HOWTO: New Unit Creation

Hey,

Can you explain more about what an FBX file is? My friend and I are trying to make a simple unit (a predator spy drone), and we've got it working functionally with the helicopter unit model from the game, but we'd like to make the actual mesh and textures.

So am I understanding right that the FBX file is an export of the mesh, and an animation? So I can make the mesh, and any animations in whatever 3d program, export as an FBX file and it'll be able to be imported into the game? Sorry if this is a very noobish question, just trying to wrap my head around the process you've outlined.

If you have any recommended tutorials on this process that'd be much appreciated.

Thanks,

David

PS I'm experienced in using Maya so I should be able to physically make the mesh, textures, etc, once I get going, just never tried to use it to mod a game before.
 
BOOYAA! Civ 4 unit conversion proved in rather spectacular fashion even if I do say so myself... check out the shadows...

Spoiler :





Did someone say DLC?

(If you're wondering, this is a half-completed project I had lying around for Civ 4 to make flying versions of the dragons. I only have an idle animation so far, but I thought it would make an impressive test for Civ4->Civ5 conversion.)
 

Attachments

  • dragon1.jpg
    dragon1.jpg
    92.9 KB · Views: 4,585
  • dragon2.jpg
    dragon2.jpg
    96.6 KB · Views: 1,416
  • dragon3.jpg
    dragon3.jpg
    110 KB · Views: 52,913
  • dragon4.jpg
    dragon4.jpg
    96.7 KB · Views: 1,391
Can you explain more about what an FBX file is?

FBX is just a file format like any other - as long as your 3D software of choice can export to this format then you can get your own models in the game. If Maya doesn't have it built in, then you'd definitely be able to download a plugin if you just google for "Maya FBX export". But to be honest, I'd put money on it being built-in.

So, having built, textured, and rigged your model, just export to FBX and then follow the instructions in the first post :)

The only other thing is you'll need your textures to be in DDS format. You can get plugins for Photoshop and other packages which will save in this format.

@Deliverator: :goodjob: awesome!
 
Thanks, if it's that straight forward I'll give it a shot tomorrow. Thanks for the tutorials guys, really useful!
 
WOW guys.. just WOW. Can't wait to see what people are going to do with this. Great work. Now if only I knew how to create 3d art heh.

On a side note that Privates game looks hilarious.

Again, Great work guys.

Looking forward to your civ4 conversions Deliverator.

Cheers.
 


Well his head seems to be facing the right way and at the correct level . but not the rest of the body. It also crashes the game. :sad:
 
Well his head seems to be facing the right way and at the correct level . but not the rest of the body. It also crashes the game. :sad:

You know, this might be easier if you just send me the MAX file and I'll take a look :lol:

my email is captain [dot] binky [at] gmail [dot] com
 
NEW TOOL!

ANNOUNCING:

IndieStone Nexus Buddy!

DOWNLOAD HERE: http://www.theindiestone.com/lemmyandbinky.com/civ2/IndieStoneNexusBuddy.zip

New experimental version of the Material Maker. It's now called the 'Nexus Buddy' as it's much more than a material maker! You can now make new units without EVER LOADING NEXUS. Weee! (well not strictly true as it's interacting with Nexus on a code level)

New features:

* You can now import directly from an FBX file! When you open a file, click the drop down to select FBX as the file type, and select an FBX and it will import automatically!



You want your FBX file and ALL dds textures you plan to use on your materials all together in a work directory. This is all you need.

* You can define the animation definitions inside Nexus Buddy! Set them up in the same way as you would in Nexus. The first anim you define will automatically gain every event code used to create units, so you can create one anim definition and go with it. Then you can take them off this anim in the property window as you add new anims. It will save these anim definition and load them whenever you load up your source gr2 file or reimport the FBX file, so you don't have to keep typing them whenever you make changes.



* The biggie. Assuming you have your FBX and associated dds textures in one place... Once you've imported it, set up your materials and added the anims. Click the 'Smart Exporter' tab to find....



BAM!

Just click 'Export' and in the directory your source FBX file is you'll get a subdirectory called 'export'

In it...



All the files you need for your model, all the animations, all the textures, and a fully made fxsxml file set up for all your anims, the state machines, anim graphs and anim triggers.

Just drop these into your Art folder of your mod and add your own civ5artdefines_unitmembers.xml and that's ALL you have to do. New unit, in there!

Furthermore you can always reload your source gr2 (the one in same directory as your FBX) and change the animations / materials, or reimport the FBX. Although currently you'll have to recreate your materials if you reimport from FBX, all your anim definitions will still be there, so you can reexport to your heart's content and tweak the anim definitions to suit.

Have fun!

Will update the tutorial with the 'fast way' which cuts out a lot of the steps sometime soon. Tomorrow I may try and do some kind of automatic new unit XML generation, perhaps even have it make a ModBuddy project if you want it to. See how many of those steps we can get rid of :) also we're going to look into getting a leader in the game soon, so will be adding Leader support to this then.
 
Just drop these into your Art folder of your mod and add your own civ5artdefines_unitmembers.xml and that's ALL you have to do.

Correct me if i'm wrong ,to do a fresh new unit,you need to modify Units.xml and some other files,in order to use it in game,right?
 
NEW VERSION:

http://www.theindiestone.com/lemmyandbinky.com/civ2/IndieStoneNexusBuddy.zip

So I added complete unit creation ability, XML and all, to the Nexus Buddy tool:




Which allows you to edit most of the unit details, both the art details and the actual unit's stats and such. It all generates sensible values for class types and unit names based on the model filename and such. You don't have to change a single parameter and you'll still get a unit in-game out of it. The default parameters of the unit are mostly equivelent to a warrior.

Click export with all default settings, not typing in a single value, and it generates this in the export directory:



Drag the tree into ModBuddy:



Remember these were generated by the tool. Apart from importing the FBX, adding an animation definition (one click), and creating a material (a few clicks), I've done nothing but export it.

Now add the UpdateDatabase Action in the Action tab of the properties:



Tick the 'Reload Unit System' tickbox in the main properties.

Build and run the game and:



Hurrah! That's a unit from FBX to in the game without touching a single line of XML. :)
 
I 'll do :)
I successfully added a unit from Civ IV !!!
I still have a problem to solve : My units are too little (they're as little as ants!)
It's funny,i can see them running on the floor :D
How can i solve that?

Ps : Thanks you for what you do for us :)
 
lemmy101 said:
Remember these were generated by the tool. Apart from importing the FBX, adding an animation definition (one click), and creating a material (a few clicks), I've done nothing but export it.
...
Hurrah! That's a unit from FBX to in the game without touching a single line of XML. :)

Amazing lemmy. The rate you're cranking these tools out is phenomenal! I should be able to do a Civ 4 conversion guide on the weekend (unless someone beats me to it). You'll probably have gone through another 6 iterations of the tool by then!

Edit: By the way could you add something to kick off the 3D Viewer from your tool? Would be handy.
 
I 'll do :)
I successfully added a unit from Civ IV !!!
I still have a problem to solve : My units are too little (they're as little as ants!)
It's funny,i can see them running on the floor :D
How can i solve that?

Ps : Thanks you for what you do for us :)

Had the same issue with the dragon. I had to up the fScale from 0.14 to 12.5. Civ 4 units are scaled much smaller it seems.
 
Top Bottom