[UNIT] Need help configuring some of Snafusmith's old models

AzraelZephyrian

Chieftain
Joined
Apr 11, 2019
Messages
73
Hey all.

I just got into modding; I've made a few (as yet unpublished due to simplicity) small mods, and I decided to try to build a unit pack using Snafusmith's skins and models. Unfortunately, while I've figured out basic XML, how to change a unit's stats/promotions/class etc., I haven't figured out how to handle 3D models like the ones Snafusmith made.

If someone could take a glance at the files, tell me roughly what needs to be done to make 'em work, and recommend a template mod that I might look at for reference, that would be fantastic.

Thanks guys!

Moderator Action: Welcome to CivFanatics. Moved this thread to the main C&C forum as that is where questions belong. Good luck with your mod work. leif
 
Last edited by a moderator:
The easiest way to do this is to find a mod using the models you like (or similar models) - the use the unit definitions they do.

Generally speaking, you need to define the unit (most people do this in XML for simplicity, although many of JFD's units use SQL - which can be greatly streamlined if you're adding multiple units in the same file). These definitions are basically database updates that add the elements the game engine needs to properly understand the unit.

You'll also need what most modders call an, "art defines" file. These are the instructions to the game engine on how to employ the 3D models.

Many of my mods use Snafusmith's mods, so they may be useful to get you started: https://forums.civfanatics.com/resources/smans-the-world-at-war.27142/

One more thing to add: if some of the units look like they're firmly planted nose-down into the ground, it means you'll need to also use the modified animation files. Many of Snafusmith's, Wolfog's, and Danrell's models require these files as well. I can't find the direct download to these animation files, but all of them (plus modified animation files from other modders) are located in that World at War mod:

\\ART\Common\

IIRC, most of Smitty's models use the files in the 'EditedAnimations - AIM' folder, but be sure to include any modified trigger files as well. You will be able to know what files to include by looking at the model's .fxsxml file (always included in the model). This file specifies which animation files are required (ending with a *.gr2).

The modified animation files always have '_aim_' somewhere in their name. There are two folders in the WAW mod ART\Common folder - AIM and MS. I think the MS files generally deal with new ships, while the AIM files deal with everything else. But that's not 100.0000% correct all the time. It's why I included all of the files in the mod - just to be sure they were there.

The model's .fxsxml file also defines the specific trigger file the model requires (instructs the game engine how to perform animations associate with the unit). Generally speaking, a reference to a trigger file in the .fxsxml file will look like:

FX_Triggers_Fighter.ftsxml

That's standard Civ5 notation. Modified trigger files look a little different, with additional characters to denote a mod, modder, etc.:
edited_fx_triggers_Katyusha.ftsxml
fx_triggers_WAW_CW_predator.ftsxml
fx_triggers_M3A1HT.ftsxml

etc. The last one is obviously a new (non Civ5 standard) trigger file, since there's no M3A1HT unit in the game.

I know it may sound complicated, but it's really not. Just find a mod that uses a model you like, then grab the file that defines the database changes and the file that defines the animation data required. Sometimes, if you're lucky, they're in the same file - which greatly simplifies you mod's code and mod maintenance.

I only include the lengthy discussion on the modified animation files so you'd be on the lookout for them, and know how to add them to the mod if you're units don't appear, the mod crashed the game, etc. It takes almost no effort to crash the game when dealing with unit animations. So, don't be too worried if you run into a few until you get the hang of it.

One more thing to add - you may need to clear the game cache more often than usual when adding units. For example, if you're building a unit/mod several times, with a few changes, sometimes the game doesn't quite get all the changes and you'll be testing version B of your mod (in your mind) while the game is serving up version A. It often helps to exit the game entirely between builds as well. For example, if your model has a Knight with red trim and you want to change it to blue - no problem. But if you don't force the game to reload the textures in memory (i.e. exit the game then come back in), the game will use the buffered version of the file, so the Knight remains red until restart.

Lots of little ankle biters involved with adding units to a mod, but again, after you build a few, you'll amass a library of working unit prototypes that you can quickly adapt to new mods and models. Generally speaking, once you have a working Bomber model, it should be a straightforward task to add the next model using the same DATABASE code. Handling the Art Defines portion takes a little more art and finesse.

But still, hang in there and keep rebuilding through the crashes. When you're done, you'll have a mod that remakes the game in a way you think best. And that's a pretty good feeling, especially as it will introduce you to a huge community of players who really will surprise you with the quality of suggestions/complaints/etc. - and they're more than willing to work with you to make your mod and vision even better...

And when you hit a brick wall, the community here is pretty dang good at offering solutions to cut your solution time from days/weeks to minutes/hours. Basically, any problem you encounter, someone here has already encountered it and knows how to fix it.

Good luck!
 
Ah it's the famous sman. Thanks a bunch. I'll give it a shot. Do I have permission to steal some code from WAW for art implementation? That's the bit I'm a bit confused about.

I'm also gonna try just making some of my own models with nexusbuddy et al. Seems like it would be a useful intro, as there are step-by-step guides--if a bit outdated.
 
And possibly a few models. If the answer is no, that's fine. I may use them for personal games though, in a dieselpunk mod.
 
Ah it's the famous sman

My mother always said I was infamous... :crazyeye:

Seriously, you certainly have my permission to use anything in my mods - even without asking:

https://forums.civfanatics.com/threads/the-modiquette.473030/

I think the important thing is to make sure you give credit somewhere in your mods. And as for reusing my content? Heck, so much of mine is plagiari..., er, recycled from other mods, it's probably more fair to let me know what you're using, so I can send you the name of the modder from whom I originally grabbed the content.

