This script was very necessary for me but I avoided it for years because of big amount of copying lines for bonus_building. So I tryed to exclude this part by adding same effects that give bonus building to core buildings (city/castle walls) with event_counter condition attached. I tested it today and everything worked fine. So I need only change event_counter to get PO bonuses for all settlements and build target_building in settlement that I want to give to another faction.
Here is the part for core_buildings in EDB
Spoiler Alert, click show to read:
Code:
law_bonus bonus 20 requires not building_present_min_level ros_temp_buildings ros_target and event_counter change_settlement 1
population_health_bonus bonus 20 requires not building_present_min_level ros_temp_buildings ros_target and event_counter change_settlement 1
happiness_bonus bonus 20 requires not building_present_min_level ros_temp_buildings ros_target and event_counter change_settlement 1
Here is the script (in this case I use it for regional rebellion of egypt on moors)
Spoiler Alert, click show to read:
Code:
monitor_event FactionTurnEnd FactionType moors
console_command create_building Hellholt ros_target
add_settlement_turmoil Hellholt 30
provoke_rebellion Hellholt
end_monitor
monitor_event FactionTurnEnd FactionType slave
set_event_counter change_settlement 1
faction_emerge egypt moors 5 120.0 190.0 1.2 town false egypt1 Ormond 53
spawn_army
faction egypt
character random_name, named character, x 58, y 16, family, label egypt3
traits GoodCommander 2 , Energetic 1 , Loyal 2 , Brave 3, BattleDread 1 , StrategyDread 1 ,
unit bodyguard yronwood exp 1 armour 0 weapon_lvl 0
unit Yronwood Cavalry exp 3 armour 1 weapon_lvl 0
unit Yronwood Infantry exp 3 armour 1 weapon_lvl 0
unit Yronwood Infantry exp 3 armour 1 weapon_lvl 0
unit Yronwood Infantry exp 3 armour 1 weapon_lvl 0
unit Yronwood Infantry exp 0 armour 1 weapon_lvl 0
unit Yronwood Scrimish exp 0 armour 1 weapon_lvl 0
unit Yronwood Scrimish exp 2 armour 0 weapon_lvl 0
unit Yronwood Scrimish exp 2 armour 0 weapon_lvl 0
unit Yronwood Archers exp 0 armour 1 weapon_lvl 0
unit Yronwood Archers exp 0 armour 1 weapon_lvl 0
unit yronwood horsearchers exp 3 armour 0 weapon_lvl 0
unit yronwood horsearchers exp 3 armour 0 weapon_lvl 0
unit yronwood jav cavalry exp 1 armour 1 weapon_lvl 0
unit yronwood jav cavalry exp 1 armour 1 weapon_lvl 0
unit yronwood jav cavalry exp 1 armour 1 weapon_lvl 0
unit yronwood jav cavalry exp 1 armour 1 weapon_lvl 0
end
set_event_counter change_settlement 0
set_faction_standing egypt moors -9.9
set_faction_standing moors egypt -9.9
destroy_buildings egypt ros_temp_buildings false
terminate_monitor
end_monitor
My sister, do you still recall the blue Hasan and Khalkhin-Gol?
Russian warship is winning. Proofs needed? Go find yourself!
That would exclude villages from getting the bonuses, meaning there's a good chance that a village could be transferred to the new owner instead of the intended settlement being transferred.
Withwnar, I think you have a mistake in the OP, specifically in the description of"min_num_remain" . Afaik it means the min number of settlements the source faction should keep (the one that is loosing the settlements)...
That your spawnpool seize only one settlement is ensured by the PO requirement for the neighboring settlement being set to 0.0