AvernumScript/Appendix/Campaign and Scenario Calls

From Wikibooks, open books for an open world
< AvernumScript | Appendix
Jump to: navigation, search

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.

Contents

[edit] 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 0–99.

[edit] 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.

[edit] short get_flag(short a,short b)

Identical to get_sdf().

[edit] short get_sdf(short a,short b)

Returns SDF(a,b).

[edit] 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 0–255.

[edit] void set_flag(short a,short b,short new_value)

Sets SDF(a,b) to be new_value.

[edit] 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 0–99.
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export