wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > General Mapping Tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-13-2009, 01:41 PM   #1
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default Creating Tooltips using Object Editor Fields

Create Tooltips using Object Editor Fields
  • I. Introduction
  • II. Huh?
  • III. Parts of the Code
  • IV. Uses and Advantages
  • V. Examples
  • VI. Credits

I. Introduction
Hey, this is my first Tutorial (I think...), but hopefully not my last. I just realized that I personally knew how these things worked, and it may or may not be common knowledge. I'd already written this up part-way for someone else, so it made sense to try and submit a tutorial. Meh, enjoy? :P


II. Huh?
What I'm talking about are those little codes inside the tooltips on all Blizzard abilities. You may have noticed them, they look something like this (using Aerial Shackles as an example):
Code:
<Amls,Dur1>
Put simply, these are like little codes that point to different parts of the Object Editor. Just like BBCode here at Wc3C and other sites, it uses a specific format; similar to opening and closing. Everything in between, if it matches the format, has some affect.


III. Parts of the Code
Here it is again:
Code:
<Amls,Dur1>
Basically, this contains the ability from which you are drawing information (first entry), and the entry of the field you want (second entry). This is separated by a comma (no space), and surrounded by those strange brackety-pointy things (carets?).

Click image for larger version

Name:	Pic1.JPG
Views:	420
Size:	93.4 KB
ID:	39707You may notice that you can't just find these strange "Amls" and "Dur1" things. However, it's quite easy:
Hold Ctrl and push D. (or go to the [View] -> [Display Values as Raw Data] in the Ability section of the Object Editor.) Every ability will now show some 4-letter code on the left-most window pane; that is the rawcode of that ability. Every ability has one, including custom abilities that you make. Using this as the first entry, you can tell Warcraft where you want it to go to look for information.
Now, still with all the values displayed as Raw Data, click on an ability (like, oh, say Aerial Shackles! :P). Instead of "Stats - Duration" or "Text - Tooltip - Normal", you will see stuff like "Dur1" and "Tip". This is the second entry which will tell Warcraft exactly what data to draw from the WE.
There are tons of others, like Cost1, Order, Area1, Name, which means you can feasibly make it bring up any bit of information.

**As an aside, the Raw Data code for abilities, similar to the ones for each field, actually have a naming paradigm; they follow a certain format.
- All start with "A", which stands for ability.
- Hero abilities use the second letter based on their race ("H" = Human, "U" = Undead, etc)
- Everything else is a shortened form of the spell (Aabs = Ability "Absorb Mana", AHfs = Ability Human Hero "Flamestrike", etc)



