wurstscript / WurstStdlib2

WurstScript Standard Library Version 2
Apache License 2.0
55 stars 53 forks source link

AbilityDefinitionHealReductionBonus data field doesn't work #437

Closed Jaccouille closed 6 months ago

Jaccouille commented 6 months ago

Hello, I added an AbilityDefinitionHealReductionBonus in #432 I just noticed the data field ID for healing and damage doesn't seem to work, in editor it's Iofr so I thought adding this method would be enough

    function setHealingMultiplier(int level, real value)
        def.setLvlDataUnreal("Iofr", level, 1, value)

However the field isn't updated at all in my generated ability, other fields work. image

Moreover, I also failed to properly set the damage bonus field, I assumed the field ID would be "Idam" like the other orb ability but again, I can't make it work and I don't see it in the editor, but the Orb of Fire Item that uses the ability has this tooltip :

Adds <AIf2,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air, and reduce the effectiveness of healing and regeneration on enemy units by <AIf2,DataB1,%>% for <AIf2,Dur1> seconds.

The description is correct in the game, at least the unmodified item. Have you encountered similar issues in the past? Is this a mistake on Blizzard part? I am surprised I can't see at least the damage field of the ability in the editor.

Frotty commented 6 months ago

Hey, some fields have had problems, would need to inspect the objmod files to be sure, but usually the approach should work.

Frotty commented 6 months ago

@Jaccouille as mentioned in discord, this is related to the data pointer. This is used in many abilities, I don't know if it can be seen with some other means. But when you create the ability in a test map and then use it as base for runmap, all objects get extracted to build/objeditingoutput. There you can see the data pointer, and it is not 1 for Iofr.

@compiletime function create_w3a_A001()
    let def = createObjectDefinition("w3a", 'A001', 'AIf2')
    ..setLvlDataUnreal("Iofr", 1, 2, 0.1)