Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: Limit amount of traits at the same time?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Limit amount of traits at the same time?

    I've been adding office traits to replace the senate offices (as the latter are apparently hard-coded), and as the title says I wonder how I can limit the amount of the traits to a specific number at any given time.

    For example, I always want two characters of roman factions to have the Consul-trait, no more and no less.

    How do I accomplish this?

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Limit amount of traits at the same time?

    You can't, at least not without using ancillaries to help you do it. This is one of the major shortcomings of the trait/ancillary system in RTW.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  3. #3
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    Bugger...

    So how do I make ancillaries to help me do it?

  4. #4

    Default Re: Limit amount of traits at the same time?

    For example, you want to make two "Quaestor" officers. You create a quaestor_a and a quaestor_b ancillary (same text etc, just different internal names) and you demand that in order for them to be assigned, another instance of them must not already exist in the faction.

  5. #5
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    I've been doing some reading on this and the other board about ancillaries, but a couple of questions remain:

    1: Can I make ancillaries hidden? I think it should be enough that the offices show up as traits.

    2: How do I set a time-limit on ancillaries? I only want the offices to last for a set number of turns.

    3: How do I make certain that the designated amount of ancillaries are assigned at the same time? I want all holders of the same offices to gain and lose them at the same time.

  6. #6

    Default Re: Limit amount of traits at the same time?

    1: If you define a non-existant image for them (and use a dot or sth equally small as on-screen name), they will not be visible or transferable.

    2: No, you can't, but you can connect ancillaries with traits and simulate that. The ancillaries themselves will never go away though.

    3: You can use the condition 'I_TurnNumber = x' in the triggers of all of them.

  7. #7
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    2: How do I accomplish that? I figured that I should put 'unique' on all the office-ancillaries, but if the ancillary never disappear, then there cannot be any successors in office?

    3: Does that command specify the actual turn of the campaign or the number of turns that must have passed since the last assignment of the ancillary? If it is the former, I would have to make a huge amount of triggers for each office position to make sure characters get elected on a regular basis for the duration of the campaign.

    - - -

    I thought it might be good if I posted some information about what I'm trying to achieve:

    4 quaestors, time in office - 8 turns, new elections - every 8th turn
    2 aediles, time in office - 8 turns, new elections - every 8th turn
    2 cucurle aediles, time in office - 8 turns, new elections - every 8th turn
    2 praetors, time in office - 8 turns, new elections - every 8th turn
    1 praetor peregrinus, time in office - 8 turns, new elections - every 8th turn
    1 praetor urbanus, time in office - 8 turns, new elections - every 8th turn
    2 consuls, time in office - 8 turns, new elections - every 8th turn
    2 censors, time in office - 12 turns, new elections - every 40th turn
    1 pontifex maximus, to serve a life-long tenure

    I also want the characters to spend some time out of office after each tenure, and I don't want any one character to hold two offices at the same time, save for the pontifex maximus.

    In addition to this I will make traits for propraetors and proconsuls.

    I've been able to accomplish all of this using traits (and it's actually working) except for the fact that there can be a limitless number of holders of each office.

    Is there any way to accomplish what I want?

  8. #8

    Default Re: Limit amount of traits at the same time?

    The TurnNUmber specifies the turns lapsed rom the beginning of the campaign, with the first one being turn 0.

    Here's a rough plan.

    Code:
    ;------------------------------------------
    
    Ancillary office_Quaestor1_gen1
        Image non_existing_image.tga
        Description office_Quaestor1_gen1_desc
        EffectsDescription office_Quaestor1_gen1_effects_desc
        Effect Electability  401
    
    ;------------------------------------------
     
     Ancillary office_Quaestor2_gen1
         Image non_existing_image.tga
         Description office_Quaestor2_gen1_desc
         EffectsDescription office_Quaestor2_gen1_effects_desc
         Effect Electability  401
     
     ;------------------------------------------
    Code:
    ;------------------------------------------
    
    Trigger office_Quaestor1_gen1_gain
        WhenToTest CharacterTurnEnd
        
        Condition FactionType romans_julii
              and I_TurnNUmber = 8
              and not FactionwideAncillaryExists office_Quaestor1_gen1
              and Attribute Electability = 0
              and blablabla
    
        AcquireAncillary office_Quaestor1_gen1  Chance  100
        
    ;------------------------------------------
    
    Trigger office_Quaestor2_gen1_gain
        WhenToTest CharacterTurnEnd
        
        Condition FactionType romans_julii
              and I_TurnNUmber = 8
              and not FactionwideAncillaryExists office_Quaestor2_gen1
              and Attribute Electability = 0
              and blablabla
    
        AcquireAncillary office_Quaestor2_gen1  Chance  100
        
    ;------------------------------------------
    Code:
    ;------------------------------------------
    
    Trait office_Quaestor
        Characters family
    
        Level office_Quaestor
            Description office_Quaestor_desc
            EffectsDescription office_Quaestor_effects_desc
            Threshold  1
    
            Effect x
            Effect y
            Effect z
    
        Level office_Quaestor_ex1
            Description office_Quaestor_ex1_desc
            EffectsDescription office_Quaestor_ex1_effects_desc
            Threshold  9 
    
            Effect xyz
    
        Level office_Quaestor_ex2
            Description office_Quaestor_ex2_desc
            EffectsDescription office_Quaestor_ex2_effects_desc
            Threshold  12
    
            Effect Electability -401
    
    ;------------------------------------------
    Code:
    ;------------------------------------------
    
    Trigger office_Quaestor_advance
        WhenToTest CharacterTurnEnd
    
        Condition Trait office_Quaestor >= 1
    
        Affects office_Quaestor  1  Chance  100
    
    ;------------------------------------------
    
    Trigger office_Quaestor_gain
        WhenToTest CharacterTurnEnd
        
        Condition Attribute Electability = 401
              and Trait office_Quaestor = 0
    
        Affects office_Quaestor  1  Chance  100
        
    ;------------------------------------------
    The amount of turns dictates the 'step' of the I_TurnNumber condition. If the elections are every 4 years, then the turn number should advance by 16 (in a 4tpy mod).
    Obviously, you need a new anc for each 'generation' of each office. Lots of ancs for you to make.
    The difference with Pontifex Maximus is that you only need 1 anc, since it's a life-long office.
    The third level of each trait exists to remove the electability given by each anc and demonstarte the character is ready to be given a new office.

    This is very rough, I'm sure it has some holes, it's just the basic structure.
    Last edited by Aradan; December 04, 2008 at 09:49 AM.

  9. #9
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    I've been doing a lot of reading in this thread, and I've implemented the same system with TurnsInOffice and TurnsOutOfOffice in addition to the system with which characters are required to reach a certain age in order to be elected to the offices.

    Right, let's see if I'm able to make this work.

    One further question though before I start: How do I connect the ancillary with the corresponding trait? When a character acquires the quaestor-ancillary he should also receive the questor-trait at the same time?

    Many thanks for your assistance, I'm impressed with your patience in helping me out with my silly questions.

  10. #10

    Default Re: Limit amount of traits at the same time?

    The linking is done via the unused attribute assigned. Each office-anc assigns a given amount of Electability (you can use any other attribute that is otherwise unused by named characters, like NavalCommand) and the trait triggers checks for the proper amount. I've made the "linking" lines of code red, in the previous post.

  11. #11
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    I hope there's no size limit on the files associated with ancillaries...

    I've only gotten to generation 10 on triggers, and it's already about 2000 lines of code.

  12. #12

    Default Re: Limit amount of traits at the same time?

    One is not known, but you may become a pioneer and find it.

  13. #13
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    I'm done writing the triggers for the ancillaries, some 30 000 lines of code. Now only the ancillaries themselves remain...

    I hope there's no problem using the same descriptions for multiple generations of the same ancillary?

  14. #14

    Default Re: Limit amount of traits at the same time?

    As long as the internal names are different by even one character, no.

    Seems I'm wrong, sorry.
    Last edited by CaesarVincens; December 05, 2008 at 05:07 PM.

    Expand your borders, a mod based on XGM 5.

  15. #15
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Limit amount of traits at the same time?

    The internal names can be the same, various traits can share descriptions with no problem. Disregard the above. If you read the guide (Complete Traits/Ancillaries Guide) this is mentioned.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  16. #16
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    Hmm... I've been writing some 60 000 lines of code total and copied the files to the game folders (after making appropriate back-ups, of-course).

    I ran the Ancillary/Trait Validator and manually checked all traits, ancillaries and triggers. There were no errors or even warnings on the ones I've written myself.

    I ran the game, and it starts like it should. I started a new campaign and play a few turns, and just about everything seems to be working.

    I quit the campaign and exit the game, and there are no error messages.

    So far so good, and one would think that everything should be in perfect order.

    Except for one thing... None of the new ancillaries/retinues are never given, and thus no offices are assigned either.

    Some of my new traits don't show either, even though I've made sure that they are assigned to the characters in descr_strat.txt and that they are not designated as hidden. I also checked the descriptions files, and all necessary data is there.

    On the other hand, some of my new traits do show and work as intended.

  17. #17

    Default Re: Limit amount of traits at the same time?

    Can you post a trigger of one of the non-showing traits?

  18. #18
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    I managed to half-solve one of the issues, about my new plebeian traits.

    This trait is actually divided into two traits, a personal one and a family one, where the second one is passed on from father to son. Both entries for the traits looked exactly the same except they had different names and that the second one was hidden.

    There were no issues playing with that, except that none of the traits showed up on the character records.

    Since they shared the same references, I thought that I should remove the 'hidden' designation on the second one. I tried this, and it worked half way (so to speak):

    1: When showing the record of a character with the first level, two entries of the trait was listed (Plebeian was listed twice).

    2: When showing the record of a character with the second level, one of entry of the trait was listed (Equestrian was listed once).

    3: When showing the record of a character with the third level, I got a CTD without any error message.

    As for the problems with the office-ancillaries and their associated traits and triggers, I've yet to solve any of the issues.

    I have enclosed all the relevant files to this post, feel free to have a look around.

    I have deleted all entries in the files not written by me.

  19. #19

    Default Re: Limit amount of traits at the same time?

    Before downloading (bit pressed on time here, might do later):

    1: I don't think a trait can exist twice in a character's record, what you're seeing is probably both plebeian traits, active at the same time.
    2: ?
    3: Some error in the internal tags of the textual descriptions, or you just confused the engine there with something.

    About ancs, I'll have to download.

  20. #20
    Foederatus
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    48

    Default Re: Limit amount of traits at the same time?

    You'll see this once you've dowloaded the files later, but the two traits have the same level. For example:

    Trait DistinguishedTraitPersonal
    Level 1 Plebeian
    Level 2 Equestrian
    Level 3 Patrician

    Trait DistinguishedTraitFamily
    Level 1 Plebeian
    Level 2 Equestrian
    Level 3 Patrician

    1: Yes, that was what I meant. Two traits displayed with two listings.
    2: Two traits displayed with one listing.
    3: I've been trying to find a disrepancy, but I've been unable to do so.

Page 1 of 2 12 LastLast

Posting Permissions

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