Arsenal rules (deck record, editor, lobby check)

Decoded from the Store build 1.3.25854.2 executable (our reading of the machine code) and checked against the layout of the user’s own deck files; no game text or data here. The menu screens are scripts (.ssb, a small script VM); a script reaches the executable through numbered natives that take one argument block (arguments at +0, +8, +0x10, +0x18). The arsenal editor’s native table is at 0x1403f1d50 (146 entries); the numbers below index it.

Deck record (0x64 bytes; Esper-RE deck.h has the file layout; M, the offsets are the ones the code below reads):

Offset Type Meaning
0x14 s16 × 30 the cards: a skill id, or −1 = an aura card
0x50 u16 school capacity of the arsenal (1..3): how many different schools it may hold
0x52 u16 rule flags, recomputed from the cards (below)

An arsenal is always 30 cards: there is no separate count. Taking a skill out writes −1 into its place, so every place that holds no skill is an aura card. No minimum or maximum number of aura cards is enforced anywhere; the only test is “holds at least one skill” (flag 0x4000).

The editor (state object at global 0x1404bec08, 0xb60 bytes, made at 0x14015e94b; the list on screen is the object at 0x1404c0140):

Rule flags (0x14015b830, written to deck + 0x52):

Flag Set when
0x4000 the arsenal holds at least one skill
0x20 all its skills are of one school
0x40 no skill appears twice
0x80 every skill costs ≤ 3 and none has button mode 2 (skill record 0x28 / 0x46)
0x100 every skill costs ≥ 3 and none has button mode 2

What each game rule asks of an arsenal (table 0x1402dbc78, u32 × 12, indexed by the versus game rule; check 0x14015b9e0 = (flags & required) == required):

Game rule Required flags
0, 1, 3, 4, 5, 10, 11 0x4000
2 none (the match uses pre-made decks, the own arsenal is not loaded)
6 0x20 (one school)
7 0x40 (no duplicates)
8 0x80 (low cost)
9 0x100 (high cost)

Where it is checked (the only three users of 0x14015b9e0):

The match start does not check the deck again (M: no other reader of the table or the flags; the online set-up 0x140187710 just loads the picked arsenal). The copy limit and the capacity are editor-side only; a deck that breaks them is played as it is. In netplay each side loads its own arsenal: the other side never sees the full deck before the match.

Aura factor and capacity: the match set-up takes the aura regeneration factor from deck + 0x50, i.e. from the arsenal’s capacity, not from the schools actually used (“Combat rules”, corrected there).

Not decoded: how the capacity of a new arsenal is chosen (the case the player owns; the buy / grant path 0x14012d820, 0x14015b7b0 was not followed); the editor’s script side (messages, which leave path asks native 31); the second counter set (+0x68, by skill record 0x0E) has no reader that we found.

Implementation notes for the rebuild