SplitMSG
by VéKTöR
⤓ Download · 10.0 KBVéKTöR's script helps you separate death messages off into a side window, so they don't clutter your chat HUD. Optionally, you can also filter out other messages like "Station Access On", etc. That way you'll get the most out of those few lines!
- Filename
SplitMSG.zip- Size
- 10.0 KB (listed 10KB)
- Type
- ZIP
- Developer
- VéKTöR
- Date
- 1999-05-16 (newest file inside)
- theexiled upload
- Jan 15, 2009 - 01:34
- Format
- Zip archive data, at least v2.0 to extract, compression method=deflate
Readme — ZEAR/readme.txt (from the archive itself)
Installing the String Pack for Presto Pack
------------------------------------------
1. If you don't already have one, create a '<tribes>\config\zear' folder.
2. Unzip MoreStringPresto.cs into the 'zear' folder.
3. In your <tribes>\config\autoexec.cs file, anywhere after the line
exec("presto\\autoexec.cs");
add the line
Include("zear\\MoreStringPresto.cs");
4. (Re)start Tribes.Readme — GRIMJACK/readme.txt (from the archive itself)
What are these functions for?
These are for finding the pixel size of strings, and
trimming a string to a specified pixel size (or less).
There are 2 functions, as follows:
String::FindPixelWidth(%STRING);
String::TrimToPixelWidth(%STRING,%INTEGER)
%STRING is the string you wish to know the size of, or
to trim to the pixel width listed in %INTEGER. So, the
line:
String::FindPixelWidth("Now is the time for all good men...");
would return the value 224, as that is how wide it would
appear inside Tribes when printed to the screen, a HUD,
or whatever. Next, the line:
String::TrimToPixelWidth("Now is the time for all good men...",200)
will return "Now is the time for all good ", as the next
character, "m" is 10 pixels wide and would bump your
string up to a total of 201 pixels wide.
My hope is that it can be used to stop HUD's from text
wrapping and therefor scrolling stuff off the bottom of
the HUD. Very annoying. With any luck at all, people
will find lots of other uses for it as well.
Feel free to modify the code if you like, and you know
what you're doing, of course.
If you have questions, I can be contacted through the
scripting forum at PlanetStarSiege, or by email at
[email redacted].
_______________________________________________________
Required Stuff:
Presto Pack 0.93+
Zear's Presto compatible extra string functions
_______________________________________________________
Installation:
Add the following line to your autoexec.cs file.
Include("GrimJack\\string_lengths.cs");
This function depends on a function written by Zear, namely
String::Ascii(). So, needless to say, you'll need to have
Zear's presto compatible string functions installed and
working as well.
This also requires the Presto Pack, if only for the
INCLUDE function.
Other than that, it is currently setup to work from your
TRIBES\CONFIG\GRIMJACK folder. Drop both files in there.
______________________________________________________
Bugfixes:
There was a nasty habit of creating an endless loop in the
Trim function, as I didn't check to see if the string that
was submitted was already shorter than the max. :( So now
the very first thing is a check to see if this is the case,
if so it simply returns the original string, unmodified.
Also, I had the space character - " " incorrectly measured
in the Char_lengths.cs file, so it was tacking on an extra
pixel for each space you had in the string.
______________________________________________________
Known issues:
If I missed a character (rather unlikely) it will count it as
a single pixel wide. I have run through every character in the
ASCII sequence I could make Tribes print sucessfully, and most
of the ones it won't print properly as well.
I am thinking of checking for a zero length return on a character
and arbitrarily assigning it a value of 8 or so, but I haven't
done it yet.
Have fun with it, folks.
Dave Stewart, aka GrimJack
SQA Engineer
-Will work for bug free code-
[email redacted]Contents — 7 files (inside the archive)
- GRIMJACK/char_lengths.cs 4.7 KB
- GRIMJACK/readme.txt 3.0 KB
- GRIMJACK/string_lengths.cs 3.0 KB
- vektor/SplitMSG.cs 6.6 KB
- vektor/SplitMSG.txt 1.6 KB
- ZEAR/MoreStringPresto.cs 9.1 KB
- ZEAR/readme.txt 436 B
Source: The Exiled — Tribes Repository
Original page: https://library.theexiled.pwnageservers.com/file.php?id=541
Archived source HTML: theexiled/mirror-html/file/541.html
Original page: https://library.theexiled.pwnageservers.com/file.php?id=541
Archived source HTML: theexiled/mirror-html/file/541.html