System BuffStruct

Jesus4Lyf

Good Idea™
Reaction score
397
Code limit and extremely limited bank system is just plain FAIL and destroys everything that made the SC2 engine superior to WC3. :nuts:
Whilst I totally agree, I must insist this thread stays on topic. :)

By the way, this system often crosses my mind and after my placement finishes, I hope to revisit it. :)
 

Laiev

Hey Listen!!
Reaction score
188
I got one question...

Can I create more then 1 BuffType per trigger?

example:

JASS:
//! runtextmacro BuffType("Return")
    //! runtextmacro SetBuffName("Return")
    //! runtextmacro SetBuffAlignment("NEUTRAL")
    //! runtextmacro SetBuffTooltip("This unit is being Returned; it will return to its previous location soon.")
    //! runtextmacro SetBuffIcon("ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp")
//! runtextmacro BuffStruct()
    real x
    real y
    method onCreate takes nothing returns nothing
        set this.x = GetUnitX(this.unit)
        set this.y = GetUnitY(this.unit)
    endmethod
    method preDestroy takes nothing returns nothing
        call SetUnitX(this.unit, this.x)
        call SetUnitY(this.unit, this.y)
    endmethod
//! runtextmacro EndBuff()

//! runtextmacro BuffType("Return")
    //! runtextmacro SetBuffName("Return")
    //! runtextmacro SetBuffAlignment("NEUTRAL")
    //! runtextmacro SetBuffTooltip("This unit is being Returned; it will return to its previous location soon.")
    //! runtextmacro SetBuffIcon("ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp")
//! runtextmacro BuffStruct()
    real x
    real y
    method onCreate takes nothing returns nothing
        set this.x = GetUnitX(this.unit)
        set this.y = GetUnitY(this.unit)
    endmethod
    method preDestroy takes nothing returns nothing
        call SetUnitX(this.unit, this.x)
        call SetUnitY(this.unit, this.y)
    endmethod
//! runtextmacro EndBuff()
 

Jesus4Lyf

Good Idea™
Reaction score
397
There is no preloading for the buff abilities, yet.

you'll have to wait a while for J4L to update or if you know your vJASS, you can just do it yourself (like what i did)
Ew, I forgot that? My bad.
Yeah, give me a few weeks...

But you can always add/remove the buff for a dummy unit on map init, I suppose. :)
 

muzk

Member
Reaction score
3
Oh, yes I failed, wrong thread. So, if I wanna increment for example 40% damage from attacks I just have to play with damageDealt method? ^^

But I want it for an attribute of a unit
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Is this system still working? For some reason my buff won't show up inside the object editor.

JASS:

//! runtextmacro BuffType("Dummy")
    //! runtextmacro SetBuffName("Dummy")
    //! runtextmacro SetBuffAlignment("NEGATIVE")
    //! runtextmacro SetBuffTooltip(" ")
    //! runtextmacro SetBuffIcon("None")
//! runtextmacro BuffStruct()
 

Jesus4Lyf

Good Idea™
Reaction score
397
Do you end your buff?
[LJASS]//! runtextmacro EndBuff()[/LJASS]
JASS:
//! runtextmacro BuffType("Dummy")
    //! runtextmacro SetBuffName("Dummy")
    //! runtextmacro SetBuffAlignment("NEGATIVE")
    //! runtextmacro SetBuffTooltip(" ")
    //! runtextmacro SetBuffIcon("None")
//! runtextmacro BuffStruct()
//! runtextmacro EndBuff()
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Do you end your buff?
[LJASS]//! runtextmacro EndBuff()[/LJASS]
JASS:
//! runtextmacro BuffType("Dummy")
    //! runtextmacro SetBuffName("Dummy")
    //! runtextmacro SetBuffAlignment("NEGATIVE")
    //! runtextmacro SetBuffTooltip(" ")
    //! runtextmacro SetBuffIcon("None")
//! runtextmacro BuffStruct()
//! runtextmacro EndBuff()

Yeah.

EDIT:
I think it may have to do with:
[ljass]//! externalblock extension=lua ObjectMerger $FILENAME$[/ljass]

Works perfectly fine in AIDS and Damage:
[ljass]//! external ObjectMerger w3a AIlz dprv anam "Life Bonus" ansf "(Damage System)" Ilif 1 500000 aite 0[/ljass]
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Strange. Does it work if you open/save/close the map a couple of times? Or if you populate it with the default stuff in the documentation, and save/close/open couple of times? It is common for BuffStruct buffs to not show up the first couple of times, for some odd reason... =/

I've tried opening and closing repeatedly, using the buffs that came with the demo map, etc. Nothing comes up. :(

EDIT: After restarting my computer, the buff finally showed up. How do I manipulate the buff when it's applied with an ability?
 

Jesus4Lyf

Good Idea™
Reaction score
397
EDIT: After restarting my computer, the buff finally showed up. How do I manipulate the buff when it's applied with an ability?
Yea, JassHelper can be a bit flakey with how it compiles BuffStruct. It's strange.

To manipulate the buff? Refer to the documentation and examples... but if you need help with something specific, feel free to ask and perhaps we can help...? :)
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Well, I have an ability that applies the buff. I've added an onCreate method and onDestroy method, but nothing happens. Is there something I need to do?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top