Advertisement
NRFB

Checks

May 1st, 2023
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.74 KB | None | 0 0
  1. The anatomy of the "checks" field:
  2. Whenever any data structure allows for a "checks" field it essentially allows for a huge amount of different effects to be coded in through the data itself. The "checks" field should contain an array [] of different dictionaries {}, each one representing a different effect that can be raised up to be handled by the game when its conditions are met. Let's take a look at a skill from the example mod:
  3.  
  4. "checks": [{"trigger": "FLOOR_START", "ranks": [1], "requirements": {}, "check": "ALLY_GAIN_STATUS", "character": "self", "info": {"status": "ExampleMod1_SE_TeeOff", "duration": 1, "visible": true, "overwrite": "IGNORE"}}]
  5.  
  6. This may look intimidating, but we can break it down.
  7. The whole thing is an array, or put more simply, a list of items contained in square brackets and separated by commas. There's only one entry in this array, so only one check. We can just ignore the outer [] in this case.
  8. That leaves us with a dictionary, which is a set of keys and values that is contained in braces and separated by commas. Removing the outer {} and separating out the pairs, we have:
  9.  
  10. "trigger": "FLOOR_START",
  11. "ranks": [1],
  12. "requirements": {},
  13. "check": "ALLY_GAIN_STATUS",
  14. "character": "self",
  15. "info": {"status": "ExampleMod1_SE_TeeOff", "duration": 1, "visible": true, "overwrite": "IGNORE"}
  16.  
  17. Here we can see that the "info" field also contains a dictionary which can also be further separated out. We'll get to that, but for now, we'll cover the more basic parts that can be in a check dictionary:
  18.  
  19. "trigger": What type of event being raised could potentially cause this effect to activate?
  20. "ranks": What skill ranks can have this effect happen? (exclusive to skills)
  21. "requirements": What conditions need to be satisfied for this effect to activate beyond just matching the trigger type?
  22. "check": What type of check does this effect generate to raise and potentially activate other effects?
  23. "character": Who does this newly generated check target when it is raised?
  24. "info": What information needs to be passed on along with this check so that the game logic can handle it?
  25.  
  26. And answering those questions from what we see in the data:
  27.  
  28. What type of event being raised could potentially cause this effect to activate? The FLOOR_START event.
  29. What skill ranks can have this effect happen? Rank 1 only.
  30. What conditions need to be satisfied for this effect to activate beyond just matching the trigger type? The dictionary here is empty, so there are no conditions. (This isn't technically true, but we'll talk about that later)
  31. What type of event does this effect generate to raise and potentially activate other effects? It raises an ALLY_GAIN_STATUS check to be handled.
  32. Who does this effect target if it does activate? Self, or rather, the character who had this skill activate in the first place.
  33. What information needs to be passed on so that this specific effect can be handled by the game logic? The status effect, duration, visibility, and overwrite type.
  34.  
  35. So there is a split there. The first three fields are saying WHEN the check should be raised, and the latter three are saying WHAT should be raised. While the order of fields doesn't matter, I tend to try and separate it like this.
  36.  
  37. Whenever an event happens in game, a relevant check is generated and raised up. When the check is going to be handled by the game logic, the game first reaches out to every relevant entity and essentially says "a check of this type is happening, do you have anything that could be triggered as a result?" and evaluates all of those things first.
  38.  
  39. So you start the game. The game gets a FLOOR_START check raised internally because you enter the dungeon. It takes that FLOOR_START check and looks at each ally (and other relevant entity) to see if they have anything that could trigger when FLOOR_START happens. An ally with this skill would indeed have something that could potentially trigger, because the skill has FLOOR_START as its trigger field. Seeing that, the game then evaluates a bit more. Does the ally have the right skill rank? Are the requirements met? There's only one rank of this skill and there are no requirements, so in this case, yes to both. Everything is correct, so the check should be generated and raised up now.
  40.  
  41. A check with the type of ALLY_GAIN_STATUS is created. This check's character "self" is evaluated as the character who has the skill in the first place. The information in the info field is packaged into the check, and the whole thing is raised up just like the FLOOR_START check was earlier.
  42.  
  43. The game then looks at each ally (and other relevant entity) to see if they have anything that could trigger when ALLY_GAIN_STATUS is happening. For the sake of example, we'll say that there are no further checks generated and raised here.
  44.  
  45. So with that covered, the game can then use the info field to evaluate what it needs to when an ALLY_GAIN_STATUS type event is happening. Not to shock anyone, but it turns out this applies a status effect to the target ally. Which status effect? The one specified in the info field. For how long? The amount in the duration field. And so on.
  46.  
  47. Once that ALLY_GAIN_STATUS check is all finished up and evaluated and the game has done everything it needs to with it, the check can be cleared away, and the game can continue on with anything it had left to do with the FLOOR_START check that triggered this whole thing. It finishes up looking at any remaining allies/entities, and then clears away the FLOOR_START check... And goes right into an ALLY_TURN_START check as game logic continues!
  48.  
  49. Some of the more programming oriented people reading this probably looked at that above bit, recognized the last in first out nature and thought "stack", and you would be correct in doing so because that's literally what's happening. It's entirely possible that I could have saved a lot of time by just saying that but I wrote it the long way and you read it the long way and neither of us are getting our time back and I'm not even a little sorry.
  50.  
  51. But anyway, knowing all of this now, I hope you can see how much power it gives to anything that has a "checks" field. Ninety-something percent of all status effects, skills, curses, spells, monster/trap status effects, and results of dungeon and camp event scenes use this format (there are some effects that are hard coded due to needing to touch the UI or do weird stuff which isn't the best but it is what it is). By that logic, being able to insert your own versions of those things and have them use the same system, you have ninety-something percent of the same power that I have to make an effect do the thing you want it to do! You just have to know what check types are available, when they are triggered, what information they need, and what they do. Easy, right?
  52.  
  53. ... Maybe not, but it should be possible to get a decent understanding.
  54.  
  55. The following is a complete list of all the different check types that can be raised in the game along with what they do. There are also general guidelines for when you would want to trigger off of that type, or when you would want to raise a check of that type yourself, and a list of what fields are expected in the check information.
  56.  
  57. TODO: Continue filling out the expected check info for all checks. It is only partially done.
  58.  
  59. DUMMY
  60. Does nothing on its own. This is often used internally for effects that could trigger in multiple ways at once as a way to make sure that the associated text/icon/particle effect only plays once regardless of how many parts of it are triggered at the same time.
  61. Raise a check of this type if: You want access to some of the base UI functions of a check to happen without further logic.
  62. Trigger off of this check type if: Do not trigger off of DUMMY.
  63. Info:
  64. None
  65. CHANGE_TRIGGERING_CHECK_CHARACTER,
  66. Looks at the check that triggers this one and changes the character it is pointing at to the character that has this effect.
  67. Raise a check of this type if: You want an effect that changes the target of a parent check.
  68. Trigger off of this check type if: Do not trigger off of CHANGE_TRIGGERING_CHECK_CHARACTER.
  69. Example: I'll Cover You skill changes the target of a ALLY_COMBAT_ATTACKED check when triggered.
  70. Info:
  71. None (because at least currently, this check can only set the triggering check's target to the character who raises this check)
  72. CHANGE_TRIGGERING_CHECK_INFO_ADD,
  73. Looks at the check that triggers this one and changes the specified information to a new value by adding the evaluated amount.
  74. Raise a check of this type if: You want an effect to add to a field in the parent effect.
  75. Trigger off of this check type if: Do not trigger off of CHANGE_TRIGGERING_CHECK_INFO_ADD
  76. Info:
  77. info: String. The name of the field in the triggering check that is to be changed.
  78. amount: Amount*. The new value that the field in the triggering check should be set to.
  79. CHANGE_TRIGGERING_CHECK_INFO_VALUE,
  80. Looks at the check that triggers this one and changes the specified information to a new value.
  81. Raise a check of this type if: You want an effect to set the information in a parent effect to a static value.
  82. Trigger off of this check type if: Do not trigger off of CHANGE_TRIGGERING_CHECK_INFO_VALUE
  83. Info:
  84. info: String. The name of the field in the triggering check that is to be changed.
  85. value: Any type. The new value that the field in the triggering check should be set to.
  86. CANCEL_TRIGGERING_CHECK,
  87. Sets the check that triggers this one to be canceled after all checks that it triggers are finished evaluating.
  88. Raise a check of this type if: You want an effect to cancel another effect happening.
  89. Trigger off of this check type if: Do not trigger off of CANCEL_TRIGGERING_CHECK
  90.  
  91. CHANGE_TRACKER_VALUE,
  92. Changes the value of the given status, skill, or curse information tracker to the given amount/value.
  93. This happens BEFORE further checks are triggered, meaning it cannot be canceled once raised.
  94. Raise a check of this type if: You want an effect to change the value of a tracker variable on this or any other status/skill/curse
  95. Trigger off of this check type if: You want an effect that does something when a status/skill/curse's tracking variable values have changed
  96. Example: Grace has an internal value for the number of Grace stacks which can be changed by triggering this check.
  97. Info:
  98. type: String, one of "status", "skill", or "curse". The type of entity that has the tracker to be changed.
  99. tracker: String. The name of the tracker field.
  100. amount: Amount*. The new value that the tracker should be set to.
  101. FLOOR_START,
  102. Triggers once per ally at the start of each dungeon floor. Does nothing on its own.
  103. Raise a check of this type if: Do not raise FLOOR_START manually.
  104. Trigger off of this check type if: You want an effect that happens exactly once to the ally at the start of a dungeon floor.
  105. Info:
  106. None
  107. ALLY_TURN_START,
  108. Triggers once at the start of a given ally's turn. Does nothing on its own.
  109. Raise a check of this type if: Do not raise ALLY_TURN_START manually.
  110. Trigger off of this check type if: You want an effect that happens at the start of each of the ally's turns.
  111. Info:
  112. None
  113. ALLY_HEAL_DAMAGE,
  114. Triggers when some effect indicates that an ally should heal a negative stat. If not cancelled, heals the ally in the given stat for the given amount, then raises an ALLY_DAMAGE_WAS_HEALED check.
  115. Raise a check of this type if: You want an effect to heal an ally.
  116. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to heal.
  117. Info:
  118. stat: String, one of "Injury", "Exhaustion", "Lust", "Corruption_T", "Corruption_P". Which stat is taking damage.
  119. amount: Amount*. How much damage is being dealt.
  120. ALLY_DAMAGE_WAS_HEALED,
  121. Triggers after an ally has been made to heal a negative stat. Triggers any post-heal effects, then outputs the information about how much was healed to the event list UI.
  122. Raise a check of this type if: Do not raise ALLY_DAMAGE_WAS_HEALED manually.
  123. Trigger off of this check type if: You want an effect to happen only when an ally has been successfully healed.
  124. Info:
  125. None
  126. ALLY_TAKE_DAMAGE,
  127. Triggers when some effect indicates that an ally should take damage to a negative stat. If not cancelled, the ally gains the given amount in the given stat, then raises an ALLY_DAMAGE_WAS_TAKEN check.
  128. Raise a check of this type if: You want an effect to do damage to an ally.
  129. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to take damage.
  130. Info:
  131. stat: String, one of "Injury", "Exhaustion", "Lust", "Corruption_T", "Corruption_P". Which stat is healing damage.
  132. amount: Amount*. How much damage is being healed.
  133. ALLY_DAMAGE_WAS_TAKEN,
  134. Triggers after an ally has been made to take damage in a negative stat. Triggers any post-damage effects, then outputs the information about how much damage was taken to the event list UI.
  135. Raise a check of this type if: Do not raise ALLY_DAMAGE_WAS_TAKEN manually.
  136. Trigger off of this check type if: You want an effect to happen only when an ally has successfully taken damage.
  137. Info:
  138. None
  139. ALLY_NEGATIVE_STAT_BREAK,
  140. Triggers automatically when an ally reaches 100 in a (non-corruption) negative stat. If not cancelled, sets temporary corruption to 0, adds break_amount to permanent corruption, heals the ally for 30 in all negative stats, and removes Well Rested. After that it raises an ALLY_NEGATIVE_STAT_BROKEN check.
  141. Raise a check of this type if: Do not raise ALLY_NEGATIVE_STAT_BREAK manually.
  142. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to suffer a corruption break.
  143. Info:
  144. break_amount: Int. The amount of temporary corruption that is to be converted into permanent corruption.
  145. ALLY_NEGATIVE_STAT_BROKEN,
  146. Triggers after an ally has had a negative stat break. Triggers any post-break effects, then outputs information about the corruption break having happened to the event list UI.
  147. Raise a check of this type if: Do not raise ALLY_NEGATIVE_STAT_BROKEN manually.
  148. Trigger off of this check type if: You want an effect to happen only when an ally has suffered a corruption break.
  149. Info:
  150. None
  151. ALLY_GAIN_STATUS,
  152. Triggers when some effect indicates that an ally should be gaining a status effect. If not cancelled, applies the given status effect for the given duration with the given visibility using the given overwrite behavior, then raises an ALLY_GAINED_STATUS check.
  153. Raise a check of this type if: You want an effect to give an ally a status effect.
  154. Trigger off of this check type if: You want an effect that happens immediately before a status effect is granted to an ally.
  155. Info:
  156. status:
  157. duration:
  158. visible:
  159. overwrite:
  160. ALLY_GAINED_STATUS,
  161. Triggers after an ally has gained a new status effect. Triggers any post-status gain effects, then outputs information about the status being gained to the event list UI.
  162. Raise a check of this type if: Do not raise ALLY_GAINED_STATUS manually.
  163. Trigger off of this check type if: You want an effect to happen only when an ally has successfully gained a status effect.
  164. Info:
  165. None
  166. ALLY_STATUS_TICK,
  167. Triggers when a status effect is being made to decrease its duration. This can happen naturally at the start of an ally's turn or when an ally performs an action, depending on what kind of status effect it is. If not cancelled, decreases the duration of the given status effect by 1
  168. Raise a check of this type if: You want an effect to tick down the duration of an ally's status effect(s)
  169. Trigger off of this check type if: You want an effect to happen whenever an ally's status effect duration is decreasing.
  170. Info:
  171. status:
  172. ALLY_LOSE_STATUS,
  173. Triggers when some effect indicates that an ally should be losing a status effect. If not cancelled, it will look for the given status effect on the character. If it is found, its trackers will be removed, it and any of its associated particles will be made invisible, then it will be removed. After that it will create an ALLY_LOST_STATUS check.
  174. Raise a check of this type if: You want an effect to remove a status effect from an ally.
  175. Trigger off of this check type if: You want an effect to happen immediately before a status effect is going to be lost.
  176. Info:
  177. status
  178. OR
  179. statuseswithtag
  180. ALLY_LOST_STATUS,
  181. Triggers after an ally has had a status effect removed. Triggers any post-status loss effects, then outputs information about the status loss to the event list UI and resets ally pathfinding to its current natural state.
  182. Raise a check of this type if: Do not raise ALLY_LOST_STATUS manually.
  183. Trigger off of this check type if: You want an effect to happen only when a status effect has successfully been lost.
  184. Info:
  185. None
  186. ALLY_COMBAT_ENCOUNTER,
  187. Triggers the first time that a monster room is entered with a monster inside. If not cancelled, plays a given encounter sound, then looks for a relevant dungeon event for the monster, triggering any of its checks and sending it out to the event list UI if one is found.
  188. Raise a check of this type if: Do not raise ALLY_COMBAT_ENCOUNTER manually.
  189. Trigger off of this check type if: You want an effect to happen when an ally first encounters a new monster.
  190. Info:
  191.  
  192. ALLY_COMBAT_ATTACK,
  193. Triggers immediately before an ally is about to perform the Attack Action.
  194. If cancelled, checks if the monster can counterattack. If so, raises an ALLY_COMBAT_ATTACKED check.
  195. If not cancelled, performs combat calculations with the character and monster information, outputs a message to the event list UI, raises a MONSTER_TAKE_DAMAGE check, spawns given particles/sounds, then triggering an ALLY_COMBAT_POST_ATTACK check.
  196. Raise a check of this type if: You want an effect to force an ally to attack a monster.
  197. Trigger off of this check type if: You want an effect to happen immediately before an attack against a monster occurs.
  198. ALLY_COMBAT_POST_ATTACK,
  199. Triggers after an ally has completed an Attack Action successfully. Triggers any post-attack checks, then raises an ALLY_COMBAT_ATTACKED check if the monster is willing and able to counter attack.
  200. After all checks are resolved, sets the ally as having performed an action and adds exhaustion from combat if appropriate.
  201. Raise a check of this type if: Do not raise ALLY_COMBAT_POST_ATTACK manually.
  202. Trigger off of this check type if: You want an effect to happen immediately after an ally attacks, but before the monster can counterattack.
  203. ALLY_COMBAT_ATTACKED,
  204. Triggers immediately before an ally is about to be attacked by a monster. If not cancelled and the monster still has health, does combat calculations with the character and monster information.
  205. This looks for a relevant dungeon event for the monster and event type, but there are currently no ALLY_COMBAT_ATTACKED events in the game. If it doesn't find a dungeon event, it simply outputs generic text to the event list UI.
  206. After that it spawns relevant particles/sounds for combat, then checks if the damage calculation indicates that the ally has been hit. If so, raises an ALLY_COMBAT_ALLY_DAMAGED check.
  207. Raise a check of this type if: You want an effect to force a monster to attack an ally. (TODO: I've never had an effect raise this. Would it even be okay to do manually?)
  208. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to be attacked.
  209. TODO: ALLY_COMBAT_POST_ATTACKED post check?
  210. ALLY_COMBAT_ALLY_DAMAGED,
  211. Triggers when a monster has dealt enough damage to an ally to score a hit. If not cancelled, looks for a relevant dungeon event for the monster, triggering any of its checks and sending it out to the event list UI if one is found.
  212. Raise a check of this type if: Do not manually raise ALLY_COMBAT_ALLY_DAMAGED
  213. Trigger off of this check type if: You want an effect to happen when a monster successfully scores a hit on an ally.
  214. TODO: ALLY_COMBAT_ALLY_WAS_DAMAGED post check?
  215. ALLY_COMBAT_ENEMY_DEFEATED,
  216. Triggers when a monster has taken enough damage to be reduced to 0 or less health, and the final blow was a direct attack that can be linked to a character. If not cancelled, looks for a relevant dungeon event for the monster, triggering any of its checks and sending it out to the event list UI if one is found.
  217. After that it spawns relevant particles/sounds for the monster's defeat, updates the ally's count of defeated monsters, and raises a MONSTER_DEFEATED_FROM_ROOM check
  218. Raise a check of this type if: Do not raise ALLY_COMBAT_ENEMY_DEFEATED manually.
  219. Trigger off of this check type if: You want an effect to happen when an ally reduces a monster's health to 0.
  220. ALLY_TRAP_TRIGGERED,
  221. Triggers when a trap is about to go off, regardless of why or if it is going to hit or not. If not cancelled, spawns relevant particles/sounds for the trap being triggered, then checks if avoiding is allowed.
  222. If avoid is allowed, it compares the trap's accuracy against the character's relevant stat. If the accuracy is higher, raises an ALLY_TRAP_TRIGGERED_HIT check. If not, raises an ALLY_TRAP_TRIGGERED_MISS check.
  223. If avoid is not allowed, raises an ALLY_TRAP_TRIGGERED_HIT check.
  224. After all checks are resolved, sets the trap to no longer be armed. If the trap is not rearmable, it is removed from the room. Otherwise, the trap's rearm timer is set to its rearm time.
  225. Raise a check of this type if: You want an effect to force a trap to go off.
  226. Trigger off of this check type if: You want an effect to happen immediately before a trap is going to go off.
  227. ALLY_TRAP_TRIGGERED_HIT,
  228. Triggers when a trap has gone off and it has been determined that it is going to hit an ally. Spawns relevant trigger hit sound, then looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found.
  229. Raise a check of this type if: Do not raise ALLY_TRAP_TRIGGERED_HIT manually.
  230. Trigger off of this check type if: You want an effect to happen when a trap successfully scores a hit on an ally.
  231. ALLY_TRAP_TRIGGERED_MISS,
  232. Triggers when a trap has gone off and it has been determined that it is going to miss an ally. Spawns relevant trigger miss sound, then looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found.
  233. Raise a check of this type if: Do not raise ALLY_TRAP_TRIGGERED_MISS manually.
  234. Trigger off of this check type if: You want an effect to happen when an ally successfully avoids a trap that has gone off.
  235. ALLY_TRAP_ATTEMPT_DISARM,
  236. Triggers immediately before an ally is about to perform the Disarm Action. If not cancelled, performs disarm calculations with the ally and trap information, outputs a message to the event list UI, raises a TRAP_TAKE_DAMAGE check, spawns given particles/sounds, then if the trap
  237. Raise a check of this type if: You want an effect to force an ally to use the disarm action on a trap.
  238. Trigger off of this check type if: You want an effect to happen immediately before an ally uses the disarm action on a trap.
  239. TODO: ALLY_TRAP_ATTEMPTED_DISARM post check?
  240. ALLY_TRAP_COMPLETED_DISARM,
  241. Triggers when a trap has taken enough damage to be reduced to 0 or less health, and the final damage was a direct disarming that can be linked to an ally. If not cancelled, looks for a relevant dungeon event for the trap, triggering any of its checks and sending it out to the event list UI if one is found.
  242. After that it spawns relevant particles/sounds for the trap's disarming, updates the ally's count of disarmed traps, and raises a TRAP_DISARMED_FROM_ROOM check.
  243. Raise a check of this type if: Do not raise ALLY_TRAP_COMPLETED_DISARM manually.
  244. Trigger off of this check type if: You want an effect to happen when an ally reduces a trap's health to 0.
  245. ALLY_TRAP_FAILED_DISARM,
  246. TODO: Is this used for anything? It triggers when a trap's complexity counter passes an ally's defend stat, but just raises an ALLY_TRAP_TRIGGERED_HIT check anyway.
  247. ALLY_OPEN_CHEST,
  248. Triggers immediately before an ally is about to perform the Open Chest Action. If not cancelled, removes the chest from the room, spawns the relevant particles/sounds, and looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found.
  249. After all checks are resolved, sets the ally as having performed an action and updates the ally's count of opened chests.
  250. Raise a check of this type if: You want an effect to force an ally to use the open chest action.
  251. Trigger off of this check type if: You want an effect to happen immediately before an ally opens a chest.
  252. TODO: ALLY_OPENED_CHEST post check?
  253. ALLY_ENTERING_ROOM,
  254. Triggers immediately before an ally moves to enter a room. Appends the ally to the list of room occupants.
  255. TODO: Should this be cancellable? EXITING ROOM is, but I would need to double check that an ally can't get stuck in some between rooms limbo.
  256. Raise a check of this type if: Do not raise ALLY_ENTERING_ROOM manually.
  257. Trigger off of this check type if: You want an effect to happen when an ally enters a room.
  258. ALLY_EXPLORING_ROOM,
  259. Triggers when an ally has entered a room which has not had its contents revealed previously.
  260. After all checks are resolved, updates the ally's count of rooms explored
  261. Raise a check of this type if: Do not raise ALLY_EXPLORING_ROOM manually (TODO: Actually, would this be okay? It may actually be?)
  262. Trigger off of this check type if: You want an effect to happen when a room is explored.
  263. ALLY_EXITING_ROOM,
  264. Triggers immediately before an ally moves to exit a room. Removes the ally from the list of room occupants.
  265. Raise a check of this type if: Do not raise ALLY_EXITING_ROOM manually.
  266. Trigger off of this check type if: You want an effect to happen when an ally exits a room.
  267. ALLY_RESTED_IN_SAFE_ROOM,
  268. Triggers immediately before an ally is about to perform the Rest Action. If not cancelled, sets the ally as having performed an action, outputs a message to the event list UI, and heals the appropriate negative stats from resting.
  269. Raise a check of this type if: You want an effect to force an ally to use the Rest Action.
  270. Trigger off of this check type if: You want an effect to happen when an ally uses the Rest Action.
  271. ALLY_FORCE_MOVE_TO_ROOM,
  272. Triggers when some effect indicates that an ally should be moved from their current location to a given room. If not cancelled, raises an ALLY_EXITING_ROOM check for their current room, then an ALLY_ENTERING_ROOM check for the new room, then an ALLY_WAS_FORCE_MOVED_TO_ROOM check.
  273. Raise a check of this type if: You want an effect that forcibly moves an ally from their current room to a new one.
  274. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to be forcibly moved.
  275. ALLY_WAS_FORCE_MOVED_TO_ROOM,
  276. Triggers after an effect has forcibly moved an ally to a new room. Does nothing on its own, but triggers any post-move checks.
  277. Raise a check of this type if: Do not raise ALLY_WAS_FORCE_MOVED_TO_ROOM manually.
  278. Trigger off of this check type if: You want an effect to happen only when an ally has finished being forcibly moved.
  279. ALLY_TELEPORTING_TO_ROOM,
  280. A positive variant of ALLY_FORCE_MOVE_TO_ROOM. Does the same thing but with a different connotation.
  281. TODO: This should also probably be split into a pre and post check
  282. Raise a check of this type if: You want an effect that moves an ally from their current room to a new one, but does not trigger effects of ALLY_FORCE_MOVE_TO_ROOM
  283. Trigger off of this check type if: You want an effect to happen immediately before an ally is going to be moved.
  284. Example: The Recall spell moves allies to the safe room when they suffer a corruption break, but is considered a good thing compared to other force move effects.
  285. ALLY_CHANGE_CURRENT_DESIRE,
  286. Triggers when some effect indicates that an ally's current value for a desire is to be changed. If not cancelled, modifies the given desire by the given amount field and outputs a message to the event list UI. If allow_drive_change is true and the current desire value goes above 10 or below 0, triggers an ALLY_CHANGE_DESIRE_DRIVE check.
  287. TODO: There's a weird bit of code in here I need to look at later
  288. Raise a check of this type if: You want an effect to change the current value of one of an ally's desires.
  289. Trigger off of this check type if: You want an effect to happen immediately before one of an ally's desires is going to be changed.
  290. ALLY_CHANGE_DESIRE_DRIVE,
  291. Triggers when some effect indicates that an ally's drive for a desire should change. If not cancelled, modifies the given desire drive by the given amount field and outputs a message to the event list UI.
  292. Raise a check of this type if: You want an effect to directly change one of an ally's desire drives.
  293. Trigger off of this check type if: You want an effect to happen immediately before one of an ally's desire drives is going to be changed.
  294. ALLY_CHANGE_FAVORABILITY,
  295. Triggers when some effect indicates that an ally's favorability value should change. If not cancelled, sets the ally's favorability to the given amount.
  296. Raise a check of this type if: You want an effect to change an ally's favorability toward the inquisitor.
  297. Trigger off of this check type if: You want an effect to happen immediately before an ally's favorability toward the inquisitor is giong to be changed.
  298. ALLY_CHANGE_CONTROL,
  299. exactly the same as the previous, but for player control over the ally instead of favorability
  300. ALLY_TO_ALLY_INTERACTION,
  301. TODO: Complex and messy. Need to think about refactoring to make these less hardcoded
  302. ALLY_TURN_END,
  303. Triggers once at the end of an ally's turn. Does nothing on its own.
  304. Raise a check of this type if: Do not raise ALLY_TURN_END manually.
  305. Trigger off of this check type if: You want an effect that happens at the end of an ally's turn.
  306. MONSTER_SPAWN_IN_ROOM,
  307. Triggers when some effect indicates that a monster should be spawned in a given room. If not cancelled, spawns a monster of the given monster_ID with any specified spawn_modifier, then adds it to the given room. After that, raises a MONSTER_WAS_SPAWNED_IN_ROOM check.
  308. Raise a check of this type if: You want an effect that will spawn a new monster.
  309. Trigger off of this check type if: You want an effect that will happen immediately before a monster is going to be spawned.
  310. MONSTER_WAS_SPAWNED_IN_ROOM,
  311. Triggers after some effect has spawned a monster. Triggers any post-monster spawn checks, but does nothing on its own.
  312. Raise a check of this type if: Do not raise MONSTER_WAS_SPAWNED_IN_ROOM manually.
  313. Trigger off of this check type if: You want an effect that will happen when a monster has successfully been spawned.
  314. MONSTER_TAKE_DAMAGE,
  315. Triggers when some effect indicates that a monster should take damage. If not cancelled, calculates actual damage done from the amount in against the monster's armor, then raises a MONSTER_DAMAGE_WAS_TAKEN check.
  316. Raise a check of this type if: You want an effect to deal damage to a monster.
  317. Trigger off of this check type if: You want an effect that will happen immediately before a monster is about to take damage.
  318. MONSTER_DAMAGE_WAS_TAKEN,
  319. Triggers after something caused a monster to take damage. Outputs a message to the event list UI.
  320. If the monster's health has reached 0 or less and the damage dealt can be directly linked to an ally, triggers an ALLY_COMBAT_ENEMY_DEFEATED check.
  321. If the monster's health has reached 0 or less and the damage source is not directly linkable to an ally, it skips the ALLY_COMBAT_ENEMY_DEFEATED check and instead raises a MONSTER_DEFEATED_FROM_ROOM check.
  322. Raise a check of this type if: Do not raise MONSTER_DAMAGE_WAS_TAKEN manually
  323. Trigger off of this check type if: You want an effect that will happen only when a monster has successfully taken damage.
  324. MONSTER_HEAL_DAMAGE,
  325. Triggers when some effect indicates that a monster should regain health. If not cancelled, adds the given amount to the specified monster's current health stat, then raises a MONSTER_DAMAGE_WAS_HEALED check.
  326. Raise a check of this type if: You want an effect to heal damage from a monster.
  327. Trigger off of this check type if: You want an effect that will happen immediately before a monster is about to heal.
  328. MONSTER_DAMAGE_WAS_HEALED,
  329. Triggers after a monster regained health. Triggers any post-heal checks, then outputs a message to the event list UI.
  330. Raise a check of this type if: Do not raise MONSTER_DAMAGE_WAS_HEALED manually.
  331. Trigger off of this check type if: You want an effect that will happen only when a monster has successfully been healed.
  332. MONSTER_GAIN_STATUS,
  333. Triggers when some effect indicates that a monster should gain a status effect. If not cancelled, applies the given status effect for the given duration using the given overwrite behavior, then raises a MONSTER_GAINED_STATUS check.
  334. Raise a check of this type if: You want an effect to give a monster a status effect.
  335. Trigger off of this check type if: You want an effect that happens immediately before a status effect is granted to a monster.
  336. MONSTER_GAINED_STATUS,
  337. Triggers after a monster has gained a new status effect. Triggers any post-status gain effects, then outputs information about the status being gained to the event list UI.
  338. Raise a check of this type if: Do not raise MONSTER_GAINED_STATUS manually.
  339. Trigger off of this check type if: You want an effect to happen only when a monster has successfully gained a status effect.
  340. MONSTER_STATUS_TICK,
  341. Triggers when a monster's status effect is being made to decrease its duration. This can happen naturally at the start of an ally's turn or when a monster performs an action, depending on what kind of status effect it is. If not cancelled, decreases the duration of the given status effect by 1.
  342. Raise a check of this type if: You want an effect to tick down the duration of a monster's status effect(s)
  343. Trigger off of this check type if: You want an effect to happen whenever an monster's status effect duration is decreasing.
  344. MONSTER_CHANGE_TRACKER_VALUE,
  345. Changes the value of the given monster status effect information tracker to the given amount/value.
  346. This happens BEFORE further checks are triggered
  347. Raise a check of this type if: You want a monster effect to change the value of a tracker variable on this or any other effect
  348. Trigger off of this check type if: You want a monster effect that does something when an effect's tracking variable values have changed
  349. MONSTER_LOSE_STATUS,
  350. Triggers when some effect indicates that a monster should be losing a status effect. If not cancelled, it will look for the given status effect on the monster. If it is found, its trackers will be removed, it and any of its associated particles will be made invisible, then it will be removed. After that it will create a MONSTER_LOST_STATUS check.
  351. Raise a check of this type if: You want an effect to remove a status effect from a monster.
  352. Trigger off of this check type if: You want an effect to happen immediately before a status effect is going to be lost by a monster.
  353. MONSTER_LOST_STATUS,
  354. Triggers after a monster has had a status effect removed. Triggers any post-status loss effects, then outputs information about the status loss to the event list UI.
  355. Raise a check of this type if: Do not raise MONSTER_LOST_STATUS manually.
  356. Trigger off of this check type if: You want an effect to happen only when a status effect has successfully been lost by a monster.
  357. MONSTER_RETREAT_FROM_ROOM,
  358. Triggers when some effect indicates that a monster should run away. If not cancelled, clears the monster from the room, leaving it empty. If log_research is true in the check information, the monster is still added to the player's research notes from this happening.
  359. Raise a check of this type if: You want an effect that causes a monster to run from a room.
  360. Trigger off of this check type if: You want an effect to happen when a monster is trying to run from a room.
  361. MONSTER_DEFEATED_FROM_ROOM,
  362. Triggers when a monster has hit 0 or less health and should be removed from the room. If not cancelled, adds the monster to the player's research notes, spawns the relevant particles/sounds for the monster, and outputs text to the event list UI. If the monster has a reward chest, the room is changed to a chest room and that is also sent to the event list UI. Either way, the monster is then removed from the room.
  363. Raise a check of this type if: You want an effect that causes a monster to be removed from a room and considered defeated.
  364. Trigger off of this check type if: You want an effect to happen immediately before a monster is going to be removed from a room.
  365. TODO: TRAP_SPAWN_IN_ROOM and TRAP_WAS_SPAWNED_IN_ROOM
  366. TRAP_TAKE_DAMAGE,
  367. Triggers when some effect indicates that a trap should take damage. If not cancelled, calculates actual damage done from the amount in, then raises a TRAP_DAMAGE_WAS_TAKEN check.
  368. Raise a check of this type if: You want an effect to deal damage to a trap.
  369. Trigger off of this check type if: You want an effect that will happen immediately before a trap is about to take damage.
  370. TRAP_DAMAGE_WAS_TAKEN,
  371. Triggers after something caused a trap to take damage. Outputs a message to the event list UI.
  372. If the trap's health has reached 0 or less and the damage dealt can be directly linked to an ally, triggers an ALLY_TRAP_COMPLETED_DISARM check.
  373. If the trap's health has reached 0 or less and the damage source is not directly linkable to an ally, it skips the ALLY_TRAP_COMPLETED_DISARM check and instead raises a TRAP_DISARMED_FROM_ROOM check.
  374. Raise a check of this type if: Do not raise TRAP_DAMAGE_WAS_TAKEN manually
  375. Trigger off of this check type if: You want an effect that will happen only when a trap has successfully taken damage.
  376. TRAP_HEAL_DAMAGE,
  377. Triggers when some effect indicates that a trap should regain health. If not cancelled, adds the given amount to the specified trap's current health stat, then raises a TRAP_DAMAGE_WAS_HEALED check.
  378. Raise a check of this type if: You want an effect to heal damage from a trap.
  379. Trigger off of this check type if: You want an effect that will happen immediately before a trap is about to heal.
  380. TRAP_DAMAGE_WAS_HEALED,
  381. Triggers after a trap regained health. Triggers any post-heal checks, then outputs a message to the event list UI.
  382. Raise a check of this type if: Do not raise TRAP_DAMAGE_WAS_HEALED manually.
  383. Trigger off of this check type if: You want an effect that will happen only when a trap has successfully been healed.
  384. TRAP_GAIN_STATUS,
  385. Triggers when some effect indicates that a trap should gain a status effect. If not cancelled, applies the given status effect for the given duration using the given overwrite behavior, then raises a TRAP_GAINED_STATUS check.
  386. Raise a check of this type if: You want an effect to give a trap a status effect.
  387. Trigger off of this check type if: You want an effect that happens immediately before a status effect is granted to a trap.
  388. TRAP_GAINED_STATUS,
  389. Triggers after a trap has gained a new status effect. Triggers any post-status gain effects, then outputs information about the status being gained to the event list UI.
  390. Raise a check of this type if: Do not raise TRAP_GAINED_STATUS manually.
  391. Trigger off of this check type if: You want an effect to happen only when a trap has successfully gained a status effect.
  392. TRAP_STATUS_TICK,
  393. Triggers when a trap's status effect is being made to decrease its duration. This can happen naturally at the start of an ally's turn or when a trap performs an action, depending on what kind of status effect it is. If not cancelled, decreases the duration of the given status effect by 1.
  394. Raise a check of this type if: You want an effect to tick down the duration of a trap's status effect(s)
  395. Trigger off of this check type if: You want an effect to happen whenever a trap's status effect duration is decreasing.
  396. TRAP_CHANGE_TRACKER_VALUE,
  397. Changes the value of the given trap status effect information tracker to the given amount/value.
  398. This happens BEFORE further checks are triggered
  399. Raise a check of this type if: You want a trap effect to change the value of a tracker variable on this or any other effect
  400. Trigger off of this check type if: You want a trap effect that does something when an effect's tracking variable values have changed
  401. TRAP_LOSE_STATUS,
  402. Triggers when some effect indicates that a trap should be losing a status effect. If not cancelled, it will look for the given status effect on the trap. If it is found, its trackers will be removed, it and any of its associated particles will be made invisible, then it will be removed. After that it will create a TRAP_LOST_STATUS check.
  403. Raise a check of this type if: You want an effect to remove a status effect from a trap.
  404. Trigger off of this check type if: You want an effect to happen immediately before a status effect is going to be lost by a trap.
  405. TRAP_LOST_STATUS,
  406. Triggers after a trap has had a status effect removed. Triggers any post-status loss effects, then outputs information about the status loss to the event list UI.
  407. Raise a check of this type if: Do not raise TRAP_LOST_STATUS manually.
  408. Trigger off of this check type if: You want an effect to happen only when a status effect has successfully been lost by a trap.
  409. TRAP_CHANGE_REARM_TIMER,
  410. Triggers when some effect indicates that a trap should have its rearm timer set to a new value. This is NOT generated as a result of a turn passing, only other effects. If not cancelled, sets the trap's rearm timer to the given amount.
  411. Raise a check of this type if: You want an effect to change the remaining time until rearming of a trap.
  412. Trigger off of this check type if: You want an effect to happen only when a trap's rearm timer is about to be changed.
  413. TRAP_REMOVE_FROM_ROOM,
  414. Triggers when some effect indicates that a trap should be removed from a room for some reason other than being disarmed. If not cancelled, clears the trap from the room, leaving it empty. If log_research is true in the check information, the trap is still added to the player's research notes from this happening.
  415. This is NOT generated from a non-rearmable trap going off.
  416. Raise a check of this type if: You want an effect that causes a trap to be removed from a room.
  417. Trigger off of this check type if: You want an effect to happen when a trap is going to be removed from a room.
  418. TRAP_DISARMED_FROM_ROOM,
  419. Triggers when a trap has hit 0 or less health and should be removed from the room. If not cancelled, adds the trap to the player's research notes, raises the relevant particles/sounds for the trap, and outputs text to the event list UI. The trap is then removed from the room.
  420. Raise a check of this type if: You want an effect that causes a trap to be removed from a room and considered disarmed.
  421. Trigger off of this check type if: You want an effect to happen immediately before a trap is going to be removed from a room.
  422. WITCH_DEN_DEAL_MADE,
  423. Triggers immediately after the player has finished using the Witch's Den room to make a deal, but before the results of the deal are applied. Does nothing on its own. Currently, witch den options are semi-hard coded, so interacting with them via mods will be a bit messy. As a result, the check contains no information about WHAT was exchanged in the deal, just that a deal was made.
  424. Raise a check of this type if: Do not raise WITCH_DEN_DEAL_MADE manually.
  425. Trigger off of this check type if: You want an effect to happen immediately after a deal with the Witch is completed, but before the results of the deal are applied.
  426. SHRINE_OFFERING_MADE,
  427. Triggers immediately after the player has selected the option to give an offering of corruption at a Shrine room. Looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found. After that, deals the given amount of permanent corruption damage to the ally, updates the corruption wave timer, and adds the time extension to the player's save file (but does NOT save the file)
  428. Raise a check of this type if: Do not raise SHRINE_OFFERING_MADE manually.
  429. Trigger off of this check type if: You want an effect to happen immediately when a shrine offering is made.
  430. SHRINE_BLESSING_GIVEN,
  431. Triggers immediately after the player has selected the option to have an ally gain the curse that is offered in a shrine. Looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found. After that, applies the given curse to the ally, setting it to be revealed if the player has already reached research level 1 for that curse.
  432. Raise a check of this type if: Do not raise SHRINE_BLESSING_GIVEN manually.
  433. Trigger off of this check type if: You want an effect to happen immediately when a shrine blessing is accepted.
  434. SHRINE_DENOUNCED,
  435. Triggers immediately after the player has selected the option to denounce at a Shrine room. Looks for a relevant dungeon event, triggering any of its checks and sending it out to the event list UI if one is found. After that, gets a list of rejected curses on the ally and removes all of them.
  436. Raise a check of this type if: Do not raise SHRINE_DENOUNCED manually.
  437. Trigger off of this check type if: You want an effect to happen immediately when a shrine is denounced.
  438. ROOM_BECOME_OBSCURED,
  439. Triggers when some effect indicates that a given room should be made darkened/obscured. If not cancelled, spawns the lighting effect on the map and sets the room's obscured property to true.
  440. Raise a check of this type if: You want an effect to darken a room.
  441. Trigger off of this check type if: You want an effect to happen immediately before a room is going to be made darkened.
  442. ROOM_SHOW_PARTICLE_EFFECT,
  443. Triggers when some effect indicates that it should show a particle effect inside of a given room. If not cancelled, looks to see if the room is obscured by darkness. If the room is unobscured or the show_when_obscured flag is set to true in the check information, the given particle is spawned and put on the dungeon map in the given room's location.
  444. Raise a check of this type if: You want an effect to display a particle effect in a room when it happens.
  445. Trigger off of this check type if: Do not trigger off of ROOM_SHOW_PARTICLE_EFFECT.
  446. PLAYER_SCRY_ROOM,
  447. Triggers when the player has used the scry spell on a given room in the dungeon. If not cancelled, generates PLAYER_SCRY_ALLY, PLAYER_SCRY_MONSTER, and PLAYER_SCRY_TRAP for each such entity in the room. After those checks are resolved, spawns the relevant particles/sounds, sets the room to no longer be obscured, explores it, and adds the scry_cooldown amount to the player's scry cooldown.
  448. Raise a check of this type if: You want an effect to scry a room.
  449. Trigger off of this check type if: You want an effect to happen immediately before a room is going to be scried.
  450. PLAYER_SCRY_ALLY,
  451. Triggers when a room has been scried that includes an ally. If not cancelled, outputs information about the scry having happened to the event list UI and updates the ally's count of times scried.
  452. Raise a check of this type if: It would be better to raise a PLAYER_SCRY_ROOM.
  453. Trigger off of this check type if: You want an effect to happen when an ally is being scried.
  454. PLAYER_SCRY_MONSTER,
  455. Triggers when a room has been scried that includes a monster. If not cancelled, outputs information about the scry having happened to the event list UI.
  456. Raise a check of this type if: It would be better to raise a PLAYER_SCRY_ROOM.
  457. Trigger off of this check type if: You want an effect to happen when a monster is being scried.
  458. PLAYER_SCRY_TRAP,
  459. Triggers when a room has been scried that includes a trap. If not cancelled, outputs information about the scry having happened to the event list UI.
  460. Raise a check of this type if: It would be better to raise a PLAYER_SCRY_ROOM.
  461. Trigger off of this check type if: You want an effect to happen when a trap is being scried.
  462. PLAYER_SCRY_COOLDOWN_CHANGED,
  463. Triggers when some effect indicates that the player's scry cooldown should be changed to a new value. If not cancelled, sets the player's current scry cooldown to the given amount field.
  464. TODO: "allowbelowzero" in check info here is uhhh... Hard to explain, but necessary as long as there are no post checks for scry effects. Basically if a scry effect wants to reduce its own cooldown (example: Siphon reducing scry cooldown if scrying a monster room) the cooldown will be 0 at the time PLAYER_SCRY_MONSTER happens, so it has to allow the cooldown to be adjusted to below 0 temporarily before PLAYER_SCRY_ROOM adds the base scry cooldown on after the other checks are resolved. So it will go 0 -> -2 -> 18 instead of 0 -> 0 -> 20.
  465. Raise a check of this type if: It would be better to raise a PLAYER_SCRY_ROOM.
  466. Trigger off of this check type if: You want an effect to happen when an ally is being scried.
  467. MAP_CORRUPTION_WAVE,
  468. Triggers when the timer for a corruption wave has hit 0, indicating that a wave is happening now. Ranks up a random curse on each ally. If doing so is not possible, damages the ally for the appropriate amount.
  469. Raise a check of this type if: I... haven't actually tried having an effect raise this? It might actually work.
  470. Trigger off of this check type if: You want an effect to happen when a corruption wave occurs.
  471. FLOOR_END,
  472. Triggers once per ally at the start of each dungeon floor. Does nothing on its own.
  473. Raise a check of this type if: Do not raise FLOOR_END manually.
  474. Trigger off of this check type if: You want an effect that happens exactly once to the ally at the end of a dungeon floor.
  475.  
  476. This is the end of all the currently existing checks FOR THE DUNGEON PORTION OF THE GAME
  477.  
  478. TODO: Full explanation for Camp checks
  479. RETURNED_TO_CAMP,
  480. CAMP_REROLL_ALL_ACTIVITIES,
  481. CAMP_ALLY_DETERMINING_DESIRED_ACTIVITY,
  482. CAMP_ALLY_ASKED_TO_CHANGE_ACTIVITY,
  483. CAMP_TIME_OF_DAY_ADVANCE,
  484. CAMP_ALLY_DOING_ACTIVITY,
  485. CAMP_ALLY_CHANGE_CURRENT_DESIRE,
  486. CAMP_ALLY_SET_CURRENT_DESIRE,
  487. CAMP_ALLY_CHANGE_DESIRE_DRIVE,
  488. CAMP_ALLY_CHANGE_FAVORABILITY,
  489. CAMP_ALLY_CHANGE_CONTROL,
  490. CAMP_ALLY_TENT_TALK,
  491. CAMP_ALLY_TENT_ACTION,
  492. CAMP_ALLY_ADD_TENT_MODIFIERS,
  493. CAMP_ALLY_REMOVE_TENT_MODIFIERS,
  494. CAMP_ALLY_TENT_HYPNO,
  495. CAMP_ALLY_TENT_UNHYPNO,
  496. CAMP_ALLY_TENT_EMPOWER_CURSE,
  497. CAMP_ALLY_TENT_WEAKEN_CURSE,
  498. CAMP_ALLY_TENT_EMBRACE_CURSE,
  499. CAMP_ALLY_TENT_REJECT_CURSE,
  500. CAMP_ALLY_HEAL_DAMAGE,
  501. CAMP_ALLY_TAKE_DAMAGE,
  502. CAMP_ALLY_GAIN_STATUS,
  503. CAMP_ALLY_GAINED_STATUS,
  504. CAMP_ALLY_STATUS_TICK,
  505. CAMP_ALLY_LOSE_STATUS,
  506. CAMP_ALLY_LOST_STATUS,
  507. CAMP_ALLY_REFRESH_SKILLS,
  508. CAMP_ALLY_IMPRINT_SCROLL,
  509. CAMP_ALLY_TEACH_SKILL,
  510. CAMP_PLAYER_SLEEP,
  511. CAMP_PLAYER_RESEARCH,
  512. CAMP_PLAYER_PREP_SPELLS,
  513. CAMP_ADD_SPELL_TO_PASSIVES,
  514. CAMP_REMOVE_SPELL_FROM_PASSIVES,
  515. CAMP_PLAYER_MEMORIZE_SKILL,
  516. CAMP_PLAYER_CAST_SPELL,
  517. CAMP_PLAYER_CAST_SPELL_ON_ALLY,
  518. CAMP_PLAYER_CAST_SPELL_ON_LOCATION,
  519. CAMP_PLAYER_SCRY_LOCATION,
  520. RETURNED_TO_DUNGEON,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement