Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 84

Thread: Script for selecting the heir - (Update 24.07.2015)

  1. #61

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Hello,

    I copied the codes as explained, but when I start a new campaign, as soon as a potential husband pops up it crashes and closes. Every time. Sooo...

    I downloaded the Bare Geomod, and it does not work on it. It gives me all of the options described in this post for Heir Candidate, but it does not create a trait nor does it choose the next heir correctly, I tested it and the person I chose was not selected by the game when the leader died.

  2. #62

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Hello FreeASAPRocky. I think you haven't entered the trait and its respective triggers correctly in "export_descr_character_traits.txt" file. Take a look in the LOG file to see if it indicates a script error message when assigning the trait.

    P.S: The script is only compatible with Kingdoms mods, if you enter it in the vanilla Grand Campaign it will cause a CTD (Crash to desktop).

  3. #63

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Thank you for getting back so quickly! I attached my system log. Hopefully you will be able to find out the error because it is beyond my skills lol

    and yes I downloaded the Kingdoms expansion pack off Steam. I am just using the main file, not crusaders, americans, etc.
    Attached Files Attached Files

  4. #64

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Ok. The LOG file don't says anything. Try in Bare Geomod, not in original game. And review all files that need to be modified. It's important that a new file "historic_events.txt.strings.bin" be generated and that the code be well written in the "export_descr_character_traits.txt" file; trait and triggers in their respective sections.

  5. #65
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Try setting the log to trace mode too. That might give a clue.

  6. #66

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Miguel, I have tried to use the files from the Bare Geomod and still no success. I went ahead and redownloaded the game from steam, all the files are still "packed" so this is like starting from scratch.

    I am a rookie at this modding, I have read several articles and discussions on this forum regarding it, but i feel that they skip some steps that beginners should know. I was hoping you could give me a step-by-step walkthrough for a beginner on how to make this mod work...if it is too much I understand. I have Python 2.5 and a bin script converter. I just need to know everything I need to do from start to finish to make this work. Thank you so much for your help already!!

  7. #67

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    In Bare Geomod there is no missing any unpacked file to add this script. If it doesn't works, it's because you added some text incorrectly. Review the instructions of the first post.

    P.S: To unpack the game you must run this file: "...\Medieval II Total War\tools\unpacker\unpack_all.bat"

  8. #68
    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,125
    Blog Entries
    35

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Rather unpack files this way - it does so outside the game directory which has numerous advantages.










  9. #69

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    I'm getting a crash when the turn cycles back to me. Could this be a result of having NA- Heir ancilliary installed for Stainless Steel ?

    I'm also trying to make this work in an existing campaign. If it's not either of those two things, I must have screwed up the syntax for the entries. Could someone be a chum and check my syntax ?

    Edit: Just tried starting a new campaign and it crashes when it attempts to load. Something must be horribly wrong with my syntax..

    System.log error: 22:11:51.958 [game.script] [error] Condition parsing error in mods/Stainless_Steel_6/data/export_descr_character_traits.txt, at line 33179, column 21Trait not recognised

    Edit 2: Okay the crash was caused by me not adding the actual Trait under the traits section. Though on campaign start, I'm not seeing anything different. Just the faction announcement of Crown Heir from the Next heir ancillary mod. Will test again on my existing campaign.

    Edit 3: Well the mod is working, but is definitely not save-game compatible. Does anyone know if this script is capable of circumventing the left-most rule issue ? At any rate, thank you to author of this script.



    Syntax for Traits- Red text represents existing entries):

    Spoiler Alert, click show to read: 
    Trigger AI_leader_boost
    WhenToTest CharacterTurnStart


    Condition Trait Factionleader = 1
    and not CharacterIsLocal


    Affects LeaderAndHeirAiBoost 3 Chance 100


    ;------------------------------------------
    Trait HeirCandidate
    Characters family


    Level Heir_Candidate
    Description Heir_Candidate_desc
    EffectsDescription Heir_Candidate_effects_desc <----------------------------
    MOVED TO TRAITS SECTION-----------------------------------
    Threshold 1

    Effect Authority 8
    Effect PersonalSecurity 2




    ;------------------------------------------


    ;===============================================================
    ;== TRIGGER DATA STARTS HERE ==
    ;===============================================================


    ;------------------------------------------
    Trigger Heir_excandidate
    WhenToTest BecomesFactionHeir


    Condition Trait HeirCandidate > 0


    Affects HeirCandidate -1 Chance 100


    ;------------------------------------------
    Trigger Leader_excandidate
    WhenToTest BecomesFactionLeader


    Condition Trait HeirCandidate > 0


    Affects HeirCandidate -1 Chance 100


    ;------------------------------------------


    Historic Events- Added this to match alphabetical order:

    Spoiler Alert, click show to read: 
    {RUSSIA_REGENT_EVENT_TITLE}End of a Dynasty?
    {SELECT_CANDIDATE_BODY}You want choose the family member who will be the next heir of the faction?\n\n\n\n(INSTRUCTIONS: If you decline the option of select the candidate, don't reappears until the faction's leader dies. If you accept, appears the family tree screen. At that moment, you can choose a family member (except leader and heir) and press the zoom button to select the next heir. But if you aren't interested in any existing family member at this moment, you can close the window and choosing the general in other "turn", opening the panel again manually.)
    {SELECT_CANDIDATE_TITLE}Select the next heir
    {SELECTED_BODY}The selected general will have rights of inheritance to the throne, followed by the current heir.
    {SELECTED_TITLE}Inheritance privileges granted




    Campaign script:

    Spoiler Alert, click show to read: 
    monitor_event FactionTurnStart FactionType mongols
    and not FactionIsLocal
    and I_CharacterExists mongols4chindu
    and I_CharacterExists mongols4nayuk


    if I_CompareCounter attack_konjikala = 1
    siege_settlement mongols4chindu, Konjikala, attack
    siege_settlement mongols4nayuk, Konjikala, maintain
    set_counter attack_konjikala 2
    terminate_monitor
    end_if


    if I_CompareCounter attack_konjikala = 0
    siege_settlement mongols4chindu, Konjikala, maintain
    siege_settlement mongols4nayuk, Konjikala, maintain
    set_counter attack_konjikala 1
    end_if


    end_monitor


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;; ;;;
    ;;; Script for selecting the heir ;;;
    ;;; ;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




    declare_counter candidate
    declare_counter first_candidate
    declare_counter checking
    declare_counter active_heir_bucle
    declare_counter decline_sh




    monitor_event CeasedFactionHeir CharacterIsLocal
    and I_CompareCounter candidate = 0


    historic_event select_candidate true
    set_counter first_candidate 1

    end_monitor


    monitor_event BrotherAdopted CharacterIsLocal
    and I_TurnNumber >= 0
    and I_CompareCounter candidate = 0
    and I_CompareCounter first_candidate = 0
    and I_CompareCounter active_heir_bucle = 0


    historic_event select_candidate true
    set_counter first_candidate 1
    set_counter active_heir_bucle 1


    terminate_monitor
    end_monitor


    monitor_event CharacterComesOfAge FactionIsLocal
    and IsGeneral
    and I_CompareCounter candidate = 0
    and I_CompareCounter first_candidate = 0
    and I_CompareCounter active_heir_bucle = 0

    historic_event select_candidate true
    set_counter first_candidate 1
    set_counter active_heir_bucle 1


    terminate_monitor
    end_monitor


    monitor_event FactionTurnEnd FactionType slave
    set_counter checking 1
    end_monitor


    monitor_event CharacterTurnEnd CharacterIsLocal
    and I_TurnNumber > 0
    and Trait HeirCandidate > 0


    set_counter checking 2
    end_monitor


    monitor_event FactionTurnEnd FactionIsLocal
    and I_CompareCounter checking = 1
    and I_CompareCounter active_heir_bucle = 1
    and I_CompareCounter decline_sh = 0
    and I_CompareCounter candidate = 0


    historic_event select_candidate true
    set_counter first_candidate 1
    end_monitor


    monitor_event EventCounter EventCounterType select_candidate_accepted
    and I_EventCounter select_candidate_accepted = 1


    select_ui_element faction_button
    simulate_mouse_click lclick_down
    simulate_mouse_click lclick_up


    select_ui_element family_tree_button
    simulate_mouse_click lclick_down
    simulate_mouse_click lclick_up


    select_ui_element faction_button
    simulate_mouse_click lclick_down
    simulate_mouse_click lclick_up


    ui_flash_start family_tree_zoom_to_button
    set_event_counter select_candidate_accepted 0
    set_counter candidate 1

    end_monitor


    monitor_event CharacterSelected CharacterIsLocal
    and I_CompareCounter candidate = 1
    and I_ScrollOpen family_tree_scroll
    and IsGeneral
    and not IsFactionLeader
    and not IsFactionHeir


    ui_flash_stop
    console_command give_trait this HeirCandidate 1
    set_counter candidate 0
    historic_event selected


    end_monitor


    monitor_event EventCounter EventCounterType select_candidate_declined
    and I_EventCounter select_candidate_declined = 1


    set_counter decline_sh 1
    end_monitor






    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    ;-------------------------------------------------------------
    wait_monitors
    end_script


    Export VNVS:

    Spoiler Alert, click show to read: 
    {HousePrincess_desc} She may not be a member of a traditional royal family, but this woman thinks herself equal, if not superior, to her regal rivals.
    {Heir_Candidate}Candidate for heir
    {Heir_Candidate_desc}ItÂ’s one of the main candidates in the line of succession to the throne.
    {Heir_Candidate_effects_desc}It has a good degree of authority and leader skills.
    Last edited by Ruprecht; August 18, 2019 at 09:00 AM.
    Signature by Lucarius.

  10. #70

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    The saved games aren't loaded? If you remove the "selecting heir script" does the same thing happen? Have you modified more things in the mod?

    P.S: The Stainless Steel already includes a method to select heir through an ancillary. If you don't eliminate it, the "trait" of this method will not take effect unless you increase the authority to more than 20 points.
    Last edited by Miguel_80; August 19, 2019 at 06:10 AM.

  11. #71

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Quote Originally Posted by Miguel_80 View Post
    The saved games aren't loaded. If you remove the "selecting heir script" does the same thing happen? Have you modified more things in the mod?

    P.S: The Stainless Steel already includes a method to select heir through an ancillary. If you don't eliminate it, the "trait" of this method will not take effect unless you increase the authority to more than 20 points.
    I'm using SS 6.2, which does not come with any included succession mods. The Next Heir mod is standalone for use with SS 6.2.

    Your script is working concurrently with the next heir mod. Presumably the collective authority from both will just stack on a desired character.

    But this script did nothing in my existing campaign, which I assume is normal.


    I'm actually quite curious to whether this script can override the left-most rule succession problem. I'm inclined to think not, as it still relies on authority which the left-most rule caveat totally ignores.
    Last edited by Ruprecht; August 18, 2019 at 06:57 PM.
    Signature by Lucarius.

  12. #72
    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,125
    Blog Entries
    35

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    The campaign_script file is not save game compatible: it only gets read at the start of a game. The EDCT file however is save game compatible.










  13. #73

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Hi Miguel! I need help with the script. I am trying to use it in the mod Total Vanilla, I followed all the instructions, and pasted everything in the correct place, but nothing happens after my FL dies, or the heir, is there something I am doing wrong or the script is not compatible with the mod?

    I am pretty sure this script is awesome and I want to enjoyed with my game, I don't know anything about modding, so I hoped you could help me. Thank you.

  14. #74

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Hello Jadaniel13. If the selection message doesn't appears, so the code is not in the correct place in "campaign_script.txt" file.

  15. #75

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Thanks!! I made it work, now is running perfectly, thanks!

  16. #76

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Quote Originally Posted by jadaniel13 View Post
    Thanks!! I made it work, now is running perfectly, thanks!
    Ok. I'm glad it works for you. What have you corrected exactly?

  17. #77

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Okay so, after a lot of trial and error I finally got this mod to work on @Gigantus revived version of KCGM 5.0 since I prefer that map over SS 6.4. However, this does not work as I had imagined it.
    Since with this mod you cannot change the heir. Only the next heir in line after the current one? Maybe that's obvious somewhere and I'm just stupid, but I think that should've been more clearly written out somewhere.
    Or am I still missing something? However, I am clueless about this type of modding, but what is the difference for SS 6.4 NHA submod? And why can't it be done here? Since there you clearly can change you're current heir whenever you want with the switch of an ancillary.

  18. #78
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Quote Originally Posted by Rei-sensei View Post
    Since with this mod you cannot change the heir. Only the next heir in line after the current one? Maybe that's obvious somewhere and I'm just stupid, but I think that should've been more clearly written out somewhere.
    It says so in the very first sentence...

    This script is used to choose the next heir
    Not the heir. The next heir.

  19. #79

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Hello Rei-sensei. In this script, once the heir candidate is chosen, he cannot be changed. If the selection window appears and none of generals you have is interested, ignore it, the red selection circle on the button will continue appearing when you enter in "family tree" panel. When you have a General that you like, then choose him.
    Last edited by Miguel_80; January 14, 2021 at 09:24 AM.

  20. #80

    Default Re: Script for selecting the heir - (Update 24.07.2015)

    Thanks for pointing out the obvious captain, really helpful.

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