Log in

View Full Version : Script to destory faction



Thurnor
01-05-2007, 14:23
Is it possible to have a script that destroys a faction (i.e all settlements rebel) when the faction leader is killed? I'd prefer this to happen if its through an unnatural death (not old age); but this isnt essential. Possibilities? Any help would be appreiated.

Atilius
01-07-2007, 01:57
Inside a script, there is no way I know of to distinguish between a death in battle and a natural death.

The event monitor below will destroy the Gauls upon the death of the Gallic faction leader:



monitor_event BecomesFactionLeader FactionType gauls
console_command kill_faction gauls
end_monitor

This is triggered by the succession of the faction heir to faction leadership, which implies the faction leader has died. I've tested it and it works nicely.

I haven't tested the use of CeasedFactionLeader in place of BecomesFactionLeader, but that ought to work too.

Thurnor
01-07-2007, 14:53
Thankyou, thats a lot of help. I assume that the destoyed faction's provinces turn rebel.

If this were to be done on the BI engine, would provinces go to the faction that shadows the faction? e.g. If the Western Roman Empire was eliminated in this way, would there settlements go over to the Western Roman Empire rebels?

Atilius
01-07-2007, 23:40
Thankyou, thats a lot of help. I assume that the destoyed faction's provinces turn rebel.

That's right.



If this were to be done on the BI engine, would provinces go to the faction that shadows the faction? e.g. If the Western Roman Empire was eliminated in this way, would there settlements go over to the Western Roman Empire rebels?

I think so, but I haven't confirmed this.

Thurnor
01-08-2007, 21:00
Thanks for the reply, must test this. Thanks again