Template:Op quests

Quests
Quests are just that: some tasks that characters in the game world want the player to do. It's interesting to note that in Warband quests can have three possible outcomes: success, failure and conclusion. Generally the last option is used to indicate some "intermediate" quest result, which is neither a full success, nor a total failure.

Conditional operations
check_quest_active = 200
 * (check_quest_active, ),
 * Checks that the quest has been started but not yet cancelled or completed. Will not fail for concluded, failed or succeeded quests for as long as they have not yet been completed.

check_quest_finished = 201
 * (check_quest_finished, ),
 * Checks that the quest has been completed (result does not matter) and not taken again yet.

check_quest_succeeded = 202
 * (check_quest_succeeded, ),
 * Checks that the quest has succeeded and not taken again yet (check will be successful even after the quest is completed).

check_quest_failed = 203
 * (check_quest_failed, ),
 * Checks that the quest has failed and not taken again yet (check will be successful even after the quest is completed).

check_quest_concluded = 204
 * (check_quest_concluded, ),
 * Checks that the quest was concluded with any result and not taken again yet.

Slot operations for quests
quest_set_slot = 506
 * (quest_set_slot, , , ),

quest_get_slot = 526
 * (quest_get_slot,, , ),

quest_slot_eq = 546
 * (quest_slot_eq, , , ),

quest_slot_ge = 566
 * (quest_slot_ge, , , ),

Quest management
start_quest = 1280
 * (start_quest, , ),
 * Starts the quest and marks giver_troop as the troop who gave it.

conclude_quest = 1286
 * (conclude_quest, ),
 * Sets quest status as concluded but keeps it in the list. Frequently used to indicate "uncertain" quest status, when it's neither fully successful nor a total failure.

succeed_quest = 1282
 * (succeed_quest, <quest_id>),:also concludes the quest
 * Sets quest status as successful but keeps it in the list (player must visit quest giver to complete it before he can get another quest of the same type).

fail_quest = 1283
 * (fail_quest, <quest_id>),:also concludes the quest
 * Sets quest status as failed but keeps it in the list (player must visit quest giver to complete it before he can get another quest of the same type).

complete_quest = 1281
 * (complete_quest, <quest_id>),
 * Successfully completes specified quest, removing it from the list of active quests.

cancel_quest = 1284
 * (cancel_quest, <quest_id>),
 * Cancels specified quest without completing it, removing it from the list of active quests.

setup_quest_text = 1290
 * (setup_quest_text, <quest_id>),
 * Operation will refresh default quest description (as defined in module_quests.py). This is important when quest description contains references to variables and registers which need to be initialized with their current values.

store_partner_quest = 2240
 * (store_partner_quest, ),
 * During conversation, if there's a quest given by conversation partner, the operation will return it's id.

setup_quest_giver = 1291
 * (setup_quest_giver, <quest_id>, <string_id>),
 * Apparently deprecated, as quest giver troop is now defined as a parameter of (start_quest).

store_random_quest_in_range = 2250
 * (store_random_quest_in_range,, <lower_bound>, <upper_bound>),
 * Apparently deprecated as the logic for picking a new quest has been moved to module_scripts.

set_quest_progression = 1285
 * (set_quest_progression, <quest_id>, ),
 * Deprecated and useless, operation has no game effects and it's impossible to retrieve quest progression status anyway.

store_random_troop_to_raise = 2251
 * (store_random_troop_to_raise,, <lower_bound>, <upper_bound>),
 * Apparently deprecated.

store_random_troop_to_capture = 2252
 * (store_random_troop_to_capture,, <lower_bound>, <upper_bound>),
 * Apparently deprecated.

store_quest_number = 2261
 * (store_quest_number,, <quest_id>),
 * Apparently deprecated.

store_quest_item = 2262
 * (store_quest_item,, <item_id>),
 * Apparently deprecated. Native now uses quest slots to keep track of this information.

store_quest_troop = 2263
 * (store_quest_troop,, <troop_id>),
 * Apparently deprecated. Native now uses quest slots to keep track of this information.