AvernumScript/Appendix/Campaign and Scenario Calls
These are the functions for manipulating the scenario variables and Stuff Done flags. For information on Stuff Done Flags see the original documentation's chapter on scripting basics.
void clear_quest(short which_quest)
edit- Resets the quest which_quest. It is as if it was never given. No text message is displayed.
Notes:
- The acceptable range for which_quest is 0–99.
void end_scenario(short party_won)
edit- Immediately terminates the scenario and returns the party to the title screen.
Values for party_won are: | |
0 – | Party's scenarios entered count is incremented and
the scenarios won count is not incremented. |
1 – | Party's scenarios entered count is incremented and
the scenarios won count is incremented. |
2 – | Party's scenarios entered count is not incremented and
the scenarios won count is not incremented. |
short get_flag(short a,short b)
edit- Identical to
get_sdf()
.
short get_sdf(short a,short b)
edit- Returns SDF(a,b).
void inc_flag(short a,short b,short how_much)
edit- Changes SDF(a,b) by how_much, which can be negative.
Notes:
- The acceptable range for how_much is 0–255.
void set_flag(short a,short b,short new_value)
edit- Sets SDF(a,b) to be new_value.
void toggle_quest(short which_quest,short start_or_finish)
edit- Toggles whether the party is doing the quest which_quest or not.
Values for start_or_finish are: | |
0 | – If the party is currently on the quest, which_quest, the quest which_quest is marked as finished and will be removed from the quest log. |
1 | – If the party has not completed the quest, which_quest, the quest which_quest is started and will appear on the party's quest log. |
Notes:
- The acceptable range for which_quest is 0–99.