< AvernumScript < Appendix

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)

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 099.

void end_scenario(short party_won)

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)

Identical to get_sdf().

short get_sdf(short a,short b)

Returns SDF(a,b).

void inc_flag(short a,short b,short how_much)

Changes SDF(a,b) by how_much, which can be negative.


Notes:

  • The acceptable range for how_much is 0255.

void set_flag(short a,short b,short new_value)

Sets SDF(a,b) to be new_value.

void toggle_quest(short which_quest,short start_or_finish)

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 099.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.