Advertisement
SeedBorn

Dog Message Generation

Jul 13th, 2020
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. As part of its constructor function, which runs when a dog spawns, it calls a function that will assign it a message number. These message ids are stored in the dog overlay at offset 30EC, each separated by 8 bytes. The function that assigns the message numbers works as follows:
  2.  
  3. There is a number stored in save context (offset F22 on J1.0) which contains the numbers 0 through D in a randomized order. It updates when the zone loads and is used to determine the random messages. There are 14 dogs in the track, and each is numbered 0 through D in their instance at offset 286. One by one they take a nibble from the random number and add it to 3538 to form a message id (the doggy messages have ids from 3538 to 3546 and are listed here https://wiki.cloudmodding.com/mm/Text_IDs_(3000)). Then, the message id 353D (unused?) is changed to 3538.
  4.  
  5. For example, the number which gives the permutation might read A4 37 86 92 BD 1C 50. The dogs read this one byte at a time, starting with the least significant nibble. So the message ids in this scenario, ordered from dogs 0 to D, would be
  6.  
  7. 353C
  8. 3542
  9. 353F
  10. 353B
  11. 353E
  12. 3540
  13. 353A
  14. 3541
  15. 3545
  16. 3543
  17. 3544
  18. 3539
  19. 3538
  20. 3538
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement