Creating new units with mixed models

I'm assuming that the Warg has smoother animations than the Wolf, due to using the Lion animations instead of the Wolf ones... so would it be possible to modify/rig the Wolf to use the Lion animations file?
 
I'm assuming that the Warg has smoother animations than the Wolf, due to using the Lion animations instead of the Wolf ones... so would it be possible to modify/rig the Wolf to use the Lion animations file?

Yes, I could skin the Wolf over the lion animations (provided they are not also "problem" animations). Nutty mentioned using the Warg itself but it never occurred to me to simply use just its animations. Thanks for the idea! :goodjob:

I will still try to resolve the present wolf animations because that will determine whether or not it will correct other "problem" animations or not. But, if that fails - we can use lion animations instead. You will lose the howl fidget, but....
 
Yes, I could skin the Wolf over the lion animations (provided they are not also "problem" animations). Nutty mentioned using the Warg itself but it never occurred to me to simply use just its animations. Thanks for the idea! :goodjob:

I will still try to resolve the present wolf animations because that will determine whether or not it will correct other "problem" animations or not. But, if that fails - we can use lion animations instead. You will lose the howl fidget, but....

Are the Lion animations part of the base game? I know that DarkScythe is pretty keen on the howl fidget, so he may not want to lose that... but if the Lion animation is part of the core game, then he could at least mix reskinned Wolves (using Lion animations) with Wolves using the original Wolf animation to get his mixed units, as well.

Still, as you say, if you can solve the issues with the present wolf animations it's likely the best solution... so good luck!
 
No, both the wolf and lion were imported from Civ4.

FWIW, the Wargs are fine (though the formation needs to be tweaked at that scale). I guess I got unlucky with the first few I picked to check; the last few have been OK.

EDIT:
It's still a small sample size so far:

BAD: Wolf, Scorpion, Highlander
GOOD: MacTruck, Dreadnought Mechs, Slaver, Warg

I imagine the lion is probably OK as well...
 

Attachments

  • wargs.png
    wargs.png
    121.3 KB · Views: 110
Dreadnought Mechs?
From Skajaquada's [vaporware] WH40K mod.

Note this was prior to NexusBuddy 2, so all the old ones aren't necessarily bad. I haven't tried any of danrell's edited_animations...
 
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:.

Hum, okay. Thanks for clearing that up, though! I think I'm starting to understand somewhat why the incompatibilities exist. Having to create animations from scratch does indeed sound like a pain, so it probably wouldn't be worthwhile, I imagine.

Nutty's list is slightly confusing me again, though, but it does feel like we're starting to come up with a nice reference list of sorts for others who want to use these units.

Are the ones listed as "GOOD" the ones that use stock animations, and are therefore, easily mixed together, while the "BAD" ones contain custom animations and can't be mixed?

Also, if the Lion was imported from Civ4 just as the Wolf was, wouldn't that also mean it would be using non-standard animations? (Apologies if I'm misunderstanding again.)

Finally, I've started looking at the fxsxml and ftsxml files. Dear God those event codes in the ftsxml files are a mess. I just spent some time re-sorting all the event triggers according to their event codes for the Warrior, Scout, Rifleman, and Horseman (so that I'd have a good variety to compare) and noticed two things:

1) They all have a bunch of event codes in common, but some units also have some codes that are unique to them (Rifleman has 3200, Horseman has 2440, all 4 have 2200)
2) In comparing against the event codes defined in the fxsxml file, there are a lot of "missing" codes.. (No one has 1000, for example.)

My question is.. when I'm trying to rebuild these trigger files, is it necessary to find a match for every event code defined in the wolf model's fxsxml, or is it only necessary to find one match within each animation set?

Further, after sorting these, I looked at what event codes were linked to the "TORCH" entries.. and it seems it spans 2 event codes -- 1160 and 1180 -- which are absent form the Rifleman (which makes sense, as they just shoot the city with their rifles.)
I suppose I am safe in simply removing everything for event codes 1160 and 1180 (which includes some stuff not labeled as having to do with a torch) since the Wolf's fxsxml makes no reference to either event code?

