PDA

View Full Version : Tutorial (Kingdoms): Switching faction icons part way through a campaign



Epistolary Richard
09-01-2007, 14:01
One of the things that has interested me the most before I bought Kingdoms expansion was the inner workings of the Kalmar Union and, happily, I was not to be disappointed. A couple of excellent new scripting commands are now available to us.

This first one allows you to change a faction's icon in the middle of a campaign as part of the campaign script.


Changing a faction's icon & banners part-way through a campaign

The command is (as used in the Kalmar Union script):



;apply kalmar union faction banner to denmark
set_faction_banner
faction denmark
banner kalmar_union
end_set_faction_banner


It's all extremely straight forward, the faction is the faction you want to change and the banner is the faction name whose icon you want to change it to.

And so, here is a test script I used:



monitor_event FactionTurnStart FactionType denmark
and I_TurnNumber = 2

set_faction_banner
faction denmark
banner teutonic_order
end_set_faction_banner


terminate_monitor

end_monitor

monitor_event FactionTurnStart FactionType denmark
and I_TurnNumber = 3

set_faction_banner
faction denmark
banner mongols
end_set_faction_banner


terminate_monitor

end_monitor

monitor_event FactionTurnStart FactionType denmark
and I_TurnNumber = 4

set_faction_banner
faction denmark
banner england
end_set_faction_banner


terminate_monitor

end_monitor




Turn 1 - start as Denmark
https://img232.imageshack.us/img232/9373/changebanner1tc3.th.jpg (https://img232.imageshack.us/my.php?image=changebanner1tc3.jpg)


Turn 3 - faction icon changed to Teutonic Order
https://img232.imageshack.us/img232/2051/changebanner2ph2.th.jpg (https://img232.imageshack.us/my.php?image=changebanner2ph2.jpg)


Turn 4 - faction icon changed to the Mongols
https://img247.imageshack.us/img247/3725/changebanner3ks1.th.jpg (https://img247.imageshack.us/my.php?image=changebanner3ks1.jpg)https://img247.imageshack.us/img247/4020/changebanner3arh5.th.jpg (https://img247.imageshack.us/my.php?image=changebanner3arh5.jpg)


Turn 5 - faction icon changed to the England? uh oh
https://img232.imageshack.us/img232/1531/changebanner4kl0.jpg (https://imageshack.us)



The difference was that england was not set up in the descr_strat file for the Teutonic campaign, all it was was a matter of setting up england as a dead faction in descr_strat, which allowed the following:

https://img232.imageshack.us/img232/7751/changebanner5ow1.th.jpg (https://img232.imageshack.us/my.php?image=changebanner5ow1.jpg)





This does mean that there is an effective limit on the number of different permutations of icon you can have based on how many spare slots you have in your descr_strat file. Campaigns that use fewer factions, as a result, will have more flexibility in the number of icons they can change to.

I've tested this in the British Isles campaign also, which worked.
However, it did not appear to work in the core M2TW campaign. :sad:


What use might it be?

This change is only cosmetic, however as well as situations such as the Kalmar Union where a faction is forming a larger scale alliance worthy of a separate name (another example might be England, Scotland & Wales forming Great Britain), it could also be used to demonstrate dynastic (such as the merging of Lancastrian and Yorkist roses), societal (such as the development of the Eastern Roman Empire into the Byzantine Empire) or religious changes.

alpaca
09-01-2007, 14:58
This doesn't change the name though, or does it?

Lusted
09-01-2007, 15:09
If i remember it does change the name as well, i think that is done via the campaign_script as well.

Epistolary Richard
09-01-2007, 22:03
No, I don't believe that the name is changed.

zerathule
09-10-2007, 15:00
That leads to interesting perspective : England becomming Great Britain for exemple.
Can you come back to your former banner or is it "permanent" ? I could see an HRE mod where the german minor that becomes emperor gets a new banner and faction name, only to loose it once the emperor changes.