Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. Double encounter rolls
  2.  
  3. 1.0 Presumptions
  4.  
  5. 1.1 Frame timings
  6. walking/surfing: 17 frames/tile[1]
  7. stationary turn: 4 frames[1]
  8.  
  9. 1.2 Mt.Moon frame costs
  10. encounter rate: 10/256[2] or 3.90625% per roll
  11. encounter length: 627 frames[3]
  12. 3.90625% * 627 frames = 24.4921875 frames
  13. 24 frame cost per roll due to frame loss of encounter
  14.  
  15. 1.3 Term definitions
  16. in movement: a period in which the character is continuously moving including the input that begins the period
  17. first turn: the first non-forward direction the character moves in while in movement; may or may not be a stationary turn
  18.  
  19. 2.0 Overview
  20.  
  21. 2.1 What is an encounter roll?
  22. 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.
  23.  
  24. 2.2 What is a double encounter roll?
  25. 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.
  26.  
  27. 2.3 When does a double encounter roll occur?
  28. 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.
  29.  
  30. 3.0 Applications
  31.  
  32. 3.1 General principle
  33. Double encounter rolls should be avoided as they are unnecessary extra chances at encounters.
  34.  
  35. 3.2 Mt.Moon movement
  36. 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.
  37.  
  38. 3.3 Other movement
  39. There may be patches of grass where this is applicable and could be worth investigation.
  40.  
  41. 3.4 DSum manipulation
  42. 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.
  43.  
  44. Sources
  45. [1] http://forums.pokemonspeedruns.com/viewtopic.php?f=6&t=308#p2660
  46. [2] http://wiki.pokemonspeedruns.com/index.php/Pok%C3%A9mon_Red/Blue/Yellow_Encounter_Slots
  47. [3] Estimate based on encounter length of 10.5 seconds
  48. [4] https://github.com/iimarckus/pokered/blob/c2efe700ac1c5cca88bac710b98388a99665741e/engine/battle/wild_encounters.asm#L48
  49. [5] Observed through a BizHawk script mirrored at http://pastebin.com/zddcwCqb
  50. [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