Advertisement
krot

war3map.wtg

Mar 20th, 2024 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. https://www.hiveworkshop.com/threads/warcraft-3-trigger-format-specification-wtg.294491/
  2. Header:
  3. char[4]: file ID (WTG!)
  4. int: wtg file format version = 7
  5. int: number "a" of triggers categories
  6. "a" times a category definition structure*
  7. int: number "b" ???
  8. int: number "c" of variables
  9. "c" times a variable definition structure**
  10. int: number "d" of triggers
  11. "d" times a trigger definition structure***
  12.  
  13. *Category Definition Structure:
  14. int: category index
  15. String: category name
  16. int: Category type: 0=normal, 1=comment
  17.  
  18. **Variable Definition Structure:
  19. String: variable name
  20. String: variable type
  21. int: number "e" ???
  22. int: array status: 0=not an array, 1=array
  23. int: array size
  24. int: initialisation status: 0=not initialized, 1=initialized
  25. String: initial value (string)
  26.  
  27. ***Triggers Definiton Structure:
  28. String: trigger name
  29. String: trigger description
  30. int: trigger type: 0=normal, 1=comment
  31. int: enable state: 0=disabled, 1=enabled
  32. int: custom text trigger state: 0=not a custom text trigger, 1=custom text trigger (use data in the WCT)
  33. int: initial state: 0=initially on, 1=not initially on
  34. int: run on map initialization: 0=no, 1=yes
  35. int: index of the category the trigger belongs to
  36. int: number "i" of event-condition-action (ECA) function
  37. "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)
  38.  
  39. *(4)ECA function definition structure
  40. int: function type: 0=event, 1=condition, 2=action
  41. String: function name
  42. int: enable state: 0=function disabled, 1=function enabled
  43. "x" times a parameter structure*(5). x depends of the function and is hardcoded.
  44. int: ???
  45. int: number "i" of event-condition-action (ECA) function
  46. "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)
  47.  
  48. *(5)Parameters Structure:
  49. int: type which can be 0=preset, 1=variable, 2=function, 3=string
  50. String: parameter value
  51. int: begin function (if it is function it should be set to 1 otherwise to 0)
  52. if begin function is set to 1:
  53. int: type: 3
  54. String: the same as parameter value
  55. int: begin function: 1
  56. "x" times a parameters structure*(5). x depends on the function and is hardcoded.
  57. int: end function (always set to 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement