Difference between revisions of "Final Fantasy I & II: Dawn of Souls:Notes"

From Data Crystal
Jump to: navigation, search
m
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
  
==Bitfields and IDs==
+
=Bitfields and IDs=
===Bitfields===
+
[[Final_Fantasy_I_%26_II:_Dawn_of_Souls:Bitfields__and_IDs|Bitfields and IDs]]
  
----
+
=FF1 Animation Scripting Format=
 +
[[Final_Fantasy_I_%26_II:_Dawn_of_Souls:FF1_Animation_Scripting|FF1 Animation Script Commands]]
  
 +
=Event Script Commands=
 +
[[Final_Fantasy_I_%26_II:_Dawn_of_Souls:Script_Commands|Command Table]]
  
'''''Class Equip Bits'''''
+
=Vehicle Starting Location=
  0x01 Knight/Paladin
+
  0x65278 Ship start location (X), 32 bits (=0x00000cb8)
  0x02 Thief/Ninja
+
  0x6527C Ship start location (Y), 32 bits (=0x00000928)
  0x04 Monk/Master
+
  0x65280 Airship start location (X), 32 bits (=0x00000d68)
  0x08 Red Mage/Wizard
+
  0x65284 Airship start location (Y), 32 bits (=0x00000e68)
0x10 White Mage/Wizard
 
0x20 Black Mage/Wizard
 
  
'''''Element Bits'''''
 
0x01 Paralysis
 
0x02 Stone
 
0x04 Time
 
0x08 Death
 
0x10 Fire
 
0x20 Ice
 
0x40 Lightning
 
0x80 Quake
 
0x100 Poison
 
0x200 Darkness
 
0x400 Sleep
 
0x800 Silence
 
0x1000 Confuse
 
0x2000 Mind
 
  
'''''Status Effect Bits'''''
+
=ROM Data Formats=
0x01 Death
+
==Monsters==
0x02 Stone
 
0x04 Poison
 
0x08 Blind
 
0x10 Stun
 
0x20 Sleep
 
0x40 Silence
 
0x80 Confusion
 
 
 
'''''Monster Family Bits'''''
 
0x01 Magical
 
0x02 Dragon
 
0x04 Giant
 
0x08 Undead
 
0x10 Werebeast
 
0x20 Aquatic
 
0x40 Spellcaster
 
0x80 Regenerating
 
 
 
===IDs===
 
 
 
----
 
 
 
'''''Targeting IDs'''''
 
$00 Automatic
 
$01 All Enemies
 
$02 One Enemy
 
$04 User
 
$08 All Allies
 
$10 One Ally
 
 
 
'''''Spell Type IDs'''''
 
$00 Warp/Exit
 
$01 Damage
 
$02 Damage (Undead targets only)
 
$03 Inflict negative status
 
$04 Hit Multiplier down
 
$05 Morale down
 
$06 (Unused)
 
$07 Healing
 
$08 Cure negative status
 
$09 Defense up
 
$0A Grant elemental resistance
 
$0B Attack, Hit Rate up
 
$0C Hit Multiplier up
 
$0D Attack up
 
$0E Evade down
 
$0F HP Max
 
$10 Evade up
 
$11 Nullify resistances
 
$12 Inflict status (<300HP = 100% accuracy)
 
$13 Heal Fixed HP or MP
 
Heals HP, MP or both equal to the spell's Power 1.
 
Power 2 determines which to heal:
 
$01 - HP
 
$02 - MP
 
$03 - Both
 
$14 Max HP up
 
$15 Max MP up
 
$16 Hit Rate up
 
$17 Damage = Power 1
 
 
 
'''''Item Effect IDs'''''
 
$00 Sleep/Tent/Cottage effect
 
$01 Max HP up by Power*10
 
$02 Max MP up by Power
 
$03 Strength up by [1..Power]
 
$04 Stamina up by [1..Power]
 
$05 Intellect up by [1..Power]
 
$06 Agility up by [1..Power]
 
$07 Luck up by [1..Power]
 
$08 Giant Tonic
 
$09 Faerie Tonic
 
$0A Strength Tonic
 
$0B Protect Drink
 
$0C Speed Drink
 
$0D Restore HP
 
$0E Restore MP
 
$0F Elixir/Megalixir (0 or 1)
 
$10 Phoenix Down
 
$11 Remedy
 
$12 Use (Power)th Spell effect
 
 
 
'''''Spell IDs'''''
 
$00 Nothing
 
$01 Cure
 
$02 Dia
 
$03 Protect
 
$04 Blink
 
$05 Blindna
 
$06 Silence
 
$07 Nulshock
 
$08 Invis
 
