Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Double encounter rolls
- 1.0 Presumptions
- 1.1 Frame timings
- walking/surfing: 17 frames/tile[1]
- stationary turn: 4 frames[1]
- 1.2 Mt.Moon frame costs
- encounter rate: 10/256[2] or 3.90625% per roll
- encounter length: 627 frames[3]
- 3.90625% * 627 frames = 24.4921875 frames
- 24 frame cost per roll due to frame loss of encounter
- 1.3 Term definitions
- in movement: a period in which the character is continuously moving including the input that begins the period
- first turn: the first non-forward direction the character moves in while in movement; may or may not be a stationary turn
- 2.0 Overview
- 2.1 What is an encounter roll?
- An encounter roll is when the game tests the encounter rate D887 against a random value FFD3 to determine whether or not to initiate a wild battle. The game performs this operation at address 78C4 when ROM bank 4 is loaded[4]. We expect an encounter roll once per tile while walking through grass, in a cave, etc. Encounter rolls do not occur during the first two steps following a battle.
- 2.2 What is a double encounter roll?
- A double encounter roll is when an encounter roll occurs twice per tile while walking through grass, in a cave, etc. Double encounter rolls do not occur during the first two steps following a battle.
- 2.3 When does a double encounter roll occur?
- A double encounter roll occurs during the first turn should the first turn be in grass, in a cave, etc.[5] Review above information again if necessary.
- 3.0 Applications
- 3.1 General principle
- Double encounter rolls should be avoided as they are unnecessary extra chances at encounters.
- 3.2 Mt.Moon movement
- Because the character is not moving after an encounter, the first turn can occur again once the character is in movement. To avoid a double encounter roll, the first turn should be used during the two steps following a battle if possible. It may be worth the following if a turn is coming up and not within the two steps, but still close enough that another encounter may not happen before it: After an encounter, face a non-forward direction before moving forward, sacrificing the 4 frame cost of turning in place in exchange for one less encounter roll. The odds presented earlier evaluated an encounter roll at 24 frames, meaning the sacrifice should be worth it when applied correctly.
- 3.3 Other movement
- There may be patches of grass where this is applicable and could be worth investigation.
- 3.4 DSum manipulation
- When turning against walls in a corner is not an option, or even as an alternative due to the speed, double encounter rolls can be forced for at least a 50% increase[6] based on input consistency. Instead of staying in movement while attempting to DSum, the character should come to a stop after taking a step to reset the first turn. Then when spending a turn frame to move in the opposite direction, the double encounter roll will occur on the tile the movement began on and the normal encounter roll will occur on the destination tile. This would be repeated to get more rolls during the window of desired encounters, but a slight modification of step-based charts would most likely be needed.
- Sources
- [1] http://forums.pokemonspeedruns.com/viewtopic.php?f=6&t=308#p2660
- [2] http://wiki.pokemonspeedruns.com/index.php/Pok%C3%A9mon_Red/Blue/Yellow_Encounter_Slots
- [3] Estimate based on encounter length of 10.5 seconds
- [4] https://github.com/iimarckus/pokered/blob/c2efe700ac1c5cca88bac710b98388a99665741e/engine/battle/wild_encounters.asm#L48
- [5] Observed through a BizHawk script mirrored at http://pastebin.com/zddcwCqb
- [6] Two encounter rolls per 21 frames (17+4) instead of one per 17 frames
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement