General Category > AI War II - Modding

Modding format questions and process questions.

(1/3) > >>

Cyborg:
What format does my ship need to be exported as, as a model?

Draco18s:

--- Quote from: Cyborg on February 16, 2017, 06:45:47 PM ---What format does my ship need to be exported as, as a model?

--- End quote ---

Likely OBJ or FBX (and both might work), although imported into Unity, then exported as an asset package.

It's the "import it into Unity, then export it again" bit that's important.

eRe4s3r:
I am also kinda confused how we could Import our own ship models, usually with unity the way is to edit asset files directly, but surely this is not how it's supposed to work, right? But FBX works definitely to get it into Unity, it's literally drag and drop. But the real question is how we then get our ship that we put into a unity project in Unity "free" exported and referenced in the actual game.

Cinth:

--- Quote from: Cyborg on February 16, 2017, 06:45:47 PM ---What format does my ship need to be exported as, as a model?

--- End quote ---

I would suspect any format that Unity can process.


--- Quote from: eRe4s3r on February 17, 2017, 05:39:07 AM ---I am also kinda confused how we could Import our own ship models, usually with unity the way is to edit asset files directly, but surely this is not how it's supposed to work, right? But FBX works definitely to get it into Unity, it's literally drag and drop. But the real question is how we then get our ship that we put into a unity project in Unity "free" exported and referenced in the actual game.

--- End quote ---

Adding models and processing them for the game is surprisingly easy.  Stick your FBX in a folder (probably in a folder dedicated to mods and stuff, I don't know?) and start up Unity.  Do some stuff there and that part is done.  All the referencing is done through the XML.  I'd screenshot a ship definition so you could see it but I'm not sure about what I can and can't post.

x4000:
Regarding model import, basically what will happen is this:

1. There's a separate unity project completely unconnected to the main AI War 2 project, which I'll post.  This will be called something like AIWar2ModderProject or something.

2. You download that thing, and put your files in there.  If your local copy of unity can read it, then that's all that is needed; internally unity will store it in its own style.

2.a. As one example, for you to use blender files in unity, you have to have blender installed.  Unity can't do that without blender installed.  But you only need blender on YOUR machine, I don't need it on mine and nor do players use it.  We're just talking about what is needed to get into "unity internal format."

3. You'll then mess with your files in unity as much as you want, setting things up.  There are some scripts of mine you'll need to attach to it to do things like set up your own LODs, and to say how your textures link up with your model (using what shader, etc).  I will have tutorials on all that (and actually a lot of them are already up, albeit aimed at Cinth.

4. When happy, you hit "Build Asset Bundle" from an Arcen entry on the toolbar at the top of unity.  It will then take your textures, sound effects, meshes, and so forth and put them into one big file that has them all in there together.  You should name this something like CyborgsMods.assetbundle or whatever, so that you're sure it doesn't conflict with anyone else's bundle.  Don't have something generic like ModPackage1, because then some other modder might use the same thing.  Similarly don't date the asset bundle in its name, because most likely for future versions you'll just replace the existing bundle.  There's no benefit to you having more than one asset bundle for yourself, ever.  Unity can read out of it piecemeal as-needed.

5. Then you put that asset bundle, and its manifest file (also generated in step 4) into a specific subfolder in the AI War 2 project itself.  If you open up the manifest file in a text editor, it shows you all the "files" that are inside it.  If some aren't in there that were supposed to be, then you can fix that and regenerate the bundle.  That happens sometimes, if you forget to say "I want this in the bundle."

6. Then you make a copy of some xml files with ship stats, and call it something like CyborgFleetShips.xml or whatever.  You either set up your own custom ship there, with links to the same "filenames" that are in your manifest file (and a note saying which bundle file to load this from), or you simply swap out the art for one of our existing ships.  If you do it in your own custom file, it won't get overwritten when we update the game, even if we change our own underlying models or the ship stats, etc.

7. As far as the ideal formats for Unity goes, I would definitely say FBX.  That's a bit more consistent of a format than obj, and doesn't require any extra software like blend files do.  I think it can also read 3ds files, but I'm not sure.  I haven't tried.  I definitely cannot read max files or similar.  Almost every graphics program is able to export to either fbx or obj, via plugins at worst, so it's a nice thing to do.

Navigation

[0] Message Index

[#] Next page

Go to full version