Advertisement
entrpntr

npc timers / defeated trainers

Apr 30th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. [3:58 AM] entrpntr: can you explain exactly where defeated trainers throws things off between saves?
  2. [4:01 AM] entrpntr: rather, is it in the overworld; doesn't wait until lcd is turned off or whatever
  3. [4:03 AM] entrpntr: wondering if the 3 extra sprites you pass from the Bug Catcher save have anything at all to do with why things get thrown off
  4. [4:03 AM] entrpntr: vs the Lass save
  5. [4:08 AM] Dabomstew: so overworld loop on an "even" frame does
  6. - map script
  7. - npc advancement
  8.  
  9. map script contains CheckMapTrainers or something similarly named which checks trainers
  10. a predef EngageTrainer is called for every trainer that isn't defeated
  11. AFTER all those checks are over, npc advancement starts
  12. the extra predef EngageTrainer definitely takes enough time to advance rdiv an extra time (with bankswitch etc)
  13. in npc advancement Random is called for any npc that just reached their timer
  14. [4:09 AM] Dabomstew: that's the summary of the trainer situation
  15. [4:10 AM] entrpntr: basically everything comes down to rdiv then
  16. [4:10 AM] Dabomstew: yeah
  17. [4:15 AM] entrpntr: and IGT overflowing anywhere in the overworld won't have the effect it does with lcd off
  18. [4:26 AM] Dabomstew: yeah
  19. [4:26 AM] Dabomstew: well, it might
  20. [4:26 AM] Dabomstew: but it's only 24 cycles
  21. [4:26 AM] Dabomstew: so less likely to shift rdiv
  22. [4:27 AM] Dabomstew: and it only matters on the exact frame that a timer expires
  23. [4:27 AM] Dabomstew: if IGT overflows on the same frame a timer expires, there is a small chance (I think about 1/5, its 48 cycles not 24, oops) that rdiv overflows by 1 and ruins everything
  24. [4:28 AM] Dabomstew: err 48/256 so 3/16
  25. [4:28 AM] entrpntr: ok so the extra sprites would make some sense then
  26. [4:28 AM] Dabomstew: yeah the more sprites you pass the more likely it is
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement