PPQ_Purple
Purple Cube
- Joined
- Oct 11, 2008
- Messages
- 5,455
Can you drop me a link? I don't have too much time to work on this stuff these days but if you do I'll look for a fix.
<UnitArtInfo>
<Type>ART_DEF_UNIT_GRENADIER</Type>
<Button>Art/Units/Horse_Grenadier_Neu/BotonGranadero.dds</Button>
<fScale>0.44</fScale>
<fInterfaceScale>0.8</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/Horse_Grenadier_Neu/Horse_Grenadier.nif</NIF>
<KFM>Art/Units/Horse_Grenadier_Neu/Horse_Grenadier.kfm</KFM>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/HorseShadow.nif</ShadowNIF>
<ShadowAttachNode>HorseBip Spine1</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
<AudioRunSounds/>
</UnitArtInfo>
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Assets/Art/Units/Horse_Grenadier/Horse_Grenadier.kfm
deleted: Assets/Art/Units/Horse_Grenadier/Horse_Grenadier_MD_RunDie.kf
deleted: Assets/Art/Units/Horse_Grenadier/knight.nif
modified: Assets/XML/Art/CIV4ArtDefines_Unit.xml
It's been a while since I did any units but if I recall correctly this is what you need to understand and do.Dear PPQ_Purple, I downloaded the Horse Grenadier you made and tried to transform it into an Arambai cavalry, but now some problems have arisen, I don't know how to solve them, I can only come and ask for advice you:
I replaced all the grenades in the NIF with darts, but the cavalry still throws grenades when throwing attacks, how can I modify the grenades in the throwing animation?
The cavalryman appears in the game with a dart, but the dart in his hand disappears after an attack?
Thank you for your reply, I'll try to fix itIt's been a while since I did any units but if I recall correctly this is what you need to understand and do.
The projectile, in this case grenade, seen in the unit model is only related to the animations of that model. So things like fidgeting with the grenade, hiding it when in melee etc. The projectile effects are not part of the model but their own separate thing which the game engine attaches to the animation when required. And the link between those is in the Horse_Grenadier_md_rangedstrike.kf file. Open that up and scroll down to find NiTextKeyExtraData. In there you'll find this line: Effect:Grenade_Throw_Effect:EFFECT_GRENADE_THROW.
The way to read that is that the game takes the special effect defined in CIV4EffectInfos.xml by the name of EFFECT_GRENADE_THROW and attaches it to the animated node Grenade_Throw_Effect in the NIF file. So you want to change that line in the .kf file to Effect:Grenade_Throw_Effect:NAME_OF_YOUR_DART_EFFECT.
You will also have to either find an existing dart/javelin effect from the main game (I would suggest EFFECT_MALISPEAR which is the throwing spear from the Mali Skirmisher) or make your own to use.
Save your changes to the .kf file and you are all done.
Did you manage to change the effect to what you need?Thank you for your reply, I'll try to fix it
Hi PPQ_Purple, sorry for taking so long to get back to you.Did you manage to change the effect to what you need?