Creating new units with mixed models

Yeah, I'll agree with that.. fixing stuff unnecessarily that doesn't really need to be fixed.

I do wonder though, and this is probably too much work just to test (and also outside my area of ability) what happens if you stripped out the wolves' custom animations and stuck some sort of stock animation into it instead, if that would allow you to render the subgroups again. judging by what Nutty has concluded, as well as my observation of the other mod's UU, I imagine it would work in that scenario, though.

Well, if it only allows one set of named custom animations, then simply rename the custom animations and edit the .fxsxml file accordingly for each separate skin. More of a hack than a solution, but if it works....

Also, I don't see why rigging CiV horse animations for the wolf wouldn't work - the Civ IV "custom" animations are essentially horseman animations from Civ IV.
 
Nope, it's not the fact that two units are using the same custom animations. It can be completely different kinds of units (and again, it could be just one custom animation unit and one CiV base game unit).
 
Unfortunately, I'm not quite sure how to go about this "rigging" process.. :(

I'm not sure how these work to begin with, haha. I just grabbed Civitar's files from his thread, and it came with whatever animations they had.
 
Nope, it's not the fact that two units are using the same custom animations. It can be completely different kinds of units (and again, it could be just one custom animation unit and one CiV base game unit).

Ah, in that case it wouldn't work of course. So, not being a programmer (beyond basic scripting) my solution would be to re-rig the wolf mesh/animations to that of the CiV horseman. That would solve the problem in this case from what I have gathered thus far.
 
Well, it does seem like these Wolf units have an animation that makes them occasionally "howl."
I imagine if you replace them with the horseman animations this wouldn't happen, but I'm having a tough time understand the two of you, if you mean you can or cannot have a mix of units which use a combination of custom and stock animations..

Is it all one type or nothing, or are you simply limited to having one group using custom animations, and every other group must use stock ones?
 
Well, it does seem like these Wolf units have an animation that makes them occasionally "howl."
I imagine if you replace them with the horseman animations this wouldn't happen, but I'm having a tough time understand the two of you, if you mean you can or cannot have a mix of units which use a combination of custom and stock animations..

Is it all one type or nothing, or are you simply limited to having one group using custom animations, and every other group must use stock ones?

No, you are correct; the wolf has two animations that presently make it distinct from a horseman: the fidget (howl) and attack sequences. The rest are verbatim horseman animations. So, this effectively wouldn't be an ideal approach unless you were willing to lose those animations (and I suppose they are rather vital for a wolf) or only have one group use them as suggested. It was a possible solution but far from ideal.

Ideally, of course, it needs to be determined where the root of the problem is and correct it if possible.
 
Is it all one type or nothing, or are you simply limited to having one group using custom animations, and every other group must use stock ones?
If it's one of the "problem" models, then that model must be the last one listed in the formation in the ArtDefine_UnitInfoMemberInfos table (or any following models don't appear).
 
If it's one of the "problem" models, then that model must be the last one listed in the formation in the ArtDefine_UnitInfoMemberInfos table (or any following models don't appear).

I suppose it's a good thing that I have my slaver unit last in my slavery mod, then. I guess I just got lucky that I didn't encounter this problem...yet!
 
I don't know if I should be impressed or saddened by the fact that the very first time I tried to touch any sort of custom units stuff, I run into problems that not even you guys have seen before, haha.

Anyway, thanks for that summary Nutty; so it sounds like you can only use one model with custom animations per unit, and everything else must use stock animations, if you want to go with such mixed-model units. I don't know if I can do that with the wolves since, well, the howling is pretty important for a wolf I think, and also that I have no idea what is even required in order to change those animations. I suppose this also means I can't even use multiple "copies" of the same model, and just vary the size of the groups, since they'd 'all' be using custom animations as well.

It sounds like, as Nomad or What says, unless someone can figure out and correct the root of the problem, this is essentially a wall I've run into, so I'll have to resign myself to accepting that they'll all be the same models, which isn't the end of the world, I guess.

Edit:
Actually, I have another question to ask related to units, if you guys wouldn't mind helping me out with that.

