Aller au contenu

Photo

New spell debuff icon is blank


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
I wanted to make a new debuff effect with a new icon. I couldn't figure any way to do it other than to create a new spell ability. So I followed this tutorial to make a new spell ability: social.bioware.com/wiki/datoolset/index.php/Adding_a_New_Spell_Tutorial

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
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
After much testing either I am overlooking something obvious or else there is no way to add new effect icons. I know others have been working on making new classes with new abilities and I would love to hear if they are overlooking the problem if there is a way around it that I missed.

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
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
Ran another test and it seems that I can get it to work sometimes, though it depends on what ID I choose for my new ability. 1000000 did not work, 200262 (the highest existing ID in ABI_base) did work, 200263 also works. Looks like sys_injury uses 500000-500100...



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.