| Each of the 165 monsters has a record reached through a table of 165 offsets at the start of the monster data: a 10-letter name, then fixed fields, then an ailment group (a mask byte and one byte per set bit), an element group (a mask and one byte per set bit of its low 7), and a count byte with that many more. The battle loader copies the name and the fixed bytes into the fighter, widening the bytes at +24 to +26 to words; the reward code reads the experience as a word at +27, the gold as a word at +30, the dropped item at +32 and its rate at +33. Lufia Forge names the words at +16, +20 and +22 HP, ATP and DFP and treats the word at +18 as MP, the bytes at +24 to +26 M.DEF, AGL and MGR, the byte at +12 the element the monster is weak to and +13 the physical damage it then takes in sixteenths, and the element group's bytes magic damage multipliers in sixteenths. 77 monsters carry a drop. HP runs up to 65535 (Gades). | LufiaForge/LufiaForge/Modules/GameData/GameDataOffsets.cs L36–39LufiaForge/LufiaForge/Modules/GameData/MonsterEditorViewModel.cs L34–38LufiaForge/LufiaForge/Modules/GameData/MonsterEditorViewModel.cs L337LufiaForge/LufiaForge/Core/Battle/MonsterTable.cs L227–233LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L139–140 | Code |
| Each of the 256 items has a record reached through a table of 256 offsets: a 12-letter name, bytes at +12 to +15, a word at +16, a mask byte at +20, one record-relative pointer for each set bit of the mask's low six, and then a list of three-byte properties (an id and a word) ended by 0, which the record reader spreads into one word per property id. The equip code takes a weapon's property 14 second byte as the wearer's hit byte (255 when it is 0), property 22 as the weapon's special, and averages the nonzero property 23 bytes of the other five pieces into the wearer's encounter byte. The other meanings are Lufia Forge's alone: it names +12 the type, +13 the equipment slot (1 weapon to 6 ring), the high four bits of +14 who can equip it (Hero, Lufia, Aguro, Jerin), the word at +16 the price, and the property ids 5 ATP, 6 DFP, 7 MGR, 8 AGL, 9 STR, 10 INT, 14 weight and hit chance, and the rest. 163 items have a slot by that reading; the 57 with a nonzero mask (the usable ones) have pointers before their property list. | LufiaForge/LufiaForge/Modules/GameData/GameDataOffsets.cs L28–30LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L15–30LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L59–66LufiaForge/LufiaForge/Modules/GameData/ItemEditorViewModel.cs L93–97 | Code |
| The 56 spells have records reached through a table of offsets: an 8-letter name, then bytes the spell reader copies from +8 to +20, among them a record-relative pointer at +12 to the effect data, which the reader turns into an address. The rest is Lufia Forge's reading: a usage byte at +8, a target byte at +10 and the MP cost at +11, effect codes (such as 1 restore HP, 5 restore all HP, 6 cure ailments, 11 elemental damage, 15 drain MP, 16 teleport, 17 float) and element numbers (1 Fire to 7 Dark); it reads the effect data as an effect byte, then for elemental damage an element, a power word and a random range; for healing and stat changes a kind, a power and a random range; for ailments a kind and a success rate. | LufiaForge/LufiaForge/Modules/GameData/GameDataOffsets.cs L52–53LufiaForge/LufiaForge/Modules/GameData/SpellEditorViewModel.cs L104–128LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L102–108LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L121–126 | Code |
| Eight character records of 29 bytes each hold a character's state when they join: level, a growth counter, six stat words (HP, MP, AGL, INT, STR, MGR), the experience, the experience for the next level and the increment (three bytes each), and six equipment bytes. The join routine fills party slot id mod 4 only when the slot's level is 0: from a level kept aside for the slot if there is one, else by copying the record; so Maxim, Selan, Guy and Artea (records 4-7, the prologue party) take the slots of the Hero, Lufia, Aguro and Jerin; Lufia Forge names the records and the stats. | LufiaForge/LufiaForge/Modules/GameData/GameDataOffsets.cs L11–13 | Code |
| The game has 86 shop numbers, each an offset into the shop records; a record is a type byte, then item numbers, ended by 0, and a type of 0 is no shop. 70 have stock. Lufia Forge names the types 2 weapons, 3 armor, 4 weapons and armor, 5 items and 7 accessories, and the town of each shop; types 1 (shop 45, no stock), 6 (four shops of ciders) and 8 (shop 13, stuffed animals) it leaves unnamed. | LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L75–94 | Code |
| Before the prologue the game's script gives the prologue party 10 stacks of items (Miracle x87, Ex Potion x62, Ex Magic x28, Revive x50, Awaken x92, Stone Cure x88, Mystery Pin x95, Shriek x91, Ex Arrows x36, Ex Bomb x29) and teaches Maxim 10 spells, Selan 8 and Artea 12. | LufiaForge/LufiaForge/Modules/GameData/GameDataOffsets.cs L48–50research-event-commands.md L136–137 | Code |
| Random battles start from a roll on each step: on a map that has them, outside some map states that skip the roll (not identified here), a step taken while the party's step count is 4 or more starts a battle when random(128) is below 10 × danger ÷ 128, halved off the world map, where danger is 128 unless something changes it (see the danger claim). So with danger 128 a step after the fourth starts a battle with chance 10 in 128 (1 in 12.8) on the world map and 5 in 128 (1 in 25.6) elsewhere, computed. In one state the code tests (two flags not identified here) the roll is out of 255 instead. While a step count that an item or spell effect sets is above 0 and danger is 192 or more, every step starts a battle, the fourth-step wait included; that count goes down by one a step in some map states. | LufiaForge/LufiaForge/Core/Battle/Encounters.cs L8–10 | Code |
| A physical hit's damage starts from ATP − DFP: (ATP − DFP + 1) ÷ 2 + 1 when ATP is higher, 2 when they are within 16 of each other the other way (or equal), and 0 when DFP is 16 or more higher. A critical hit doubles that base, and makes a base of 0 into 2. The base is then multiplied by a factor of 96 plus the mean of (base ÷ 16 + 2) rolls of random(64), over 128, so the larger the base the closer the factor stays to about 127 (computed), and the mean, rounded up, of two rolls of random(r) is added, where r is ATP ÷ 8 rounded to the nearest, plus 1. DFP counts one and a half times against a target in one state the code tests (not identified here), and an attack with ATP 0 misses. Steps for slayer types, elements, weapon specials, a stone target (no damage) and drain follow and aren't covered here. | LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L133–137 | Code |
| The party's Run command never escapes a fixed formation (the bosses'), always escapes in one battle state the code tests (not identified here), and otherwise escapes when random(A ÷ 4) is at least random(M ÷ 2), where A is the highest AGL among the party members present and M the highest among the monsters still in the battle, each counting its base plus a second stat word that the lookup adds to every stat (cleared to 0 when the monsters load and for the party at a step of the battle code; what raises it wasn't traced). So with equal agility the party's roll is out of half the monsters' range, and an escape succeeds about 1 time in 4 (26% at AGL 120, 28% at 40, computed for an evenly spread random byte). | LufiaForge/LufiaForge/Modules/GameData/GameDataLabels.cs L133–137 | Code |