Edit:
Also, Nutty, if you want, I can update my OP with your findings on the GOOD/BAD list, I think.
Eventually you can probably use that to make a master list if you were intending to do that.

Edit2:
Nomad or What - In reading your guide, I saw you say this:
The first item of importance is that they each have a unique &#8220;id&#8221; attribute; to be more precise, every trigger in the <triggers> element must have a unique &#8220;id&#8221; attribute.
But, in looking at the ftsxml file I just sorted for the Warrior, I see this:
Code:
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="1" event="AS3D_UNIT_WARRIOR_BAT_AMB_T1_$(WEAPON)" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="2" event="AS3D_UNIT_WARRIOR_BAT_AMB_T2_$(WEAPON)" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="1" event="AS3D_UNIT_WARRIOR_BATTLE_AMB_VOX_T1" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="2" event="AS3D_UNIT_WARRIOR_BATTLE_AMB_VOX_T2" bone="" />
All of them have the same 'id'..
 
EDIT:
It's still a small sample size so far:

BAD: Wolf, Scorpion, Highlander
GOOD: MacTruck, Dreadnought Mechs, Slaver, Warg

I imagine the lion is probably OK as well...

Lion should be OK, Warg uses its animations directly (I made no animation modifications).

The fact that the Scorpion doesn't work is further confirming my suspicion that the animations were imported incorrectly. I did the scorpion (it was my first custom animation unit) and when I was creating the animations I incorrectly reapplied a .br2 overwrite and saved as a normal .gr2 instead of as an animation. The same static image appeared in Nexus as it did with the wolf. I was always thinking about correcting the animations but didn't see the need since they appeared fine in game - until now.

I will bump this up as highest priority and let you know the results shortly.
 
Nutty's list is slightly confusing me again, though, but it does feel like we're starting to come up with a nice reference list of sorts for others who want to use these units.

Are the ones listed as "GOOD" the ones that use stock animations, and are therefore, easily mixed together, while the "BAD" ones contain custom animations and can't be mixed?

No; all stock (i.e., existing CiV animations) work fine. Some custom (i.e., imported) animations DO work properly and some DON'T work properly.

Finally, I've started looking at the fxsxml and ftsxml files. Dear God those event codes in the ftsxml files are a mess. I just spent some time re-sorting all the event triggers according to their event codes for the Warrior, Scout, Rifleman, and Horseman (so that I'd have a good variety to compare) and noticed two things:

1) They all have a bunch of event codes in common, but some units also have some codes that are unique to them (Rifleman has 3200, Horseman has 2440, all 4 have 2200)
2) In comparing against the event codes defined in the fxsxml file, there are a lot of "missing" codes.. (No one has 1000, for example.)

My question is.. when I'm trying to rebuild these trigger files, is it necessary to find a match for every event code defined in the wolf model's fxsxml, or is it only necessary to find one match within each animation set?

Further, after sorting these, I looked at what event codes were linked to the "TORCH" entries.. and it seems it spans 2 event codes -- 1160 and 1180 -- which are absent form the Rifleman (which makes sense, as they just shoot the city with their rifles.)
I suppose I am safe in simply removing everything for event codes 1160 and 1180 (which includes some stuff not labeled as having to do with a torch) since the Wolf's fxsxml makes no reference to either event code?

Edit:
Also, Nutty, if you want, I can update my OP with your findings on the GOOD/BAD list, I think.
Eventually you can probably use that to make a master list if you were intending to do that.

ALL units with animations have event code 1000; it is "IdleA" and applies even to static objects as a placeholder.

Rifleman has 3200 due to (I suspect) a Firaxis mod that uses the Rifleman triggers file; it is the equivalent of "DeathC" (DeathA is 1200, DeathB is 2200).

Each event code can have several sounds, effects, transfers, or combinations thereof. For example, a city attack typically uses 5 sounds, 1 effect (the torch), and 1 transfer (directing the torch towards the city). Some event codes are only sounds, and some event codes have no sounds or effects and aren't listed in the .ftsxml file at all. So, you do not need to match event codes between the two files, only those events where you wish to use a trigger of some sort.

Whenever a bone is mentioned in the .ftsxml file, it has to match a bone that exists in the model (the tutorial explains how to find this) and must be referenced in the .fxsxml file.
 
