Results 1 to 9 of 9

Thread: Traits conditions

  1. #1

    Default Traits conditions

    I am trying to make a trait that makes civil wars and unrest happen more based on faction size so i figured that i need to make it so that faction leaders get this "offensive to nobles" trait more since it's the one that leads to civil wars

    therefore i hijacked this

    Code:
    ;------------------------------------------
    Trigger civil_war_or_not1
     WhenToTest BecomesFactionLeader
    
    
     Condition Trait Offensive_To_Nobles = 0
           and SettlementsTaken >= 7
           and FactionIsLocal
    
    
     Affects Offensive_To_Nobles 1 Chance 5
    
    
    ;------------------------------------------
    and turned it into this

    Code:
    ;------------------------------------------
    Trigger civil_war_or_not1
     WhenToTest CharacterTurnEnd
    
    
     Condition IsFactionLeader
           and SettlementsTaken >= 10
           and FactionIsLocal
    
    
     Affects Offensive_To_Nobles 1 Chance 8
    
    
    ;------------------------------------------


    am i getting this right or i am completely offroad ?

    dug around and found only one thread about it and it said that "SettlementsTaken" might not be working, anyone can confirm ? what would be an alternative condition to use ?
    You know you've played too much Stainless Steel when in every other mod you play you think cavalry is too weak.

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,141

    Default Re: Traits conditions

    I have never used SettlementsTaken so I don't know of it works and I'm not certain of what it means. "How many settlements has the player captured so far during this campaign?" say the docudemons, so if the player has captured 5 but lost 4 then is SettlementsTaken 5 or 1? And if the player captures one then loses it then captures it again, then it's 1 settlement but 2 takes so is SettlementsTaken 1 or 2? And how do diplomacy-given settlements factor into the number?

    As an alternative you could use some script...

    Code:
    monitor_event FactionTurnStart
    
      set_event_counter lots_of_regions 0
    
      if I_LocalFaction england
        and I_NumberOfSettlements england >= 14
        set_event_counter lots_of_regions 1
      end_if
      
      if I_LocalFaction france
        and I_NumberOfSettlements england >= 16
        set_event_counter lots_of_regions 1
      end_if
    
      ;...other factions...  
    
    end_monitor
    ...and the trait trigger...

    Code:
    Trigger civil_war_or_not1
     WhenToTest CharacterTurnEnd
    
     Condition IsFactionLeader
           and I_EventCounter lots_of_regions = 1
           and FactionIsLocal
    
     Affects Offensive_To_Nobles 1 Chance 8
    In this hypothetical example, england start with 4 regions and france start with 6. And we want the trait to be gained when the faction has expanded by 10 or more regions, by any means. Hence the >= 14 and >= 16 checks.

    If the leader has the trait but the faction has no longer expanded by 10+ regions, then should he lose the trait? If so then this...

    Code:
    Trigger civil_war_or_not1
     WhenToTest CharacterTurnEnd
    
     Condition IsFactionLeader
           and I_EventCounter lots_of_regions = 1
           and FactionIsLocal
           and Trait Offensive_To_Nobles = 0
    
     Affects Offensive_To_Nobles 1 Chance 8
     
    Trigger civil_war_or_not2
     WhenToTest CharacterTurnEnd
    
     Condition IsFactionLeader
           and I_EventCounter lots_of_regions = 0
           and FactionIsLocal
    
     Affects Offensive_To_Nobles -1 Chance 100

  3. #3
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    47,100
    Blog Entries
    24

    Default Re: Traits conditions

    You could use the I_NumberOfSettlements condition, keeping the initial number in mind. That should make life easier

    My money for SettlementsTaken would be on 'conquered' without any deductions for lost settlements. But I am not sure, nor have I ever tested.
    Last edited by Gigantus; August 24, 2019 at 07:45 AM.



  4. #4
    Lusitanio's Avatar Content Staff
    Join Date
    Jan 2018
    Location
    Portugal
    Posts
    936

    Default Re: Traits conditions

    You could also add some more turmoil to it, just to make the civil war more interesting.

    Code:
    monitor_event SettlementTurnEnd SettlementName Petra	and SettlementIsLocal
    	and not GovernorInResidence
    		add_settlement_turmoil Petra 9
    		freeze_recruit_pool Sinay_Province true
    end_monitor
    This code adds turmoil to the city and freezes the recruitment pool if there is no governor. If you take that condition, it will also happen with governor. You can add other conditions like the number of settlements.

  5. #5
    QuintusSertorius's Avatar EBII Hod Carrier
    Artifex

    Join Date
    Feb 2008
    Location
    UK
    Posts
    11,585

    Default Re: Traits conditions

    Just note settlement_turmoil is temporary (fading at a rate of 5% a turn), and is based on the SOF_TURMOIL value chosen in the descr_settlement_mechanics.xml.

  6. #6

    Default Re: Traits conditions

    did a bunch of changes and apparently it works and all i had to do was change ">= 10" into "<= 10"
    also added back the Trait Offensive_To_Nobles = 0 condition, was stupid of me to even remove it in the first place
    i gave it 90 chance for testing purposes and tested it on byzantines who start with 15 settlements, it all works, the faction leader gets the offensive trait on 2nd or 3rd turn always as it should

    Code:
    ;------------------------------------------
    Trigger civil_war_or_not1
     WhenToTest CharacterTurnEnd
    
    
     Condition Trait Offensive_To_Nobles = 0
           and IsFactionLeader
           and SettlementsTaken <= 10
           and FactionIsLocal
    
    
     Affects Offensive_To_Nobles 1 Chance 90
    
    
    ;------------------------------------------
    Trigger civil_war_or_not2
     WhenToTest CharacterTurnEnd
    
    
     Condition Trait Offensive_To_Nobles = 0
           and IsFactionLeader
           and SettlementsTaken <= 20
           and FactionIsLocal 
    
    
     Affects Offensive_To_Nobles 1 Chance 20
    
    
    ;------------------------------------------
    Trigger civil_war_or_not3
     WhenToTest CharacterTurnEnd
    
    
     Condition Trait Offensive_To_Nobles = 0
           and IsFactionLeader
           and SettlementsTaken <= 30
           and FactionIsLocal
    
    
     Affects Offensive_To_Nobles 1 Chance 30
    
    
    ;------------------------------------------
    You know you've played too much Stainless Steel when in every other mod you play you think cavalry is too weak.

  7. #7

    Default Re: Traits conditions

    Quote Originally Posted by Lusitanio View Post
    You could also add some more turmoil to it, just to make the civil war more interesting.

    Code:
    monitor_event SettlementTurnEnd SettlementName Petra    and SettlementIsLocal
        and not GovernorInResidence
            add_settlement_turmoil Petra 9
            freeze_recruit_pool Sinay_Province true
    end_monitor
    This code adds turmoil to the city and freezes the recruitment pool if there is no governor. If you take that condition, it will also happen with governor. You can add other conditions like the number of settlements.
    this is exactly what i need now, i tested a bit and all the generals are getting obedient to his liege trait that makes them super loyal, lame af, it should be chaos, lots of generals should rebel and stuff, it's so ridiculous that civil war is actually beneficial lol

    indeed i need to spice it up, i've had civil war happen in the past because of excomunication and debt and i remember that even when a general went full rebel all i had to do is to simply move him out of the settlement, yeah he could move very little but still he could, also in the case that i couldnt move him out all i had to do was just move another character in the settlement to take the role of goveror thus preventing the settlement from rebelling

    for movement points i think i can add that effec to the rebel traits, will see if it works out

    how can i make a family memeber or general cause massive unrest despite not being the governor ?
    You know you've played too much Stainless Steel when in every other mod you play you think cavalry is too weak.

  8. #8
    Jurand of Cracow's Avatar History and gameplay!
    Artifex

    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    2,502

    Default Re: Traits conditions

    Quote Originally Posted by Dekhatres View Post
    this is exactly what i need now, i tested a bit and all the generals are getting obedient to his liege trait that makes them super loyal, lame af, it should be chaos, lots of generals should rebel and stuff, it's so ridiculous that civil war is actually beneficial lol

    indeed i need to spice it up, i've had civil war happen in the past because of excomunication and debt and i remember that even when a general went full rebel all i had to do is to simply move him out of the settlement, yeah he could move very little but still he could, also in the case that i couldnt move him out all i had to do was just move another character in the settlement to take the role of goveror thus preventing the settlement from rebelling

    for movement points i think i can add that effec to the rebel traits, will see if it works out

    how can i make a family memeber or general cause massive unrest despite not being the governor ?
    I think the decisive factor of who is the governor in a settlement is Piety. So adding a +Piety to the rebel trait would make the rebel always a governor thus solving your issue.

    I also think that -200 Movement makes a general immobile - except of boarding a ship. This is perhaps the max what can be done.

    You're very true that a botched up civil war is a problem. I've played Titanium and there's always a civil war warning, then it happened and only one general rebelled while every else was buffed up.

    In general, I think that most of the changes on the throne should cause civil wars in the Stainless Steel (and perhaps other mods), at least for factions like Byzantium or Hungary.

  9. #9

    Default Re: Traits conditions

    thanks man, will try the piety thing

    yea i saw many traits having -200, looked a bit around some more and trait Rebellious has -350 movement points, gona try that value

    EDIT: well the -350 movement points didnt immobilize him, atleast piety thing worked, so now basically i got a bunch of saints going around stiring up XD


    2 generals rebelled now, 1 completely immobilized while the other can still be moved a little bit just enough to get out of a settlement, are there any other ways to immobilize a general for good ? and their army too if possible
    Last edited by Dekhatres; August 24, 2019 at 01:32 PM.
    You know you've played too much Stainless Steel when in every other mod you play you think cavalry is too weak.

Posting Permissions

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