1#ifndef ALCHEMY_CHARACTER_H
2#define ALCHEMY_CHARACTER_H
struct CharacterDefinition gCharacter_DefinitionTable[]
struct ClassDefinition gClass_DefinitionTable[]
Declares nothing of its own: it only includes types.h, edition.h and farcall.h.
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
A character's definition: the growth curves of its stats, its element bonus, starting level and start...
u8 unk097
Padding in chars.tsv.
u16 items[13]
The starting items, each added and equipped at a new game; the low nine bits are the item.
u8 unk0b2[2]
Padding in chars.tsv.
s16 hp[6]
The growth curves: each stat at levels 0, 20, 40, 60, 80 and 100.
u8 unk00[0x50]
Twenty words in chars.tsv; not named by any TBS code.
u8 startingLevel
the level a new game raises the character to
u8 elementBonus[4]
Added to ten times the Djinn set in each element to give the character's element levels (Unit_GetElem...
An ability a class teaches, and the level it is learned at.
u8 level
the level it is taught at
u8 unk02[2]
Padding in classes.tsv.
u8 ability
the action taught, 0 for none
A class: its series, the element levels it needs, its stat multipliers and the abilities it teaches.
struct ClassAbility abilities[16]
the Psynergy the class teaches
u8 pp
tenths of the base stat
u8 def
tenths of the base stat
u8 atk
tenths of the base stat
u8 unk0e[2]
Padding in classes.tsv.
u8 luck
tenths of the base stat
u8 agi
tenths of the base stat
long series
The series the class belongs to; Class_Determine picks the series from the character's two strongest ...
u8 unk50[4]
[0] to [2]: the ability effects the class is weak to (BattleTarget_IsWeakToEffect); [3] is not read t...
u8 required[4]
The element levels the class needs, in tens: the last class of the series the character meets in all ...
u8 hp
tenths of the base stat
A Djinni: its ability and the stat bonuses it gives while set.
u16 abilityId
the action the Djinni unleashes
u8 unk02[2]
Reserved in djinn.tsv; not named by any TBS code.
u8 unk0a[2]
Reserved in djinn.tsv.
s8 hp
Added to the base stats while the Djinni is set (UnitCalc), before the class multiplies them.
An enemy's definition: its level and stats, items, element preset, the actions it chooses from and it...
s16 item
the item it may leave, 0 for none
u8 unk00[15]
The enemy's name: enemies.tsv's name column, 15 bytes, blank in every row.
u8 elementPreset
row of gEnemy_ElementPresetTable, 0 to 43
u8 itemActions
one bit per place in actions: use an item held instead
s8 targetStrategy
Whom a single-target attack favours: the target with the most HP left (0), the most maximum HP (1) or...
s16 itemChance
The chance of the item: 1 in 2 to the power itemChance - 1, two powers better with BattleEnemy_Record...
u16 items[4]
items the enemy carries, 0 for none
u32 rewards
0 in every row; copied to BattleUnit.rewards
u16 hp
The base stats BattleUnitSet copies into the unit.
u8 counts[4]
how many of each item it carries
s8 actionStrategy
How the action is chosen from actions (BattleCommand_SelectAutomatic): one of three weight tables (0 ...
u8 unk48[4]
[0] to [2]: the ability effects the enemy is weak to (BattleTarget_IsWeakToEffect); [3] is 0 in every...
u8 unk1e[2]
Reserved in enemies.tsv: 0 in every row.
u8 unk24[4]
Reserved in enemies.tsv: 0 in every row.
u16 actions[8]
the abilities the enemy chooses from
u16 experience
experience won
u8 turns
actions a round (BattleUnit.baseActionCount)
A level up's result: the level reached, an ability learned and the gain in each stat.
The integer types, TRUE, UNUSED and the fixed-address macros.