-
Notifications
You must be signed in to change notification settings - Fork 0
/
w3g_actions.txt
1648 lines (1261 loc) · 73.5 KB
/
w3g_actions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*******************************************************************************
* WarCraft III Replay action format description *
* *
* document version: 1.00 *
* document date : 2005-04-30 *
* document authors: blue, nagger *
* *
* For more informtion about w3g file format, please visit: *
* http://w3g.deepnode.de *
* and *
* http://warcraft.kliegman.com *
* *
* Check out the developer forum on: *
* http://shadowflare.gameproc.com *
* or contact us via mail *
* mailto:w3g_format@deepnode.de *
* *
*******************************************************************************
===============================================================================
Table of Content
===============================================================================
1.0 Introduction
1.1 Standardized APMs
2.0 Action ID's
3.0 AbilityFlags
4.0 ItemID's
4.1 Stringencoded ItemID's
4.2 Numeric ItemID's
5.0 ObjectID's
6.0 Click Coordinates
7.0 General notes
8.0 Notes on older Patches
9.0 Credits
10.0 Document revision history
===============================================================================
DISCLAIMER (please read it ...)
===============================================================================
All information in this document was solely obtained by looking at the replay
file and guessing the meaning of each single field. All knowledge about the
games mechanics is based on experience obtained by playing the game.
Neither reverse engineering was used nor any copyrighted files modified.
It is explicitly prohibited to use the information provided in this document
for any illegal activities including hacking, cheating and pirating.
Thank you Blizzard for your great games and a quite straight-forward
WarCraft III replay file format ;-)
The use of the information provided in this document is free of charge as long
as you follow the rules above. Furthermore you may copy it freely as long as
the file is unchanged (please mail us about any error or addition - we like
to keep things centralized).
We would really appreciate it if you credit us in your project or drop us
a line via mail - because we like to know if the work put into this document
was anything worth after all ...
===============================================================================
1.0 Introduction
===============================================================================
This document describes the format of the actions found in the TimeSlot blocks
of the replay (see 'w3g_format.txt' section 5 for details):
0x1F - TimeSlot block (rarely also 0x1E)
1 word - number of bytes that follow
1 word - time increment (milliseconds)
about 250 ms in battle.net
about 100 ms in LAN and single player
n-2 byte - CommandData block(s) (not present if n=2)
For every player which has executed an action during the last time slot there
is at least one 'CommandData' block.
CommandData block:
1 byte - PlayerID
1 word - Action block length
n byte - Action block(s) (may contain multiple actions !)
Action block:
1 byte - ActionID (see 2.0)
n byte - action arguments (see 2.0)
Notes:
o The number of 'Action blocks' can only be determined by parsing the actions
up to the denoted Action block length.
o The 'time increments' are only correct for replays played at fastest speed.
o Accumulate all 'time increments' to get the time of current action(s).
TODO: analyse time increments of slow/normal speed
===============================================================================
1.1 Standardized APMs
===============================================================================
This section defines a standardized Actions-Per-Minute(APM) value.
With it we hope to make APM values more comparable inbetween all current and
future replay tools out there and coming. Please use it in your tool too :D
The main goal is an easy-to-implement algorithm. This way even simple replay
tools should have no difficulties at all to calculate it.
Basic rules:
o Only count in-game actions (no map-signals, no chat).
o Every counted action increments the player action counter by one.
o Do not filter out any player action.
o APM = numbers of actions of a player / time this player played.
Accordingly all actions in section 2.0 are marked in the headline:
[APM+] = Action is counted.
[APM?] = Special, please read the notes on this action (0x16, 0x19).
[APM-] = Action is not counted.
Additionally you have to pay attention to the pause/unpause actions in order to
determine the played time correctly:
Pause game (action 0x01):
o Stop the time at the first occurence of this action
(there might be multiple ones).
o The pause action itself is not counted.
o Do NOT stop counting the actions within a pause
(but skip actions like map signals as usual).
Resume game (action 0x02):
o Resume counting the time at first occurence of this action
(there might be multiple ones).
o Do not count this action itself.
Due to this simple method there are the following inadequacies:
o Cancelling a unit/building by pressing Escape key will be counted twice
(Action 0x61 + Action 0x10 with unitid=0x08000D00).
o Map signal are uncounted. They are no real in-game actions and can very
easily abused to increase the APM value.
o No 'tab' action are counted (since patch 1.14b).
(Prior to patch 1.14b only the last action of a complete cycle through all
subgroups was not counted.)
Keep in mind that for the APM value it is not important, which consequences
within the game an action has. It is only significant *how often* it is used.
If a player executes a specific action once every minute, it only results in
a 1 APM difference at the end.
Do you really need a APM precision better than say ±5 APMs ?
Note:
o If you decide to develop your own APM system (e.g. by filtering some user
actions) please do *not* call it APM.
Call it TrueAPM, RealAPM, myAPM, UserAPM or something like that instead.
===============================================================================
2.0 Action ID's
===============================================================================
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x01 - Pause game [ 1 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Notes:
o Due to lag there can be multiple pause or unpause actions, but they didn't
stack. The first unpause will resume the game, no matter how many pause
actions came before.
o There can be other actions between pause and resume action
(e.g. map signal action, actions issued before game pausing but delayed
by network latency)
o The length of the replay (found in replay header) is the effective play
time excluding any pause
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x02 - Resume game [ 1 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Note:
o See notes for Pause game action
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x03 - Set game speed in single player game (options menu) [ 2 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - game speed:
0x00 - slow
0x01 - normal
0x02 - fast
Note:
o Time increments (see 1.0) are only correct for fast speed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x04 - Increase game speed in single player game (Num+) [ 1 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Note:
o Time increments (see 1.0) are only correct for fast speed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x05 - Decrease game speed in single player game (Num-) [ 1 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Note:
o Time increments (see 1.0) are only correct for fast speed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x06 - Save game [ n bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
n bytes - savegame name (null terminated string)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x07 - Save game finished [ 5 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknown (always 0x00000001 so far)
This action is supposed to signal that saving the game finished.
It normally follows a 0x06 action.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x10 - Unit/building ability (no additional parameters) [ 15 bytes ] [APM+]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 word - AbilityFlags (see section 3) ('byte' for patch version < 1.13)
1 dword - ItemID (see section 4)
1 dword - unknownA (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - unknownB (0xFFFFFFFF) (only present for patch version >= 1.07)
Note:
o For pre v1.07 replays this record is only 6 bytes.
o For pre v1.13 replays AbilityFlags is a Byte and therefore
the whole block 1 byte smaller.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x11 - Unit/building ability [ 22 bytes ] [APM+]
(with target position)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 word - AbilityFlags (see section 3) ('byte' for patch version < 1.13)
1 dword - ItemID (see section 4)
1 dword - unknownA (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - unknownB (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - target location X
1 dword - target location Y
Note:
o For pre v1.07 replays this record is only 14 bytes.
o For pre v1.13 replays AbilityFlags is a Byte and therefore
the whole block 1 byte smaller.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x12 - Unit/building ability [ 30 bytes ] [APM+]
(with target position and target object ID)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 word - AbilityFlags (see section 3) ('byte' for patch version < 1.13)
1 dword - ItemID (see section 4)
1 dword - unknownA (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - unknownB (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - target position X coordinate
1 dword - target position Y coordinate
1 dword - objectID1
1 dword - objectID2
objectID1 == objectID2 == FF FF FF FF for no object (e.g. rally on ground)
Note:
o For pre v1.07 replays this record is only 22 bytes.
o For pre v1.13 replays AbilityFlags is a Byte and therefore
the whole block 1 byte smaller.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x13 - Give item to Unit / Drop item on ground [ 38 bytes ] [APM+]
(with target position, object ID A and B)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 word - AbilityFlags (see section 3) ('byte' for patch version < 1.13)
1 dword - ItemID (see section 4)
1 dword - unknownA (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - unknownB (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - target location X
1 dword - target location Y
1 dword - Target_objectID_1
1 dword - Target_objectID_2
1 dword - Item_objectID_1
1 dword - Item_objectID_2
Notes:
o For pre v1.07 replays this record is only 30 bytes.
o For pre v1.13 replays AbilityFlags is a Byte and therefore
the whole block 1 byte smaller.
o Target_objectID 1 and 2 is 0xFFFFFFFF for ground
Example: drop potion on ground:
13
40
21 00 0D 00
5B 10 58 C3
97 CE 1B 44
FF FF FF FF
FF FF FF FF
11 2D 00 00
D3 96 00 00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x14 - Unit/building ability [ 43 bytes ] [APM+]
(with two target positions and two item ID's)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 word - AbilityFlags (see section 3) ('byte' for patch version < 1.13)
1 dword - ItemID_A (see section 4)
1 dword - unknownA (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - unknownB (0xFFFFFFFF) (only present for patch version >= 1.07)
1 dword - target location A_X
1 dword - target location A_Y
1 dword - ItemID_B (see section 4)
9 byte - unknown
1 dword - target location B_X
1 dword - target location B_Y
Notes:
o For pre v1.07 replays this record is only 35 bytes.
o For pre v1.13 replays AbilityFlags is a Byte and therefore
the whole block 1 byte smaller.
Examples:
(human townhall rightclick on tree (tree not direct accessible))
Felwood:
14 00 03000D00 000024C5 0000B844 72745443 40 00100100 000000FF 000024C5 0000B844
. . . . . . . . $ . . . . D r t T C @ . . . . . . . . . . $ . . . . D
Lordaeron Summer:
14 00 03000D00 0000D8C4 00005044 746C544C 40 00100100 000000FF 0000D8C4 00005044
. . . . . . . . . . . . P D t l T L @ . . . . . . . . . . . . . . P D
Village-Autumn:
14 00 03000D00 000070C4 00007044 77745446 40 00100100 000000FF 000070C4 00007044
. . . . . . . . p . . . p D w t T F @ . . . . . . . . . . p . . . p D
Dungeon:
14 00 03000D00 0000A0C3 00009844 68735444 40 00100100 000000FF 0000A0C3 00009844
. . . . . . . . . . . . . D h s T D @ . . . . . . . . . . . . . . . D
(rightclicks)[==]
14 00 03000D00 0000D845 000000C6 6C6F676E 08 00A05500 0000000F 0000D845 000000C6
. . . . . . . . . E . . . . l o g n . . . U . . . . . . . . E . . . .
14 00 03000D00 0000C0C4 00001BC6 77745442 40 00100100 000000FF 0000C0C4 00001BC6
. . . . . . . . . . . . . . w t T B @ . . . . . . . . . . . . . . . .
14 00 03000D00 00008845 0000BE45 746C544C 40 00100100 000000FF 00008845 0000BE45
. . . . . . . . . E . . . E t l T L @ . . . . . . . . . . . E . . . E
14 00 03000D00 00004AC5 0000C3C5 65746165 08 00905908 00000001 00004AC5 0000C3C5
. . . . . . . . J . . . . . e t a e . . . Y . . . . . . . J . . . . .
14 00 03000D00 000080C4 0000D845 6C6F6775 08 0090590A 00000001 000080C4 0000D845
. . . . . . . . . . . . . E l o g u . . . Y . . . . . . . . . . . . E
(attack)[!=]
14 18 0F000D00 BA387FC3 2C6F6FC5 746C544C 40 00100100 000000FF 0000A0C3 000074C5
. . . . . . . 8 . , o o . t l T L @ . . . . . . . . . . . . . . t .
(undead gold)[==]
14 04 6C6F6775 0000F044 00002C45 6C6F676E 08 00A05500 0000000F 0000F044 00002C45
. . l o g u . . . D . . , E l o g n . . . U . . . . . . . . D . . , E"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x16 - Change Selection (Unit, Building, Area) [ 4+n*8 bytes ] [APM?]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - select mode:
0x01 - add to selection (select)
0x02 - remove from selection (deselect)
1 word - number (n) of units/buildings
block repeated n times:
1 dword - ObjectID1
1 dword - ObjectID2
(ObjectID1 == ObjectID2 for starting town hall and trees ?)
Note:
o If one simply selects a new unit then this results in a single 'add to
selection'-action (16 01) preceded by a 'remove from selection'-action
(16 02) for the complete old selection.
APM-Note:
o Every 'Change Selection' action (both 'select' and 'deselect') increases
the APM counter by one [APM+], BUT:
o Do *not* count a 'select' action that follows *immediately* after a
'deselect' action within the *same* CommandData block.
This is reasonable because mostly all deselect actions in front of select
actions are autogenerated by WarCraft and therefore the whole deselect/
select combo action needs to be counted as 1 action only.
o Example pseudo algorithm:
FOREACH TimeSlot-block DO
...
FOREACH CommandData-block DO
id = ReadPlayerID()
LastActionWasDeselect = FALSE;
...
FOREACH Action-block DO
actionid = ReadActionID()
...
IF (actionid == 0x16) THEN
IF (selectMode == deselect) THEN
countThisActionAsAPM()
LastActionWasDeselect = TRUE;
ELSE
IF (!LastActionWasDeselect) THEN countThisActionAsAPM()
LastActionWasDeselect = FALSE;
ENDIF
ELSE
LastActionWasDeselect = FALSE;
ENDIF
...
ENDFOREACH
...
ENDFOREACH
...
ENDFOREACH
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x17 - Assign Group Hotkey [ 4+n*8 bytes ] [APM+]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - group number (0-9)
the group number is shifted by one:
key '1' is group0, ... , key '9' is group8 and key '0' is group9
1 word - number (n) of items in selection
block repeated n times:
1 dword - ObjectID1
1 dword - ObjectID2
Note:
o There is no extra 'add to group' action (Shift-[1..0]). Instead the
whole *new* group is listed with an 'assign group hotkey' action.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x18 - Select Group Hotkey [ 3 bytes ] [APM+]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - group number (0-9)
the group number is shifted by one:
key '1' is group0, ... , key '9' is group8 and key '0' is group9
1 byte - unknown (always 0x03)
Note:
o There is no deselect action (0x16 02) issued for the previous selection.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x19 - Select Subgroup (patch version >= 1.14b) [ 13 bytes ] [APM?]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - ItemID (see section 4)
1 dword - ObjectID1 (see section 5)
1 dword - ObjectID2
Notes:
o Always following a 0x1A-Action (Pre subselection)
o The ItemID and the ObjectID represents the first unit in the newly
selected subgroup.
This can be used to associate ItemID's with ObjectID's for one unit!
o Nearly all 'Select Subgroup' actions are autogenerated.
TODO:
o Find algorithm to detect real 'SelectSubgroup' actions (TAB-key pressed)
for APM counting.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x19 - Select Subgroup (patch version < 1.14b) [ 2 bytes ] [APM?]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - subgroup number (0-11, 0xFF)
Notes:
o There is a special subgroup action: 0x19 0xFF
It is an auto-generated action in the replay and might mean something
like "update subgroups" (e.g. when a summoned unit disappears or peasant
turns into militia etc.).
o Most 'select subgroup 0'-actions (0x19 00) are autogenerated too (e.g. if
one selects a subgroup and then selects a completely different unit).
o Since patch 1.13 nearly all 'Select Subgroup' actions are autogenerated.
Very often WarCraft seems to write a complete subgroup status to the replay.
For every player there is an 'Update Subgroup' action (0x19 0xFF)
followed immediately by a 'Select Subgroup' action where the subgroup
number represents the current subgroup status. This status does not always
correspond to the currently selected subgroup of this player. (TODO: why?)
APM-Note:
o Only count this action if 'subgroup number' is neither 0x00 nor 0xFF.
o Do *not* count a 'Select Subgroup' action that follows *immediately* after
a 'Update Subgroup' action within the *same* CommandData block.
(Adapt the example pseudo algorithm of action 0x16.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x1A - Pre Subselection [ 1 byte ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Notes:
o Mostly followed by a 0x19-Action (Select Subgroup) but not always
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x1B - Unknown [ 10 bytes ] [APM-]
0x1A for WarCraft III patch version <= 1.14b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - unknown (always 0x01 so far)
1 dword - unknown (ObjectID1?)
1 dword - unknown (ObjectID2?)
Notes:
o Only in scenarios, maybe a trigger-related command
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x1C - Select Ground Item [ 10 bytes ] [APM+]
0x1B for WarCraft III patch version <= 1.14b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - unknown (flags? always 0x04 so far)
1 dword - ObjectID1
1 dword - ObjectID2
Notes:
o Leftclick on an item laying on the ground (selecting it).
o This action is normally preceded by a deselect (0x16 02) and subgroup
update (0x19 FF) action.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x1D - Cancel hero revival [ 9 bytes ] [APM+]
0x1C for WarCraft III patch version <= 1.14b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - UnitID1 (always a hero)
1 dword - UnitID2 (always a hero)
Notes:
o This action is only present in LAN/Multiplayer games.
o It is issued for every canceled hero revival - regardless which spot
in the "build/revival queue" the hero had.
o It is not issued for canceling hero training. There you get the "usual"
"61 10 40 08 00 0D 00 ..." action sequence.
o This action is normally preceded by a deselect (0x16 02) and subgroup
update (0x19 FF) action.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x1E - Remove unit from building queue [ 6 bytes ] [APM+]
0x1D for WarCraft III patch version <= 1.14b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - SlotNr (0 = unit currently build,
1 = first unit in queue,
2 = second unit in queue,
...
6 = last unit in queue)
1 dword - ItemID (StringID for the canceled unit)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x21 - unknown [ 9 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknown [A] (0x000064F0 so far)
1 dword - unknown [B] (0x000064F0 so far)
Note:
o Very very rare action block.
o Found in replays with patch version 1.04 and 1.05.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x20, 0x22-0x32 - Single Player Cheats [ * bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Action | Size | Cheat | Description
-------+--------+--------------------------+-------------------------------
0x20 | 1 Byte | TheDudeAbides | Fast cooldown
0x22 | 1 Byte | SomebodySetUpUsTheBomb | Instant defeat
0x23 | 1 Byte | WarpTen | Speeds construction
0x24 | 1 Byte | IocainePowder | Fast Death/Decay
0x25 | 1 Byte | PointBreak | Removes food limit
0x26 | 1 Byte | WhosYourDaddy | God mode
0x27 | 6 Byte | KeyserSoze [amount] | Gives you X Gold
0x28 | 6 Byte | LeafitToMe [amount] | Gives you X Lumber
0x29 | 1 Byte | ThereIsNoSpoon | Unlimited Mana
0x2A | 1 Byte | StrengthAndHonor | No defeat
0x2B | 1 Byte | itvexesme | Disable victory conditions
0x2C | 1 Byte | WhoIsJohnGalt | Enable research
0x2D | 6 Byte | GreedIsGood [amount] | Gives you X Gold and Lumber
0x2E | 5 Byte | DayLightSavings [time] | Set a time of day
0x2F | 1 Byte | ISeeDeadPeople | Remove fog of war
0x30 | 1 Byte | Synergy | Disable tech tree requirements
0x31 | 1 Byte | SharpAndShiny | Research upgrades
0x32 | 1 Byte | AllYourBaseAreBelongToUs | Instant victory
| | |
? | | Motherland [race][level] | Campain level jump
Additional Parameter:
o Action 0x27,0x28,0x2D: Adding Resources
1 byte - unknown (always 0xFF)
1 dword - (signed) amount of ressources
o Action 0x2E: Set time of day
1 float - time (IEEE single precision float, 4Bytes)
Notes:
o Action 0x21 is not a cheat (see action above).
o Cheat "TenthLevelTaurenChieftain" (changes background music) does not
appear in replays.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x50 - Change ally options [ 6 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - player slot number (0-11)(including computer AI players)
1 dword - flags
bit 0-4 - set if allied with player (value 0x1F)
bit 5 - set if vision shared with player (value 0x20)
bit 6 - set if unit control is shared with player (value 0x40)
bit 10 - set if "allied victory" is ticked (value 0x0400)
(for patch version >= 1.07, see note)
Notes:
o All other bits not listed above are unused (zero).
o The parameter to this action always reflects the current status of all
options.
o There is a action for every player where at least one option was changed.
o Changing the "allied victory" option results in an action for every player
in game (no matter if ally or non-ally).
o On patch version <= 1.06 the "allied victory" option was represented by
bit 9 (value 0x0200).
o Shared unit control is linked to both shared vision and ally up.
If either of them is unticked shared unit control is disabled too.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x51 - Transfer resources [ 10 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - player slot number (0-11)(including computer AI players)
1 dword - Gold to transfer
1 dword - Lumber to transfer
Note:
o Transfering resources to multiple players results in an action for every
involved player.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x60 - Map trigger chat command (?) [ n bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknownA
1 dword - unknownB
n bytes - null terminated string (chat command or trigger name)
Note:
o unknownA == unknownB so far
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x61 - ESC pressed [ 1 byte ] [APM+]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Notes:
o This action often precedes cancel build/train actions.
o But it is also found seperately (e.g. when leaving the 'choose skill'
subdialog of heros using ESC).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x62 - Scenario Trigger [ 13 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknown [A]
1 dword - unknown [B]
1 dword - unknown (counter) (only present for patch version >= 1.07)
Notes:
o A=B in all replays so far.
o Probably sync action for custom map timer triggers.
o The third dword counts upwards in TFT azure tower defense map games.
o The third dword was missing for replays with patch version <= 1.06
o For pre v1.07 replays this record is only 9 bytes.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x66 - Enter choose hero skill submenu [ 1 byte ] [APM+]
0x65 for WarCraft III patch version <= 1.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Notes:
o This action is issued if you select a hero and enter his 'choose skill'
submenu. It does not matter wether one actually can choose a new skill
(because of level up) or not.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x67 - Enter choose building submenu [ 1 byte ] [APM+]
0x66 for WarCraft III patch version <= 1.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
no additional data
Notes:
o This action is issued if you select a worker (peon, peasant, acolyte, wisp)
and enter the build submenu to choose a building to create.
It does not matter whether one really builds something.
o It is usually followed by a build action (0x11) or a ESC action (0x61).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x68 - Minimap signal (ping) [ 13 bytes ] [APM-]
0x67 for WarCraft III patch version <= 1.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - Location X
1 dword - Location Y
1 dword - unknown (00 00 A0 40)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x69 - Continue Game (BlockB) [ 17 bytes ] [APM-]
0x68 for WarCraft III patch version <= 1.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknown [C]
1 dword - unknown [D]
1 dword - unknown [A]
1 dword - unknown [B]
Notes:
o This action is issued if the game winner chooses 'continue game' or
if 'observer on defeat' is enabled and a loser chooses 'continue game'.
o Always combined with 0x6A action (see below).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x6A - Continue Game (BlockA) [ 17 bytes ] [APM-]
0x69 for WarCraft III patch version <= 1.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 dword - unknown [A]
1 dword - unknown [B]
1 dword - unknown [C]
1 dword - unknown [D]
Notes:
o This action is issued if the game winner chooses 'continue game' or
if 'observer on defeat' is enabled and loser choose 'continue game'.
o Only present for replay saver, 'continue game' of other players results in
normal 'leave game' action.
o Always followed by a 0x69 action (see above) with data [C][D][A][B].
o Parameters [A][B] look similar to those of 0x62 action.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0x75 - Unknown [ 2 bytes ] [APM-]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 byte - unknown
Notes:
o Only in scenarios, maybe a trigger-related command
===============================================================================
3.0 AbilityFlags
===============================================================================
Ability flags represent additional attributes of an action.
E.g.: If bit 0 is set the action was queued (by pressing the shift key) and
will only be executed after the previous action was finished.
Unfortunately Warcraft sets some of the bits automatically, even when the
player didn't press a modifier button/key (e.g. subgroup command flag).
The Flag item used to have BYTE size until patch 1.12. With patch 1.13 it
was extended to a WORD.
Flag value is composed of the following values
0x0001 - queue command (shift held down)
0x0002 - ? (apply to all units in subgroup ?)
0x0004 - ? (area effect ?)
0x0008 - group command (all units in current selection)
0x0010 - move group without formation (formation disabled)
0x0020 - ?
0x0040 - ctrl held down (subgroup command)
sometimes automatically added
(e.g. subgroup worker -> rightclick mine without ctrl)
new since patch 1.13
0x0100 - autocast on/off command
Examples:
0x42 - rightclick item in inventory
0x44 - use ability (revive hero, cast spell)
0x48 - ctrl group command (group peasants -> goldmine)
0x44 - detonate Wisp (area effect unit ability ?)
0x4C - use WON (area effect item ?)
0x00 - use ability (Stop, Hold, uproot, Mirrorimage etc.)
0x40 - Train unit / Research / Buy (resources changed?)
(Orc burrow - combatpositions)
0x42 - use special ability (that changes unit stats ???)
(heros: skill ability, HU townhall: call to arms)
0x44 - Summon (summon units and train heros)
TODO: further research, verification
===============================================================================
4.0 ItemID's
===============================================================================
There are two types of ItemID's - alphanumeric and stringencoded:
o Both types are 4 Bytes long.
o Stringencoded ID's contain four valid characters.
o Alphanumeric ID's have always the format: ?? ?? 0D 00
===============================================================================
4.1 Stringencoded ItemID's
===============================================================================
Stringencoded ItemID's are used for:
o Constructing a building
o Upgrading a building (Tier2, Tier3, tower upgrades)
o Training units/heros
o Skilling hero abilities
o Researching abilities/skills/spells
o Researching upgrades
o Buying items/merc./heros
Stringencoded ID's contain four valid characters, giving a representative name
for the unit/hero/item/ability.
Blizzard used some kind of naming convention for some things:
The lowbyte (little Endian style) of the string may mean:
'A' - Hero ability
'e' - Night Elf unit
'E' - Night Elf hero
'h' - Human unit
'H' - Human hero
'o' - Orc unit
'O' - Orc hero
'R' - Research item
'u' - Undead unit
'U' - Undead hero
For Hero abilities ('A') the next byte denotes the race (E=elf,H=human,O=orc,U=undead).
For Research items ('R') the next byte denotes the race (e=elf,h=human,o=orc,u=undead).
Shop items and mercenaries don't fit into this naming sceme - e.g. some things
start with a 'h'. But the hole string is always unequivocal.
A complete list of string encoded ID's used can be found in the file
"war3.mpq/Scripts/common.ai" (units & buildings)
and in the files
"war3.mpq/Units/*Strings.txt" (units, abilities, upgrades, items)
in your WarCraft directory.
Even more information (including gold cost etc.) about the String ID's can be found
in the "war3.mpq/Units/*.slk" data files.
Following are some example ID's:
ewsp - Elf Wisp
esen - Elf Huntress (Sentinel?)
etoa - Elf tree of ages (tier2)
Resm - Research Elf Melee Attack+1
opeo - Orc peon
ostr - Orc stronghold (tier2)
uaco - UD acolyte
AOsf - Ability Orc: shadow wolves
AOmi - Ability Orc: mirror image
Obla - Orc Blademaster
Ofar - Orc Farseer
Otch - Orc Tauren Chieftain
wneg - wand of negation (WON)
gemt - gem of true seeing
edob - Elf huntress hall
emow - Elf moon well
oalt - Orc altar
otrb - Orc burrow
usep - UD crypt
uzig - UD ziggurat
===============================================================================
4.2 Numeric ItemID's
===============================================================================
Numeric ItemID's are only used on EXECUTION of abilities/spells.
(e.g. hero spells, unit spells, autocast on/off)
Alphanumeric IDs have always the format: ?? ?? 0D 00
Following is a list of alphanumeric ID's found so far:
03 00 0D 00 - rightclick
04 00 0D 00 - stop
08 00 0D 00 - cancel (train, research) (often preceded by an ESC action 0x61)
0C 00 0D 00 - set rally point
0F 00 0D 00 - attack
10 00 0D 00 - attack ground (e.g. Orc Catapult) [11-40-ID-ClickX/Y]
12 00 0D 00 - move unit
16 00 0D 00 - patrol
19 00 0D 00 - hold position
- - - - - -
21 00 0D 00 - give away item (from inventory to unit or ground) [13-40-ID-ClickX/Y-UnitID-ItemID]
- - - - - -
22 00 0D 00 - swap item place 7 (slot of item to swap with!)
23 00 0D 00 - swap item place 8
24 00 0D 00 - swap item place 4
25 00 0D 00 - swap item place 5
26 00 0D 00 - swap item place 1
27 00 0D 00 - swap item place 2
- - - - - -
28 00 0D 00 - use item place 7
29 00 0D 00 - use item place 8
2A 00 0D 00 - use item place 4
2B 00 0D 00 - use item place 5
2C 00 0D 00 - use item place 1
2D 00 0D 00 - use item place 2
- - - - - -
31 00 0D 00 - return resources (tested with ghoul with lumber)
32 00 0D 00 - mine (ghoul -> lumber)
37 00 0D 00 - use ability: reveal area (N goblin laboratory) [11-40-ID-ClickX/Y]