As there was a meme earlier today about how towns literally never surrender, I went digging to see how the game calculates whether the AI is willing to surrender or not. As my finds were rather curious, I thought I might as well share what I found, and explain how it works. The game code Part 1: selecting the correct dialogue option Whenever the player selects [anyone,"player_siege_ask_surrender", [(lt, "$g_enemy_strength", 100), (store_mul,":required_str","$g_enemy_strength",5),(ge, "$g_ally_strength", ":required_str")], "Perhaps... Do you give your word of honour that we'll be treated well?", "player_siege_ask_surrender_treatment", []], [anyone,"player_siege_ask_surrender", [(lt, "$g_enemy_strength", 200), (store_mul,":required_str","$g_enemy_strength",3),(ge, "$g_ally_strength", ":required_str")], "We are ready to leave this castl...