Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 2.13 KB

README-Dev.md

File metadata and controls

63 lines (41 loc) · 2.13 KB

Final Fantasy Randomizer: HMS Jayne Prototype

Development guide

The directories/packages in the project are:

  • asp: (Answer Set Programming) These are the files that support the solver used for key item placement.

  • data: IPS patches, and source that could be used to rebuild them in many cases.

  • doslib: Dawn of Souls library - Code to support reading and writing the ROM and associated data structures.

    Contained within "doslib" is a subpackage "gen". These files are autogenerated by build_types.py in "doslib".

  • event: Code for assembling and disassembling event bytecode.

  • labels: Text files that include NPC and location ID strings.

  • randomizer: Final Fantasy Randomizer - Code to support randomizing the ROM.

  • static: Static files used by the website.

  • stream: library to support reading and writing of streams, used by doslib.

Key Item Distribution

The Key items returned work like this. Suppose a Placement returned was:

[Placement(item='oxyale', location='king'),
Placement(item='canoe', location='sara')]

This means:

  • Oxyale can be found at the location of the King of Cornelia.
  • The Canoe can be found by Sara, the Princess of Cornelia.

This does not mean that the King will hand over Oxyale, or that the Princess will give the canoe. Rather it means that the NPCs that usually provide those items, in this case the Fairy and Sage (Lukahn in the randomizer, will be there and provide those items.

This further means that going to the Temple of Fiends will reveal that Garland has kidnapped Lukahn, and freeing him will have him provide the canoe to the party.

At that point, the Fairy, in the King's spot, will provide Oxyale, now that their beloved sage has been rescued(?).

Example of how to modify something, given a data type.

enemy_stats_stream = rom.open_bytestream(0x1DE044, 194 * 32)
new_enemy_stats_stream = Output()
for index in range(0, 194):
    enemy = EnemyStats(enemy_stats_stream)
    enemy.max_hp = int(enemy.max_hp * 0.1)
    enemy.write(new_enemy_stats_stream)

rom = rom.apply_patch(0x1DE044, new_enemy_stats_stream.get_buffer())

More details coming soon(er or later).