Trouble getting the attack animation correct..

mikeburnfire

Warlord
Joined
Oct 4, 2014
Messages
156
Hey! I hate to ask, but I'm trying to get the hang of unit-creation and I'm having a spot of trouble. I'm currently trying to use Wolfdog's "War Junk" ship to behave like a UU Trireme, but it's defaultly set up to use Frigate animations:

Spoiler :


For the SQL file, I wrote:

Spoiler :


But it still uses gunpowder attacks instead of the arrows.

In the code, it looks like I'm saying, "Hey War Junk! Use everything that the Trireme is using except the model!", but something still isn't working right. Any clues to where I messed up?
 
Just make a copy of the trireme.fxsxml file [extracted from the game .fpk files] and rename it warjunk_trireme.fxsxml or something. Change the "Mesh file=" reference to the war junk .gr2 model and the "Texture file=" references for the diff and sref files to the war junk .dds textures. Now, in your art defines, set the model to warjunk_trireme.fxsxml.

Also, though it may work as-is (as SQLite is rather forgiving), as a matter of syntax, you should remove the ' ' quote marks from the scale entry, as you're representing the number 0.13 itself, not the text ".13"
 
Just make a copy of the trireme.fxsxml file [extracted from the game .fpk files] and rename it warjunk_trireme.fxsxml or something. Change the "Mesh file=" reference to the war junk .gr2 model and the "Texture file=" references for the diff and sref files to the war junk .dds textures. Now, in your art defines, set the model to warjunk_trireme.fxsxml.

Now it's completely invisible, attacks and all.

Spoiler :



(the fxsxml file is "Import Into VFS = TRUE" as well)

I have no idea where the problem could be.
 
Sorry if I was not to clear before but it is the fx_trigger_frigate.ftsxml file that you need to customize. Try using fx_triggers_trireme.ftsxml as your template and rename the bones to match the bone usage in warjunk.fxsxml. It does not mater what you change them to or if some are not used except for WORLD_center has to be changed to World, save as unique name then in warjunk.fxsxml file change <TimedTrigger file="FX_Trigger_xxxxxxxx.ftsxml"/>.

Code:
	<BoneUsage>
		<Bone name="World"/>
		<Bone name="point_PROJECTILE_35"/>
		<Bone name="point_PROJECTILE_44"/>
		<Bone name="point_PROJECTILE_28"/>
		<Bone name="point_PROJECTILE_38"/>
		<Bone name="point_PROJECTILE_08"/>
		<Bone name="point_PROJECTILE_27"/>
		<Bone name="point_PROJECTILE_20"/>
		<Bone name="point_PROJECTILE_40"/>
		<Bone name="point_PROJECTILE_29"/>
		<Bone name="point_PROJECTILE_04"/>
		<Bone name="point_PROJECTILE_23"/>
		<Bone name="point_PROJECTILE_05"/>
		<Bone name="point_PROJECTILE_24"/>
		<Bone name="point_PROJECTILE_16"/>
		<Bone name="point_PROJECTILE_18"/>
		<Bone name="point_PROJECTILE_21"/>
		<Bone name="point_PROJECTILE_33"/>
		<Bone name="point_PROJECTILE_43"/>
		<Bone name="point_PROJECTILE_34"/>
		<Bone name="point_PROJECTILE_06"/>
		<Bone name="point_PROJECTILE_25"/>
		<Bone name="point_PROJECTILE_17"/>
		<Bone name="point_PROJECTILE_41"/>
		<Bone name="point_PROJECTILE_36"/>
		<Bone name="point_PROJECTILE_52"/>
		<Bone name="point_PROJECTILE_37"/>
		<Bone name="point_PROJECTILE_19"/>
		<Bone name="point_PROJECTILE_39"/>
		<Bone name="point_PROJECTILE_22"/>
		<Bone name="point_PROJECTILE_07"/>
		<Bone name="point_PROJECTILE_26"/>
		<Bone name="point_PROJECTILE_42"/>
	</BoneUsage>
 
Okay, I moved everything into a new file to test it separate of my main mod file, but something strange has happened. My War Junk is now a Spearman. It uses Spearman animations and models. I tried to re-import everything from Wolfdog's WarJunk model files and left everything as the default Frigate, but it's still Spearmen. I made sure the SQL and XML files are updated to the database and everything else is imported into VFS. Still spearmen.

Everything was working fine in the other project file. And since everything is currently directly copied from Wolfdog's files, the problem HAS to be in my XML or SQL coding. And since the icon and civilpedia entry are working fine, that means that the problem is somewhere in the SQL coding, yeah?

In the Database log, the only clue I could find was:

[734057.260] columns StrategicViewType, TileType are not unique
[734057.260] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[734058.773] no such table: ContentPackage.LocalizedText
[734058.773] no such table: ContentPackage.LocalizedText
[734058.773] no such table: ContentPackage.LocalizedText
[734065.762] Validating Foreign Key Constraints...


So maybe this part is wrong in my SQL:?
INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
SELECT ('ART_DEF_UNIT_WARJUNK'), TileType, Asset
FROM ArtDefine_StrategicView WHERE (Type = 'ART_DEF_UNIT_FRIGATE');




I feel like the solution is right there, but I can't see it.
 
Okay, I moved everything into a new file to test it separate of my main mod file, but something strange has happened. My War Junk is now a Spearman.

Did you click the checkbox to tell the mod to update unit art/animations? I can't remember exactly which one it's called, but since you said you made a new project file it's quite possible you forgot to activate the necessary checkboxes.
 
Reload Unit System checkbox. Spearman is the default animation when the unit animation you are trying to use is not "good" in some way or other. But the most common is as Bouncy mentioned, forgetting to check the checkbox.

But the mod itself as built and sent to the mods menu is far more useful for finding oopses and other errors. whoward69's zip your mods and attach tutorial

Also, the errors you are showing from the Database.log appear to be the ones everyone always gets, and are cuased by mistakes in the base-game code as supplied and never fixed by Firaxis.
 
Ugh. What a silly mistake. Sorry-- first time messing around with unit creation! :p

Got it functioning, mostly. War Junk is currently using the arrows animation. Unfortunately, the arrows are being fired from across the map, instead of from the ship.

Spoiler :


I tried to change the TimedTrigger, but then the animation disappeared completely.
 
Ugh. What a silly mistake. Sorry-- first time messing around with unit creation! :p

Oh, trust me -- I'm pretty sure we've all done that. :p

I don't know enough about rigging animations to know for sure what could be causing the problem, although I'm guessing it could be an issue with the bones not matching up properly...
 
You'll want to copy the fx_triggers_trireme.ftsxml and rename your copy.

Then change all of the bone reference from "WORLD_center" to "World", and the bone references to "fx_PROJECTILE_L_..." and "fx_PROJECTILE_R_..." change to "point_PROJECTILE_..."

As far as what numeric suffix to use after point_PROJECTILE_, you can more or less choose randomly from the list in the section of the .fxsxml, or you can try to do some matching by comparing the frigate .ftsxml file and/or examining the models in Granny Viewer with bone names enabled.

Then add the new .ftsxml file to your mod, set VFS=true, and finally change the TimedTrigger reference in the .fxsxml to refer to your new .ftsxml file.
 
You're a miracle-worker, Nutty. I finally got the War Junk shooting arrows. It's beautiful!
 
Top Bottom