Hmm, okay, I don't really know about those "hidden" event codes. (I can only go by what I see in the files here.)

That said, let me see if I have understood this properly:

The Wolf model has, among others, defined event code "1000" for its idle animation. Because every unit has this by default, I do not need to find any other event code for this in my "custom" ftsxml file.

As well, since the Wolf's "Strike A" seems to call event codes 1100, 1160, and 1180, with the latter two being used for City Attacks, would I simply leave the one entry for 1100, which all 4 units have, and simply delete 1160 and 1180, or should I essentially copy 1100 into the 1160 and 1180 event codes?

Finally, for the Wolf's "Run" animation, it uses event codes 1120, 1140, and 1400, which all 4 units I've checked have, but it also uses 1440, and 2440 which appear unique to the Horseman (at least in the 4 files I've checked; probably applies to all mounted units?) In this case, should I only choose one (such as 2440) and remove the others, or should I have one of the "common" ones, and one of the "unique" ones?

Sorry, I'm still trying to wrap my head around all these event codes..
 
Hrm.. okay.. but now things are getting a bit confusing when I have codes (such as for running) which exist in both the Warrior and Horseman files, but there also exist unique event codes, and the wolf model fxsxml seems to reference all of them..
 
Hrm.. okay.. but now things are getting a bit confusing when I have codes (such as for running) which exist in both the Warrior and Horseman files, but there also exist unique event codes, and the wolf model fxsxml seems to reference all of them..

You have to realize that the wolf .fxsxml file was created uniquely from something else so it may have errors. Maybe it uses horseman event codes with rifleman triggers and warrior animgraphs - I don't know. The best thing to do is to use stock .fxsxml files and their corresponding .ftsxml files and tailor them to your needs. What has happened in the case of the wolf is that there are only 10 custom animations; CiV stock units have 18 or more. So, where an animation didn't exist (e.g., DeathB) an existing wolf animation was substituted for it (so the wolf "die" animation now uses two event codes: 1200 and 2200). Similarly, horseman units not only have run, shuffle, and charge but also turn left and turn right. The wolf only has a "run" animation, so all 5 of these event codes have to be applied to the wolf "run" animation.
 
But, in looking at the ftsxml file I just sorted for the Warrior, I see this:
Code:
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="1" event="AS3D_UNIT_WARRIOR_BAT_AMB_T1_$(WEAPON)" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="2" event="AS3D_UNIT_WARRIOR_BAT_AMB_T2_$(WEAPON)" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="1" event="AS3D_UNIT_WARRIOR_BATTLE_AMB_VOX_T1" bone="" />
    <trigger type="FTimedTriggerSound" id="63" time="0" duration="1" repeat="0" ec="1140" track="1" tier="2" event="AS3D_UNIT_WARRIOR_BATTLE_AMB_VOX_T2" bone="" />
All of them have the same 'id'..

Yes, true. They are alternate sounds (AMB_T1 & AMB_T2, VOX_T1 & VOX_T2) for the same action (note that one is tier="1" and the other tier="2"). I am not certain but I think it has to do with which path the AnimGraph chooses (if you look in Nexus at a sample AnimGraph it has an input/output matrix that is randomized each time). So, yes, you can use the same "id" if you know how the mechanics work. I don't, so if you ever figure it out please let me know :). That is why I say, for the sake of a basic tutorial, to apply a unique "id" to each trigger in order to avoid potential mismatched sounds or effects.

EDIT: Sample Worker AnimGraph (.dge Data Graph file)
Spoiler :
 

Attachments

  • AnimGraph.jpg
    AnimGraph.jpg
    229.6 KB · Views: 156
So.....is THIS what you were trying to do???



As I suspected from the results of Nutty's testing, many of the earlier animation conversions were done incorrectly (including some of mine :blush: ). I converted the source .kf files from Civ IV and now the animations are functioning as they should.

:goodjob: Thanks Nutty for doing all of the testing! Now, I have to fix my scorpions and a couple of other units I created wrong....

EDIT: Attached are the files that need to be swapped out. They are:

1) .gr2 animation files (they have new names, so be careful!)
2) .gr2 model files
3) .fxsxml files
4) .ftsxml file (same for all models)
 

