Changes

Jump to navigation Jump to search

FF7/Field/Encounter

725 bytes added, 17:15, 1 February 2007
no edit summary
== Overview ==
 
Section 7 provides encounter data for the field by referencing [[FF7/Battle/Battle_Scenes|battle IDs]] and providing probabilites for each type of encounter required. The section consists of two ''encounter tables'' that hold sets of these battle configurations; these tables may be switched between using field scripting. The two encounter tables are contiguous and follow directly after the section's length description; due to the presence of the two encounter tables regardless of whether they are used or not, the section length is always 48 bytes.
Following these are the ten encounter structures; these are divided into two groups of six and four, as detailed below. There is also a further two-byte "padding" value, used for alignment.
 
=== Switching Between Tables ===
 
The purpose of two tables is to allow the scripting system to switch between a choice of two sets of encounter data. This is used in-game to allow two levels of difficulty within one field, so that if the player revisits an area in a later part of the game (such as areas of Midgar), the enemies will be suitably more difficult. This can be implemented by placing "easier" encounters in the first table, harder encounter IDs in the second table, and switching appropriately (perhaps by checking the Plot Point Variable).
 
Tables are switched between by simply passing a 0 or 1 to the [[FF7/Field/Script/Opcodes/4B_BTLTB|BTLTB]] opcode, representing the required table.
The second ten bits denote the [[FF7/Battle/Battle_Scenes|ID]] of the battle.
 == Battle = Encounter Entry Types ===
The set of ten battles is split into two groups. The first six battles are generic battles, intended for general use, and whose probabilities must total 64. The final four battles are intended to be used in the following order:

Navigation menu