IV. Uses and Advantages
The reason you would do this (and why I suggest learning how to) is because you can effectively make tooltips write themselves. (It can be used in other places, of course; potentially all over the World Editor; but tooltips are it's most obvious use.)

By way of example: Say you made a custom ability, and lower a target enemy's armor by -3/-6/-9 (for three levels). If you write (in the tooltip): "Lowers enemy armor by -3/-6/-9" (for each level), then all is good.
Unless...
You later decide to change the armor-lost, for balance or whatever. Suddenly, you have to go back through each level and rewrite just that little number. Quite annoying, with 3 levels. Now imagine you're making an ability with 20+ levels.

This is similar to the "Auto-Fill" function; a great way to conserve time, made to ease the Object Editing process. In fact, using these works in tandem with the Auto-Fill feature of the Object Editor.
Effectively, you just "map" that part of the tooltip to that specific bit of information.


V. Examples
<ACam,Cost1> = 50 (neutral hostile Anti-magic Shell costs 50 mana)
<Amls,Dur1> = 40 (aerial shackles binds a target for 40 seconds)
<A000,Area3> = 280 (this is the Barrage custom ability on Rising_Dusk's Hero3 Submission.)
**Actually, if you'll note, since it was a custom ability, it doesn't have the nice format of the other abilities. It was the first custom ability made, so it's "A000" (those are all zeroes, not "O"s).

<AEev,DataA2,%>% = 20% (Lvl 2 Evasion gives a 20% chance to evade).
**This portrays the use of a ",%" between the 2nd entry and the bracket, which multiplies the 2nd entry by 100 (effectively making a percentage out of a value such as ".20"). The second "%" outside of the brackets simply adds on a percent sign after the modified 2nd entry, as you would expect.)

<Axxx,YYYY,.> = A Real value (i.e. 2.75) that will not automatically round into an Integer (i.e. 3). The period (".") between the 2nd entry and the bracket is what does it.


VI. Credits
YourJanissary (user on the Wc3:TFT board at GameFAQs)
~For spurring me to create this tutorial
Rising_Dusk
~For (unwittingly) letting me use his map as an example.
Wc3Campaigns
~A great site for Wc3 Modding!
Alexander244
~For adding a few Examples I missed~
Akolyt0r
~For adding his 2 bits~
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=

Last edited by Kyrbi0 : 01-17-2009 at 12:40 AM.
Kyrbi0 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-14-2009, 06:25 AM   #2
Kwah
Christmassy.
 
Kwah's Avatar
 
Join Date: Jun 2008
Posts: 644

Submissions (4)

Kwah will become famous soon enough (43)Kwah will become famous soon enough (43)

Default

Very, very convenient.

"Dynamic tooltips" suggest to me though, generating and changing the tooltips in game (an intensive feat).

So, can you base a skills tooltip off the values from another skill? It's something I've never tried before.
Kwah is offline   Reply With Quote
Old 01-14-2009, 06:44 PM   #3
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

Quote:
Originally Posted by hawk900
"Dynamic tooltips" suggest to me though, generating and changing the tooltips in game (an intensive feat).

So, can you base a skills tooltip off the values from another skill? It's something I've never tried before.
1. Yes, I ran into a wall when I tried to name the darn thing. I don't know what they're called (if they even have a real name), and the only thing I could think of was how they "dynamically" change what they display whenever you change it in the Object Editor (i.e., you don't have to change them yourself).

If you can think of something better, I'd be more than happy to have an Admin change it. (<- not a threat :P)

2. Potentially, sure. You could probably even use it to take values like the Name or Tooltip, and insert that into a tooltip.
Ironically, I didn't learn this before doing the bulk of my "custom race" work, so this whole time I've been doing exactly what these save you from doing; writing and re-writing and re-re-writing the tooltips for every edit. :P
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=

Last edited by Kyrbi0 : 01-14-2009 at 06:44 PM.
Kyrbi0 is offline   Reply With Quote
Old 01-14-2009, 07:47 PM   #4
Alexander244
Now Kharyb
 
Join Date: Feb 2006
Posts: 602

Submissions (1)

Alexander244 is a jewel in the rough (193)Alexander244 is a jewel in the rough (193)Alexander244 is a jewel in the rough (193)

Default

You should include <Axxx,YYYY,%> mutiplies a value by 100.
Also in some cases you need to use <Axxx,YYYY,.> to make a real value display as a real and not round to an integer.
__________________

Last edited by Alexander244 : 01-14-2009 at 07:49 PM.
Alexander244 is offline   Reply With Quote
Old 01-14-2009, 08:00 PM   #5
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

Huh. I didn't know that. Ok, thanks; I'll add it in (somewhere...).

--EDIT--
Alright, done. I couldn't think of a good example for the "no rounding-reals" example (Incinerate?), so meh. Thanks. :P

~~~

So what are the rules for this kind of things? I understand PitzerMike is busy; that's alright. Like, should I only bump every 48 hours (or was it 72?), if at all?
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=

Last edited by Kyrbi0 : 01-14-2009 at 08:15 PM.
Kyrbi0 is offline   Reply With Quote
Old 01-14-2009, 08:14 PM   #6
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Damn, when i saw this Thread title on the recent posts list, i thought of something ....like ..changing tooltips at runtime ...which would be quite cool :)
still dunno if its possible ..i once played a map (was some footy dunno) which had buggy scrolling tooltips ...but it was more of a bug ......
random characters scrolling/moving trough the tooltips 0.o
akolyt0r is offline   Reply With Quote
Old 01-14-2009, 08:17 PM   #7
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

^Again, sorry. :P If anyone thinks of a more appropriate name, that'd work.
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 01-14-2009, 09:59 PM   #8
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

lil error here
examples:
Quote:
<Amls,Dur1> = 40 (aerial shackles binds a target for 30 seconds)

hmm... "How to create Tooltips using object editor data fields"..
or maybe "HOWTO: Use Object Editor Data Fields in Tooltips"

hmm kinda long and bulky xD, but at least correct, since those tooltips are pretty much not dynamic

You might also add that that <XXXX,YYYZ> stuff is not limited to the ability it refers to...you might also use those in tooltips of a hero for example...so you can see the data of his abilites before you choose him or something... maybe as example.

Last edited by akolyt0r : 01-14-2009 at 09:59 PM.
akolyt0r is offline   Reply With Quote
Old 01-14-2009, 10:18 PM   #9
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

1. Ah, thank you

2. Nah, that's too clunky. I'm looking for something elegant here.
And sure they're "dynamic". They change, by themselves. (I know that's not the strict definition... actually, I can't find a good definition on the interwebz. o_o)

3.
Quote:
Originally Posted by akolyt0r
You might also add that that <XXXX,YYYZ> stuff is not limited to the ability it refers to...you might also use those in tooltips of a hero for example...so you can see the data of his abilites before you choose him or something... maybe as example.
Quote:
Originally Posted by The Tutorial
(It can be used in other places, of course; potentially all over the World Editor; but tooltips are it's most obvious use.)
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 01-14-2009, 10:37 PM   #10
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Kyrbi0
1. Ah, thank you

2. Nah, that's too clunky. I'm looking for something elegant here.
And sure they're "dynamic". They change, by themselves. (I know that's not the strict definition... actually, I can't find a good definition on the interwebz. o_o)

3.

hmm well ...didnt even read it completely ^^ ...i already know everything ...
but you could add bugs ...
the only one i can think of atm is:
the mindmg and maxdmg data fields dont work as intended for custom units.
If you use thos fields of custom units they will always show the values of the unit on which those custom units were based ...
akolyt0r is offline   Reply With Quote
Old 01-14-2009, 10:43 PM   #11
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

I don't of any bugs. If enough are found, I can add a section.

However, (in your example) it sounds like you used the wrong First entry. Whenever you make a custom anything, the Raw Data code for that "thing" looks like "A###: Axxx", where the last part (after the colon) is the "regular" Raw Data code of the unit you based it off of, and the "A###" is the actual Raw Data code of the custom "thing".
Also, it numbers in order of "first-created"; i.e., the first "thing" you make will be "A000", the second will be "A001", ad nauseum.
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 01-14-2009, 11:06 PM   #12
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Kyrbi0
I don't of any bugs. If enough are found, I can add a section.

However, (in your example) it sounds like you used the wrong First entry. Whenever you make a custom anything, the Raw Data code for that "thing" looks like "A###: Axxx", where the last part (after the colon) is the "regular" Raw Data code of the unit you based it off of, and the "A###" is the actual Raw Data code of the custom "thing".
Also, it numbers in order of "first-created"; i.e., the first "thing" you make will be "A000", the second will be "A001", ad nauseum.
yeah...good but ..i usually give my new custom units funny rawcodes as '!!!!' lol xD
and ur wrong anyway ...its not always 'A###' thats only for abilities ...'B###' for buffs ...'h###' for human units, 'u###' for undeads and so on...



well i recently saw a thread on thehelper concerning this bug mom..
http://www.thehelper.net/forums/showthread.php?t=116883

PS: and im not that dumb, as you might believe, well most of the time at least :X

Last edited by akolyt0r : 01-14-2009 at 11:09 PM.
akolyt0r is offline   Reply With Quote
Old 01-14-2009, 11:32 PM   #13
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

Quote:
Originally Posted by akolyt0r
yeah...good but ..i usually give my new custom units funny rawcodes as '!!!!' lol xD
and ur wrong anyway ...its not always 'A###' thats only for abilities ...'B###' for buffs ...'h###' for human units, 'u###' for undeads and so on...



well i recently saw a thread on thehelper concerning this bug mom..
http://www.thehelper.net/forums/showthread.php?t=116883

PS: and im not that dumb, as you might believe, well most of the time at least :X
1. ... I'm not aware that you could choose the rawcode, but alright...
2. I didn't explicity say it was "always" 'A###'. Just transpose for whatever 'thing' you're looking at (buffs, units, etc). Seriously.
3. Huh.
4. Did I say you were dumb? I was just answering what could be a common problem.
Besides, what I was talking about is something I do all the time. I'm incredibly absentminded. I can only imagine I'd do something like that, too.
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=

Last edited by Kyrbi0 : 01-14-2009 at 11:38 PM.
Kyrbi0 is offline   Reply With Quote
Old 01-15-2009, 12:48 AM   #14
Kwah
Christmassy.
 
Kwah's Avatar
 
Join Date: Jun 2008
Posts: 644

Submissions (4)

Kwah will become famous soon enough (43)Kwah will become famous soon enough (43)

Default

Automatic Tooltips?
Automated?
Kwah is offline   Reply With Quote
Old 01-15-2009, 12:50 AM   #15
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,942

Submissions (1)

Kyrbi0 is a jewel in the rough (165)Kyrbi0 is a jewel in the rough (165)

Send a message via MSN to Kyrbi0
Default

Meh, that sounds nice. But "Dynamic" seems to draw people to it (mainly because they think it's something much more complicated :P).

If an Admin/Mod thinks it should change, then that's fine.
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:58 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services