Skill table (Assets/Data/gstorage/gsdata_<lang>.dat)
One file per language, same records,
different text. Read by
skilldata.py →
skills.json. Field map after
SkillEditor
(github.com/Torphedo/SkillEditor, GPL-3.0:
src/structs.h,
res/labels.yaml) and the Modding
Wiki page File Formats/Skill; the
checks below are ours. All integers
little-endian.
File: u32 total size (= file size, our check that the version is known), three u32 unknown, u32 version, u32 skill limit; then 752 records of 0x90 bytes at 0x18, padding, and the text table at 0x34004.
Text table: u32 text size,
u32 entry count, u32 entry-table size, u32
version, u32 skill limit, then
count × {u32 text index, u32 name
offset, u32 description offset}. Offsets are
from 0x34004 + entry-table size
(not from the entry, as SkillEditor’s reader has
it — that gives garbage on this build),
NUL-terminated UTF-8. Look entries up by their
index field.
Record (0x90 = 72 × u16; s16 where it can be negative). A record is a usable skill when 0x04 == 10. A few displayed ids repeat; skilldata.py keeps the first.
| off | field | check |
|---|---|---|
| 0x00 | text index (name/description); also the effect file number, see below | names match the in-game list for 370 of 374 listed skills |
| 0x02 | id as shown in game | every listed skill found by it |
| 0x04 | register (10 = usable) | |
| 0x06 | internal id (equals 0x00 for most) | |
| 0x08 | rarity − 1 | +1 matches the in-game rarity for 331/374; the rest are the top rank, shown capped |
| 0x0E | type: 0 aura, 1 attack, 2 defense, 3 erase, 4 status, 5 special, 6 environment | matches every listed skill |
| 0x12 | school 0..5 (0 = aura) | matches every listed skill |
| 0x14 / 0x16 | cast animation profile, ground / air (0 = none); see “Cast animation profiles” | 361 of 386 skills have a ground slot |
| 0x18..0x1E | combo follow-up profiles, up to the first 0 | |
| 0x20 | effect file played when the record has no profile | |
| 0x46 | button mode; 2 = hold to loop the cast | |
| 0x22 / 0x24 / 0x26 | sound: cast / flight (loop) / hit | |
| 0x28 | aura cost | matches 367/374 (the rest have a variable cost) |
| 0x2C | cost change per use (s16) | |
| 0x2E | health cost to the caster | |
| 0x30 | uses, 0 = unlimited | matches every listed skill |
| 0x4C | ground/air: 0 ground, 1 air, 2 both, 3 both with the air animation | |
| 0x52 | skill set: selects the meaning of 0x54..0x6C (a union) | |
| 0x7A | behavior: 0 straight, 1 parabola, 2 fall, 6 multishot, 8 mine, 12 blade, 13 melee, 17 ricochet, 20 rain, … (full list in skilldata.py) | the melee kinds (12, 13) are the skills listed as short range; 0 is medium range |
| 0x7C..0x8E | ten behavior parameters, meaning depends on 0x7A | |
| 0x32..0x44 | (shared notes) ten skill ids this skill lets through the combo gate while it is being cast | non-zero in 6 records of our file; reader not re-read in PDUWP.exe |
| 0x48 / 0x4A | (shared notes) use condition and its value: a cast precondition on the caster. Odd modes 1, 3, 5, 8 pass when the quantity is at most the value, even modes 2, 4, 6, 9 when it is at least the value (1/2 health, 3/4 aura, 5/6 capsules left, 8/9 maximum aura); 7 passes when aura equals the maximum | modes 1, 2, 5, 7, 8, 9 occur, in 20 records of our file; reader not re-read in PDUWP.exe, not implemented |
Skill set 0 (attacks and most erase/special skills): 0x54 range class (0 short/medium, 1 long, 2 all — checked against the listed range of every attack), 0x56 damage formula (0 = plain, other values scale with game state), 0x58 damage (matches the listed strength of every set-0 skill that lists one; in set 2, the defenses, 0x58 is something else), 0x5A damage change per use, 0x5C..0x60 which cards of the target it affects, 0x62 hit effect + 0x64/0x66 its values, 0x68 shield piercing, 0x6A collision mode. Other sets: only the set number is written; SkillEditor’s labels.yaml has guesses for sets 1–6.
Straight behavior (0x7A = 0)
— decoded from the executable’s straight-shot
spawn and per-tick update (our reading of the
machine code; SkillEditor’s labels for 0x80/0x82
are “acceleration” / “end speed”, the code uses
them as below). All values s16. The game logic
advances one tick = 1/30 s (its
clocks add 1/30 per tick). One game unit is 0.1
m (PdData.WORLD_SCALE; the
character models come out at human height with
it).
| off | field (skills.json) | meaning |
|---|---|---|
| 0x7C | life |
≥ 0: lifetime in ticks. < 0: a range of −raw × 10 units (= −raw m); the lifetime is the ticks needed to fly it, see below |
| 0x7E | start_speed |
v0 = raw / 10.8 units per tick (× 30 × 0.1 → raw / 3.6 m/s) |
| 0x80 | cruise_speed |
v1, same unit; used only when 0x82 > 0 |
| 0x82 | ramp_frames |
n: the speed goes linearly from v0 to v1 over the first n ticks (speed at tick k = v0 + (v1 − v0)·k/n), then stays v1. 0 = constant v0 |
| 0x84 | homing |
max turn per tick = raw × 0.1° × p / 100. The rate per raw unit (0.1°/tick) is decoded; p is a percent carried by the cast event, not by this record, and its value (100) is assumed, not decoded. The shot turns toward the target (capped rotation) only while the target lies within 60° of its flight direction (cos > 0.5) |
Lifetime from a range D = −0x7C × 10 units: with n = 0, ticks = D / v0; with n > 0, the ramp covers (v0 + v1)·n / 2; if that is ≥ D the lifetime is n, else n + (D − ramp distance) / v1. Results are truncated to whole ticks. All of this is decoded from the lifetime routine (RVA 0x2636f0; its constants are 10.0, 1/10.8 and 0.5), including the shortcut “lifetime = n when the ramp alone covers D” (it does not shorten the lifetime to the tick where D is reached). Neither division checks for a zero speed.
How the lifetime runs out
(shot object tick at RVA ~0x263911, post-update
at 0x26e720): the result is a counter in the
shot object. Each tick the object’s age goes up,
the behavior update moves the shot, and then, if
the counter is not 0, it is decremented; when it
is 0 the end routine (0x26cd70) runs, but only
if the object has one of the flags 0x8030. The
straight init sets flag 0x10 unless a game-mode
global is 4 or 5 and a character-side flag is
clear, which we have not identified. So a
lifetime of L moves the shot L + 1 times (we use
L ticks; one tick less). A 0x7C of
0 therefore means, as far as decoded, a
shot that ends after its first tick, or one that
never ends in those other modes. Which modes
those are is unknown. No
straight set-0 attack with a damage value has 0
here (only records that don’t move or are not
attacks), so the game rebuild does not ship a
one-tick shot: such a record flies for a
placeholder lifetime by range class
(DataSkill.LIFETIME_BY_RANGE, 2.5 s
/ 4 s). Each tick the position moves by speed ×
the forward axis. The same lifetime routine is
shared by behavior 11 (0x7A = 11 reads
0x7C..0x82 the same way); behavior 8 reads 0x82
× 0.1 and behaviors 3/12/13/14 read 0x7C × 0.1
as a float (meaning not followed).
Shot end (end routine 0x14026cd70(shot, reason), our reading of the machine code) (bof3). The reason comes from the caller: 0 = the lifetime ran out (post-update 0x14026e720), 2 = it hit a character (the hit test 0x14026f870 returns 2 after the damage path), the others from the collision and defense paths (1, 3, 5..11, not all separated). At the start of every tick the shot copies its matrix’s position to +0x1b0 (0x1402639a9), before the behavior moves it; the end routine writes +0x1b0 back into the matrix (0x14026cf00), then updates and stops the flight effect (+0x30) and stops the flight sound (+0x38, not for reasons 5 and 6).
- Reason 0: no effect is spawned (the reason switch skips it).
- Reasons 1..3: the record’s hit sound (0x26) at the shot’s last position (+0x140), then effect slot 2 of the record’s effect file with the shot’s own matrix (its z row is the flight direction, the axis the homing cone test uses at 0x1402647d6), i.e. not turned and at the position the hit tick’s move started from. A set-0 record with hit effect 0x62 = 5 (explode) scales the matrix’s rotation rows by 0x64 × 0.1 × 0.2 (= 2 × the blast radius in metres; every other record keeps scale 1.0: the −1.0 preset is always replaced on this path, corrected (doc-answers); the scale reaches the meshes, “Open questions settled” 1). The effect is not attached to the target: its id goes into the ending shot, which no longer moves it. Reason 2, not exploding, also plays a common-bank cue at +0x140 (0x140276330, volume and pitch 0x1000): 6 when the target’s player object passes two checks and its character table record’s impact sound flag (charaset +0x34, run-time 0x1404c0248 + 0xa0 × character; “Character table”) is 0, else 7. The flag is 0 for every playable model, so a hit on a player character plays 6.
- Reasons 5..11: other slots (4, 5, 1, 3; not followed per case).
- A separate path (0x1402729c0, from the hit routine 0x140272bc0) spawns slot 5 of the effect (the record’s own, or the one of the record’s +0x14 entry) at a per-character point (0x14058bd40, stride 0x1c); eft-files without a slot 5 draw nothing there.
Damage: 0x58 is health points: the in-game hit popup shows the same number, and the HUD health is a small integer. Max health was not decoded, nor the cast windup (it is not in the record; probably the animation profile 0x14/0x16).
Effect file.
Assets/Data/Effect/eftNNNN.alr/.eft
with NNNN = the record’s 0x00. Checked with
Effect/name.lst (cp932, fixed-width
NNNN <Japanese name>
entries): its name for N equals the Japanese
text (gsdata_ja.dat) of the record
for 283 of 389 usable records; skills.json flags
this per record
(effect.name_match). The rest
(mostly the later skills) are not linked yet;
the animation profile (0x14) may be the real
link. The effect files are decoded below (“Skill
effects”); skilldata.py’s
effect.tint (brightness-weighted
mean over the colored textures) is only a
fallback color now.
Checked against: the public skill list at phantomdust.online/skills (374 skills: id, name, type, school, cost, strength, uses, range, rarity, homing), compared field by field (script not kept: it would hold the list).