KHD

Trick Room Glitch Explained

KHD
Aug 8th, 2014
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.34 KB | None | 0 0
  1. [15:37:55] <&Marty> GreatSage, I've done some tests, let's move the discussion here
  2. [15:38:36] <&Marty> I had two Deoxys-S, one named Fast with 504 Speed and one named Slow with 503 Speed
  3. [15:38:57] <%Joim> lol
  4. [15:39:27] <&Marty> after three Agility each and in Trick Room, Slow moved first consistently throughout two full Trick Room durations
  5. [15:40:09] <&Marty> I put up Rain Dance (the Deoxys have Swift Swim) and Slow continued moving first consistently in Trick Room
  6. [15:40:53] <%Joim> so the bug thing is untrue?
  7. [15:41:10] <&Marty> also note that the two opposing Level 1 Magikarp moved after both Slow and Fast
  8. [15:41:47] <&GreatSage> hm
  9. [15:42:12] <&GreatSage> did you check whether the unusual behavior with a pokemon of a "normal" speed, like 300, still existed in bw2?
  10. [15:42:29] <&GreatSage> (i mean, the basic trick room "bypass" thing)
  11. [15:42:32] <&Marty> this was done in White 2, yeah
  12. [15:42:44] <&GreatSage> ok
  13. [15:43:11] <&Marty> I'm not really sure what to make of these results
  14. [15:43:28] <&GreatSage> hm, so it's definitely not a speed tie as UPC suggested, right?
  15. [15:43:40] <&GreatSage> well, by "definitely" i mean "very probably not"
  16. [15:43:56] <&Marty> right, there must be some other factor
  17. [15:45:09] <&Marty> perhaps there is a second Speed check if the stat is 0
  18. 02[15:45:40] * +Jirachee ([email protected]) Quit (Quit: stealth_duck v2.05)
  19. [15:46:22] <&GreatSage> i am still really confused as to why 1808/1809 would be the breakpoint
  20. [15:46:27] <&GreatSage> did game freak just use some arbitrary
  21. [15:46:33] <&GreatSage> "large" number
  22. [15:46:40] <&GreatSage> that they thought nobody would ever bother to exceed?
  23. [15:47:26] <&Marty> if that's the case they forgot they invented Speed Boost Ninjask :/
  24. [15:48:03] <~Cathy> well
  25. [15:48:10] <~Cathy> xfr has already implemented an extremely accurate simulator
  26. [15:48:18] <~Cathy> why don't we just take a look at how it handles trick room
  27. [15:48:30] <~Cathy> http://vsplayer.pokecheck.org/?src
  28. [15:48:43] <~Cathy> ah
  29. [15:48:45] <~Cathy> it doesn't need to handle it
  30. [15:48:49] <~Cathy> because the turn order is already determined for its purposes
  31. [15:48:57] <~Cathy> well, xfr probably can give us an explanation of the mechanic anyway
  32. [15:49:00] <~Cathy> when he's active
  33. 03[15:49:09] * ChanServ sets mode: +v xfr
  34. [15:49:26] <+xfr> I'm here
  35. [15:49:36] <~Cathy> hi
  36. [15:49:42] <~Cathy> do you know how trick room works in gen 5 games?
  37. [15:50:07] <+xfr> hi, let me see
  38. 03[15:51:43] * Jirachee ([email protected]) has joined #showdown
  39. 03[15:51:44] * ChanServ sets mode: +v Jirachee
  40. 03[15:56:17] * Hyperbeem ([email protected]) has joined #showdown
  41. 03[16:04:27] * elevator_afk ([email protected]) has joined #showdown
  42. 02[16:04:28] * elevator_afk ([email protected]) Quit (Client exited)
  43. 03[16:04:47] * elevator_afk ([email protected]) has joined #showdown
  44. 03[16:04:48] * ChanServ sets mode: +v elevator_afk
  45. [16:04:48] <+xfr> ok
  46. [16:04:55] <+xfr> speed room has a very simple effect
  47. 02[16:05:28] * %Broolucks ([email protected]) Quit (Ping timeout: 187 seconds)
  48. 02[16:05:44] * +elevator_music ([email protected]) Quit (NickServ (GHOST command used by elevator_afk))
  49. 03[16:05:47] * elevator_afk is now known as elevator_music
  50. [16:05:55] <+xfr> in the comparison value for turn action sorting, the speed is replaced with 0x710-speed
  51. [16:06:31] <+xfr> so if your speed is over 1808 it overflows
  52. [16:06:38] <~Cathy> cool
  53. [16:06:45] <~Cathy> thanks a lot for that information
  54. [16:07:14] <+xfr> the turn is determined by applying insertion sort on these turn action values
  55. [16:07:50] <Sakura> I'm trying to set up a custom avatar, I've written it into config.js and put the picture into the folder, How do I use it or assign it?
  56. [16:08:07] <~Cathy> just for avoiding any doubt -- what does it overflow to?
  57. [16:08:14] <~Cathy> what is 0x710-(0x710+1)
  58. [16:08:15] <+xfr> the 0x10000 value depends on action type, 0x1000 is priority, then subpriority (like lagging tail or that berry), then the actual speed
  59. [16:08:48] <+xfr> it will overflow to 1 apparently
  60. [16:10:16] <~Cathy> that system is actually pretty clever
  61. [16:10:23] <~Cathy> it's more optimised than our series of comparisons
  62. 02[16:11:17] * +Eggy ([email protected]) Quit (Quit: http://www.mibbit.com ajax IRC Client)
  63. [16:13:49] <+xfr> to be precise the exact calculation is 0x2710-speed but possibly due to an error
  64. 03[16:13:58] * iss ([email protected]) has joined #showdown
  65. 03[16:13:59] * ChanServ sets mode: +v iss
  66. [16:14:12] <+xfr> the precision is truncated to 12 bits for the speed action sorting
  67. [16:15:18] <+xfr> however, the real speed value is in fact 0x2710-speed because it would overflow the sub-priority value otherwise
  68. [16:16:06] <+xfr> even without trick room speed precision is only up to 4095
  69. [16:16:27] <~Cathy> interesting
  70. [16:16:36] <~Cathy> is there any way to overflow that other than via trick room
  71. [16:16:38] <~Cathy> ?
  72. [16:17:31] <+xfr> I don't think so
  73. [16:17:46] <+xfr> heh actually...
  74. [16:18:07] <&Marty> oh, that explains why the 2012 Speed Deoxys still 'outsped' two Pokemon with no more than 6 Speed in Trick Room
  75. [16:18:10] <+xfr> I think with tailwind and scarf Ninjask might hit 4140 at +6
  76. [16:19:06] <&Marty> that's very interesting
  77. [16:20:00] <&Marty> thanks xfr
  78. [16:20:33] <&Marty> I'll go tack on Tailwind to this Swift Swim Agility Deoxys
  79. [16:21:33] <+xfr> once again the precision problem only applies to the action order decision
  80. [16:21:52] <+xfr> the end of turn effects also are speed sorted, but they do not have priority or subpriority and thus use the full precision
  81. [16:22:14] <+xfr> so you if you have an overflow the speed will still be correct for the end of turn effects
  82. 02[16:23:12] * Hyperbeem ([email protected]) Quit (Ping timeout)
  83. 03[16:23:23] * V4 ([email protected]) has joined #showdown
  84. 03[16:23:26] * ChanServ sets mode: +o V4
  85. [16:24:42] <+xfr> ok correction the precision is actually 13 bits
  86. [16:24:55] <+xfr> so without trick room the overflow is at 8191
  87. [16:25:09] <+xfr> still possible to hit with swift speed I think
  88. [16:26:03] <+xfr> Game Freak mistake was to use 0x2710-speed when they should have used 0x1FFF-speed
  89. [16:26:06] <~Cathy> so is the effective speed in trick room (0x2710 - speed) & 8191
  90. [16:26:20] <+xfr> yes exactly
  91. [16:26:55] <+xfr> &8191 is at 021BC7E6 for the action sort
  92. [16:27:09] <+xfr> and 0x2710-speed is at 21BCA0C
  93. [16:27:31] <+xfr> it simply does LDR R0, =0x2710, SUBS R4, R0, R4
  94. 02[16:28:21] * Snowflakes ([email protected]) Quit (Connection reset by peer)
  95. 03[16:28:34] * Snowflakes ([email protected]) has joined #showdown
  96. [16:30:05] <~Cathy> mm
  97. 03[16:30:16] * prem ([email protected]) has joined #showdown
  98. 03[16:30:19] * ChanServ sets mode: +h prem
  99. [16:30:21] <~Cathy> interesting mechanics
  100. 02[16:30:47] * Menace13 ([email protected]) Quit (Quit: Menace13)
  101. [16:31:29] <&Marty> hmm, I can hit 12096 Speed, let's see how this goes
  102. 03[16:32:05] * Menace13 ([email protected]) has joined #showdown
  103. 02[16:33:12] * %prem ([email protected]) Quit (Ping timeout)
  104. [16:33:24] <+xfr> 12096 will be treated as 3904, try with 8192
  105. [16:33:35] <+xfr> and you'll move last against anything
Advertisement
Add Comment
Please, Sign In to add comment