OneShortEye

Random Blue Beast RNG thoughts

Aug 19th, 2020 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. Trying to figure out how the blue beast RNG works. This is in room 60, the south dining hall in the castle.
  2.  
  3. (instance enterNorth of Script
  4. (properties)
  5.  
  6. (method (changeState newState &tmp [temp0 2])
  7. (switch (= state newState)
  8. (0
  9. (proc550_17)
  10. (if (== global333 6)
  11. (self changeState: 90)
  12. else
  13. (if (and (not global352) (not global353))
  14. (if (> (Random 0 100) 25)
  15. ((ScriptID 550 3) init:)
  16. else
  17. (proc550_16)
  18. )
  19. )
  20. (if (== global333 8)
  21. ((ScriptID 550 3)
  22. init:
  23. setScript: 0
  24. view: 894
  25. setLoop: 4
  26. posn: 175 134
  27. show:
  28. stopUpd:
  29. )
  30. )
  31. (gEgo_FEgo
  32. init:
  33. posn: (gEgo_FEgo x?) 141
  34. setMotion: MoveTo (gEgo_FEgo x?) 151 self
  35. )
  36. )
  37. )
  38. (1
  39. (proc550_18)
  40. (client setScript: 0)
  41. )
  42. (90
  43. (gEgo_FEgo init: hide: normal: 0)
  44. ((gEgo_FEgo head?) hide:)
  45. ((ScriptID 550 3)
  46. init:
  47. show:
  48. setScript: 0
  49. view: 888
  50. setLoop: 2
  51. cel: 1
  52. posn: (gEgo_FEgo x?) 160
  53. cycleSpeed: 4
  54. setCycle: End self
  55. )
  56. )
  57. (91
  58. ((ScriptID 550 3)
  59. view: 896
  60. setLoop: 3
  61. cycleSpeed: 0
  62. setLoop: -1
  63. setCycle: Walk
  64. setMotion: MoveTo (gEgo_FEgo x?) global348 self
  65. )
  66. )
  67. (92
  68. (= global333 5)
  69. (global2 newRoom: 59)
  70. )
  71. )
  72. )
  73. )
  74.  
  75. I'm assuming from the name that this is what runs when you enter from the North. I understand basically how "changeState" works from the SCI Companion documentation, though I don't quite know what "&tmp [temp0 2]" is doing there.
  76.  
  77. proc550_17 means "disable player controls" and proc550_18 means "enable player controls." So I'm guessing those first two states are when Graham is walking into the room.
  78.  
  79. proc550_16 has something to do with the cat RNG, but there are also globals in that procedure that I haven't figured out yet.
  80.  
  81. "ScriptID 550 3" appears to refer to the blue beast (what the code refers to as "theHenchman"). I had originally thought the "if (> (Random 0 100) 25) ((ScriptID 550 3) init:)" line meant there was a 75% chance of the blue beast showing up, but real world tests show this chance to be much higher. Like, nearly every time (except when the cat shows up). So there's something going on there I don't quite understand.
  82.  
  83. The previous conditional is "if (==global333 6)(self changeState: 90))". state 90 looks like it summons the blue beast, so where is global333 set to 6?
  84.  
  85. That's in room59, the north dining hall, in the "exitDown" function.
  86.  
  87. (if
  88. (and (== global333 3) (> ((ScriptID 550 3) y?) 200))
  89. (= global333 6)
  90. )
  91.  
  92. Okay, so where is global333 set to 3? inside "theHenchManScript", which I can't quite follow yet.
  93.  
  94. Also, something elsewhere in the game that's funny: the script that runs when you trap the witch in the bottle is called "killTheBitch".
Advertisement
Add Comment
Please, Sign In to add comment