Typhlomence
Magical Tomomo
I don't know if you already shared that extra bone information before, but thank you anyway. I might find that quite useful.
Spoiler :
Hrm... I tried to follow your process, Nomad, but I'm running into problems. My plasma beams are coming in from off-screen, which suggests there's a problem with the bone I'm trying to connect to, but I'm not sure what the problem is. Can you take a look at my files?
I've included both my .blend file and the .gr2, .fxsxml, and .ftsxml files.
Spoiler :
Hrm... I tried to follow your process, Nomad, but I'm running into problems. My plasma beams are coming in from off-screen, which suggests there's a problem with the bone I'm trying to connect to, but I'm not sure what the problem is. Can you take a look at my files?
I've included both my .blend file and the .gr2, .fxsxml, and .ftsxml files.
Your bones in the .gr2 file are not the same as in the .blend file. The .gr2 is missing the gun_right & gun_left bones. It looks like something went wrong with the export process. Try and apply changes to skeleton and re export. I applied and did a quick export and the bones are there now in the .gr2.
I also saw the bone issue that Wolfdog mentioned. Hopefully that's the only problem, but could you send me the full mod? I want to see the .xml files that you defined for the base unit as well.
That must be it -- I'm exporting the model to .br2 using the method in your old tutorial for converting Civ 4 models to Civ 5. So I export to .br2 and then import the .br2 mesh over the basic Tank skeleton.
Should I try exporting the model through .fbx as well? Import the .fbx file, then import the .br2 over it?
Yes if you export the skeleton as .fbx and overwrite with .br2 gives the best results as the .fbx does not cleanly export meshes sometimes. This is the tutorial you will need to follow as you will need to export the animations as well given you now have a custom skeleton.
Hmm... even if I'm using the tank animations (just with the extra bones for effects)? Or can I just skip step B in the tutorial, since I don't have custom animations...?
I should check and see what animations Nomad or What used for the Cobra...
EDIT: Man, I still feel like I'm hitting a wall -- I tried exporting the .blend file as both an .fbx and a .br2, and then loaded the .fbx file in and imported the .br2 mesh over it, and I still can't find the bone in Granny... I think for now I'm just going to have to stick with the model that I have that works, until I can figure out the exact steps I need to follow to add a bone and then get the proper model imported into a .gr2 the way Nomad or What did.
I used existing CiV Helicopter Gunship animations for the Cobra. I understand your frustration; sometimes I get a unit to work perfectly and am inspired to do something similar and then totally hit a wall with it. I can't even imagine the countless hours I have wasted on half-baked projects. My advice is to put it on the back burner and come back to it later with a fresh perspective (I have a LOT of back burners apparently ). If I have a chance I will take a look at it but my time is limited and I am working on a custom animation project right now. Plus, we need to flying get angels/demons into the game and I am way past due on doing them.
Maybe you can use Wolfdog's .gr2 that he made? I thought he mentioned that he had a corrected model....
I think you can from memory but you need to get the rotation right in the .fbx export which seems to be the problem you are having. Try exporting to .fbx with the -90 rotation enabled or you may have to rotate in blender before export as well. I remember it take a lot of experimenting to get the rotation right. Also an older version of the .fbx export script may help you to do this.Hmm... even if I'm using the tank animations (just with the extra bones for effects)? Or can I just skip step B in the tutorial, since I don't have custom animations...?
I think you can from memory but you need to get the rotation right in the .fbx export which seems to be the problem you are having. Try exporting to .fbx with the -90 rotation enabled or you may have to rotate in blender before export as well. I remember it take a lot of experimenting to get the rotation right. Also an older version of the .fbx export script may help you to do this.
Hmm... I've noticed that in my version of Blender, the .fbx doesn't show the same alignment options as in some of the tutorials:
Spoiler :
I'll have to try experimenting with the options and see if I can export a properly-aligned skeleton. Would exporting the mesh first, and then rotating the model to other orientations (so that the .fbx rotation lines it up properly) work?
<trigger type="FTimedTriggerAction" id="54" time="0.392593" duration="0" repeat="0" ec="1100" track="4" tier="0" action="1" />
<trigger type="FTimedTriggerEffect" id="8" time="0.303704" duration="0.0666667" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MUSKET_IGNITE" bone="b_RIFLE" />
<trigger type="FTimedTriggerEffect" id="1" time="0.37037" duration="0" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MUSKET_SMOKE_02" bone="b_RIFLE" />
<trigger type="FTimedTriggerSound" id="11" time="0.37037" duration="0" repeat="0" ec="1100" track="1" tier="0" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE" bone="" />
<trigger type="FTimedTriggerSound" id="33" time="0.118519" duration="0" repeat="0" ec="1100" track="1" tier="0" event="AS3D_UNIT_MUSKETMAN_SOLDIER_FOLEY" bone="" />
<trigger type="FTimedTriggerSound" id="15" time="0.364814758" duration="0" repeat="0" ec="1100" track="1" tier="1" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE_T1" bone="" />
<trigger type="FTimedTriggerSound" id="45" time="0.364814758" duration="0" repeat="0" ec="1100" track="1" tier="2" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE_T2" bone="" />
<trigger type="FTimedTriggerTransfer" id="100" time="0.112613671" duration="0" repeat="0" ec="1100" track="3" tier="0" refid="111" speed="3.34995" tangent.x="0.0338858142" tangent.y="-0.9204834" tangent.z="-0.389309883" />
<trigger type="FTimedTriggerEffect" id="104" time="0.04629628" duration="0.0333333" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MECH_GUN_MUZZLE" bone="b_RIFLE" />
<trigger type="FTimedTriggerEffect" id="111" time="0.05754753" duration="0.07" repeat="0" ec="1100" track="7" tier="0" event="ART_DEF_VEFFECT_TRAIL_RAILGUN_PROJ" bone="b_RIFLE" />
<trigger type="FTimedTriggerSound" id="114" time="0.03518518" duration="0" repeat="0" ec="1100" track="1" tier="-1" event="AS3D_UNIT_SUPERCONDUCTOR_RIFLE_FIRE" bone="" />
I decided to give this a try myself while experimenting with an MMD model import:
She used the Musketman animations initally. While it's great that I can have Yoko shoot railgun rounds rather than the Musketman's usual muzzle effect, it's not synced properly with her model animation. The model will continuously perform the firing animation but the railgun rounds appear sporadically and rarely when they actually should, except for the first time.Spoiler :
While it's not important right now (this is just a test, after all), would tweaking with the timings make it work with the model animation properly?
For reference, here's the original Musketman animations for event code 1100:
Code:<trigger type="FTimedTriggerAction" id="54" time="0.392593" duration="0" repeat="0" ec="1100" track="4" tier="0" action="1" /> <trigger type="FTimedTriggerEffect" id="8" time="0.303704" duration="0.0666667" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MUSKET_IGNITE" bone="b_RIFLE" /> <trigger type="FTimedTriggerEffect" id="1" time="0.37037" duration="0" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MUSKET_SMOKE_02" bone="b_RIFLE" /> <trigger type="FTimedTriggerSound" id="11" time="0.37037" duration="0" repeat="0" ec="1100" track="1" tier="0" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE" bone="" /> <trigger type="FTimedTriggerSound" id="33" time="0.118519" duration="0" repeat="0" ec="1100" track="1" tier="0" event="AS3D_UNIT_MUSKETMAN_SOLDIER_FOLEY" bone="" /> <trigger type="FTimedTriggerSound" id="15" time="0.364814758" duration="0" repeat="0" ec="1100" track="1" tier="1" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE_T1" bone="" /> <trigger type="FTimedTriggerSound" id="45" time="0.364814758" duration="0" repeat="0" ec="1100" track="1" tier="2" event="AS3D_UNIT_MUSKETMAN_MUSKET_FIRE_T2" bone="" />
And here's what I put instead, based on the GDR (essentially the same as the GDR's railgun except I reduced it to one round rather than four, and I used a custom sound):
To be fair, it might not have helped that I used the same set for all attack event codes (1160, 1180 and 2100 as well) and this is a ranged unit rather than a melee unit. But I just thought I'd ask in case anyone knows what's going on.Code:<trigger type="FTimedTriggerTransfer" id="100" time="0.112613671" duration="0" repeat="0" ec="1100" track="3" tier="0" refid="111" speed="3.34995" tangent.x="0.0338858142" tangent.y="-0.9204834" tangent.z="-0.389309883" /> <trigger type="FTimedTriggerEffect" id="104" time="0.04629628" duration="0.0333333" repeat="0" ec="1100" track="2" tier="0" event="ART_DEF_VEFFECT_MECH_GUN_MUZZLE" bone="b_RIFLE" /> <trigger type="FTimedTriggerEffect" id="111" time="0.05754753" duration="0.07" repeat="0" ec="1100" track="7" tier="0" event="ART_DEF_VEFFECT_TRAIL_RAILGUN_PROJ" bone="b_RIFLE" /> <trigger type="FTimedTriggerSound" id="114" time="0.03518518" duration="0" repeat="0" ec="1100" track="1" tier="-1" event="AS3D_UNIT_SUPERCONDUCTOR_RIFLE_FIRE" bone="" />
<!-- _______ Mech Projectile Trail _______ -->
<VisEffectArtInfo>
<Row>
<Name>ART_DEF_VEFFECT_TRAIL_PLASMA_CANNON_PROJ</Name>
<Transform>
<Translation x="0.0" y="0.0" z="0.0"/>
<Rotation x="90.0" y="0.0" z="0.0"/>
<Scale>0.02</Scale>
</Transform>
<fBaseDuration>0.01</fBaseDuration>
<fBaseDurationScale>1.0</fBaseDurationScale>
<ParticleEffects>
<ParticleEffect>
<Name>ART_DEF_PEFFECT_TRAIL_PULSE_PROJECTILE_01</Name>
<!--
<Name>ART_DEF_PEFFECT_TRAIL_RAILGUN_PROJ</Name> -->
</ParticleEffect>
</ParticleEffects>
<ChildEffects>
<ChildEffect trigger="ProjectileEnd">
<Name>ART_DEF_VEFFECT_RAILGUN_IMPACT_$(TERRAIN)</Name>
</ChildEffect>
</ChildEffects>
</Row>
</VisEffectArtInfo>
Oh my. I might have saved myself some time if I had come across this thread a couple of months ago. (I reused all the Civ5 effects I could in this mod, which I might put up on CivFanatics at a later date.) So if I understand what you're saying about scaling correctly, the reason my arrows and other projectile effects are too big is that their scale is determined by the same value used to scale the model? (mostly 0.5 in my case, and things do seem roughly three times too large)
That's... unfortunate. I don't like the idea of upsizing and re-exporting everything just to get the effects to work out. Hm.
Something I've found that may help: In the ArtDefine_UnitMemberCombatWeapons table, there are HitEffectScale and ProjectileChildEffectScale entries. I've found these to be worthless for archers, but somewhat effective for cannons; presumably HitEffectScale affects the impact effect listed under HitEffect.