Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 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

    my question is

    can I set more names to one settlement (not only two)?

    for example city :

    Porszony (hungarian)
    Pressburg (german)
    Bratislava (slovak)

    The more sand has escaped from the hourglass of our life, the clearer we should see through it.
    Niccolo Machiavelli

  2. #2
    Keyser Soze's Avatar Domesticus
    Join Date
    Jul 2008
    Location
    Bratislava
    Posts
    2,437

    Default Re: J@mes' Kingdoms Scripts

    I think the two names is possible to have. three no. in mod "1143" it is nice done - there are christian names and muslim names of settlements in Iberia.

    nice work, J@mes.

    EDIT: link http://www.twcenter.net/forums/showthread.php?t=142355
    Last edited by Keyser Soze; April 11, 2010 at 07:16 AM.
    sorry my english.

  3. #3
    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 don't really need the counters, the condition is enough.

    monitor_conditions I_SettlementOwner Venice = milan
    change_settlement_name Venice Istanbul
    end_monitor

    Don't think there is a limit to names you can the settlement into.










  4. #4
    Polpolgio's Avatar Miles
    Join Date
    Jun 2008
    Location
    Barcelona, Europe
    Posts
    362

    Default Re: J@mes' Kingdoms Scripts

    In our Reconquista mod, we gave four names to Girona city:
    Girona -catalan domain
    Gerona-castilian domain
    Gérone-french domain
    Jarunda-muslim domain

    or same with Perpignan:

    Perpinyà -catalan domain
    Perpiñán -castilian domain
    Perpignan-french domain
    Barbanyan-muslim domain

    You need more than a counter, but it works perfectly

    If you want, I can attach the script I used to set four names to one settlement. If you wait, I'll do a new tut about this right now.

    http://www.twcenter.net/forums/showthread.php?t=349073

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

    Default Re: J@mes' Kingdoms Scripts

    Gigantus -> You are the best !
    Solved !

    Thanks!

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

    Default Re: J@mes' Kingdoms Scripts

    Oh.... :/
    Why scripts from J@mes, are out of order?
    And agian I must to ask somebody for the help (probably You, Gigantus )

    Look, I have a script from J@mes, for faction Lithuania: (similar to J@mes's script)
    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;
    ; -- lithuania to christianity
    ;;;;;;;;;;;;;;;;;;;;;;;;

    monitor_event FactionTurnStart


    add_events
    event counter lithuania_conversion_accepted
    event counter blithuania_conversion_declined
    date 1
    end_add_events

    terminate_monitor

    end_monitor

    monitor_event FactionTurnStart FactionType lithuania

    if I_NumberOfSettlements lithuania < 10

    historic_event lithuania_conversion true factions { lithuania, }

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter lithuania_conversion_accepted = 1

    set_religion lithuania catholic
    retire_characters blithuania priest
    change_population_religion lithuania catholic 75 pagan


    terminate_monitor

    end_monitor


    And I add to 2 line in historic_events.txt :
    {LITHUANIA_CONVERSION_TITLE}Blablabla?
    {LITHUANIA_CONVERSION_BODY}Blablabla?
    When was first turn, nothing is happening...



    What's is wrong? Maybe again something must something change? Any line in campaign_script?

  7. #7

    Default Re: J@mes' Kingdoms Scripts

    thx guys for letting me know

    The more sand has escaped from the hourglass of our life, the clearer we should see through it.
    Niccolo Machiavelli

  8. #8
    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

    1. the first monitor is incomplete:
    monitor_event FactionTurnStart [FactionType factionname, FactionIsLocal, not FactionIsLocal]

    2. Your skript will only fire when Lithuania has less then 10 settlements
    if I_NumberOfSettlements lithuania < 10

    3. Lucky it didn't fire because it would have crashed due to wrong entries in the descr_historic_event file
    The text for the initial window (decision)
    {ACCEPT_DECLINE_name of historic event_BODY}
    {ACCEPT_DECLINE_name of historic event_TITLE}
    The text for the NO decision
    {DECLINE_name of historic event_BODY}
    {DECLINE_name of historic event_TITLE}
    The text for the YES decision
    {ACCEPT_name of historic event_BODY}
    {ACCEPT_name of historic event_TITLE}

    4. And there is spelling mistake:
    retire_characters blithuania priest










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

    Default Re: J@mes' Kingdoms Scripts

    Still the event don't show in first turn. I correct a mistake, look:

    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;
    ; -- lithuania to christianity
    ;;;;;;;;;;;;;;;;;;;;;;;;

    monitor_event FactionTurnStart FactionType lithuania

    add_events
    event counter lithuania_conversion_accepted
    event counter lithuania_conversion_declined
    date 1
    end_add_events

    terminate_monitor

    end_monitor

    monitor_event FactionTurnStart FactionType lithuania

    if I_NumberOfSettlements lithuania < 10

    historic_event lithuania_conversion true factions { lithuania, }

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter lithuania_conversion_accepted = 1

    set_religion lithuania catholic
    retire_characters Lithuania priest
    destroy_units Lithuania pagan_unit
    change_population_religion lithuania catholic 75 pagan


    terminate_monitor

    end_monitor


    (Lithuania has less then 10 settlements - 4 provinces)

    And I add few lines to historic_events.txt:
    {ACCEPT_DECLINE_LITHUANIA_CONVERSION_BODY}Akceptuje
    {ACCEPT_DECLINE_LITHUANIA_CONVERSION_TITLE}Akceptuje
    {DECLINE_LITHUANIA_CONVERSION_BODY}Nie akceptuje
    {DECLINE_LITHUANIA_CONVERSION_TITLE}Nie akceptuje
    {ACCEPT_LITHUANIA_CONVERSION_BODY}Akc
    {ACCEPT_LITHUANIA_CONVERSION_TITLE}Akc
    {LITHUANIA_CONVERSION_TITLE}Chrzest Litwy
    {LITHUANIA_CONVERSION_BODY}Bla bla bla...
    Nothing...

    Is it still necessary to mend something?

  10. #10
    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

    This might look a bit stilted, but it works for me in this way. I am sure you can convert the last two monitor_ event into monitor_condition. Please note that this will only show if you play Lithuania yourself:

    Code:
    ;--- creating the counters ---
    monitor_event FactionTurnStart FactionType lithuania
    
        add_events    
            event event_counter accept_decline_lithuania_conversion_accepted
            event event_counter accept_decline_lithuania_conversion_declined
            date 0
        end_add_events
    
        terminate_monitor
    end_monitor
    
    ;--- triggering the event for Lithuania only ---
    monitor_event FactionTurnStart FactionType lithuania
        and I_NumberOfSettlements lithuania < 10
    
        historic_event accept_decline_lithuania_conversion true factions { lithuania, }
    
    terminate_monitor
    
    end_monitor
    
    ;--- Conversion accepted ---
    monitor_event EventCounter EventCounterType accept_decline_lithuania_conversion_accepted
        and I_EventCounter accept_decline_lithuania_conversion_accepted == 1
    
            historic_event accept_lithuania_conversion
    
            set_religion lithuania catholic
            retire_characters Lithuania priest
            destroy_units Lithuania pagan_unit
            change_population_religion lithuania catholic 75 pagan
        
        terminate_monitor
    end_monitor
    
    ;--- Conversion declined ---
    monitor_event EventCounter EventCounterType accept_decline_lithuania_conversion_declined
        and I_EventCounter accept_decline_courage_declined == 1
    
            historic_event decline_lithuania_conversion
        
        terminate_monitor
    end_monitor










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

    Default Re: J@mes' Kingdoms Scripts

    Still nothing...

    I copy your script, and nothing...

    Did you chek a own script ?

  12. #12
    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

    One thing you need: the descr_event_images file from one of the kingdoms mods. Otherwise the Yes\No event doesn't work.

    And yes, I have about 7 of those events in my latest mod.

    1. Are you playing Lithuania?
    2. Do you have the above in the data folder?










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

    Default Re: J@mes' Kingdoms Scripts

    1.Yes, all time I playing Lithuania, when I chek this script.
    2.yes, I had earlier file descr_event_images.txt in my mod (copy from kingdoms)

    Perhaps is stiil something is missing ? Any file ?

  14. #14
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: J@mes' Kingdoms Scripts

    Is your campaig_script executed at all? Or can it be that there is another, unrelated, monitor broken in your script that prevents the entire script from firing (inculding this event)?

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

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

    Default Re: J@mes' Kingdoms Scripts

    I don't understand too much

  16. #16
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: J@mes' Kingdoms Scripts

    Some errors make the entire campaign_script.txt unreadable for the game, such as a missing "end_monitor" or "end_if" somwhere in the file.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  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

    For testing purposes I usually put this line at the beginning of my script:

    restrict_strat_radar false

    If the cover appears in the left of the radar map, then I know something is wrong with my script and check in the log.










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

    Default Re: J@mes' Kingdoms Scripts

    ->Gigantus - I wrote a your line: restrict_strat_radar false at the beginning script.

    Now I see a errors in system.log from campaign_script, look:

    16:44:52.529 [game.script] [error] Script parsing error at line 3471, column 1 in Feudalic_Novgorod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file Feudalic_Novgorod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    16:44:52.529 [game.script] [error] Script parsing error at line 3473, column 5 in Feudalic_Novgorod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file Feudalic_Novgorod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    And this is a line:

    Spoiler Alert, click show to read: 

    3471 monitor_event FactionTurnStart FactionType lithuania

    3473 add_events
    event event_counter accept_decline_lithuania_conversion_accepted
    event event_counter accept_decline_lithuania_conversion_declined
    date 0
    end_add_events

    terminate_monitor
    end_monitor

    ;--- triggering the event for Lithuania only ---
    monitor_event FactionTurnStart FactionType lithuania
    and I_NumberOfSettlements lithuania < 10

    historic_event accept_decline_lithuania_conversion true factions { lithuania, }

    terminate_monitor

    end_monitor

    ;--- Conversion accepted ---
    monitor_event EventCounter EventCounterType accept_decline_lithuania_conversion_accepted
    and I_EventCounter accept_decline_lithuania_conversion_accepted == 1

    historic_event accept_lithuania_conversion

    set_religion lithuania catholic
    retire_characters Lithuania priest
    destroy_units Lithuania pagan_unit
    change_population_religion lithuania catholic 75 pagan

    terminate_monitor
    end_monitor

    ;--- Conversion declined ---
    monitor_event EventCounter EventCounterType accept_decline_lithuania_conversion_declined
    and I_EventCounter accept_decline_courage_declined == 1

    historic_event decline_lithuania_conversion

    terminate_monitor
    end_monitor


    All script is a wrong ? Maybe only beginning script ?

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

    Default Re: J@mes' Kingdoms Scripts

    It's Amazing! When I delete lines with change a name settlement, suddenly Lithuania can change religius, and... acting!

    ________________

    Now all is OK
    Thanks !


    _________________

    That's all in a campaign_script.
    Now I make a new unit and other....



    Hmm... I have a one question
    How make a "computer change religon" ? I would like if only computer decide change a religion. I must add a new line ??
    And I would like if only computer always choose "yes"

    And.... How make if I want a Lithuania change religion in 200th turn ??
    Last edited by StaefanBatory; April 13, 2010 at 11:24 AM.

  20. #20
    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

    That is exactly what happens with your script: when the computer plays the lithuania faction and gets the condition\event he will choose yes.










Page 3 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
  •