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 07-10-2009, 07:00 PM   #1
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default Displaying tooltips by hovering

This tutorial was inspired by my need for a hero selection set up. I want to thank Anitarf for introducing me to the idea, Here-b-Trollz for providing links on the subject, and Karukef for finding the original discovery.

This tutorial will teach you how to make displayable tooltips in-game simply by hovering over something. Does not use RtC or Trackables.

You'll need:

1 World editor, however you like it
1 MPQ Browser (I prefer MPQ Master)
1 Map. Obviously.
1 Notepad-like program (or Notepad)
1 Keyboard


MAJOR NOTE: As far as my tests show, you CANNOT use Vex's map optimizer at ALL with a map that uses this method. For some reason, even after disabling every tweak and optimization I could, the information in the .wts still didn't show in-game, even though it existed in the .wts. I've contacted Vex and hopefully we can figure this out.

Now let the fun begin!

STEP 1: The destructible
The first step is really simple. This method works by utilizing the Name box shown by destructibles in-game. Of course, the Name box only allows a small amount of text... in the Object editor.

So first, make a custom destructible. I based mine off of a barrel, though any will do I suppose.

Edit the following fields to match mine:

Text - Name : Testing the tutorial
Pathing - Is Walkable : True
Pathing - Pathing Texture : None
Editor - Show Helper Object for Selection : True (just for simplicity when moving it)
Art - Minimap - Show : False
Art - Model File : Invisible Platform <Base> (it's under destructibles)
Art - Shadow : None

Note: Hit Points MUST be >0 or the destructible won't show.

Good, now that's done. You can place one if you want. Doesn't matter right now.

STEP 2: The MPQ and .wts file
Note: If you can condense what you're saying to the confines of the Name box, you do NOT have to do steps 2 and 3.

Now, this whole method works off using the Name box of our destructible. However, in the Object editor you're only allowed like, 2 sentences worth of text. This MAY be enough for you if it's small (like a sign that says "Go left"), but if you're making tooltips like I was, you'll need more.

So, open up your MPQ Editor of choice and open up your map. Under the master directory (no folders or anything), scroll until you find "war3map.wts". Extract it or open it directly with Notepad.


Once open, scroll to the bottom (since it's the latest string you've made). You'll see something like this:

Quote:
Originally Posted by .wts file
STRING 1800
// Destructibles: B000 (Testing the tutorial), Name (Name)
{
Testing the tutorial
}
Obviously, "STRING 1800" and "B000" may be different, but that's what it will look like for the most part.

Now the easy part: See between the { and }? Just edit that to your desired tooltip. No need to use the |n line breaks, just make a new line as needed. You'll need color codes for color though (obviously).
Note: Break your line often so it fits into a neat paragraph (for things like descriptions), or else your tooltip will be really long (horizontally) and ugly.

Note: You will have to edit the .wts file every time you need to modify this tooltip, as it cannot be edited properly in the Object Editor. It'll show up (and the name will be the tooltip), but editing it will cause it to revert to its truncated form, and we don't want that.

Step 3: Back to the map
Note: You will need to have the World Editor closed when replacing the .wts file or else it won't be replaced, and nothing will happen.
Replace the .wts file in the MPQ with the new one with your modified tooltip using your MPQ browser, and then reopen your map in the WE.
IMPORTANT: You MUST save now, or else you'll lose all the work you did in the .wts file. Not good! Also, you may need to have your MPQ browser closed out in order for it to work properly. I'm not sure, but it may interfere with the saving process. Sorry you have to open and close these things 100 times :(


Step 4: The map
So, in order for these to look good, you'll need to place them where players will hover. For something like hero selection, you'll need dummy units with your hero models and locust, so they cannot be selected. Better yet would be special effects, but the method is up to you; as long as the unit cannot be selected in any way (as this will interfere with the player's ability to hover over the destructible).

It may take some tinkering, but move the destructible around (including increasing/decreasing its Z location by using Ctrl + Page Up/Down) until it looks smooth and pretty.
This is the result from my original testing. Works beautiful!



And now you're done!


Troubleshooting:
*All I get is a tiny blank box!
Did the .wts file get imported properly? If you tried replacing it while the map was open in the World Editor/Warcraft 3, nothing will happen.
Also, if you didn't save at step 3 like instructed, it won't work + you'll lose the work you did. It pays to read and obey :P
*The tooltip is wrong!
See above.
*I can't seem to replace the .wts file...
Either the map was open in Wc3/the WE, or you may have to delete the old .wts file from the MPQ and add the new one in its place.
*After optimizing with Vex's map optimizer, all my tooltips are gone!
I went through this error too. To fix it, uncheck "Optimize String Usage". You'll lose some kb of compression, but the problem will be solved.
NOTE: Wrong. Vex's Optimizer makes this method unusable for some reason.


Alternate Ideas
These are just some ideas you can use to make this work better for you.

If you still want the heroes to be selectable, perhaps make the doodad use a model like the Question Mark, and tell users to hover over them for the tooltip, but make the heroes selectable for selection/a closer look. (Recommended method!)

You can use the ObjectMerger as well to take advantage of the Name box. Example of usage is below:
Collapse JASS:
//! textmacro MakeSign takes RAWCODE, TEXT
    //! external ObjectMerger w3b DTlv $RAWCODE$ bnam "$TEXT$" bfil "Doodads\LordaeronSummer\Props\SignPost\SignPost.mdl" bgpm "Doodads\LordaeronSummer\Props\SignPost\SignPost.mdl" bmas 1.5 bmis 1.5
//! endtextmacro
Where TEXT is, obviously, the name of the destructible (in this case, a sign). Thanks azlier for pointing out this alternative.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt


Last edited by darkwulfv : 08-21-2009 at 02:48 PM.
darkwulfv is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-10-2009, 09:55 PM   #2
Anopob
Yay!
 
Anopob's Avatar
 
Join Date: May 2006
Posts: 870

Anopob has a spectacular aura about (120)

Default

You might want to say that the cap for the object editor is 2 sentences (or whatever it was in the other thread), and if the user only needs that much, they don't need to do the confusing parts with the MPQ.
__________________
Give +REP to people who help you with things or make good resources.
Better Ways of Requesting For Help - Race Contest #2 WIP Thread (Bone Race)
As of December 1st I have my blue rep. Yay :D
Anopob is offline   Reply With Quote
Old 07-10-2009, 10:10 PM   #3
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Wow this is pretty awesome. Might find some use in fullscreen inventories and the like. For hero selection I still prefer selecting the hero and being able to look at his skills though.
Opossum is offline   Reply With Quote
Old 07-10-2009, 10:13 PM   #4
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

+rep for this, writing it down although your "problem" was already solved is a cool thing.
Also I find the tutorial really informing and helpful, and its surely a cool method of displaying stuff.
now some points: link to the threads mentioned(those in your original thread, i mean)
and maybe there is some method to still make the heroes clickable?
i mean like, you hover over the hero, see a short description, then, if its interesting, you click on the hero and can take a closer look at the skills, etc. that'd be most cool 8)
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec is offline   Reply With Quote
Old 07-11-2009, 01:30 AM   #5
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Anopob: It's vaguely referenced, but I'll make that more clear.

Opposum: Yeah, being able to click the hero would be cool... Perhaps with experimentation?

Blubb: The thread I was referred to won't help anyone, as it's really just Karukef saying "hey, I found out you could do this. Btw, edit the .wts."
I'm sure you could find a way to make the heroes clickable. For example, give the doodad a model (the question/exclamation mark?) and place it next to it, so you can hover it and get the description, then click the hero to get the skills.

I shall update the tutorial now :D Thanks for the rep and kind words.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 07-11-2009, 03:35 AM   #6
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Bit of updating with step 3 after I did more testing.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 07-12-2009, 10:34 PM   #7
azlier
User
 
Join Date: Jun 2008
Posts: 116

azlier is on a distinguished road (10)

Default

You should also note that you can take advantage of the destructible 'Name' box by using the ObjectMerger. This is a textmacro I use in my map to make signposts:

Collapse JASS:
//! textmacro MakeSign takes RAWCODE, TEXT
    //! external ObjectMerger w3b DTlv $RAWCODE$ bnam "$TEXT$" bfil "Doodads\LordaeronSummer\Props\SignPost\SignPost.mdl" bgpm "Doodads\LordaeronSummer\Props\SignPost\SignPost.mdl" bmas 1.5 bmis 1.5
//! endtextmacro

Shows up in the Object Editor, too.
__________________
You hate me, don't you?
azlier is offline   Reply With Quote
Old 07-12-2009, 10:42 PM   #8
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Will add, thought that is a more advanced method of doing this, as it requires the user to know what those fields are (and how to work it).

Also, found a major issue in regards to Vex's map optimizer, as well as fixed an error on my part (the tooltip does show in the OE, you just can't edit it there)
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt


Last edited by darkwulfv : 07-12-2009 at 10:49 PM.
darkwulfv is offline   Reply With Quote
Old 07-13-2009, 03:43 PM   #9
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Okay, so I've found that Vex's map optimizer wreaks havoc on this method and breaks it entirely. I've contacted Vex so hopefully we can fix it. Added a warning.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 07-14-2009, 11:41 AM   #10
Captain Griffen
Dread Lord of the Cookies
 
Captain Griffen's Avatar


Content Director
 
Join Date: Sep 2003
Posts: 5,368

Submissions (2)

Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)

Approved Map: Warlords[Quicksilver #2] - 1st Place

Default

Pretty cool. Approved.
__________________
Quote:
Originally Posted by Earth-Fury
Griffen is correct, you are not.
Quote:
[13:32] <Akolyt0r> hmm.. stil i want to have some unused women
Captain Griffen is offline   Reply With Quote
Old 07-29-2009, 06:08 PM   #11
shendoo2
User
 
Join Date: Jul 2009
Posts: 2

shendoo2 has little to show at this moment (0)

Default

You should include an example map.
shendoo2 is offline   Reply With Quote
Old 08-20-2009, 03:28 PM   #12
Silvenon
User
 
Silvenon's Avatar
 
Join Date: May 2007
Posts: 492

Submissions (1)

Silvenon will become famous soon enough (63)Silvenon will become famous soon enough (63)Silvenon will become famous soon enough (63)

Send a message via MSN to Silvenon
Default

Is there a way to remove the health bar?
Silvenon is offline   Reply With Quote
Old 08-20-2009, 04:05 PM   #13
TotallyAwesome
User
 
TotallyAwesome's Avatar


Project Member: TBR
 
Join Date: Apr 2008
Posts: 582

Submissions (7)

TotallyAwesome is a jewel in the rough (164)TotallyAwesome is a jewel in the rough (164)

Send a message via ICQ to TotallyAwesome Send a message via AIM to TotallyAwesome Send a message via MSN to TotallyAwesome Send a message via Yahoo to TotallyAwesome
Default

Wow, this is pretty awesome.
Quote:
Originally Posted by Silvenon
Is there a way to remove the health bar?
Make the unit invulnerable.
__________________
Quote:
[23-56-42] Captain Griffen orders Hakeem to say: /me is going to bed now, with Wulfy, and he hopes that he will come out again with his manhood still attached...

Last edited by TotallyAwesome : 08-20-2009 at 04:06 PM.
TotallyAwesome is offline   Reply With Quote
Old 08-20-2009, 04:17 PM   #14
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by darkwulfv
Okay, so I've found that Vex's map optimizer wreaks havoc on this method and breaks it entirely. I've contacted Vex so hopefully we can fix it. Added a warning.
did you? I don't remember...
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-20-2009, 04:34 PM   #15
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

I PM'd you during your absence (which I was not aware of at the time). If you don't find the PM I'll resend it.

Quote:
You should include an example map.
I'll get around to that.

Quote:
Is there a way to remove the health bar?
I'm not sure, with desctructibles. Maybe making it invulnerable? But I don't know how that will effect the system.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt


Last edited by darkwulfv : 08-20-2009 at 04:35 PM.
darkwulfv 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 04:23 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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