Advertisement
NRFB

Amount Fields

May 1st, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.35 KB | None | 0 0
  1. Any time that I specify a field as an Amount or amount type field, it has a specific meaning. Amount type fields are meant to eventually evaluate down to a number, however there are multiple ways that this can occur.
  2.  
  3. An amount field must be one of:
  4. integer - Self explanatory. The field will have the numeric value entered.
  5. float - Self explanatory. The field will have the numeric value entered.
  6. String - The string entered must be a wildcard (see below). The field will get the value of the wildcard and set it to that value. If the string is invalid or refers to an unset variable, this field will end up with a value of 0.
  7. Array of Dictionaries - This option allows the field to be evaluated as a set of steps of math, eventually reaching a final amount. Each Dictionary inside the Array must be of the following format:
  8. {
  9. "value" - This field can be an integer, float, or String, as above
  10. "operation" - This field should be one of "+", "-", "*", "/"
  11. }
  12. (Again, remember that the order doesn't matter. It may be more intuitive to put the operation first, but either is fine)
  13. The field is evaluated by, starting with a value of 0, following the steps in each Dictionary. It evaluates the "value" field, and performs the given "operation" with the evaluated value and the total value of any previous steps.
  14.  
  15. So for an example, if you (for whatever reason), needed a field that would evaluate to an ally's current Physique stat + 3, it would look like:
  16.  
  17. "amount": [{"operation": "+", "value": "%ally_stat%Physique"}, {"operation": "+", "value": 3}]
  18. Starting from 0, it adds the value of %ally_stat%Physique, then adds the value of 3. This allows the entire field to eventually evaluate down to a single number as a result.
  19.  
  20. This obviously needs access to a variable that you won't be able to type into your .json file, so it necessitates the use of wildcards.
  21.  
  22. Wildcards as a general concept will be further explained/listed out in their own section, for now it is good enough to say that all wildcards in the game are contained in % symbols. If you ever see a field that has a %-contained string, it is meant to be accessing something within the game at run time, rather than a static value.
  23.  
  24. In the case of amount fields, the wildcards indicate where the game should look, with extra information added after the bordering % symbols.
  25.  
  26. The following is a list of accepted wildcards for amount fields specifically:
  27.  
  28. "%parent_info%*" - Looks at whatever check triggered this one for a field with a name that matches *, returns the value of that field.
  29.  
  30. "%source_field%*" - Looks at the source of this effect (usually a status effect/skill/curse/etc) for a field with a name that matches *, returns the value of that field.
  31.  
  32. "%ally_stat%*" - Looks at the relevant character for a stat with a name that matches *, returns the current value of that field. In this case, * should be one of: "STRENGTH", "DEXTERITY", "FOCUS", "VITALITY", "PHYSIQUE", "REFLEX", "WILLPOWER", "HEALTH", "INJURY", "EXHAUSTION", "LUST", "CORRUPTION_T", "CORRUPTION_P", "CORRUPTION_TOTAL"
  33.  
  34. "%ally_stat_base%*" - Looks at the relevant character for a stat with a name that matches *, returns the value of that field with no bonuses or penalties. In this case, * should be one of: "STRENGTH", "DEXTERITY", "FOCUS", "VITALITY", "PHYSIQUE", "REFLEX", "WILLPOWER", "HEALTH"
  35.  
  36. "%ally_desire_drive%*" - Looks at the relevant character for a desire with a name that matches *, returns the drive that the character has for that desire. In this case, * should be one of: "Ideals", "Growth", "Knowledge", "Autonomy", "Pleasure", "Material", "Triumph", "Success", "Community", "Relaxation".
  37.  
  38. "%ally_desire_current%*" - Looks at the relevant character for a desire with a name that matches *, returns the current value of that desire. In this case, * should be one of: "Ideals", "Growth", "Knowledge", "Autonomy", "Pleasure", "Material", "Triumph", "Success", "Community", "Relaxation".
  39.  
  40. "%ally_desire_drive_average%*" - Looks at all characters for a desire with a name that matches *, returns the average of all drives of that desire. In this case, * should be one of: "Ideals", "Growth", "Knowledge", "Autonomy", "Pleasure", "Material", "Triumph", "Success", "Community", "Relaxation".
  41.  
  42. "%ally_desire_value_average%*" - Looks at all characters for a desire with a name that matches *, returns the average of all current values of that desire. In this case, * should be one of: "Ideals", "Growth", "Knowledge", "Autonomy", "Pleasure", "Material", "Triumph", "Success", "Community", "Relaxation".
  43.  
  44. "%status_tracker%*" - Looks at the relevant character for a status tracker with a name that matches *, returns value of that tracker.
  45.  
  46. "%skill_tracker%*" - Looks at the relevant character for a status tracker with a name that matches *, returns value of that tracker.
  47.  
  48. "%curse_tracker%*" - Looks at the relevant character for a status tracker with a name that matches *, returns value of that tracker.
  49.  
  50. "%status_duration%*" - Looks at the relevant character for a status effect with an ID that matches *, returns the current remaining duration of that status effect.
  51.  
  52. "%status_applied_count%*" - Looks at the relevant character to return the number of times that a status effect with an ID that matches * has been applied to the character.
  53.  
  54. "%ally_count%*" - Looks at the relevant character to return the number of times the thing specified by * has happened. In this case, * should be one of: "OPENED_CHESTS", "CORRUPTION_BREAKS", "MONSTERS_DEFEATED", "MONSTERS_DEFEATED_IN_DARKNESS", "TRAPS_DISARMED", "ROOMS_EXPLORED", "SCRIED"
  55.  
  56. "%player_favorability%" - Looks at the relevant character to return the amount of favorability the character has for the player.
  57.  
  58. "%player_control%" - Looks at the relevant character to return the amount of control the player has over that character.
  59.  
  60. "%floor_turn_count%" - Returns the number of turns that have elapsed on this dungeon floor.
  61.  
  62. "%completed_floor_count%" - Returns the number of dungeon floors that have been completed during this run.
  63.  
  64. "%total_witch_value%" - Returns the total value of all deals the player has made with the Witch.
  65.  
  66. "%monster_stat%*" - Looks at the relevant monster for a stat with a name that matches *, returns the current value of that field. In this case, * should be one of: "max_health", "current_health", "attack", "armor"
  67.  
  68. "%monster_tracker%*" - Looks at the relevant monster for a status tracker with a name that matches *, returns value of that tracker.
  69.  
  70. "%monster_status_duration%*" - Looks at the relevant monster for a status effect with an ID that matches *, returns the current remaining duration of that status effect.
  71.  
  72. "%trap_stat%*" - Looks at the relevant trap for a stat with a name that matches *, returns the current value of that field. In this case, * should be one of: "max_health", "current_health", "attack", "accuracy", "rearm_time", "rearm_timer"
  73.  
  74. "%trap_tracker%*" - Looks at the relevant trap for a status tracker with a name that matches *, returns value of that tracker.
  75.  
  76. "%trap_status_duration%*" - Looks at the relevant trap for a status effect with an ID that matches *, returns the current remaining duration of that status effect.
  77.  
  78. "%monster_research_level%*" - Looks at the player's save file for a monster with an ID that matches *, returns the level of research for that monster.
  79.  
  80. "%trap_research_level%*" - Looks at the player's save file for a trap with an ID that matches *, returns the level of research for that trap.
  81.  
  82. "%event_happened_run_count%*" - Looks at the player's save file for an event with an ID that matches *, returns the number of times the event has happened during this run.
  83.  
  84. "%event_happened_count%*" - Looks at the player's save file for an event with an ID that matches *, returns the number of times the event has happened between this run and any previous runs where the player carried over their event count.
  85.  
  86. "%event_happened_run_count%*1%*2" - Looks at the player's save file for an event with an ID that matches *1, returns the number of times the event has happened to the ally with an ID that matches *2 during this run.
  87.  
  88. "%event_happened_count%*1%*2" - Looks at the player's save file for an event with an ID that matches *1, returns the number of times the event has happened to the ally with an ID that matches *2 between this run and any previous runs where the player carried over their event count.
  89.  
  90. Further amount wildcards can be implemented on request.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement