New spell debuff icon is blank
#1
Posté 24 décembre 2009 - 10:33
I dup'ed the line for the Weakness spell and changed a couple parameters. The icon and strings for the new spell looks correct on the spell/skill select UI, but when I apply it to myself via script, the little buff icon is blank and the tooltip for the buff is also blank. I used the same strref ID's as an existing spell so the problem is not missing strings. I also used an existing spell icon in my ABI_base file.
What am I missing? Is there a different place where I am supposed to define the buff icon and strings separate from the spell icon and strings? I am applying it to myself from an area script like this:
effect e = Effect(1012);
ApplyEffectOnObject( EFFECT_DURATION_TYPE_PERMANENT, e, GetHero(), 0.0f, OBJECT_SELF, 1000000 );
1012 is just an exising effect type and 1000000 is the ID for my new ability. The point of this was not to create a new spell, but create a new debuff icon/effect so maybe there is an easier way to do just that.
#2
Posté 26 décembre 2009 - 08:36
Here is how I tested it. Cut the line for HEROIC_OFFENSE from ABI_base and paste into ABI_base_falloutboy twice. Change the ID for the second line to 1000000. Set the guitype for both to be 777 and add a new guitype to guitypes.xls with ID 777. Added a line to spell_singletarget like so (yes, the syntax is correct):
case 1000000: // FOB added this
case ABILITY_SPELL_HEROIC_OFFENSE:
{
// remove stacking effects
RemoveStackingEffects(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility);
// attack
float fAttack = (100.0f + GetCreatureSpellPower(stEvent.oCaster)) * HEROIC_OFFENSE_ATTACK_FACTOR;
eEffect = EffectModifyProperty(PROPERTY_ATTRIBUTE_ATTACK, fAttack);
eEffect = SetEffectEngineInteger(eEffect, EFFECT_INTEGER_VFX, Ability_GetImpactObjectVfxId(stEvent.nAbility));
ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, stEvent.oTarget, HEROIC_OFFENSE_DURATION, stEvent.oCaster, stEvent.nAbility);
break;
}
When I run the game I can choose both spells from the spellbook. When I cast one of them I get a spell buff icon, when I cast the other I get a solid gray icon. The only thing different about the two spells in this case are the ability ID which is passed into ApplyEffectOnObject. Either effect icons are hard coded somewhere or they are in a place where I can't find them.
Modifié par FalloutBoy, 26 décembre 2009 - 08:38 .
#3
Posté 26 décembre 2009 - 08:53
Any spell ID less than or equal to 499999 will work. Anything higher will get you a grey box with a red line around it. I bet there is something hardcoded in the engine that says anything greater than 500000 is an injury effect and it tries to get the icon somewhere else (injuries.xls?). I am going to leave this for Bioware to deal with.





Retour en haut