I have the units in-game now working properly (though amusing, don't give wolf units the Cavalry Charge! It makes no sense.) but I'm having some strange issues with them.
Firstly, it seems the fxsxml file for these models are set to use the trigger files for the Rifleman. I guess this doesn't matter too much, but when the wolves attack, you hear rifles going off...which also makes no sense.
I tried changing the trigger file defined in the fxsxml file to use the Warrior, and huzzah! The wolves no longer mysteriously shoot their enemies with gunpowder-filled teeth.
Unfortunately, if I change it to the Warrior, city-attack animations become weird. Specifically, the wolves appear to call down the wrath of the heavens, with giant missiles of fire shooting in from the fog of war. Highly amusing, but ALSO makes no sense.
For what it's worth, I also replaced the units' city attacks with BLUNT instead of FLAMING_ARROW, since I felt it made no sense for wolves to shoot flaming arrows from their mouths. Not sure if that was the right way to go about it, though.

Any ideas, or is the Rifleman sound simply an accepted tradeoff with using custom units?
 
Nomad: You'll be glad to know your slaver isn't one of the problem children [nor is the MacTruck]. [EDIT: So we now have some more exceptions to analyze!]

DarkScythe: I'm not sure what you're using your wolves for, but I'm not sure you want to allow a wolf pack to attack a city, anyway.

I thought WeaponTypeSoundOverrideTag on it's own would fix the sound issue...

Regardless, you can use whatever fx_triggers you like; you could even make your own. Make a copy of the warrior's fx_triggers_warrior.ftsxml and delete any line that refers to a TORCH, set the .fxsxml to refer to it, and add it to your mod, VFS=true. And, yes, set both WeaponTypeTag and WeaponTypeSoundOverrideTag to BLUNT for both types of attacks in ArtDefine_UnitMemberCombatWeapons.
 
Ah ha.. thanks for those instructions, Nutty!
That doesn't sound all that complicated, so I might be able to do it.. The problem is I'm not sure where to actually find these ftsxml trigger files.. Are they only available if you unpack the game files or something? (I've not done this.)

Would this control the sound effects that play as well?
I did wonder if I could assign WeaponTypeSoundOverride to the "City attack" definition, but no one else had it, so I wasn't sure it would be accepted. (The code is as it appears in post #4.)

As for not allowing them to attack a city, I believe Vice Virtuoso mentioned something about the units not being able to attack anything at all, or something.. Perhaps I am recalling incorrectly, though.
 
Well, it's time you unpacked the FPK's, but I've attached the warrior's fx_triggers.

Yes, the trigger file references FTimedTriggerEffect and FTimedTriggerSound, so I believe if you delete all of the TORCH projectile references (or I guess you could just blank out the event code), it should do the trick.
 

Attachments

  • fx_triggers_warrior.zip
    2 KB · Views: 47
Nomad: You'll be glad to know your slaver isn't one of the problem children [nor is the MacTruck].

DarkScythe: I'm not sure what you're using your wolves for, but I'm not sure you want to allow a wolf pack to attack a city, anyway.

I thought WeaponTypeSoundOverrideTag on it's own would fix the sound issue...

Regardless, you can use whatever fx_triggers you like; you could even make your own. Make a copy of the warrior's fx_triggers_warrior.ftsxml and delete any line that refers to a TORCH, set the .fxsxml to refer to it, and add it to your mod, VFS=true. And, yes, set both WeaponTypeTag and WeaponTypeSoundOverrideTag to BLUNT for both types of attacks in ArtDefine_UnitMemberCombatWeapons.

Nutty: That is good to know - thanks!

DarkScythe: Nutty is correct; I have found with all custom animation units that you need to modify the .ftsxml "triggers" file as well (the file is called within the .fxsxml file if you need to know the name of it). If you want to avoid any sounds or effects whatsoever just delete the call for this file and that solves the problem. However, you can keep sounds of footprints on terrain, weapon impacts, etc. by modifying the file instead. It is usually best to use a warrior or some other ancient unit trigger file for fantasy models.

There is a problem with scale that hasn't been figured out as well; units imported from Civ IV are usually 10-100x smaller than CiV units, and resizing them in Blender often wickedly deforms the animations (since many don't have a true center with the mesh they distort proportionally when modified from their original scale). So, custom units like your wolf have to be scaled in the ArtDefines instead to compensate. The problem with this is that all trigger effects scale proportionately as well, which is why you have some very ginormous torches when attacking a city :eek:. They will also seem to come from out of nowhere since the bone that defined them is named differently from the Civ IV unit bones and have not been modified accordingly in the .ftsxml file.

All of the above is defined more clearly in my tutorial here.

One more thing: when I was inspecting the wolf animations in Nexus they seemed a bit quirky to me (i.e., there was an identical but un-textured static animation present along with the animation). I am going to track down the original Nifskope .kf animations and convert them myself to see if that might correct the issue. We (meaning Deliverator, Nutty, and other brilliant minds - not me!) know a lot more about the import process now and have much better tools to import units and animations than we did when the wolf unit was converted. So, maybe re-importing them using the latest method will correct the issue.
 
We (meaning Deliverator, Nutty, and other brilliant minds - not me!)
Don't lump me in with those eggheads! ;) For the most part, I just do textures. I'm yet to complete a successful Civ4 conversion. I'm just feeling my way around just like you.
 
Thanks for pulling that file for me, Nutty!
I suppose you're right -- I should probably go figure out how to unpack those files now. It's pretty staggering how much advanced stuff I'm doing, and for my first mod, no less. Haha.

But it sounds like if I can reference all the different Trigger files, I can maybe copy and paste together sound effects between Warriors and maybe Horsemen and make something decent for a Wolf?

Nomad or What: I agree, a silent unit isn't all that much better, but I guess I'm slightly OCD about my stuff working as it is supposed to, haha. Both of you seem to indicate that the problem I experienced was definitely tied to those trigger files, and the scaling also makes sense, as I had this:

Spoiler :


As for the scale problem, and the jittery animations is something I see as well, but I have absolutely no idea how to fix it, so I had to accept it. It's technically worse for me, since in the ArtDefines for the large wolf in that screenshot, I set its scale to 8.0. It's starting to look pretty bad, considering the models are fairly low detail to begin with, and it only exacerbates the jittery animations all the more so. (I'm also working on recoloring the big Wolf model there to fit my mod's needs. That was a first attempt, but I've got quite a ways to go before it looks good.)

If you can manage to properly fix up the Wolf and smooth out its animations, I'm sure I, and potentially many others, would be extremely grateful. If I figure out any set of perfect settings for the trigger files, I can probably provide that at least.

And as far as I am concerned, you and Nutty are the experts here, haha. I don't even have a mod out yet to my name.
 
DarkScythe: Mixing the fx_triggers is a good idea, though I'm not sure that the horse footfalls are quite right.
As for unpacking the textures, there's a script that's part of Nexus (from the SDK), or you can get the 3rd party tool, Dragon UnPACKer.

As for the scaling issues, why don't you use the Warg unit instead for the big guys?
 
Ah. Well, I will see what I can come up with, if I can ever actually find the fpk that contains these trigger files, and if I can actually figure out and read those files.

I currently have Dragon UnPACKer running, though if the SDK has an option, I could do that too. I do hear something about an "Old" version of Nexus though, which I don't have, so I'm not sure if it'd still work.

As for the Warg unit -- it does look awesome, but unfortunately, that model does not look like the unit/character I am trying to emulate, which is why I'm using the Wolf instead.

There are still a lot of things for me to figure out..

I definitely appreciate all the tips and suggestions, though!
 
The old version of Nexus is needed for the old version of the 3D Viewer (because the new one doesn't work). The unpack FPK script works just fine (and that just unpacks everything).

If you're also going to mess with the user interface textures, you'll also need this tool to convert the (unusable) indexed DDS files into PNG's (which you can edit and then convert back into regular DDS files).
 
Hopefully I'll not have to mess with the UI files.. (But who knows? In the two months I've been working on this, this mod just keeps getting more complicated.)

That said, I went through Nomad or What's guide and managed to unpack all the FPK's in the resource folder, which, holy crap, it's over 2GB of stuff!

Anyway, I managed to find the fx_trigger files within that mess, so hopefully I can start looking at these triggers.

All of this stuff still feels foreign to me, though, so I hope I can understand this, and what I'm doing..
 
If you can manage to properly fix up the Wolf and smooth out its animations, I'm sure I, and potentially many others, would be extremely grateful. If I figure out any set of perfect settings for the trigger files, I can probably provide that at least.

The problem with Civ IV animations is that CiV uses several more animation transfer sequences than Civ IV did. If you look at the .fxsxml file you will see lines of code referencing AnimGraph .dge files. These are data graphs that apply animation transfers such as going from idling to fidgeting or attacking and so forth. Civ IV animations do not have these "transfer" animations present, so there is a "jittery" motion as CiV tries to transfer from one animation to another (e.g., Run to Idle). The only way to truly create seamless animations would be to create the missing Civ IV animations from scratch. That is a tremendous amount of work, as I just recently found out by creating my first set of animations making the Slaver unit.

This is the primary reason why we try to "rig" the unit over an existing CiV unit skeleton instead; this way, we can seamlessly apply the animations that a CiV unit uses and avoid the issues we encounter from using custom animations. In short, it is like the difference between a doppelganger and a Frankenstein; one is a "body double" of an existing unit and the other is breathing life into a bunch of stitched-together pieces that aren't designed for each other :borg:.

So, I may be able to fix the present animations so that the wolf units all appear together (no guarantees); however, I cannot fix the scaling issues or the jittery animation transitions without completely rebuilding the wolf unit from scratch. Sorry :sad:.
 
Top Bottom