Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://www.hiveworkshop.com/threads/warcraft-3-trigger-format-specification-wtg.294491/
- Header:
- char[4]: file ID (WTG!)
- int: wtg file format version = 7
- int: number "a" of triggers categories
- "a" times a category definition structure*
- int: number "b" ???
- int: number "c" of variables
- "c" times a variable definition structure**
- int: number "d" of triggers
- "d" times a trigger definition structure***
- *Category Definition Structure:
- int: category index
- String: category name
- int: Category type: 0=normal, 1=comment
- **Variable Definition Structure:
- String: variable name
- String: variable type
- int: number "e" ???
- int: array status: 0=not an array, 1=array
- int: array size
- int: initialisation status: 0=not initialized, 1=initialized
- String: initial value (string)
- ***Triggers Definiton Structure:
- String: trigger name
- String: trigger description
- int: trigger type: 0=normal, 1=comment
- int: enable state: 0=disabled, 1=enabled
- int: custom text trigger state: 0=not a custom text trigger, 1=custom text trigger (use data in the WCT)
- int: initial state: 0=initially on, 1=not initially on
- int: run on map initialization: 0=no, 1=yes
- int: index of the category the trigger belongs to
- int: number "i" of event-condition-action (ECA) function
- "i" times an ECA function definition structure*(4) (if it's a custom text trigger it should be 0 so we don't have this section)
- *(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)
- *(5)Parameters Structure:
- int: type which can be 0=preset, 1=variable, 2=function, 3=string
- String: parameter value
- int: begin function (if it is function it should be set to 1 otherwise to 0)
- if begin function is set to 1:
- int: type: 3
- String: the same as parameter value
- int: begin function: 1
- "x" times a parameters structure*(5). x depends on the function and is hardcoded.
- int: end function (always set to 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement