If i remember it well in RTW was function "console_command control". I don't know if it was useful because i didn't make experiments with making scripts.
Anyway i would like to use it in my mod. I've got 2 factions: byzantium as a "normal" faction and bizancjum as shadowed faction and i would like to make script giving the possible to change controlled faction after rebellion event.
i've made script you can find below but it doesn't work. Now i don't know what's wrong: function "control" doesn't work in MTW2 or maybe something else?
PHP Code:
declare_counter propozycja_przyjeta_bizancjum
monitor_event FactionTurnStart FactionType byzantium
and I_NumberOfSettlements bizancjum > 0
and DiplomaticStanceFromFaction bizancjum = AtWar
and I_CompareCounter propozycja_przyjeta_bizancjum = 0
historic_event propozycja true
end_monitor
monitor_conditions I_EventCounter propozycja_accepted = 1
console_command control bizancjum
set_counter propozycja_przyjeta_bizancjum 1
end_monitor
monitor_conditions I_EventCounter propozycja_declined = 1
set_event_counter propozycja_declined 0
end_monitor
monitor_event FactionTurnStart FactionType byzantium
and I_NumberOfSettlements byzantium > 0
and I_NumberOfSettlements bizancjum > 0
and not DiplomaticStanceFromFaction bizancjum = AtWar
set_counter propozycja_przyjeta_bizancjum 0
end_monitor