AvernumScript/Appendix/Scenario Initialization Calls

These calls are all meant to be made in the scenario script, either in the state LOAD_SCEN_STATE or START_SCEN_STATE. They can, however, be made anywhere.

void add_item_to_shop(short which_shop,short which_item,short how_many)

 * This call should be made in the state START_SCEN_STATE. This places 1 or more "items" in store which_shop. which_shop ranges from 0–129. Normally, the "item" placed is an item of type which_item. The argument how_many defines the quantity of the item added to the store.


 * However, if you pick certain high values of which_item, you can put into the store things besides items &mdash; you can also have spells, alchemy recipes, and skills.

Values for which_item are:

Note:
 * Items
 * Any given shop can only have 25 types of items in stock.
 * If how_many is greater than 500, the store will have an infinite quantity of the item which_item.
 * In all cases, you will want to put a number above 0 for how_many. If you don't, the item will disappear from the store.

void create_boat(short which_boat,short which_town,short loc_x,short loc_y,short others_property)

 * This call should be made in the state START_SCEN_STATE. Initializes the boat which_boat, which ranges from 0–29. The boat is placed in town which_town in space [loc_x, loc_y].

Values for others_property are:

void create_horse(short which_horse,short which_town,short loc_x,short loc_y,short others_property)

 * This call should be made in the state START_SCEN_STATE. Initializes the horse which_horse, which ranges from 0–29. The horse is placed in town which_town in space [loc_x, loc_y].

Values for others_property are:

void init_quest(short which_quest,string quest_name,string quest_desc)

 * This call should be made in the state LOAD_SCEN_STATE. It sets the name of quest which_quest to quest_name and the description text to quest_desc.

Note:
 * The name can be at most 29 characters long
 * The description can be at most 199 characters long.
 * The acceptable range for which_quest is 0–99.

void init_special_item(short which_item,string item_name,string item_desc)

 * This call should be made in the state LOAD_SCEN_STATE. It sets the name of special item which_item to item_name and the description text to item_desc.

Note:
 * The name can be at most 29 characters long.
 * The description can be at most 199 characters long.
 * The acceptable range for which_item is 0–59.

void set_creature_type_level(short which_type,short what_level)

 * Sets the level of creature type which_type to level what_level. This is the only call that changes creature types, normally these changes are the scennamedata script.). It is provided because, in order to balance a scenario, you will probably need to adjust the levels of at least some creature types.