Compared to MGE, ToT savegames have 5 extra words (=short unsigned integers, taking up 2 bytes and a range of -32,768 to 32,767) at the end of each unit.
The 3rd word can be 0 to 3 and relates to which animation to use when the unit is active (animations are only ever used for active units). The order corresponds to that in the unitXX animation sprites:
0 Attack
1 Die
2 Idle
3 Move
The 4th word can be 0 to 7 and this determines the facing direction (both for active and inactive units, in other words, both for the unitXX and static sprites). In clock-wise direction from North (0) to Northwest (7).
Since these are words there are much more possible values, however, I think the above are the only valid ones. Some other values do work (e.g. making a warrior look like an engineer when static), but a lot of other values outright crash ToT.
There is at least one way this can be exploited. One single unit can be used for up to 5 (or 8 if you don't mind mirroring) different "impassable" units. Say, you could have a Great wall unit, and use different graphics for each of the 5 different facing directions to create a winding wall. This way you will only need 1 unit, rather than 5 different ones, so you can create more varying graphics without sacrificing any more valuable unit slots.
This will only work, however, for units that can't move (or the unit would turn to face the moving direction) and can't be attacked either (or the unit would turn to face the attacker).
Oh, and of course, to create impassable units, using my previous discovery to hide the unit key would be pretty mandatory.
And by the way, I updated SpriteGen a little too. See the earlier thread, or check my MapEdit website.
The 3rd word can be 0 to 3 and relates to which animation to use when the unit is active (animations are only ever used for active units). The order corresponds to that in the unitXX animation sprites:
0 Attack
1 Die
2 Idle
3 Move
The 4th word can be 0 to 7 and this determines the facing direction (both for active and inactive units, in other words, both for the unitXX and static sprites). In clock-wise direction from North (0) to Northwest (7).
Since these are words there are much more possible values, however, I think the above are the only valid ones. Some other values do work (e.g. making a warrior look like an engineer when static), but a lot of other values outright crash ToT.
There is at least one way this can be exploited. One single unit can be used for up to 5 (or 8 if you don't mind mirroring) different "impassable" units. Say, you could have a Great wall unit, and use different graphics for each of the 5 different facing directions to create a winding wall. This way you will only need 1 unit, rather than 5 different ones, so you can create more varying graphics without sacrificing any more valuable unit slots.
This will only work, however, for units that can't move (or the unit would turn to face the moving direction) and can't be attacked either (or the unit would turn to face the attacker).
Oh, and of course, to create impassable units, using my previous discovery to hide the unit key would be pretty mandatory.
And by the way, I updated SpriteGen a little too. See the earlier thread, or check my MapEdit website.
Comment