Results 1 to 5 of 5

Thread: Tutorial (Kingdoms): Switching faction icons part way through a campaign

  1. #1

    Default Tutorial (Kingdoms): Switching faction icons part way through a campaign

    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):

    Code:
    		;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:

    Code:
    	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



    Turn 3 - faction icon changed to Teutonic Order



    Turn 4 - faction icon changed to the Mongols



    Turn 5 - faction icon changed to the England? uh oh




    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:







    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.


    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.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  2. #2
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Tutorial (Kingdoms): Switching faction icons part way through a campaign

    This doesn't change the name though, or does it?

  3. #3
    blaaaaaaaaaarg! Senior Member Lusted's Avatar
    Join Date
    Feb 2005
    Posts
    1,773

    Default Re: Tutorial (Kingdoms): Switching faction icons part way through a campaign

    If i remember it does change the name as well, i think that is done via the campaign_script as well.

  4. #4

    Default Re: Tutorial (Kingdoms): Switching faction icons part way through a campaign

    No, I don't believe that the name is changed.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  5. #5

    Default Re: Tutorial (Kingdoms): Switching faction icons part way through a campaign

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO