-
Notifications
You must be signed in to change notification settings - Fork 0
/
terrain_definition.ksy
110 lines (110 loc) · 3.2 KB
/
terrain_definition.ksy
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
meta:
id: terrain_definition
imports:
- encrypted
- xorb1
endian: le
license: CC-BY-NC-SA-3.0
doc: |
The file `Common/SRPG/Terrain.bin` defines all 31 terrains used in the game.
These only handle the gameplay aspects; animation background is defined
elsewhere. Movement costs are defined in `Common/SRPG/Move.bin.lz`.
doc-ref: https://feheroes.gamepedia.com/index.php?title=User:HertzDevil/Reverse-engineering_notes#terrain_definition
seq:
- id: index
size: 4
type: encrypted('xoru4')
process: xor([0xab,0xa1,0xe0,0xda])
doc: The index of the terrain.
- id: base_terrain
size: 4
type: encrypted('xors4')
process: xor([0xd2,0x7d,0xd0,0x6f])
doc: |
The terrain index to use when this terrain is destroyed by an ally, or
`-1` if this terrain is not breakable by allies.
- id: foe_base_terrain
size: 4
type: encrypted('xors4')
process: xor([0xd2,0x7d,0xd0,0x6f])
doc: |
The terrain index to use when this terrain is destroyed by a foe, or `-1`
if this terrain is not breakable by foes. Used in Rival Domains and
Grand Conquests.
- id: side
size: 1
type: encrypted('xors1')
process: xor([0x21])
doc: |
`0` if the terrain belongs to the player, `1` if enemy, `-1` otherwise.
- id: terrain_group
size: 1
type: encrypted('xoru1')
process: xor([0xcb])
- id: inaccessible
size: 1
type: xorb1
process: xor([0x16])
doc: |
True if the terrain cannot be entered by any unit. Certain tiles such as
the banners from Tactics Drills are inaccessible but not wall terrains.
- id: hp
size: 1
type: encrypted('xoru1')
process: xor([0xba])
doc: Number of hits the terrain can take before it is destroyed.
- id: is_wall
size: 1
type: xorb1
process: xor([0xa8])
doc: |
True for wall terrains, false otherwise. Wall terrains use different tile
graphics depending on whether adjacent tiles are also walls (except
breakable ice and crates because these tilemaps have identical graphics
for all directions).
- id: is_liquid
size: 1
type: xorb1
process: xor([0x7c])
doc: |
`True` for water bodies and lava, `false` otherwise.
- id: is_bridge
size: 1
type: xorb1
process: xor([0x08])
doc: |
`True` for bridge terrains, `false` otherwise.
- id: is_trench
size: 1
type: xorb1
process: xor([0x30])
doc: |
`True` for trench terrains, `false` otherwise.
- id: is_fortress
size: 1
type: xorb1
process: xor([0xda])
doc: |
Whether destroying this terrain causes a victory or loss. Used for playe
and enemy fortresses.
- id: is_rd_terrain
size: 1
type: xorb1
process: xor([0xcd])
doc: |
True for the special terrains used in Rival Domains and Grand Conquests,
false otherwise.
- id: mit_mod
size: 1
type: encrypted('xoru1')
process: xor([0xaa])
doc: |
Mitigation modifier as a percentage; `30` for defensive terrain, `0`
otherwise.
- id: regen_hp
size: 1
type: encrypted('xoru1')
process: xor([0x7d])
doc: |
Amount of HP regenerated on each turn; `10` for fortresses and camps, `0`
otherwise.