$09 Cura
 
$0A Diara
 
$0B Nulblaze
 
$0C Heal
 
$0D Poisona
 
$0E Fear
 
$0F Nulfrost
 
$10 Vox
 
$11 Curaga
 
$12 Life
 
$13 Diara
 
$14 Healara
 
$15 Stona
 
$16 Exit
 
$17 Protera
 
$18 Invisara
 
$19 Curaja
 
$1A Diaga
 
$1B Nuldeath
 
$1C Healaga
 
$1D Full-Life
 
$1E Holy
 
$1F Nulall
 
$20 Dispel
 
$21 Fire
 
$22 Sleep
 
$23 Focus
 
$24 Thunder
 
$25 Blizzard
 
$26 Dark
 
$27 Temper
 
$28 Slow
 
$29 Fira
 
$2A Hold
 
$2B Thundara
 
$2C Focara
 
$2D Sleepra
 
$2E Haste
 
$2F Confuse
 
$30 Blizzara
 
$31 Firaga
 
$32 Scourge
 
$33 Teleport
 
$34 Slowra
 
$35 Thundaga
 
$36 Death
 
$37 Quake
 
$38 Stun
 
$39 Blizzaga
 
$3A Break
 
$3B Saber
 
$3C Blind
 
$3D Flare
 
$3E Stop
 
$3F Warp
 
$40 Kill
 
$41 Icestorm 1
 
$42 Blaze 1
 
$43 Gaze (Stone)
 
$44 Gaze (Paralysis)
 
$45 Flash
 
$46 Blaze 2
 
$47 Earthquake
 
$48 Gaze (Death)
 
$49 Gaze (Damage)
 
$4A Gaze (Warp)
 
$4B Icestorm 2
 
$4C Blaze 3
 
$4D Inferno
 
$4E Blaze 4
 
$4F Stone Gas
 
$50 Mind Blast
 
$51 Poison Gas
 
$52 Thunderbolt
 
$53 Deadly Gas
 
$54 Snort
 
$55 Nuke
 
$56 Ink
 
$57 Poison Darts
 
$58 Dazzle
 
$59 Tsunami
 
$5A Cyclone
 
$5B Thunder 2
 
$5C Scorch
 
$5D Stone Ray
 
$5E Excalipur
 
$5F Wind Slash
 
$60 Wave Cannon
 
$61 Tidal Wave
 
$62 Wormhole
 
$63 Comet
 
$64 Sneeze
 
$65 Acid Rain
 
$66 Potion
 
$67 Hi-Potion
 
$68 X-Potion
 
$69 Ether
 
$6A Turbo Ether
 
$6B Dry Ether
 
$6C Elixir
 
$6D Megalixir
 
$6E Remedy
 
$6F Giant's Tonic
 
$70 Faerie Tonic
 
$71 Strength Tonic
 
$72 Protect Drink
 
$73 Speed Drink
 
$FF Nothing/NULL
 
 
 
'''''Battle Background IDs'''''
 
$00 Fields
 
$01 Badlands
 
$02 Forest
 
$03 Burned Forest
 
$04 Deep Forest
 
$05 River
 
$06 Waterfall
 
$07 Lake
 
$08 Swamp
 
$09 Marsh
 
$0A Desert
 
$0B Ship
 
$0C Earth Cave
 
$0D Earth Cave Altar
 
$0E Sunken Shrine
 
$0F Sunken Shrine Altar
 
$10 Chaos Shrine
 
$11 Chaos Temple
 
$12 Chaos
 
$13 Giant's Cave
 
$14 Mt. Gulg
 
$15 Mt. Gulg Altar
 
$16 Ice Cave
 
$17 Citadel of Trials
 
$18 Mirage Tower
 
$19 Waterfall Cave
 
$1A Castle
 
$1B Marsh Cave
 
$1C Floating Fortress
 
$1D Floating Fortress Altar
 
$1E City
 
$1F Lava Shrine
 
$20 Dark Woods
 
$21 Sunset Plains
 
$22 Sunset Lake
 
$23 Sunset Forest
 
$24 Sunset Desert
 
$25 Sunset Marsh
 
$26 Sunset Swamp
 
 
 
==ROM Data Formats==
 
 
 
===Items, Weapons and Armor Data===
 
'''''Item Data Table'''''
 
0x19F07C — 0x19F33B
 
16*44
 
 
 
'''0x0-0x1''': Sorting Order
 
'''0x2''': Item Effect
 
'''0x3''': Targeting
 
 
 
'''0x4''': Usage
 
--------------------------------
 
$1 Field
 
$2 Battle
 
$4 Anytime
 
 
 
