SC2Mapster Forums

Resources > Tutorials

[Data] Button Tooltip Referencing

    #21 Jul 29, 2012 at 19:11 UTC - 0 likes

    Any more specific than that? Perhaps the event/action? I'm pretty retarded with this catalog business. I understand the tutorial above, it's just not specifically what I'm looking for.

    #22 Jul 30, 2012 at 00:46 UTC - 0 likes
    Quote from thequiet: Go

    I couldn't find the info in your tutorial but I'd really love some help here. I made an "Agility" attribute, like the WC3 one, that increments in level. It's a behavior attribute and I want to reference it it's tooltip so a player can see the damage he can do. For example: "Ability does "Agilityx5" damage to target unit.

    When I reference my behavior attribute, the damage always stays at 0, even in-game.

    Note: There will always only be 1 copy of this unit on the map, so there won't be any interference with extra numbers. Help please! :x

    I dont know how you set your attribute, but you can use a combination of abilities, effects, and upgrades to achieve what you want. It's complicated but heres what I do:

    On level up, player clicks the "add agility button", the button is a learn ability, which triggers a "behavior ability". The behavior has an effect: initial of "Effect: Type: Set". The set effect links to 2 effects. 1 adds a stack to the "agility behavior", the other is an effect of type "Issue Order". The order is linked to a research ability, in this case lets call it "research upgrades". Index 0 is strength, 1 is intelligence, and 2 is agility. These link respectively to an upgrade which increases our dummy "Agility Behavior Count" effect's "add stack count" field. Then in the tooltip, we link the modifiers to our dummy effect, so <d ref="Behavior,Agility,Modification[0],FractionalDamage[Spell] * Effect,AgilityDummyCounter,StackCount"/>

    Breaking it down

    Ability: Learn->Ability: Behavior Ability:Behavior->Dummy Behavior for each level Dummy Behavior triggers Effect: Set Effect: Set -> Effect: Add 1 to Agility; Effect: Issue Order, Ability: Hero Research, Index 2 Ability: Hero Research->Agility Upgrade->Adds 1 to Effect: (Add behavior) Agility Counter Stack count

    #23 Jul 30, 2012 at 23:50 UTC - 0 likes

    EDIT: Okay okay okay, I figured it out. But I have a question. My behavior works through a points system, as in it levels up as my character does. How can I make the tooltip update with it? :o

    Last edited Aug 01, 2012 by thequiet
    #24 Jan 02, 2013 at 05:55 UTC - 0 likes

    If people didn't already know this, a trick you can do to show decimals is, if it is less than 1, you would type: 0.<d ref="10 *(...)"\>

    I haven't tried showing numbers above 1 with decimals, but if it doesn't show, you would type: <d ref="(...)" - [10*(...)] - (...)/>.<d ref="[10*(...)] - (...)"/>

    Notice the decimal in between the two references, you have to place it manually. The (...) where you put your reference. You can change 10 to be 100 or 1000 depending on how many decimals you have.

    Last edited Jan 02, 2013 by ZeroX33: Clarification
    #25 Jan 25, 2013 at 18:17 UTC - 0 likes

    Is there any way on refering the life leech fraction of an attack (I have acustom unit with an armored weapon, so he can only attack armored targets with that weapon, and it has a 10% leech fraction, but I've tried everithing without result. I'd like to know if there's any way on refering to leech fracion on a damage effect.

You must login to post a comment. Don't have an account? Register to get one!