HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Inside the w3m/w3x (the 2nd)

01-12-2007, 10:56 AM#31
PipeDream
It's 2's complement.
02-05-2007, 10:48 PM#32
Mapz_Maker
Quote:
Originally Posted by document
-Trigger Strings and Strings

Strings are just arrays of chars terminated with a null char (C++ '\0'). However Blizzard sometimes use special control codes to change the displayed color for the string. These codes are like "|c00BBGGRR" where "BB", "GG" and "RR" are hexadecimal values (using 2 digits each) for the blue, the green and the red values. If a string starts with "TRIGSTR_" (case sensitive), it's considered as a trigger string. A trigger string is kept in memory as is ("TRIGSTR_***") and is only changed when Warcraft 3 needs to display it. Instead of just writing "TRIGSTR_000" on the user screen, War3 will look in its trigger string table created when the map was loaded and display the corresponding trigger string instead. Trigger strings only work for files inside a w3m (Jass, w3i, ...) except for the WTS which is used to define the trigger string table itself. If the number following "TRIGSTR_" is negative the trigger string will refer to a null (empty) string, if "TRIGSTR_" is followed by text, it'll be considered as trigger string #0 ( = "TRIGSTR_000").
"TRIGSTR_7", "TRIGSTR_07", "TRIGSTR_007" and "TRIGSTR_7abc" are all representing trigger string #7. "TRIGSTR_ab7", "TRIGSTR_abc" and "TRIGSTR_" refer to trigger string #0. "TRIGSTR_-7" is negative and will not refer to a trigger string; it'll be displayed as "". By convention, "TRIGSTR_" is followed by 3 digits and the null char that ends the string.
Example 1: your got the string "blah |c000080FFblah", War3 will display "blah blah" but the second "blah" will be orange (blue=00 + green=80 + red=FF ==> orange)
Example 2: you got "TRIGSTR_025" and trigger string 25 is defined (in the .wts file) as "blah|c000080FFblah", it'll display the same result as the previous example.
Size (string): vary. String length + 1 (null terminating char)
Size (trigger string): 12 bytes
it is |cTTRRGGBB
T = Transparency
R = red
G = green
B = blue
02-05-2007, 10:58 PM#33
wyrmlord
Quote:
Originally Posted by Mapz_Maker
it is |cTTRRGGBB
T = Transparency
R = red
G = green
B = blue
Yes, that's how color codes are structured.
02-24-2007, 12:05 AM#34
Mapz_Maker
(i think wyrm is agreeing with me, not saying it is obvious)
Pitzer, if you haven't already, update it! it is wrong! (i haven't checked lately though) If it is the same as when i posted no one has looked at the RED highlight.
02-24-2007, 04:00 AM#35
Mapz_Maker
@wyrm: my statment says "TTRRGGBB" meaning "|cFFFF0000" would be red, Please specify if you are talking to me or to someone else, this needs to be altered but it hasn't
02-24-2007, 08:14 PM#36
wyrmlord
I must have misread something. I thought the red text was your correction instead of the original.
02-25-2007, 07:39 PM#37
Mapz_Maker
(Removed caps/color) Your still need to fix it...
02-25-2007, 09:03 PM#38
Oglog
Calm down its only some text most people know that anyway (obviously not the person who mae that part of the document but)
02-26-2007, 11:26 PM#39
PitzerMike
It's good that you're pointing out errors in the docs, but seriously, the caps and color abuse was totally uncalled for, please remove it.

I've seen your post some days ago already and it will be included in the next update. However, it's not like I'm updating daily for every tiny thing. Afterall I'm sure everyone here knows that the order is ARGB, and not ABGR.
07-29-2007, 03:52 PM#40
TheSecretArts
I have a WAI adendum;
this is for the end parts of WAI
take:
Code:
int: game options
Unless otherwise noted all of the options are contained in HiWord of options integer.
Check for the presence of options by using a mask with following values:

Disable Fog Of War: 0x0001
Disable Victory/Defeat Conditions: 0x0002

int: regular game speed
string: path to map file
int: number "h" of Players (0-2)
"h" times players structure *(9)
int: ???
and replace it with what i have collected
Code:
int GameFlags (0x0001 - No fog, 0x0002 - No Victory / Defeat Conditions)
in GameSpeed
string TestMap Path
int NumPlayers 
for each player do:
//Start Player Structure
int Handicap (% of 64)
int Player Type (0C - Current AI, 04 -  Outside AI, 00 - Standard AI, 06/0E - Observer Chat, 01 - Player)
??? AI Source has two possible types, int or string;
     //AI source is the int set 01,00,00,00 when you have a Player/Observer/Current/Standard AI AND
     //AI source is a string whe nyou have an outside AI and has a 00 after it; EG, <String>,00
//End Player Structure
there is no unkown integer at the end
07-29-2007, 04:20 PM#41
PitzerMike
Thanks. What version of the .wai are we talking here?
07-29-2007, 04:38 PM#42
TheSecretArts
The wai i examined what wai generated from the latest patch so im assuming latest.
07-29-2007, 05:06 PM#43
PitzerMike
Quote:
Originally Posted by Format Specs
int: wai file format version: 2

I meant that version. Was it 2? Or is there already a newer version?
07-29-2007, 05:38 PM#44
SFilip
war3map.wtg, TFT version:
Code:
*(4)ECA function definition structure
int: function type: 0=event, 1=condition, 2=action
String: function name
int: enable state: 0=function disabled, 1=function enabled
"x" times a parameter structure*(5). x depends of the function and is hardcoded.
int: ???
int: number "i" of event-condition-action (ECA) function
"i" times an ECA function definition structure*(4)(if this trigger doesn't have multiple actions it should be set to 0 so we don't have this section)
The last two lines shouldn't be there and don't make sense whatsoever.
07-29-2007, 06:36 PM#45
PitzerMike
Yes, the int: ??? shouldn't be there.

However the int "i" is correct.
It's the number of child ECA's which is usually zero. Only for if (multiple conditions/actions), foreach (multiple actions) ect. it can be > 0.

Reminds me I should update the WTG specs, I have a completely rewritten version of it on my HD, just havn't had the time to update yet.

Also don't trust the version by Zoxc that is floating around. It's got the parameter structure completely flawed.