Page 1 of 5 12345 LastLast
Results 1 to 20 of 97

Thread: J@mes' Kingdoms Scripts

  1. #1

    Default J@mes' Kingdoms Scripts

    This thread will cover the Kingdoms new commands, you must run these scripts through the kingdoms .exe

    change_settlement_name


    Spoiler Alert, click show to read: 


    Spoiler Alert, click show to read: 






    Spoiler Alert, click show to read: 






    Spoiler Alert, click show to read: 






    You must first unpack the game and use Alpacas binary converter open (data/text Expanded) Expanded.txt and place this line in

    {Istanbul}Istanbul
    {Constantinople}Constantinople

    Spoiler Alert, click show to read: 

    (It had taken me a while to find this out)



    basic script


    The script

    monitor_conditions I_SettlementOwner Constantinople = turks

    change_settlement_name Constantinople Istanbul

    end_monitor
    ;-----------------------------------------------------------------

    Advanced Script
    declare_counter Constantinople_turks


    monitor_conditions I_SettlementOwner Constantinople = turks
    and I_CompareCounter Constantinople_turks = 0

    set_counter Constantinople_turks 1
    change_settlement_name Constantinople Istanbul

    end_monitor


    monitor_conditions I_SettlementOwner Constantinople = byzantium
    and I_CompareCounter Constantinople_turks = 1

    set_counter Constantinople_turks 0
    change_settlement_name Constantinople Constantinople

    end_monitor



    Changing a factions religion during campaign based on that factions settlement count

    new commands used:
    set_religion
    retire_characters
    change_population_religion


    Spoiler Alert, click show to read: 


    Accept Event
    Spoiler Alert, click show to read: 




    Byzantine Empire Converted
    Spoiler Alert, click show to read: 




    Byzantine Empire now on crusade
    Spoiler Alert, click show to read: 




    copy this into the historic_events.txt

    Spoiler Alert, click show to read: 




    Basic script

    monitor_event FactionTurnStart


    add_events
    event counter byzantium_conversion_accepted
    event counter byzantium_conversion_declined
    date 0
    end_add_events

    terminate_monitor

    end_monitor

    monitor_event FactionTurnStart FactionType byzantium

    if I_NumberOfSettlements byzantium < 10

    historic_event byzantium_conversion true factions { byzantium, }

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter byzantium_conversion_accepted = 1

    set_religion byzantium catholic
    retire_characters byzantium priest
    change_population_religion byzantium catholic 75 orthodox


    terminate_monitor

    end_monitor



    send_character_off_map

    Spoiler Alert, click show to read: 


    This script will sent a character (Hernan Cortes) the the new world and i found that you do not have to give the re-spawned character is old traits as these as saved my the character is set off the map.

    Spoiler Alert, click show to read: 




    yes i know he is dead (I messed up mymod folder )

    Spoiler Alert, click show to read: 






    Spoiler Alert, click show to read: 


    monitor_event FactionTurnStart FactionType spain
    and I_TurnNumber = 2
    ;and IsFactionAIControlled



    spawn_army
    faction spain
    character Hernan Cortes , named character, age 20, x 70, y 97, label conquistador
    traits NaturalMilitarySkill 2, Loyal 2, GoodDefender 2
    unit SE Bodyguard exp 3 armour 0 weapon_lvl 0

    end

    set_counter Hernan 1

    terminate_monitor
    end_monitor

    monitor_conditions I_CompareCounter Hernan = 1
    and I_TurnNumber = 3


    send_character_off_map conquistador


    terminate_monitor
    end_monitor

    monitor_event FactionTurnStart FactionType spain
    and I_TurnNumber = 4
    ;and IsFactionAIControlled

    spawn_army
    faction spain
    character Hernan Cortes , named character, age 22, x 7, y 72, label conquistador
    traits NaturalMilitarySkill 2
    unit SE Bodyguard exp 3 armour 0 weapon_lvl 0

    end

    terminate_monitor
    end_monitor



    Extended Script with option.

    Spoiler Alert, click show to read: 




    Spoiler Alert, click show to read: 




    Spoiler Alert, click show to read: 


    monitor_event FactionTurnStart

    add_events
    event counter send_hernan_accepted
    event counter send_hernan_declined
    date 0
    end_add_events


    terminate_monitor
    end_monitor



    monitor_event FactionTurnStart FactionType spain
    and I_TurnNumber = 2
    ;and IsFactionAIControlled



    spawn_army
    faction spain
    character Hernan Cortes , named character, age 20, x 70, y 97, label conquistador
    traits NaturalMilitarySkill 2, Loyal 2, GoodDefender 2
    unit SE Bodyguard exp 3 armour 0 weapon_lvl 0

    end


    historic_event send_hernan true factions { spain, }

    terminate_monitor
    end_monitor

    monitor_conditions I_EventCounter send_hernan_accepted = 1

    send_character_off_map conquistador

    terminate_monitor
    end_monitor

    monitor_conditions I_EventCounter send_hernan_accepted = 1
    and I_TurnNumber = 4

    spawn_army
    faction spain
    character Hernan Cortes , named character, age 22, x 7, y 72, label conquistador
    traits NaturalMilitarySkill 2
    unit SE Bodyguard exp 3 armour 0 weapon_lvl 0

    end

    terminate_monitor
    end_monitor


    and this into your historic_events.txt
    Spoiler Alert, click show to read: 

    {SEND_HERNAN_TITLE} Explore The New World
    {SEND_HERNAN_BODY} Will you send Hernan Cortes to the new world?








    more to come...
    Last edited by J@mes; August 09, 2008 at 04:45 PM.


  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: J@mes' Scripts

    Simple and straight forward. Thanks.










  3. #3

    Default Re: J@mes' Kingdoms Scripts

    Nice work J@mes! I'm definatly going to take time out to put this in my Expanded Americas mod.
    Just one thought though, will there be any effects on victory conditions from such a name change?

  4. #4

    Default Re: J@mes' Kingdoms Scripts

    no effects as expanded is not linked directly to victory conditions.


  5. #5

    Default Re: J@mes' Kingdoms Scripts

    Fantastic!, this gives me a lot of potential for renaming Americas regions from native to their present day European ones. + Rep!

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    The region name remains the same as does the settlement name that the victory condition refers to - the parts in brackets. Only the display name gets changed.










  7. #7
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: J@mes' Kingdoms Scripts

    Nice work J@mes Sensei! Will definitely be useful for my mod in some areas I'd imagine, that is if I could ever get my script changes to work beyond add_money .

    Cheers,
    Augustus

  8. #8

    Default Re: J@mes' Kingdoms Scripts

    @J@mes
    Just given this a test and ran into a problem, I needed to add
    {Constantinople}Constantinople into Expanded.txt or the script wouldn't fire.
    Last edited by Eothese; August 07, 2008 at 12:33 PM.

  9. #9

    Default Re: J@mes' Kingdoms Scripts

    yes that's an out of date picture for expanded i'm going to update.


  10. #10

    Default Re: J@mes' Kingdoms Scripts

    updated


  11. #11
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: J@mes' Kingdoms Scripts

    Interesting religion conversion script there. I could see using that to convert the Mongol Ilkhanate to Islam or similar.

    A question about the settlement_name_change script. Is it possible to make it check for a date, rather than an owner? Currently in the province of Prussia there's the city of Twangste, but I want it to changed in the year that the Teutonic Order conquered it and established Konigsberg. The Teutonic Order however is not a faction(at least at current). Is this possible with a date, or does an emergent faction have to accompany it in order to make it possible?

    Cheers,
    Augustus

  12. #12
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: J@mes' Kingdoms Scripts

    You can use it with anything. As long as you have a valid event or a valid condition that will give you true/false, you can execute the command.

  13. #13
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: J@mes' Kingdoms Scripts

    What's this "end_add_events"? I haven't seen that before.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  14. #14

    Default Re: J@mes' Kingdoms Scripts

    It just marks the end of an events structure.


  15. #15
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: J@mes' Kingdoms Scripts

    Oh oh, right I thought it's something else, never mind.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  16. #16
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Re: J@mes' Kingdoms Scripts

    James well done with those scripts. Tell me is the use of retire_character a way to kill a character, or is this a separate command?

  17. #17

    Default Re: J@mes' Kingdoms Scripts

    I have not had a chance to fully test the retire_characters but it only seems to retire all character of that type in this case priest so i don't think it can be used to kill off a character.

    there is the kill_character for that type of work but the character must be tagged with a label or the script must know the characters name.
    Last edited by J@mes; August 08, 2008 at 10:05 AM.


  18. #18

    Default Re: J@mes' Kingdoms Scripts

    I'm unfamilliar with the convert religion event, if I use it to allow a faction to convert will I need to add that faction to the appropriate religious buildings in EDB?

  19. #19

    Default Re: J@mes' Kingdoms Scripts

    yes you can use a event_counter to trigger this like a switch for a tech tree i will update the tutorial tomorrow on this and explain.


  20. #20

    Default Re: J@mes' Kingdoms Scripts

    Quote Originally Posted by The Border Reiver View Post
    James well done with those scripts. Tell me is the use of retire_character a way to kill a character, or is this a separate command?
    retire_characters will kill all characters of a given type from a faction. The command that works like kill character is send_character_off_map. You can use labels instead of character name with it.

Page 1 of 5 12345 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •