k61824
Veteran
As the name suggests this adds to the function of the cheat menu in Native so I can actually test other things I may have been building. Therefore, it requires your cheatmenu command to make these appear. (Of course whether you would like to abuse that to whatever you might fancy is a completely separate issue.)
part 1a: forcing truce and increase faction relations (Encounter with faction leader)
Add this into module_dialogue.py
part 1b: forcing truce between AI factions
in module_game_menus.py, under "faction_orders" , add the following choice:
This one will force a truce between the selected faction with all other AI factions (you got the dialogue to force truce with you.)
part 1a: forcing truce and increase faction relations (Encounter with faction leader)
Add this into module_dialogue.py
Code:
[anyone|plyr,"lord_suggest_action", [(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),],
"{!}CHEAT: Make peace with me.", "lord_pretalk",[
(call_script, "script_diplomacy_start_peace_between_kingdoms", "$g_talk_troop_faction", "$players_kingdom", 1),
(store_relation, ":players_kingdom_relation", "$g_talk_troop_faction", "$players_kingdom"),
(try_begin),
(this_or_next|eq, "$players_kingdom", 0),
(ge, ":players_kingdom_relation", 0),
(call_script, "script_set_player_relation_with_faction", "$g_talk_troop_faction", 0),
(else_try),
(call_script, "script_diplomacy_start_peace_between_kingdoms", "$g_talk_troop_faction", "$players_kingdom", 1),
(try_end),]],
[anyone|plyr,"lord_suggest_action", [(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),],
"{!}CHEAT: Make your faction like me.", "lord_pretalk",[
(store_relation, ":players_kingdom_relation", "$g_talk_troop_faction", "$players_kingdom"),
(val_add,":players_kingdom_relation",20),
(val_min,":players_kingdom_relation",100),
(call_script, "script_set_player_relation_with_faction", "$g_talk_troop_faction", ":players_kingdom_relation"),
]],
part 1b: forcing truce between AI factions
in module_game_menus.py, under "faction_orders" , add the following choice:
Code:
("faction_orders_peace", [],"{!}Force truce with other AI kingdoms.",
[
(try_for_range, ":faction", npc_kingdoms_begin, npc_kingdoms_end),
(neg|eq,":faction","$g_cheat_selected_faction"),
(call_script, "script_diplomacy_start_peace_between_kingdoms", ":faction", "$g_cheat_selected_faction", 1),
(try_end),
(jump_to_menu, "mnu_faction_orders"),
]
),
This one will force a truce between the selected faction with all other AI factions (you got the dialogue to force truce with you.)