Attachments

  • Wolf_pups.jpg
    Wolf_pups.jpg
    259.4 KB · Views: 175
  • Wolf.zip
    139 KB · Views: 51
Not meaning to hijack this thread, but the scorpion animations have been updated. The new files can be downloaded from the scorpions thread. I haven't tested a multi-model unit in game, however, so let me know if they don't work.
 
Wow, this is some amazing progress.. and swift, too!

As I said, you guys are the experts here. :p
I finally finished my recolor/retexture of the Wolf, and I think it's about as good as I can get for now, since the model itself doesn't have much detail to work with.

I need to get back and finish mucking about with the ftsxml files, but that'll probably be for tomorrow.. complicated code and 2:30 in the morning is never a good combination. Nomad or What: I'll try to digest your explanation a few posts earlier in the morning.. haha.

That said, thank you so much for your work!
I can't really tell from that screenshot, but I assume there are 2 different wolf models there working alongside each other. Annoying because both of them are very dark (I used a dark one, a light one, and a brown one.) However, this is wonderful news. I am very excited to try and get everything together now with proper unit variety.

Do I need to change anything with the files you provided?
I wasn't entirely sure how to change stuff, since I'm not sure if everything was handled via those text files, or if there were stuff directly attached in the gr2 model files that also needed to be changed. (I briefly loaded a couple models in NexusBuddy2 and saw that it had a dds file attached to it, in addition to being listed in the fxsxml file.)

That said, if you guys like and/or don't mind, I'll update my OP for this thread with your conclusions, and Nutty's earlier list and your link to the updated Scorpions for easier visibility.
 
I just got around to testing it, and I am amazed at how quickly you guys found the problem, and fixed it, all while preserving the Howl animation at the same time!

Everything appears to be working great, and the animations feel a little less jittery, although there seems to be a slight issue with the idle animation's looping -- not a big deal, though.
I also noticed the ftsxml file you provided used many sounds from Barbarians; Was this intentional, or simply a template you have?

Otherwise, the Wolves no longer have gunpowder-filled snouts, and no longer call down the wrath of the heavens, AND I have diversity in the unit groups -- this is amazing! The only issue I've found so far is that the City Attacks, although they no longer call in flaming arrows from out of nowhere, still appear to be "stuck" trying to wait for them, and the units will be continually attacking the city for upwards of 10 seconds or so before the game appears to give up, and just updates with the damage numbers.

Perhaps we need more than just the Sound triggers for event codes 1160 and 1180?
 
I just got around to testing it, and I am amazed at how quickly you guys found the problem, and fixed it, all while preserving the Howl animation at the same time!

Everything appears to be working great, and the animations feel a little less jittery, although there seems to be a slight issue with the idle animation's looping -- not a big deal, though.
I also noticed the ftsxml file you provided used many sounds from Barbarians; Was this intentional, or simply a template you have?

Otherwise, the Wolves no longer have gunpowder-filled snouts, and no longer call down the wrath of the heavens, AND I have diversity in the unit groups -- this is amazing! The only issue I've found so far is that the City Attacks, although they no longer call in flaming arrows from out of nowhere, still appear to be "stuck" trying to wait for them, and the units will be continually attacking the city for upwards of 10 seconds or so before the game appears to give up, and just updates with the damage numbers.

Perhaps we need more than just the Sound triggers for event codes 1160 and 1180?

You are correct; I believe the .ftsxml is crafted from a barbarian warrior unit. I made it for the Tiger units I converted about a month ago. I just renamed it and assigned the respective .gr2 and .dds files in the .fxsxml's.

The looping issue is due to the length of the animations not syncing with the triggers. Since they are custom animations they are being applied to triggers that aren't designed for them, thus the lack of synchronicity. It is more apparent in some animations than with others.

If you want to eliminate the city attack lag, I believe you could just copy the sounds from the AttackA event code (1100) to those for 1160 and 1180 (see the tutorial if you don't know how to do this). I could be mistaken as I haven't tried it yet, so let me know it that works. There may be something in the city attack mechanics that we haven't figured out yet.
 
Top Bottom