How to Reduce Lords Defecting

Users who are viewing this thread

gaston

Sergeant
I'm helping with the 1755 Old Frontier mod (try it!) and I want to reduce the chances of lords defecting, like to zero.

How do I do that?

I've only been modding for about a week, so please make your response detailed and specific.  I'm afraid that "Just modify the script." won't help me.

Thank you.
 
Code:
                    ("cf_troop_can_intrigue",
                      #This script should be called from dialogs, and also prior to any event which might result in a lord changing sides
                      [(eq, 1, 0),
Most Native code will call this first. By causing this script to fail, you should be removing the possibility of defection altogether.
 
Of course.
Going off Somebody's previous suggestion, within the can_intrigue script:

Code:
    ("cf_troop_can_intrigue",
	#This script should be called from dialogs, and also prior to any event which might result in a lord changing sides
    [
      (store_script_param, ":troop", 1),
      (store_script_param, ":skip_player_party", 2),
      
      (neq, ":troop", "trp_TROOP_ID"), ##ADD THIS
 
Caba`drin said:
Of course.
Going off Somebody's previous suggestion, within the can_intrigue script:

Code:
    ("cf_troop_can_intrigue",
	#This script should be called from dialogs, and also prior to any event which might result in a lord changing sides
    [
      (store_script_param, ":troop", 1),
      (store_script_param, ":skip_player_party", 2),
      
      (neq, ":troop", "trp_TROOP_ID"), ##ADD THIS

I tried this, but lords still defect. Any hints?
 
Cozur said:
Caba`drin said:
Of course.
Going off Somebody's previous suggestion, within the can_intrigue script:

Code:
    ("cf_troop_can_intrigue",
	#This script should be called from dialogs, and also prior to any event which might result in a lord changing sides
    [
      (store_script_param, ":troop", 1),
      (store_script_param, ":skip_player_party", 2),
      
      (neq, ":troop", "trp_TROOP_ID"), ##ADD THIS

I tried this, but lords still defect. Any hints?
Are you trying to prevent automatic defections completely, limit how often it happens or increase the prerequisites prior to it happening?  Making the above script fail also prevents the player from being able to convince a lord into defection and auto-indictments from occurring which may or may not have been intended.

In module_simple_triggers.py you should be able to search for a trigger that fires every 0.5 hours that starts with this:
Code:
#Individual lord political calculations
#Check for lords without fiefs, auto-defections, etc
If you follow that script down to the spot where it is commented for "#do a defection" you'll find a script call like this:
Code:
(call_script, "script_lord_find_alternative_faction", ":troop_no"),
Put a (eq, 1, 0), right before that and that should prevent lords from automatically defecting, yet leave indictments & the ability for the player to convince lords to defect as an option.

Put a (store_random_in_range, ":roll", 0, 10), (lt, ":roll", 1), and it should restrict it to 10% of how often it would normally happen.  In truth though once the conditions are met it will keep trying to achieve that 10% chance every 0.5 hours so you're only delaying the inevitable unless you set the roll to a fairly high number such as making it a 0.01% chance out of 1000.

If you want to change the relation requirement it is also in there and was changed during 1.151 from <= -75 to <= -50.  That line looks like:
Code:
(this_or_next|le, reg0, -50), #was -75
 
Back
Top Bottom