PDA

View Full Version : Tool-tip Tutorial


JarquaFelmu
04-13-2007, 2:32 AM
Items you will need:
-tblpad.exe (Easily obtained from SC.org)
-stat_txt.tbl (For this tutorial your going to have to convert it to a *.txt format, for easy's sake I just attached one already in txt format, enjoy)
-Notepad.exe (Well, you might need it, typing in the tblpad works fine but I prefer notepad for two reasons: One, It's black on white not white on black and it has a bigger font so its easier to see stuff. Note Ctrl+F is your friend:) )


Hah, Im finally back from my long dispersion from Warboards:). Anyways, I knew that some people had questions on how to make tool-tips in their mods, so I wrote a tutorial explaining the process:

Okay how you create tool tips is to simply add data between the <10> of a unit and the <0>. The <10> consitutes a carrige return and the <0> command serves double duty; first it consitutes the end of the whole 'tool-tip'. Second it signals to the cost of the unit to display. The letter before the <4> denotes the hotkey button. The actual command <4> denotes that what follows is a Technology string, more to follow later. The commands <3> and <1> simply denote what color the text will be.

Most of it is basic use and starcraft already uses this extensivly in their technologies and upgrades as in Figure 1-1:

Fig. 1-1:
<4>Research Adrenaline S<3>t<1>ims Tech<10>(Shock and Flame Trooper Reflex Upgrade)<0>

Just because a unit doesn't normally come with anything after it's name in the build menu does not mean that you cannot add it. Like so, Figure 1-2 is a normal entry for the command to build a Science Vessel, while Figure 1.3 is a modified entry to add a description of the unit. Note that in Figure 1-3 the <10> was inserted between the ending of 'Vessel' and '<0>' of Figure 1.2.

Fig. 1-2:
v<1>Build Science <3>V<1>essel<0>

Fig. 1-3:
v<1>Build Science <3>V<1>essel<10>Uses of this vessel has fallen by the wayside, but the undanted crews still strive to protect their comrades in the heat of battle<0>

It is even possible to add different colors to your unit build commands. You can do this by adding the color commands like <4>, <3> and <1> to the string. There is more colors Tblpad has a complete list of them, you can also find a complete list at the bottom of this tutorial. In Figure 1-4 it shows an example of string used for my Imperial Shock Troopers. Highlighted in bold are the color commands.

[I]Fig. 1-4:
t<1><7>Imperial <7>Shock <4>T<7>rooper<7><10><7>A powerful new suit lets this soldier use deadlier weapons<0>

Remember as long as you have <1>, <10> and <0> you can add almost any number of color commands to your tool tips. The number "1" in '<1>' is important in this case because it seems to tell starcraft that the string in question is a Build string. Where as a <4> in the same location would denote a Technology Upgrade like the stim packs.

A word of caution, if you make too many lines of text thereby making the tool-tip too large then it will crash starcraft when you mouse over the unit to build it. Currently the number of accepted characters as well as exact number of lines is unknown. It seems to vary unit to unit. However you can still add a good amount of information. In Figure 1-5 it shows my Siege Tank's Build Command string this one string was one of the single most headache inducers in while troubleshooting random crash bugs in my mod.

Fig. 1-5:
t<1>Build Assault <3>T<1>ank<10>Better than it's predecessor the Siege Tank, this tank sports a Mobile version of the old tank's Siege Cannon, and can deploy a Detector Array in Stationary Mode<0>

As a good rule of thumb; when the txt file is maximized and viewed under a screen size of 1024*768 you do not want the text string to extend very much into the third line. After about a third into the third line is the dangerzone where Starcraft will probably crash on you. Also a note to mention, even if you do not make Starcraft crash, too much text will make it so that the "Unit Cost" isn't in the tooltip screen anymore. So there is a very fine line here, regarding how much text you can use.

Now here is how you use the new stat_txt.txt you made:

Open tblpad, then using that to open your stat_txt.txt. After that simply click File>Save As change the type to *.tbl and then save. Take your new stat_txt.tbl file, put it in your mod mpq as "rez\stat_txt.tbl" and have fun with your new tool tips!

With that being said, have fun modding and I hope you have success at making tool-tips to even further enhance your mod.

-=Color Codes=-

Menu Colors
<1> = Light Blue <2> = Light Blue
<3> = Dark Green <4> = Light Green
<5> = Grey* <6> = White
<7> = Red <8> = Invisible*

In-game Colors
<1> = Light Blue <2> = Light Blue
<3> = Yellow <4> = White
<5> = Grey* <6> = Red
<7> = Green <8> = Invisible*
<60> = < <62> = >
*Starcraft will ignore all color tags after this.

grover1311
04-13-2007, 2:33 AM
very nice tutorial :)

