Editing
Field map encounter mechanics
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== When do you get encounters? (Steps and Danger) == While moving on any field map, the game will increment a value called Step Fraction once per frame. This is a value that ranges from 0 to 7 step fractions, and when it exceeds 7, it is reset back to 0 and, if the current field map is hostile and has encounters enabled, an Encounter Check is made. FF7βs field map module runs at 30 frames per second, so an encounter check is made every 0.27 seconds while constantly moving, no matter if Cloud is walking or running currently. On every encounter check, the game will increment your Danger value by an amount based on the current field. It then will randomly decide whether, if the subsequent check succeeds, the encounter will attempt to be a preemptive attack. Then, it will randomly determine a target danger threshold. If your Danger value is equal to or greater than this threshold, a battle is triggered. However, the process for determining the random number generation for this step is entirely predictable. These random numbers are determined by two values: Step ID (often written as stepid) and Offset. Both of these are 1-byte values and are what determine what random numbers are generated for target danger thresholds and preemptive flag values. Every time the game uses this generator for a random number, it increments stepid by 1 until it wraps at 256, then if it has wrapped, it increments offset by 13, which also wraps by 256. The game then fetches and uses the RNG value at this index from the field map RNG table and subtracts the current offset value, and this value is the random number. As you expend movement on a hostile field, this random number generator is called twice for each encounter check (once for the preemptive flag check and a second time for the danger threshold check), so stepid will increment by 2 for each encounter check. They both wrap at 256, so stepid is incremented on 128 encounter checks before cycling and offset increments 256 times before cycling (since 13 and 256 are coprime), so the encounter table loops after 128 * 256 = 32768 encounter checks. Because stepid and offset are all that determine what these random values are and because they increment each time a random number is generated, these values are collectively referred to as your position in the encounter table. The model used to describe the behavior of field map random encounters in Final Fantasy VII is known as the Encounter Table. This is visualized as a graph with the X axis representing position in the encounter table and the Y axis representing danger. Battle checks are visualized as lines descending from the top of the graph to the Y-position that corresponds to their minimum danger threshold. [[File:Stepgraph 1.png|center|thumb]] This is the encounter table representation for a path through the first reactor up to Guard Scorpion. The red points represent danger at each stepid throughout the journey from the entrance of the reactor to the base, and the yellow horizontal lines represent which of the six field maps each stepid is taken on in this idealized scenario. The different slopes this line of red points takes through each of these different fields represents how each of these fields has a different rate of danger increase. Higher-danger fields have a steeper line since they result in more danger gained per encounter check. This example is with running for the entire distance from the train to guard scorpion, and in total this route gets three encounters: on the 3rd, 4th, and 6th fields. Each of these encounters resets the current danger value at that point. === Manipulating the encounter table === Things change and become manipulatable when walking is introduced. If an encounter check happens while Run is not being held, danger increases by only ΒΌ as much as it would if run were held. For real-time runs, this effectively means that walking increases danger less per battle check than running, meaning that walking will result in a more shallow rate of danger increase than running. This is the encounter table representation of KartSeven's steproute's Reactor 1 up to Guard Scorpion. Notice that it only gets a single encounter this time because it uses walking in two places to reduce the rate at which danger increases, once on the 1st field and once on the 4th field. Just enough walking is done so, when the battle checks that had previously resulted in battles occur, the current danger value is low enough to fail to meet the required danger for this encounter threshold to trigger, and so no encounter occurs. [[File:Stepgraph 2.png|center|thumb]] Also note that the path taken by this encounter table is significantly longer than the path in the first encounter table. Specifically, since there is walking on the 1st and 4th fields, more of the encounter table is expended on these fields than in the example without walking. Because walking is slower than running but encounter checks still happen at the same rate when either walking or running, four times as many encounter checks are expended per unit of distance while walking compared to running. Therefore, to cover the same distance, more encounter checks must be spent, which means expending more of the encounter table. In this way, the encounter table can be thought of as a resource that can be expended, along with time, to reduce your danger value and potentially avoid encounters by walking. Whether it is beneficial to expend or to not expend parts of the encounter table through walking depends on various factors including the layout of the current and future parts of the encounter table, your current encounter formation state, and many other factors.
Summary:
Please note that all contributions to Final Fantasy VII Speedrun Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Final Fantasy VII Speedrun Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information