Ok, I'm not sure what's happening there. Go through the special power code in the hero's file and make sure he has nothing else unique that you have to add (if you want to post your code, we can see if we spot anything). Did you check all the upgrades for example? Also, check that the AI code (AISpecialPowerUpdate code block) is referencing the correct commandbotton.
Another thing to check is the experience levels code, make sure there's nothing unique linked to the gamedata .ini. Look at all the upgrades and stuff. For upgrades, check in the upgrades file to see if they are in your mod and in not either copy them across or use an upgrade from anoth hero's experience levels (if you change the upgrade, make sure to change it in the special power code in the hero's file too).
Look at the RequiredExperience and ExperienceAward code lines, they references to lines of code in the gamedata .ini so make sure they are not unique and if so, copy them across. Keep an eye out in all the rest of your code for other lines of code like that, that make reference to the gamedata. Check them all and make sure every one is in the gamedata file.
;---------------------- ARAGORN -------------------------------------
ExperienceLevel AragornLevelMP1
TargetNames = ARAGORN
RequiredExperience = 1
ExperienceAward = ARAGORN_LVL1_EXP_AWARD
Rank = 1
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
ExperienceLevel AragornLevelMP2
TargetNames = ARAGORN
RequiredExperience = ARAGORN_LVL2_EXP_NEEDED
ExperienceAward = ARAGORN_LVL2_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 2
AttributeModifiers = HeroLevelUpDamage1
Upgrades = Upgrade_AragornBladeMaster
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
Also, have you added the hero to the desired faction in the playertemplate .ini and to the same faction in skirmishaidata .ini (found in data/ini/default/ folder). Oh, another thing, check that there are no new FX or FXParticalsystems in the heroe's file.
BTW, this may be a stupid question but is the hero using a new/unique art, skin, animations and/or modle? If so, they will need adding to the asset.dat. EDIT: Never mind, I re-read your OP and saw that you have the model sorted. Did you have the hero working perfectly in game before you started adding the special power code stuff?
Edited by Titan Cronus, 21 October 2015 - 09:52 PM.