System BuffStruct

Jesus4Lyf

Good Idea™
Reaction score
396
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
187
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
396
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
396
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
396
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 The Helper:
    Happy Sunday!
    +1
  • The Helper The Helper:
    I will be out of town until Sunday evening
    +1
  • The Helper The Helper:
    I am back! Did you miss me LOL
    +1
  • jonas jonas:
    where did you go?
  • The Helper The Helper:
    Jefferson TX on a Paranormal Investigation of a haunted bed and breakfast - I got some friends that are paranormal investigators and they have an RV and do YouTubes
    +1
  • The Helper The Helper:
    It was a lot of fun. The RV was bad ass
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top