Results 1 to 3 of 3

Thread: I need some help with traits, please

  1. #1

    Default I need some help with traits, please

    As you may (or most probably not) know, 77 BC-Twilight of the Republic works giving the SPQR human player missions to fulfill with a certain time limit. The missions are shown by the advisor in a certain turn and are reminded to the player with a certain frequency.

    This system works quite well, but I also wanted to add to the faction leader a trait listing the missions' objectives. This trait should change every certain turns, as the advisor gives the players the new missions.

    After this introduction, my addition of the new trait is, of course, producing a CTD when right-clicking on the faction leader. As I am quite new to modding traits, I humbly beg your assistance.

    This is what I have added to export_descr_characters_traits.txt:

    In the trait section:
    Code:
    Trait Mission_for_SPQR
        Characters family
    
        Level Mission_Sertoriani
            Description Sertoriani_mission_desc
            EffectsDescription Sertoriani_mission_effects_desc
            Threshold  1
    
        Level Mission_Mithradates
            Description Mithradates_mission_desc
            EffectsDescription Mithradates_mission_effects_desc
            Threshold  2
    
        Level Mission_Tigran
            Description Tigran_mission_desc
            EffectsDescription Tigran_mission_effects_desc
            Threshold  3
    
        Level Mission_pirates
            Description Pirates_mission_desc
            EffectsDescription Pirates_mission_effects_desc
            Threshold  4
    
        Level Mission_Syrian
            Description Syrian_mission_desc
            EffectsDescription Syrian_mission_effects_desc
            Threshold  5
    In the triggers section:
    Code:
    ;------------------------------------------
    ;Section: SPQR Missions
    ;------------------------------------------
    
    Trigger Assign_SPQR_Mission_Sertoriani
        WhenToTest CharacterTurnStart
    
        Condition IsFactionLeader
              and Trait Mission_for_SPQR < 1
              and FactionType romans_julii
    
        Affects Mission_for_SPQR  1  Chance  100
    
    Trigger Assign_SPQR_Mission_Mithradates
        WhenToTest CharacterTurnStart
    
        Condition IsFactionLeader
              and Trait Mission_for_SPQR = 1
              and FactionType romans_julii
              and I_TurnNumber > 2
    
        Affects Mission_for_SPQR  2  Chance  100
    
    Trigger Assign_SPQR_Mission_Tigran
        WhenToTest CharacterTurnStart
    
        Condition IsFactionLeader
              and Trait Mission_for_SPQR = 2
              and FactionType romans_julii
              and I_TurnNumber > 3
    
        Affects Mission_for_SPQR  3  Chance  100
    
    Trigger Assign_SPQR_Mission_pirates
        WhenToTest CharacterTurnStart
    
        Condition IsFactionLeader
              and Trait Mission_for_SPQR = 3
              and FactionType romans_julii
              and I_TurnNumber > 4
    
        Affects Mission_for_SPQR  4  Chance  100
    
    Trigger Assign_SPQR_Mission_Syrian
        WhenToTest CharacterTurnStart
    
        Condition IsFactionLeader
              and Trait Mission_for_SPQR = 4
              and FactionType romans_julii
              and I_TurnNumber > 5
    
        Affects Mission_for_SPQR  5  Chance  100
    
    ;------------------------------------------
    This is what I have added to export_descr_VnVs_enums.txt:

    Code:
    Sertoriani_mission_desc
    Sertoriani_mission_effects_desc
    Mithradates_mission_desc
    Mithradates_mission_effects_desc
    Tigran_mission_desc
    Tigran_mission_effects_desc
    Pirates_mission_desc
    Pirates_mission_effects_desc
    Syrian_mission_desc
    Syrian_mission_effects_desc
    And, finally, in export_VnVs.txt:
    Code:
    ¬--------------------
    
    {Sertoriani_mission}	Senate Mission
    
    {Sertoriani_mission_desc}
    Senate Mission
    
    {Sertoriani_mission_effects_desc}
    Conquer the Sertoriani settlements and destroy them.
    
    ¬--------------------
    ¬--------------------
    
    {Mithradates_mission}	Senate Mission
    
    {Mithradates_mission_desc}
    The Great Mithradatic War
    
    {Mithradates_mission_effects_desc}
    Conquer the Pontic settlements of...
    
    ¬--------------------
    ¬--------------------
    
    {Tigran_mission}	Senate Mission
    
    {Tigran_mission_desc}
    War in Armenia
    
    {Tigran_mission_effects_desc}
    Bring Armenia to submission by conquering...
    
    ¬--------------------
    ¬--------------------
    
    {Pirates_mission}	Senate Mission
    
    {Pirates_mission_desc}
    War against the Pirates
    
    {Pirates_mission_effects_desc}
    The pirates that threaten commerce must be erradicated...
    
    ¬--------------------
    ¬--------------------
    
    {Syrian_mission}	Senate Mission
    
    {Syrian_mission_desc}
    Pompey in the East
    
    {Syrian_mission_effects_desc}
    Conquer the following Syrian settlements...
    
    ¬--------------------
    Thanks in advance,

    Salvor

  2. #2

    Default Re: I need some help with traits, please

    ah an easy traits question for a change

    you've reversed the title of the trait level when you, went to desc stage, if you carry that through consistently to the export_VnVs.txt that should work, so you'd need:
    {Mission_Sertoriani} = title (trait level)
    {Sertoriani_mission_desc} = description
    {Sertoriani_mission_effects_desc} = effect
    etc.... though that is likely to be more confusing than aligning them.
    I think the enums file is actually irrelevant unless you are modding early patch version but the text file must have exactly the same reference including upper / lower case (and without any odd spaces) as listed in the trait file.

    this trait and ancillary validator does good job of checking any typo type errors:
    http://forums.totalwar.org/vb/showthread.php?t=68697

    EDIT: incidentally I think you also may be using too high a number in the trigger section for what you want
    Trigger Assign_SPQR_Mission_Tigran
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
    and Trait Mission_for_SPQR = 2
    and FactionType romans_julii
    and I_TurnNumber > 3

    Affects Mission_for_SPQR 3 Chance 100
    means character jumps from level 2 (threshold 2) + 3 straight to top level = 5.
    I suspect you only needed
    Affects Mission_for_SPQR 1 Chance 100
    as that would have accumulative effect of adding +1 to threshold each turn and hence raising trait level, gradually per turn.

    EDIT 2: additionally all your triggers are accumulative as you are using > turn no, instead of = to turn number so all the earlier triggers will fire again - giving you max level of trait really early on (sorry brain too dead to do math but sure its earlier than you want) - once you get text right so it doesn't crash do test again to check levels are gained when you want them to be.

  3. #3

    Default Re: I need some help with traits, please

    It fixed the problem. Thanks a lot, Makanyane. As I had never added traits with several levels I guess that I became a bit nervous and made some stupid mistakes.

    Thanks again, for solving this problem!

Posting Permissions

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