1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  4. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  5. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Tooltip Tutorial

Discussion in 'General Mapping Tutorials' started by DenZel94, Jan 22, 2008.

  1. FelSheep

    FelSheep

    Joined:
    May 21, 2009
    Messages:
    11
    Resources:
    0
    Resources:
    0
    This tutorial is for WE newbies and those that doesn't have knowledge with color, unit, upgrade, doodad, ability and buff/effect codes. I have mastered making tootips for units and abilities used in my map. Also, no math, even arithmetic, is allowed in tooltips.
     
  2. meatfactory

    meatfactory

    Joined:
    Jan 3, 2009
    Messages:
    344
    Resources:
    18
    Maps:
    12
    Template:
    6
    Resources:
    18
    Doesn't seem to get the Hero's attribute to display on a tooltip (0) ... any ideas?
     
  3. MindWorX

    MindWorX

    Joined:
    Aug 3, 2004
    Messages:
    690
    Resources:
    5
    Tools:
    1
    Tutorials:
    4
    Resources:
    5
    Almost 5 years after the last post. I'm pretty sure that counts as necroing. :p

    And by attributes, do you mean Strength, Agility and Intelligence?
     
  4. meatfactory

    meatfactory

    Joined:
    Jan 3, 2009
    Messages:
    344
    Resources:
    18
    Maps:
    12
    Template:
    6
    Resources:
    18
    No I mean the length and depth of the heroes dick's and vg... of course I mean str agi and int :grin:
     
  5. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Well, for tooltips, they are static (opposed to dynamic). Once you enter a tooltip, it is saved in a file and it uses that tooltip throughout. The numbers, text, etc. won't change. So when you do the Data<ACl3, ...> stuff, it'll just read that field and put whatever is in there. As such, when you ask for a unit's attribute, it'll just read off whatever is the initial value. It won't update with the attribute. So if you have a tooltip that says "22 intelligence", and the hero gets a +2 intelligence tome, the tooltip will stay as "22 intelligence". Sadly, tooltips aren't actually that dynamic. :\

    tldr; The Data<####, ####> stuff is just a shortcut (useful if you need to autofill or if you change the values a lot, e.g. for balancing). Apart from that, they don't offer any "extra" features, they just save you some typing.
     
  6. meatfactory

    meatfactory

    Joined:
    Jan 3, 2009
    Messages:
    344
    Resources:
    18
    Maps:
    12
    Template:
    6
    Resources:
    18
    Thanks for the info... what about the file that the data is saved? Is it accessible?
     
  7. TheAyalalalalon

    TheAyalalalalon

    Joined:
    Feb 18, 2016
    Messages:
    94
    Resources:
    0
    Resources:
    0
    Hello
    I am not able to make my tooltips show correctly.
    I am trying to use the <o006,dmgplus1> (Attack damage base) and <o006,rangeN1> (Unit´s range) but it keeps loading as "0" in the map
    The o006 is a custom unit based on Serpent Ward <osp1>
    Did i miss something in the code?
     
  8. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Great guide, it's just missing aura tool tips displayed on other units. Like Endurance aura
     
  9. Death Adder

    Death Adder

    Joined:
    Nov 3, 2013
    Messages:
    883
    Resources:
    0
    Resources:
    0
    One thing I don't get is, in hero abilities there's only one field for 'Learn', but you can use %d to get the integer of the next level (the one you'd learn), this seems like it's dynamic isn't it?

    If so, I wonder if there's some way to use %d instead of a number for the <AbilCode,DataA1> Cool1, Dur1, etc. and have say DataA%d or Cool%d instead. Basically, when you have 0 levels of the ability and want to learn it for the first time, it would use the data for level 1, at level 1 it would show the data for level 2, etc.


    I already tried doing it like that DataA%d and the like, but it didn't work. But since %d works on it's own, I wonder if there's some way. For a bit of a scrappy solution you could actually do something like "base value + %d * level increase value", or if you're lucky the value could be the same as the level...
     
  10. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    That's neat! I didn't know about that. What happens if you do <'A000',Data%d1>? What does the tooltip end up looking like in game?

    Maybe it's parsed in one-pass, so while it does end up translating %d, it might still try to process <'A000',Data%d1> directly (without replacing %d) and fail.
     
  11. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    1,754
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Inside learn tip there are %d placeholder. All kinds of <DATA> refs arent real placeholders therefore you cant do anythng about it
     
  12. Sk0gsHu[GG]arN

    Sk0gsHu[GG]arN

    Joined:
    Jul 4, 2007
    Messages:
    69
    Resources:
    0
    Resources:
    0
    Anyone know how to show two decimals? <,.> only shows one decimal, I tried <,..> but it doesn't work.