Results 1 to 9 of 9

Thread: Tutorial (Kingdoms): Merging two factions mid-campaign

  1. #1

    Default Tutorial (Kingdoms): Merging two factions mid-campaign

    The second part of the Kalmar Union script is the merging of the Danish & Norwegian factions or, more accurately, the acquisition of the Norwegian faction by the Danish.

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


    Merging two factions (having one faction acquire another) part-way through a campaign

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

    Code:
    		;turn over norways assets to denmark
    		give_everything_to_faction norway denmark false
    The first faction is the target faction, the second faction is the acquiring faction. Not sure what the true/false parameter is.


    And so, here is a test script I used:

    Code:
    		monitor_event FactionTurnStart FactionType teutonic_order
    		and I_TurnNumber = 1
    
    		
    		give_everything_to_faction mongols teutonic_order false
    
    		
    		terminate_monitor
    		
    	end_monitor


    Turn 1 - Teutons start with original territory



    Turn 2 - Teutons acquire Mongol territory - Mongol family members become Teuton generals




    What use might it be?

    A few different thoughts on this. The first is that medieval kings gained territory in more ways that outright conquest, this command could be used to represent the merging of crowns, perhaps through inheritance, perhaps through being offered (as the crown of the Sicily was by the pope), through purchase or indeed any other criteria that could be scripted. The other is that this could be an alternative to the repetative process of having to annihilate factions down to their last stronghold. If a faction has been beaten back to a single territory if it has its faction leader killed, then maybe they might be prepared to surrender to their aggressors - or alternatively they might try to merge with another neighbouring faction in the knowledge that their aggressors may back off.
    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
    Ranting madman of the .org Senior Member Fly Shoot Champion, Helicopter Champion, Pedestrian Killer Champion, Sharpshooter Champion, NFS Underground Champion Rhyfelwyr's Avatar
    Join Date
    Oct 2006
    Location
    In a hopeless place with no future
    Posts
    8,646

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    Could this feature be implemented into the Grand Camapaign?
    At the end of the day politics is just trash compared to the Gospel.

  3. #3

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    I've not tested it, but the other scripting commands introduced in Kingdoms have not been able to be used in the Grand Campaign.
    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

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

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    Quote Originally Posted by Epistolary Richard
    I've not tested it, but the other scripting commands introduced in Kingdoms have not been able to be used in the Grand Campaign.
    My guess is that at this time they need the Kingdoms exe to be executed.

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

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    That seems to be correct, and with the retrofit mod already out it means that modders can use that as a basis.

  6. #6

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    Can you script that if a princess maries a faction leader and he dies without children the entire faction will be transfered to the on that owned the princess? I know that would be a lot of work, just want to know if it's possible.

  7. #7
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    it's quite unlikely that faction leader wouldn't have children...

    but you could give faction leader of faction 'c' trait 'a' (I think)
    and give any children of that father with fathertrait 'a' another trait 'b'

    and then set condition in script that if no-one living has trait 'b' all of faction 'c'
    is given to faction 'd'

    am not entirely sure if the link to princess is recordable - you'd need to work out
    if marriage of princess from faction 'd' can be used in first place to trigger giving trait 'a' to leader of faction 'c'


    if you've only got two factions the example would be as above - if you've got a lot of factions the whole thing would expand exponentially, with you needing to code each case; eg. that princess from faction 'f' marries leader of faction 'g', or faction 'd' etc... and every other permutation!
    Not used mods before? Looking for something small and fun?!
    Download the:

  8. #8

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    I knew that, scripting is mainly a lot of work.

  9. #9
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Tutorial (Kingdoms): Merging two factions mid-campaign

    Yup

    Quote Originally Posted by Makanyane View Post
    it's quite unlikely that faction leader wouldn't have children...
    I was actually a bit wrong on that, if you meant true, born as baby, children. If he hasn't got children who haven't come of age yet coded for him in descr_strat, and faction expands so game starts wanting to give it more generals, he's likely to end up with adopted generals filling the slots, especially if its an AI controlled faction.


    the other thing to look at would be to use an ancillary derived from the inherited traits, which is passed to real son and heirs.... you can quite easily code monitors to use
    and not FactionwideAncillaryExists Im_a_heir_anc true
    checking for faction not having a trait is messier as there isn't a FactionwideTraitExists command, though you could probably get round it with counters
    Not used mods before? Looking for something small and fun?!
    Download the:

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