as example, this garrison script I would like to be run as a show_me script but by a "silent" bit of advice, seeing that the problem is that you cant have a script load on gameload or detect if a script is running I was thinking about having it run each turn, basicly transfer the monitors to descr_advice and have that trigger proper scripts
(say have a monitor check up on AI's treasury than call a script to give some cash if needed, or even the favored 4-turns a year script can be adapted to this so it doesnt need the player "to remember ....")
example-script;
Code:
monitor_event FactionTurnEnd FactionIsLocal
if I_CompareCounter XCityX_Besieged > 0
and I_SettlementOwner XCityX = romans_julii
set_counter XCityX_Besieged 0
end_if
if I_CompareCounter XCityX_Besieged = 0
and not I_SettlementOwner XCityX = romans_julii
if I_CharacterTypeNearTile romans_julii family, 8 XxX,YyY
set_counter XCityX_Besieged 1
end_if
if I_CharacterTypeNearTile romans_julii general, 6 XxX,YyY
set_counter XCityX_Besieged 1
end_if
if I_CompareCounter XCityX_Besieged = 1
and not I_FactionNearTile romans_julii 2 XxX,YyY
console_command create_unit XCityX "spawn legion" 2
console_command create_unit XCityX "spawn archer" 1
set_counter XCityX_Besieged 0
end_if
if I_CompareCounter XCityX_Besieged = 1
console_command create_unit XCityX "spawn legion" 5
console_command create_unit XCityX "spawn archer" 3
end_if
end_if
if I_CompareCounter XCityX_Besieged = 2
set_counter XCityX_Besieged 0
end_if
if I_CompareCounter XCityX_Besieged = 1
and not I_CharacterTypeNearTile romans_julii family, 2 XxX,YyY
and not I_CharacterTypeNearTile romans_julii general, 2 XxX,YyY
set_counter XCityX_Besieged 2
end_if
end_monitor
basing the trigger on a faction means each script can be written for a specific faction, like the example is written for the Julii
It will check up on generals and family members nearby, but also when possibly under siege, spawning some extra men if you get close and a full reinforcement once if its possibly you're sieging the settlement
Than once you leave it takes at least 2 turns before a full reinforcement can take place ..
The issue I have (in concept) with making this trigger by advice is the lack of being able to set some sort of "City_ Besieged" flag to prevent over-spawn "for sure" ..
G
Bookmarks