'''0x5''': Animation (PC Casters only; monsters use Spell ID as index)
 
'''0x6-0x7''': Power
 
'''0x8-0xB''': Purchase Cost
 
'''0xC-0xF''': Sale Price
 
 
 
'''''Item In-Battle Spell Table'''''
 
 
 
0x226EA2 — 0x226EF9
 
2*44
 
 
 
Defines the spell to be cast for every consumable item when it is used in battle.
 
Normal items like Potions and Ethers take effect in this way as well.
 
 
 
 
 
'''''Weapon Data Table'''''
 
 
 
0x19F33C — 0x19FA75
 
28*65
 
 
 
'''0x00-0x01''': Sorting Order
 
'''0x02''': Who Equips (Base classes)
 
'''0x03''': Who Equips (Advanced classes)
 
'''0x04''': Attack
 
'''0x05''': Accuracy
 
'''0x06''': Evade
 
'''0x07''': Spell cast when used
 
'''0x08-09''': Elemental infusion
 
'''0x0A''': Monster Family effectiveness
 
'''0x0B''': Strength Modifier
 
'''0x0C''': Stamina Modifier
 
'''0x0D''': Agility Modifier
 
'''0x0E''': Intellect Modifier
 
'''0x0F''': Critical Rate (chance out of 200)
 
'''0x10''': HP Boost (%)
 
'''0x11''': MP Boost (%)
 
'''0x12-13''': [Unused]
 
'''0x14-17''': Purchase Cost
 
'''0x18-1B''': Sale Price
 
 
 
'''''Armor Data Table'''''
 
 
 
0x19FA58 — 0x1A021B
 
28*71
 
 
 
'''0x00-01''': Sorting Order
 
'''0x02''': Who equips (base classes)
 
'''0x03''': Who equips (advanced classes)
 
'''0x04''': Defence
 
'''0x05''': Weight
 
'''0x06''': Evade
 
'''0x07''': Spell cast when used
 
'''0x08-09''': Elemental resistance(s)
 
'''0x0A''': Strength Modifier
 
'''0x0B''': Stamina Modifier
 
'''0x0C''': Agility Modifier
 
'''0x0D''': Intellect Modifier
 
'''0x0E''': HP Boost (%)
 
'''0x0F''': MP Boost (%)
 
'''0x10-13''': [Unused]
 
'''0x14-17''': Purchase Cost
 
'''0x18-1B''': Sale Price
 
 
 
===Monsters===
 
 
'''''Monster Data Tables'''''
 
'''''Monster Data Tables'''''
  
Line 361: Line 25:
 
  0×223F4C — 0×2257AB: Monster Stats (mid-battle)
 
  0×223F4C — 0×2257AB: Monster Stats (mid-battle)
 
  0×227054 — 0×2288B3: Monster Stats (battle start)
 
  0×227054 — 0×2288B3: Monster Stats (battle start)
  0×22A880 — 0×22C0DF: Check for Regenerating family
+
  0×22A880 — 0×22C0DF: Check for Regenerating family; Load Morale when PCs Flee; awarding XP/Gil/item drops on death
 
  32*195
 
  32*195
  
Line 431: Line 95:
 
   $02: Fiend/Chaos
 
   $02: Fiend/Chaos
 
   $03: Soul of Chaos Boss
 
   $03: Soul of Chaos Boss
 +
 +
==TSA/Tile Arrangement==
 +
All TSA data begins with a 12-byte header.
 +
Bytes +$4-$5 indicate how many TSA tiles are in this TSA structure.
 +
Byte +$6 indicates how large each TSA tile is in bytes by indexing to a table at 0x81AE280
 +
Other values in the header are of unknown use.
 +
Each TSA tile follows the usual GBA format for TSA:
 +
Each TSA tile is two bytes; top nybble is palette ID; next two bits define flips:
 +
+ 400  horizontal flip
 +
+ 800  vertical flip
 +
The remaining 10 bits index to the 8x8 tile graphics found in raw GFX data.
 +
 +
===TSA in maps===
 +
All tiles in maps in Final Fantasy 1 are in units of 16x16 tiles. To construct these tiles, the game assembles two layers of 8x8 physical tiles, one for a background and the other for a foreground.
 +
 +
When given a Tile ID:
 +
Take low 4 bits, multiply by 4
 +
Take upper 12 bits, multiply by 256
 +
Add together, add to TSA tile pointer
 +
If map type is 0x1 and you're outside a room, add (0x1000); save result in r12
 +
    This way, if you're in a room or not you'll load different GFX
 +
load [r12], [r12+2] (top left/right of tile)
 +
