Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 97

Thread: J@mes' Kingdoms Scripts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    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.


  2. #2

    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?

  3. #3

    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.


  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    - The only way to get a character on to the campaign map during game play is by spawning.
    - The off_map command avoids removing the character from the family tree.
    - In the Britannia campaign the Norwegian king STARTS off_map. That way he is alive in the family tree, ages accordingly and is available for spawning.










  5. #5

    Default Re: J@mes' Kingdoms Scripts

    updated with the send_character_off_map command.

    Quote Originally Posted by BozosLiveHere View Post
    Yeah, I understand that. But AFAIK when you spawn the new Edward the engine actually creates a new one. I mean, data like acquired traits and ancillaries are not exactly the same as from the guy that was sent off the map. Or is it?
    yes those are saved, check my script i wrote for sending Hernán Cortés to the new world i did not respawn him with the same traits but he still had them.
    Last edited by J@mes; August 09, 2008 at 04:46 PM.


  6. #6

    Default Re: J@mes' Kingdoms Scripts

    Oh, that is awesome. It means the command is actually useful.

  7. #7

    Default Re: J@mes' Kingdoms Scripts

    Will this include link_faction_ai? and good tutorial btw. +rep.

    and thanks for thoses scripts you wrote for me.
    Last edited by krycek; August 14, 2008 at 01:39 PM.

  8. #8

    Default Re: J@mes' Kingdoms Scripts

    Yes I plan to cover link_faction_ai soon.


  9. #9
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: J@mes' Kingdoms Scripts

    Very helpful, thanks.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  10. #10

    Default Re: J@mes' Kingdoms Scripts

    My game crashes when I try to implement the convert religion script. This is how I have it, based on the Kingdoms grand campaign script for Lithuania:

    Spoiler Alert, click show to read: 

    ;------------------- MONGOL CONVERSION TO ISLAM -------------------;

    ;increment the timer for conversion offer
    monitor_event FactionTurnStart FactionType mongols

    inc_event_counter mongols_conversion_timer 1

    if I_EventCounter mongols_conversion_accepted = 1
    terminate_monitor
    end_if

    end_monitor

    ;offer the conversion to Lithuania if the correct conditions are met

    monitor_event FactionTurnStart FactionType mongols

    if I_NumberOfSettlements mongols < 10
    and I_EventCounter mongols_conversion_timer >= 5
    and I_EventCounter mongols_conversion_accepted = 0

    ;offer conversion to christianity
    historic_event mongols_conversion true factions { mongols, }

    ;if AI random chance to accept
    if I_IsFactionAIControlled mongols

    generate_random_counter random_accept 0 2
    if I_EventCounter random_accept < 2
    set_event_counter mongols_conversion_accepted 1
    end_if

    end_if

    terminate_monitor

    end_if

    if I_EventCounter mongols_conversion_timer >= 65
    and I_EventCounter mongols_conversion_accepted = 0

    ;offer conversion to christianity
    historic_event mongols_conversion true factions { mongols, }

    ;if AI random chance to accept
    if I_IsFactionAIControlled mongols

    generate_random_counter random_accept 0 2
    if I_EventCounter random_accept < 2
    set_event_counter mongols_conversion_accepted 1
    end_if

    end_if

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter mongols_conversion_accepted = 1

    ;Three easy steps for conversion

    ;1 - Convert the people
    set_religion mongols islam
    change_population_religion mongols islam 75 pagan

    ;2 - Destroy the pagan buildings
    ;destroy_buildings lithuania temple_dievas true
    ;destroy_buildings lithuania temple_dievas_castle true
    ;destroy_buildings lithuania temple_perkunas true
    ;destroy_buildings lithuania temple_perkunas_castle true
    ;destroy_buildings lithuania temple_giltine true
    ;destroy_buildings lithuania temple_giltine_castle true

    ;3 - Disband the pagan units
    retire_characters mongols priest
    ;destroy_units Lithuania pagan_unit

    ;notify all factions that Lithuania has converted and become Catholic
    historic_event mongols_converts event/Lithuania_converts.bik

    set_event_counter pagan_mongols 0
    set_event_counter not_pagan_mongols 1
    ; change lithuania ai label
    link_faction_ai mongols islam

    terminate_monitor

    end_monitor
    Last edited by AndariusHaliusScipio; March 10, 2010 at 05:50 PM.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    Did you declare the counters at the beginning of the script? (unlikely error, the script wouldn't have crashed because of this, just not fired)

    Did you make entries in historic_events? (mongols_conversion, mongols_converts) - this causes a crash if you don't.










  12. #12

    Default Re: J@mes' Kingdoms Scripts

    I found my problem:

    {MONGOLS_CONVERSION_TITLE}Convert to Islam?
    {MONGOLS_CONVERSION_TITLE}Will the great Khanate submit to Allah and Muhammad, His Messenger?


    Guess what it was

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    {MONGOLS_CONVERSION_TITLE}Convert to Islam?
    {MONGOLS_CONVERSION_TITLEBODY}Will the great Khanate submit to Allah and Muhammad, His Messenger?










  14. #14

    Default Re: J@mes' Kingdoms Scripts

    The game's now crashing when I have it accept the change in religion.

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    mongols_converts - have you got the entry in historic_events?










  16. #16

    Default Re: J@mes' Kingdoms Scripts

    That's not in the tutorial. What do I put?

  17. #17
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    You create two entries in the historic_events file in the same way like you did the ones for "mongols_conversions" - don't forget the picture for this event!










  18. #18

    Default Re: J@mes' Kingdoms Scripts

    James should really add that to the tutorial

  19. #19
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: J@mes' Kingdoms Scripts

    He hasn't been around for ages. So don't expect it soon.

    But as a principle: every historic_event needs it's entry in the data\text \historic_events file. Otherwise it will crash the game without error message.










  20. #20
    StaefanBatory's Avatar Civis
    Join Date
    Feb 2009
    Location
    Cracow, Poland
    Posts
    187

    Default Re: J@mes' Kingdoms Scripts

    I want to chek a first script with change settlement name.
    This script is not out of order:

    ;;;;;;;;;;;;;;;;;;;;;;;;
    ; -- Istanbul
    ;;;;;;;;;;;;;;;;;;;;;;;;

    monitor_conditions I_SettlementOwner Venice = milan
    and I_CompareCounter Venice_milan = 0

    set_counter Venice_milan 1
    change_settlement_name Venice Istanbul

    end_monitor


    monitor_conditions I_SettlementOwner Venice = venice
    and I_CompareCounter Venice_milan = 1

    set_counter Venice_milan 0
    change_settlement_name Venice Venice

    end_monitor
    And I add to expanded:

    {Istanbul}hagafa
    {Venice}wenecja
    Settlement name do not change, when my milan army counter Venice city.
    Did I do something badly?


    (My mod run through the kongdoms.exe)

Page 2 of 5 FirstFirst 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
  •