Results 1 to 5 of 5

Thread: Roman Senate Offices in EB Revisited (but is general modding question)

Hybrid View

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

    Default Roman Senate Offices in EB Revisited (but is general modding question)

    Tried modding this for my personal EB a couple of years ago before losing interest, but interest has been rekindled after reading McCullough's Antony and Cleopatra. Purpose was to insure Roman FMs achieve the consulship in the right year and with the right number (as in no more than 2, one plebeian and one patrician) by making consul election 100% and restricting acquisition of the consul trait to Roma.

    Have achieved my aims for most part; an age-39 patrician or age-41 plebeian(some variation for the married and adopted, but these examples for the born) who has served as praetor will get a trait that indicates he is eligible for consulship and will be elected if present at Roma in winter... and that works --- they will be elected and will become consulars when the following year concludes--- but I'm still running into the following problems:

    1.) The second consulship(initially coming a year late, before I lowered a threshold) will not reset. After reacquisition of the consul trait, the trait will not go away, and the FM remains consul until death. As it DOES reset the 1st time, I'm not quite sure what's going on despite lots of trial and error and error.

    2.) The EligibleForConsul trait pops up for the second time in winter(though by my count, should be a spring attribute), but if the FM is close enough to relocate to Roma he does NOT reacquire the consul trait as he should, but again reacquires the EligibleForConsul trait, loses his "consular" trait, and is elected consul the NEXT year if in Rome. (An office, that as already mentioned, he then keeps until death.) My guess is that the FM is gaining and losing the consulship that 1st winter, but I don't see how. Hoping a text-editing-savy community member can point out the probably obvious thing I'm missing.

    Here are the relevant traits and triggers (triggers ARE in the order they appear in EDCT, but then, so are the traits, lol).

    Code:
    Trait EligibleForConsul
        Characters family
    
        Level Eligible_for_Consul
            Description Eligible_for_Consul_desc
            EffectsDescription Eligible_for_Consul_effects_desc
            GainMessage Eligible_for_Consul_gain_desc
            Threshold  1
    
    
    ;^ModObsidian - part of attempt to restrict consul election to Roma
    ;-----------------------------------------
    
    Trait Consul
        Characters family
        AntiTraits notConsul
    
        Level Office_of_Consul
            Description Office_of_Consul_desc
            EffectsDescription Office_of_Consul_effects_desc
            GainMessage Office_of_Consul_gain_desc
            Threshold  1
    
            Effect Influence  2
            Effect Command  1
            Effect PersonalSecurity  2
    
    
    ;Mod146 - 11/02 : reduced command bonus by 1
    ;------------------------------------------
    
    Trait notConsul
        Characters family
        AntiTraits Consul
    
        Level Ex_Consul
            Description Ex_Consul_desc
            EffectsDescription Ex_Consul_effects_desc
            Threshold  1
    
            Effect Influence  1
            Effect Command  1
    
    
    ;------------------------------------------
    
    Trait TurnsInOffice
        Characters family
        Hidden
        NoGoingBackLevel 4
        AntiTraits TurnsOutOfOffice
    
        Level In_Office
            Description In_Office_desc
            EffectsDescription In_Office_effects_desc
            Threshold  1
    
        Level One_Year_In
            Description One_Year_In_desc
            EffectsDescription One_Year_In_effects_desc
            Threshold  4
    
        Level Eighteen_Months_In
            Description Eighteen_Months_In_desc
            EffectsDescription Eighteen_Months_In_effects_desc
            Threshold  6
    
    ;------------------------------------------
    
    Trait TurnsOutOfOffice
        Characters family
        Hidden
        NoGoingBackLevel 3
        AntiTraits TurnsInOffice
    
        Level One_Year_Out
            Description One_Year_Out_desc
            EffectsDescription One_Year_Out_effects_desc
            Threshold  4
    
    
        Level Ten_Years
            Description Ten_Years_desc
            EffectsDescription Ten_Years_effects_desc
            Threshold  32
    
    
    ;Mod: EBMod595 - 07/03 : Traits for tracking length of time in Senate offices/out of them
    ;Obsidian Mod: lvl 10 threshold reduced from 40 to 32 to match eligiblity for 2nd consulship, but something still screwy
    ;------------------------------------------
    
    
    
    
    Trigger Eligible_Patrician_Consul
      WhenToTest CharacterTurnStart
    
        Condition AgentType = family
              and Trait EligibleForConsul < 1
              and Trait Patrician = 1
              and Trait RomanAgeAddendum > 2
              and Attribute Influence > 2
              and Trait Aedile < 1
              and Trait notPraetor > 0
              and Trait Consul < 1
              and Trait notConsul < 1
    
      Affects EligibleForConsul  1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    Trigger Eligible_Plebeian_Consul
      WhenToTest CharacterTurnStart
    
        Condition AgentType = family
              and Trait EligibleForConsul < 1
              and Trait Plebeian = 1
              and Trait RomanAgeAddendum > 3
              and Attribute Influence > 2
              and Attribute Command > 0
              and Trait Aedile < 1
              and Trait notPraetor > 0
              and Trait Consul < 1
              and Trait notConsul < 1
    
      Affects EligibleForConsul  1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    Trigger Eligible_For_Consul_Again
      WhenToTest CharacterTurnStart
    
        Condition AgentType = family
              and Trait EligibleForConsul < 1
              and Attribute Influence > 2
              and Trait Censor < 1
              and Trait Consul < 1
              and Trait notConsul > 0
              and Trait TurnsOutOfOffice = 2
    
      Affects EligibleForConsul  1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    Trigger Count_Consul_Turns_in_Office
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait Consul > 0
    
      Affects TurnsInOffice  1  Chance  100
    
    ;------------------------------------------
    Trigger Stands_For_Consul
      WhenToTest CharacterTurnEnd
    
        Condition EndedInSettlement
              and FactionType seleucid
              and Trait Season = 4
              and SettlementName Roma
              and Trait EligibleForConsul > 0
    
      Affects Consul  1  Chance  100
      Affects EligibleForConsul -1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    Trigger Reset_Consul_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait Consul > 0
    
      Affects notConsul  2  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    Trigger Count_Consul_TurnsOutOfOffice_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait notConsul > 0
              and Trait Censor < 1
              and TurnsOutOfOffice < 2
    
      Affects TurnsOutOfOffice  1  Chance  100
    
    
    ;Mod: EBMod816 - 01/02/05 : fixed issue with former Consul, now Censor, never losing the office of Censor.
    ;------------------------------------------
    Thanks for checking through all that if you did. Hope you can shed light for me.

    Obsidian

  2. #2

    Icon4 Re: Roman Senate Offices in EB Revisited (but is general modding question)

    Can't find a button that will let me edit original post, so I'll reply to myself to better clarify my problems and suggest the solution I think will work. I modded EDCT to allow me, when playing as Romans (in my case in Europa Barbarorum, but with tweaking for age-related traits and tpy, should do the trick for other mods that remove the vanilla Senate), to have most generals(since they will be governing and commanding armies) ascend the Cursus Honorum of Roman offices. I added a trait, "RomanAgeAddendum", that mirrors "TurnsAlive", but with levels that reflect the traditional ages of eligibility for Roman offices and used the new trait as conditions for the appropriate offices. That works just fine.

    The chief sticking point was consul, since the game engine cannot restrict the number elected to two, nor pair up a plebeian and patrician if more than two were eligible. I decided to restrict consul election to Rome itself(via "EndedInSettlement" and "SettlementName") to give me control of who is elected and when, but I think the need for a "CharacterTurnEnd" Consul trigger ---a departure from the "CharacterTurnStart" consul trigger necessitated by the engine's LACK of a "BeginsInSettlement" condition--- has created problems for me. I added an "EligibleForConsul" trait that successfully triggers a year before a candidate can become consul, which gives me a reminder to get the FM back to Rome for winter, where the FM becomes consul, serves the 4 seasons of his term, and becomes a consular(trait notConsul) without a hitch. The problems crop up with the second consulship.

    Problem 1: a hitch in the second expression of the "EligibleForConsul" trait, which is triggered by "Eligible_For_Consul_Again", and which most importantly requires that the FM is not currently consul("trait consul < 1"), has already been a consul("trait notconsul > 1"), and has been out of office 10 years("trait outofoffice = 2").
    Code:
    Trigger Eligible_For_Consul_Again
      WhenToTest CharacterTurnStart
    
        Condition AgentType = family
              and Trait EligibleForConsul < 1
              and Attribute Influence > 2
              and Trait Censor < 1
              and Trait Consul < 1
              and Trait notConsul > 0
              and Trait TurnsOutOfOffice = 2
    
      Affects EligibleForConsul  1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    I dropped the original threshold for "TurnsOutOfOffice = 2" from 40 to 36, since the "EligibleForConsul" trait needs to pop up the year before reelection, but found EligibleForConsul popping up in winter, so I subtracted another 3(seasons) from the threshold to get a full year's reminder. That hiccup(don't see why numbers don't add up right --- 36 should work) pales in comparison... in spring of the next year Faction Announcements give the FM the "EligibleForConsul" announcement again, the character loses his "notConsul" trait(which I don't intend unless he has again become Consul) and after waiting an additional year, the character IS elected Consul(but won't give it up... more on that later).

    Upon examination I suspect "TurnsInOffice" doesn't anti-trait away "TurnsOutofOffice"(a condition for "Reset_Consul_After_Term_Expires") until the start of the next turn, which somehow leads to "Consul" anti-traiting "notConsul" without "Consul" sticking and "EligibleForConsul" expressing as a result of the initial, 1st-time "Eligible_For_<class>_Consul" trigger since those conditions once again apply.

    Problem 2: once the FM finally gets the 2nd consulship, he remains consul until death; the second consulship doesn't reset with:
    Code:
    Trigger Reset_Consul_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait Consul > 0
    
      Affects notConsul  2  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    and since the character definitely IS family and consul, something is either breaking(so it won't count) or resetting(anti-traiting) the "TurnsInOffice" count each turn, as there is no new announcement each year(4 turns) that would indicate it's a new instance of the Consul trait.

    I'm going to try this for a solution to both problems, but it's ultimately a work-around for my lack of understanding(and the restarting of campaign necessary to test new traits makes me wish a community member could have provided some insight into a solution involving only triggers):

    I'll add a new "ConsulAgain" trait that confers no bonusues(already covered by the "notConsul" trait that won't be anti-traited out of the way), triggered by a new "Stands_For_Consul_Again"(+1 ConsulAgain, chance 100) trigger that has among it's conditions "ConsulAgain < 1" so that it only confers the 1 threshold point so I can use it as part of a toggle with new reset trigger, "Reset_Consul_Again_After_Term_Expires" that affects "ConsulAgain -1 chance 100" under the condition that "ConsulAgain > 0". Such a toggle already works(i think) activating and removing the "EligibleForConsul" trait and the new "ConsulAgain" trait should avoid the problem I think is being caused by anti-traiting and trigger order with the original "Consul" trait.

    My concerns with my intended solution is that I may be postponing the original problems for any rare third consulship opportunities and that it doesn't solve the permanent second consulship, thus complicating the merit-based triggers I was contemplating to allow great generals the opportunity for non-traditional, multiple consulships(think Scipio Africanus, Marius), which I can't easily do(would need separate "ConsulWhatever" traits) if "Consul" only resets the 1st time.

    Obsidian

  3. #3

    Default Re: Roman Senate Offices in EB Revisited (but is general modding question)

    It seems the main problem is antitraits.

    May I suggest that instead of having a Consul trait and a notConsul(ExConsul) one, you have a structure with 3 traits?
    Consul (AntiTraits notConsul)
    notConsul (no antritraits)
    ExConsul (AntiTraits notConsul)

    The purpose of notConsul will be just to remove Consul and ExConsul, when appropriate. A single point to notConsul will remove whichever of Consul/ExConsul is active (assuming only one of them is active at any given time), because neither have NoGoingBackLevel X. Notice how notConsul itself doesn't have anitraits, which means a single point to either Consul/ExConsul will be enough to activate them, even if notConsul has been increased a hundred times.


    The problem with TurnsOutOfOffice is (I think) that, exactly because TurnsINOfOffice and TurnsOUTOfOffice are mutual antitraits, the very first point given to OUT actually simply removes IN (so after the first points both traits are at 0). Then the second point actually increases OUT to 1, etc.


    Btw, when you're trying to add something that complicated, it's best first to make sure that each individual "part" works as intended. Create test-traits and test-triggers, and see if doing so and so to the antitrait has the appropriate results on the trait, then see if your 'counter' traits work properly, etc. When you have all the parts complete and functional, you can combine them more easily.

  4. #4

    Default Re: Roman Senate Offices in EB Revisited (but is general modding question)

    May I suggest that instead of having a Consul trait and a notConsul(ExConsul) one, you have a structure with 3 traits?
    I used the three trait structure that I outlined in my previous post with a "ConsulAgain" trait that doesn't cancel out "notConsul"(consular trait) and it works; second consulship kicks in right on time (when I remember to get the guy back to Rome). Your suggestion of 2 notConsul traits (one explicitly for consular and the other to toggle consul/consular) sounds like a more elegant setup, but now that it ain't broke, don't think I'll be fixin' it unless I decide to rehaul the whole Cursus Honorum.

    Still having the reset problem with "ConsulAgain" just like I did with second instance of "Consul" before.
    The problem with TurnsOutOfOffice is (I think) that, exactly because TurnsINOfOffice and TurnsOUTOfOffice are mutual antitraits, the very first point given to OUT actually simply removes IN (so after the first points both traits are at 0). Then the second point actually increases OUT to 1, etc.
    This would be my problem if the second point actually reestablished IN. What I don't get about this is that the first consulship does reset, but the second will not, and it doesn't matter that the second is now a new trait. Somehow TurnsInOffice reaches 4 the 1st time, triggering a successful consul reset with
    Code:
    Trigger Reset_Consul_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait Consul > 0
    
      Affects notConsul  2  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    but did not reset when the second consulship activated before, nor does the first instance of ConsulAgain reset now with
    Code:
    Trigger Reset_Consul_Again_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait ConsulAgain > 0
    
      Affects ConsulAgain -1  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    No faction announcement at the start of first turn character should no longer be consul, so it's not a reacquisition of the trait; Trait TurnsInOffice is not reaching its threshold of 4(a year in office, TurnsInOffice = 2) this time. It does reach that threshold the first time, so I'm flummoxed. Count_Consul_TurnsOutOfOffice also seems to work(after I adjusted the threshold---smoking gun there?) because FMs successfully become EligibleForConsul again, so I am additionally flummoxed.

    Here's the dilemna: on the second go-around in winter, Trigger Stands_For_Consul_Again gives Trait ConsulAgain, which doesn't(and shouldn't) trigger
    Code:
    Trigger Reset_Consul_Again_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait ConsulAgain > 0
    
      Affects ConsulAgain -1  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    because TurnsInOffice = 0; due to trigger order TurnsInOffice doesn't activate until the end of the next turn.
    Code:
    Trigger Count_Consul_TurnsOutOfOffice_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait notConsul > 0
              and Trait ConsulAgain < 1
              and Trait Censor < 1
              and TurnsOutOfOffice < 2
    
      Affects TurnsOutOfOffice  1  Chance  100
    
    
    ;Mod: EBMod816 - 01/02/05 : fixed issue with former Consul, now Censor, never losing the office of Censor.
    ;------------------------------------------
    doesn't(and shouldn't) trigger because ConsulAgain "= 1" and is not "< 1".
    On the next turn(now spring),
    Code:
    Trigger Eligible_For_Consul_Again
      WhenToTest CharacterTurnStart
    
        Condition AgentType = family
              and Trait EligibleForConsul < 1
              and Attribute Influence > 2
              and Trait Censor < 1
              and Trait Consul < 1
              and Trait ConsulAgain < 1
              and Trait notConsul > 0
              and Trait TurnsOutOfOffice = 2
    
      Affects EligibleForConsul  1  Chance  100
    
    ;^ObsidianMod - consulship rehaul
    ;------------------------------------------
    doesn't(and shouldn't) trigger because ConsulAgain "= 1" and is not "< 1". Now we move on to the end of the spring turn where
    Code:
    Trigger Count_Consul_Again_Turns_in_Office
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait ConsulAgain > 0
    
      Affects TurnsInOffice  1  Chance  100
    
    ;------------------------------------------
    does trigger(as it should) because ConsulAgain = 1. As an antitrait, this should set TurnsOutOfOffice = 0? and TurnsInOffice doesn't +1 until next(summer) turn? If so then why does it work for the 1st consulship, which has the exact same setup(TurnsOutOfOffice > 0 courtesy of the Praetor reset), and why doesn't the ConsulAgain reset simply come a season late? Moving on
    Code:
    Trigger Reset_Consul_after_Term_Expires
      WhenToTest CharacterTurnEnd
    
        Condition AgentType = family
              and Trait TurnsInOffice = 2
              and Trait Consul > 0
    
      Affects notConsul  2  Chance  100
      Affects TurnsOutOfOffice  4  Chance  100
    
    ;------------------------------------------
    doesn't(and shouldn't) trigger until 4 turns have passed, then TurnsInOffice will "= 2" and this second consulship should then come to an end... but it doesn't. (Now imagine me doing Hubert Farnsworth's crazy, mad scientist laugh from Futurama.)

    Apologize for the long, over-technical posts. Thanks for taking a look.

  5. #5

    Default Re: Roman Senate Offices in EB Revisited (but is general modding question) --- Problem Solved!!!

    Problem solved! Second consulship for FMs now resets.

    I took a page from all the office reset triggers where "Affects TurnsOutofOffice 4 Chance 100" happens. If it were simply a matter of 1 point of the antitrait resetting the Trait/AntiTrait to zero balance, then why would you need 4 pts? Well, turns out you have to cancel the 4 pts of its antitrait, TurnsInOffice, before the TurnsOutOfOffice count can begin from zero(a guess i think must be right considering the following).

    My Eligible_For_Consul_Again trigger required 33 pts of TurnsOutofOffice("and Trait TurnsOutOfOffice = 2"), but the 4 points (a year) of TurnsInOffice never got the count back to Level 2 of "Trait TurnsInOffice" because it was subtracting from a start point of 33. Turns out all I had to do was add "Affects TurnsInOffice 33 Chance 100" to my Stands_For_Consul_Again trigger. Now TurnsOutOfOffice/TurnsInOffice is back to zero, and after the four seasons of Count_Consul_Again_Turns_In_Office, the condition "Trait TurnsInOffice = 2" is met after the year, as intended. Without the canceling 33 pts of TurnsInOffice, it would take over nine years for ConsulAgain trait to go away. For a second consulship at 50 years of age, that's a 59 year-old character; I don't really know if I ever continued testing for that long after the ConsulAgain reset failed.

    Well, now that I know, I doubt if I ever even needed a ConsulAgain trait. I guess my initial suspicion that my problems were exclusively trigger related proved correct, but we learn by doing.

Posting Permissions

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