load [r12+0x80], [r12+0x82] (bottom left/right of tile)
 +
Storing to tile map as 'background' tiles
 +
 +
load [r12+0x40], [r12+0x42]
 +
load [r12+0xC0], [r12+0xC2] - These are for the 'foreground' tiles
 +
 +
{{Internal Data|game=Final Fantasy I & II: Dawn of Souls}}

Latest revision as of 20:49, 14 July 2019


Bitfields and IDs

Bitfields and IDs

FF1 Animation Scripting Format

FF1 Animation Script Commands

Event Script Commands

Command Table

Vehicle Starting Location

0x65278 Ship start location (X), 32 bits (=0x00000cb8)
0x6527C Ship start location (Y), 32 bits (=0x00000928)
0x65280 Airship start location (X), 32 bits (=0x00000d68)
0x65284 Airship start location (Y), 32 bits (=0x00000e68)


ROM Data Formats

Monsters

Monster Data Tables

0×1DE044 — 0×1DF8A3: Bestiary
0×223F4C — 0×2257AB: Monster Stats (mid-battle)
0×227054 — 0×2288B3: Monster Stats (battle start)
0×22A880 — 0×22C0DF: Check for Regenerating family; Load Morale when PCs Flee; awarding XP/Gil/item drops on death
32*195

All four tables are identical in and of themselves.

0x00-01: EXP given
0x02-03: Gil given
0x04-05: Max HP
0x06: Morale
0x07: AI Index (unused)
0x08: Evasion
0x09: Defence
0x0A: Number of hits
0x0B: Accuracy
0x0C: Attack
0x0D: Agility
0x0E: Intellect
0x0F: Critical Rate
0x10-11: Status Attack Element
0x12: Status Attack Ailment
0x13: Monster Family
0x14: Magic Defense
0x15: (Unused/Padding)
0x16-17: Elemental Weakness(es)
0x18-19: Elemental Resistance(s)
0x1A: Item Drop Type
0x1B: Dropped Item sub-ID
0x1C: Drop Chance (%)
0x1D-1F: (Unused/Padding)

Monster Attack Animation Table

0x223540 — 0x223603
1*195
0x00: Attack Animation ID - 0x2D

Monster AI Index Table

0x22F0B8 — 0x22F17A
1*195

Monster AI Definitions

0x22F17C — 0x22F5CB
16*69
0x00: Chance to cast a spell, out of 200; can't cast if Silenced
0x01: Chance to cast a monster ability, out of 128, if a spell wasn't cast
0x02-09: Spell queue. Each spell in the queue is cast in order. When an FF byte is reached, the queue loops
0x0A: FF terminator
0x0B-0E: Ability queue. Expressed as (Spell ID - 0x41), so Icestorm 1 is the first legal ability
0x0F: FF terminator

Monster GFX Pointer Table

0x2227DC — 0x2230FF
12*195
0x0: Palette Pointer
0x4: Tile Arrangement Data Pointer
0x8: Monster tile Data Pointer

Monster Size Table

0x223644 — 0x223706
1*195
0x00: Monster Size
 $00: Small (eg Goblin)
 $01: Big (eg Troll)
 $02: Fiend/Chaos
 $03: Soul of Chaos Boss

TSA/Tile Arrangement

All TSA data begins with a 12-byte header.

Bytes +$4-$5 indicate how many TSA tiles are in this TSA structure.
Byte +$6 indicates how large each TSA tile is in bytes by indexing to a table at 0x81AE280
Other values in the header are of unknown use.

Each TSA tile follows the usual GBA format for TSA:

Each TSA tile is two bytes; top nybble is palette ID; next two bits define flips:
+ 400   horizontal flip
+ 800   vertical flip
The remaining 10 bits index to the 8x8 tile graphics found in raw GFX data.

TSA in maps

All tiles in maps in Final Fantasy 1 are in units of 16x16 tiles. To construct these tiles, the game assembles two layers of 8x8 physical tiles, one for a background and the other for a foreground.

When given a Tile ID:

Take low 4 bits, multiply by 4
Take upper 12 bits, multiply by 256
Add together, add to TSA tile pointer
If map type is 0x1 and you're outside a room, add (0x1000); save result in r12
   This way, if you're in a room or not you'll load different GFX
load [r12], [r12+2] (top left/right of tile)
load [r12+0x80], [r12+0x82] (bottom left/right of tile)
Storing to tile map as 'background' tiles
load [r12+0x40], [r12+0x42]
load [r12+0xC0], [r12+0xC2] - These are for the 'foreground' tiles


Internal Data for Final Fantasy I & II: Dawn of Souls

ROM MapRAM MapText TableNotesTutorials