theoraticly I'd say that you're better of putting stuff in a single monitor with lots of if's, as long as whatever is in that monitor is similair stuff and you're not just calling that monitor for an entire script just cause someone said monitors are more demanding ... :D
the game needs to continually(sp?) check up on monitors, where the if-statements are only being processed once the monitor is actually triggered
(I dont think there is a single "black and white" answer here, just try not to spam monitors and keep things properly grouped)
those "if character near .... " commands I have 2*198 in a single monitor, but all that monitor does is check up on generals near a tile and spawm some men if wanted/needed, anything else is again in its own monitors
not too experianced scripting TW, but in other engines I always made sure that the if-statement least likelly to pass are checked first so there are as little follow-up checks as possible, though there will be little to even no diff. at all in how demanding a script is, at least not noticable, but every little bit helps specially if eventually your mod might be run by someone on a rather old system, or if you're using a zillion statements ... ;)
btw;
siege_assault_button, is that the "start siege on battlemap" button??
also GarrisonSettlementRatio < 0.8, does that work??
I've tried that one in M2 (or similair one) and it didnt "seem" to work there, does the current command basicly mean "if garrison is smaller than 80% of 20units" ??
this is the start of my garrison bit of my script, just Rome in the example;
Code:
monitor_event ScrollOpened seige_scroll
and ScrollOpened seige_scroll
if not I_SettlementOwner Rome = romans_julii
if I_CharacterTypeNearTile romans_julii family, 3 255, 155
set_counter Settlement_Besieged 1
end_if
if I_CharacterTypeNearTile romans_julii general, 2 255, 155
set_counter Settlement_Besieged 1
end_if
if I_CompareCounter Settlement_Besieged = 1
if I_SettlementOwner Rome = romans_senate
console_command create_unit Rome "roman praetorian cohort" 6 7 3 3
console_command create_unit Rome "roman praetorian cavalry" 2 7 3 3
console_command create_unit Rome "roman urban cohort" 4 6 3 3
console_command create_unit Rome "roman legion archer ii" 4 5 3 3
end_if
if not I_SettlementOwner Rome = romans_senate
and I_CompareCounter Settlement_Level = 3
console_command create_unit Rome "roman urban cohort" 6 6 3 3
console_command create_unit Rome "roman legion archer ii" 3 3 3 3
console_command create_unit Rome "roman urban cohort" 4 5 3 3
console_command create_unit Rome "roman legion archer ii" 3 4 3 3
end_if
if not I_SettlementOwner Rome = romans_senate
and I_CompareCounter Settlement_Level < 3
console_command create_unit Rome "roman legion cohort ii" 5 3 2 2
console_command create_unit Rome "roman legion archer ii" 3 2 2 2
console_command create_unit Rome "roman legion cohort ii" 5 4 2 2
console_command create_unit Rome "roman legion archer ii" 3 3 2 2
end_if
set_counter Settlement_Besieged 0
end_if
end_if
end_monitor
G
Bookmarks