MaxedOutBC
04-13-2007, 7:56 PM
Good tutorial. Tell them that typing enter (in TblPad itself) works, too.

King_Critter
04-13-2007, 10:12 PM
Cool. Always wondered what some of those numbers were. :P (i.e. not the colors -- already knew 'bout those. But the other stuff.)

So yeah, very cool. However, you seem to be referencing pictures -- but I see no pictures. Mistake, or am I just not getting something here?

U-238
04-14-2007, 8:59 AM
Actually what he's referencing is the string examples. They should be in [code] boxes so that they're more easily noticed.

GJ Jarqua :tup:

bajadulce
05-17-2007, 2:04 PM
very nice. A lot of ppl will find this very helpful. :tup:

JarquaFelmu
05-17-2007, 6:27 PM
Thats what I am hoping. This tutorial doesn't just show how to do tool tips, but it answers general "changing unit name" questions.

MidnightGladius
05-17-2007, 6:33 PM
Heh, now the question becomes how to use that space effectively :)

Good work, Jarqua.

JarquaFelmu
05-17-2007, 11:49 PM
Exactly, that is the hardest thing I ran into. How to fit all the information you want into that very limited space. Too much and you crash the game... too little and you could be too vague. Also if you have too much text then it can hide the build cost.

Basan
05-18-2007, 3:57 AM
Good job on the tutorial, Jarqua'. :tup:

We really ought to start thinking in re-constructing up the knowledge that got lost by SEN's demise, though. ;)

JarquaFelmu
05-18-2007, 11:35 AM
I'm all ears Basan, so is a few of us. Tell us what you think should be written up and we'll get on it.

U-238
05-18-2007, 1:26 PM
Yea that was the supposed goal of the "project green" I tried to initiate. (but sadly fell apart quite rapidly. :/)

Basan
05-18-2007, 9:09 PM
I was sure to have kept hard copies of some of SEN's tutorial pages in my scrapbook extension at FF to ease our task but that must've went away when my XP account crashed a while back. :<

Well, let's get crackin' anyway. *Cracks fingers and starts to type*

I'm all ears Basan, so is a few of us. Tell us what you think should be written up and we'll get on it.

*Meh* And I didn't quite believe when someone said in the staff forum that no one pays attention to announcements. :rolleyes:
Now, as sexy as I find a forum full of stickies, I've decided we need to try and 'trim some of the fat' by merging all the tutorials into one thread. The FAQ and Resources thread will stay on its own.

At the moment, we have the crash course for grafter from TheNomad, Tool tip thread from JarquaFelmu, and, IIRC U-238 made a thread about making SC models in 3-d programmes.

So basically, if you have a tutorial to write, now's the time to get cracking. I'll merge the threads at the end of either this month, or the next, depending on responses and how busy I am with exams.

If you are making a tutorial you aim to put into the thread, start your thread with TI:: before the main title.
[Source (http://www.warboards.org/announcement.php?f=19&a=75)]

Although my general idea (and Ktan's as well, I bet) was to start punching up some modding tutorial in a similar form to our current Mapping one (http://www.warboards.org/showthread.php?t=13285) (of which is somewhat the 3rd life of those initiatives if am remembering right). We had some beginners' modding parts of it in older Mapping & Modding FAQ's, but in the revamp process it somehow got lost in translation. No matter. Now it's the time to fix it, and no better than our current modders to get together in the back scenes (aka PM's) and tweak details with one another like I did in the past with UED'. As usual you can always count with any of my help, provided my schedule allows it. ;)

For reference, our process was rather simple we set which did what and gathered the knowledge 'spilled' around in FAQ's, threads and with help of the inborn search feature to find good clear questions and quality answers and then we compiled texts for it and passed it onto one another for revisions, adding final touches and finally doing a master version goin' public.
It may seem simple to gather information at 1st glance, but it isn't though (because you could get swamped in it). Just a tiny heads up, for all it may be of worth. *Wink, wink* :)

U-238
05-19-2007, 9:06 AM
"Hell, it's about time." :p (I'll be using that quote alot :D)

I'll get cracking on finishing v2 of my guide and I'll be here for any other tutorial needs. :)