As far as building original models using Nexusbuddy? Wow! I wish you good luck! I tried that for a few, very frustrating days, and eventually just gave up. There are probably less than 20 people on the planet with the ability to build new models from scratch using this bizarre concoction of tools. The more I tried to do this, the more I realized just what gods Smitty, Danrell, Wolfdog, Bernie14, Nutty, et al, truly are... I'm sure there's room in that pantheon for one more, though!

If you just want to recolor existing models (something I've done a lot), you just need a .DDS editor (I use Gimp2 - it's powerful, yet free...) - it's easy to change the looks within the file, but you can't change the location of anything in the file (i.e. add a hat to a bare head). The models splice and dice that file to get the textures the slap onto the model, based on the original design. Again, recoloring changes are trivial, compared to the gargantuan challenge of new models.

Good luck!
 
I agree, attribution is important. And yep, I've seen your work ripped off without credit given a few times... >.<

Hmm. Well, it may be harder than I expect lol. One thing I have going for me is that I have experience with texturing (in simpler games like minecraft), graphic design, 3D modelling (though not blender), and stop-motion/gif animation (e.g. I, when of ten years age, made an animation of a trebuchet firing in GIMP...). I figure the skills are somewhat transferrable. Maybe. Dealing with nexus and co is a pain in the UNIT_ASSYRIAN_SEIGE_TOWER though. We'll see how it goes.
 
Is voxpop required to use the animations and models from WaW? (I'd assume that voxpopuli.sql is in compatibility for AI reasons?)
 
Last edited:
VP is NOT required. The compatibility script adjusts WaW database settings so it is balanced to play correctly with VP enabled (mostly adjusts unit strengths/stats, and some tech adjustments). It's more of an afterthought, and isn't required for anything concerning the units/models.
 
@Sman,

Here's a link to a (really badly balanced but not terribly buggy) version. It's me firs' mod, so...well it requires some work.

Features:
  • f-ed up tech placement because I made it for the industrial eras mod--I'l make a version soon with normal techprereqs.
  • most interesting unique units now playable
  • Foxhole fortifications (land-claiming and non-land-claiming) can be built by a number of combat units.
  • Some cool new units (mostly pilfered models from WAW). Some units based on civil war scenario art as well. Retextured a few stock units, and one of the WAW units (the latter, the bombard (based on the field artillery) is custom-textured).
  • Range extension of anything that one would naively expect to be able to shoot things (forex, tanks).
  • Volley-type units (e.g. machine guns, "mobile forts" (early tanks)) that can lay down up to 3 (might be 4, can't recall) ranged attacks.
  • Snipers!
  • A variety of different types of artillery/field guns with different strengths an weaknesses.
  • AI that is oblivious to the fact that the mutli-attack units are often meant to weaken an entire line of enemy units, rather than to kill one in particular.
  • The ability to place citadel-like (without culture bombing) improvements pretty much anywhere (removable).
  • Minor balance problems--not too bad actually. I tested the mod today on quick, and (as always) was about 3 eras ahead. I invaded "Great America" (trump mod), which was in the early medieval era. It was a rout, but not to such a degree that I believe any one unit to be unbalanced or broken.
  • Lack of text infos. And unique art infos. Will work on this soon. After I work on everything else.... eventually....:rolleyes:


https://www.dropbox.com/s/ktmsri547zknq1b/EEUVT EXPANSION (v 6).civ5mod?dl=0

There's a file that references the unltimateras mod. It'll probably just get blocked by the xml processor, but if not, it's relatively clearly labeled (although the files are a mess).

Newer, better, less finicky version:
https://steamcommunity.com/sharedfiles/filedetails/?id=1714075544
 
Last edited:
My mother always said I was infamous... :crazyeye:

Seriously, you certainly have my permission to use anything in my mods - even without asking:

https://forums.civfanatics.com/threads/the-modiquette.473030/

I think the important thing is to make sure you give credit somewhere in your mods. And as for reusing my content? Heck, so much of mine is plagiari..., er, recycled from other mods, it's probably more fair to let me know what you're using, so I can send you the name of the modder from whom I originally grabbed the content.

As far as building original models using Nexusbuddy? Wow! I wish you good luck! I tried that for a few, very frustrating days, and eventually just gave up. There are probably less than 20 people on the planet with the ability to build new models from scratch using this bizarre concoction of tools. The more I tried to do this, the more I realized just what gods Smitty, Danrell, Wolfdog, Bernie14, Nutty, et al, truly are... I'm sure there's room in that pantheon for one more, though!

If you just want to recolor existing models (something I've done a lot), you just need a .DDS editor (I use Gimp2 - it's powerful, yet free...) - it's easy to change the looks within the file, but you can't change the location of anything in the file (i.e. add a hat to a bare head). The models splice and dice that file to get the textures the slap onto the model, based on the original design. Again, recoloring changes are trivial, compared to the gargantuan challenge of new models.

Good luck!


You were right. Making new models--even based off of existing skeletons and animations--is a titanic task. I finally got it working though--mostly, aside from the myriad of graphical glitches I need to iron out once exam season has mercifully flown overhead.


Based on the T95 from the mod "tank pack".

Checklist of newb graphics problems:
  • Awful texture on modified parts
  • Some pieces are not textured at all
  • Normals are inverted on pieces of the mesh
  • Updated skeleton without updating corresponding animations, so the puff of fire discharges some meter-and-a-half from the end of the barrel
All in all...well...it's...special.
 
Hmm. I looked at the model in blender, and the normals are fine. No idea what's going on with the sections of track-cover (and the back of the turret on the front) without visible texture.
 
Back
Top Bottom