Template:Op game settings statistics

Game settings and statistics
This group of operations allows you to retrieve some of the game settings as configured by the player on Options page, and change them as necessary (possibly forcing a certain level of difficulty on the player). Operations dealing with achievements (an interesting, but underdeveloped feature of Warband) are also placed in this category.

Conditional operations
is_trial_version = 250
 * (is_trial_version),
 * Checks if the game is in trial mode (has not been purchased). Player cannot get higher than level 6 in this mode.

is_edit_mode_enabled = 255
 * (is_edit_mode_enabled),
 * Version 1.153+. Checks that Edit Mode is currently enabled in the game. Useful for making additions to the default UI.

is_cheat_mode_enabled = 53
 * (is_cheat_mode_enabled),
 * Checks if Cheat Mode is currently enabled in the game i.e. "Enable Cheats" is ticked on in the launcher.

Generic operations
get_operation_set_version = 55
 * (get_operation_set_version, ),
 * Version 1.165+. 4research. Apparently returns the current version of Module System operations set, allowing transparent support for multiple Warband engine versions.

set_player_troop = 47
 * (set_player_troop, ),
 * Changes the troop player controls. Generally used in quick-battle scenarios to give player a predefined character.

show_object_details_overlay = 960
 * (show_object_details_overlay, ),
 * Turns various popup tooltips on (value = 1) and off (value = 0). This includes agent names and dropped item names during missions, item stats in inventory on mouse over, etc.

auto_save = 985
 * (auto_save),
 * Version 1.161+. Saves the game to the current save slot.

allow_ironman = 988
 * (allow_ironman, ),
 * 1 = allow, 0 = disallow. Used on new games to disable realistic mode.

Access to game options
options_get_damage_to_player = 260
 * (options_get_damage_to_player, ),
 * 0 = 1/4, 1 = 1/2, 2 = 1/1

options_set_damage_to_player = 261
 * (options_set_damage_to_player, ),
 * 0 = 1/4, 1 = 1/2, 2 = 1/1

options_get_damage_to_friends = 262
 * (options_get_damage_to_friends, ),
 * 0 = 1/2, 1 = 3/4, 2 = 1/1

options_set_damage_to_friends = 263
 * (options_set_damage_to_friends, ),
 * 0 = 1/2, 1 = 3/4, 2 = 1/1

options_get_combat_ai = 264
 * (options_get_combat_ai, ),
 * 0 = good, 1 = average, 2 = poor

options_set_combat_ai = 265
 * (options_set_combat_ai, ),
 * 0 = good, 1 = average, 2 = poor

game_get_reduce_campaign_ai = 424
 * (game_get_reduce_campaign_ai, ),
 * Deprecated operation. Use options_get_campaign_ai instead

options_get_campaign_ai = 266
 * (options_get_campaign_ai, ),
 * 0 = good, 1 = average, 2 = poor

options_set_campaign_ai = 267
 * (options_set_campaign_ai, ),
 * 0 = good, 1 = average, 2 = poor

options_get_combat_speed = 268
 * (options_get_combat_speed, ),
 * 0 = slowest, 1 = slower, 2 = normal, 3 = faster, 4 = fastest

options_set_combat_speed = 269
 * (options_set_combat_speed, ),
 * 0 = slowest, 1 = slower, 2 = normal, 3 = faster, 4 = fastest

options_get_battle_size = 270
 * (options_get_battle_size, ),
 * Version 1.161+. Retrieves current battle size slider value (in the range of 0..1000). Note that this is the slider value, not the battle size itself.

options_set_battle_size = 271
 * (options_set_battle_size, ),
 * Version 1.161+. Sets battle size slider to provided value (in the range of 0..1000). Note that this is the slider value, not the battle size itself.


 * 1) To change the real battlesize you need to change entry string in the begining of the missions. Multiplier start from 1.25 to 5.25 according to options slider.
 * Battle reinforcements are half of the start:


 * 1) To make options show the rigth battlesize values you need to change in module.ini

get_average_game_difficulty = 990
 * (get_average_game_difficulty, ),
 * Returns calculated game difficulty rating (as displayed on the Options page). Commonly used for score calculation when ending the game.

Achievements and kill stats
get_achievement_stat = 370
 * (get_achievement_stat,, , ),
 * Retrieves the numeric value associated with an achievement. Used to keep track of player's results before finally unlocking it.

set_achievement_stat = 371
 * (set_achievement_stat, , , ),
 * Sets the new value associated with an achievement. Used to keep track of player's results before finally unlocking it.

unlock_achievement = 372
 * (unlock_achievement, ),
 * Unlocks player's achievement. Apparently doesn't have any game effects.

get_player_agent_kill_count = 1701
 * (get_player_agent_kill_count,, [get_wounded]),
 * Retrieves the total number of enemies killed by the player. Call with non-zero  parameter to retrieve the total number of knocked down enemies. Returns lifetime kill counts.

get_player_agent_own_troop_kill_count = 1705
 * (get_player_agent_own_troop_kill_count,, [get_wounded]),
 * Retrieves the total number of allies killed by the player. Call with non-zero  parameter to retrieve the total number of knocked down allies.