Fog of War
From Mount&Blade Modding Wiki
Contents |
Description
A Fog of War effect on the main map that is similar to that of AOE etc...
Agent Regeneration Script for Singleplayer
Coded by: cdvader
Python File's Used: Module_Scripts.py and Module_Simple_Triggers.py
How to implement:
1. Add All of the required New and Changed Codes (seen below.)
2. Test and report any problems
New and Changed Codes:
Module_Scripts
Add
#script_hide_center #Input: center to hide. #Output: center hidden. ("hide_center", [ (store_script_param, ":center", 1), (party_set_flags, ":center", pf_disabled, 1), ]), #script_hide_centers_in_range #Input 1: center to disable BEGIN. #Input 2: center to disable END. #Output: Disables centers. ("hide_centers_in_range", [ (store_script_param, ":center_begin", 1), (store_script_param, ":center_end", 2), (assign, ":temp_val", ":center_end"), (val_add, ":temp_val", 1), (try_for_range, ":center", ":center_begin", ":temp_val"), (party_set_flags, ":center", pf_disabled, 1), (try_end), ]), #script_hide_all_centers #Input: None. #Output: centers hidden. ("hide_all_centers", [ (try_for_range, ":center", centers_begin, centers_end), (party_set_flags, ":center", pf_disabled, 1), (try_end), ]), #script_enable_center #Input: center to enable. #Output: Enables the given center. ("enable_center", [ (store_script_param, ":center", 1), (party_set_flags, ":center", pf_disabled, 0), ]), #script_enable_centers_in_range #Input 1: centers to enable BEGIN. #Input 2: centers to enable END. #Output: Enables centers. ("enable_centers_in_range", [ (store_script_param, ":center_begin", 1), (store_script_param, ":center_end", 2), (assign, ":temp_val", ":center_end"), (val_add, ":temp_val", 1), (try_for_range, ":center", ":center_begin", ":temp_val"), (party_set_flags, ":center", pf_disabled, 0), (try_end), ]), #script_enable_all_centers #Input: None. #Output: None. ("enable_all_centers", [ (try_for_range, ":center", centers_begin, centers_end), (party_set_flags, ":center", pf_disabled, 0), (try_end), ]),
Module_Simple_Triggers
Add
(0.1, [ (try_for_range, ":center", centers_begin, centers_end), (store_distance_to_party_from_party, ":dist", ":center", "p_main_party"), (party_get_skill_level, ":skl_level", "p_main_party", skl_spotting), (val_sub, ":dist", ":skl_level"), (lt, ":dist", 10), (assign, ":chosen_center", ":center"), (party_set_flags, ":chosen_center", pf_disabled, 0), (try_end), ])
Forum Link
http://forums.taleworlds.com/index.php/topic,8652.msg2037943.html#msg2037943
Credits
By Cdvader