Jump to content

[mod] Regula Magistri


Recommended Posts

On 1/16/2023 at 12:53 AM, Umgath said:

Noon question: what is the "Servitude War"?

 

Also, what is "magistri culture"? Was I supposed to pick a custom culture on character creation?


If you charm (Fascinare) women vassals, they can form the "servitude" faction against their liege, which has the ultimate goal of becoming your vassals instead.
When they start their faction war, you can join them to help, or just let them win on their own.
Standard vassal rules apply, eg if you are a duke only countesses can start/join the servitude faction, as a duchess cant be your vassal (same rank).

Magitri culture is just a quick start culture that I think fits the themes of the Magistri religion, you dont have to use it. 
 

On 1/17/2023 at 6:49 AM, Umgath said:

Idea: it would be nice if whenever a char gets Mulsa/Phalex trait there would be a recorded "Character Memory" for her. Preferably with basic info on the type of conversion (Fascinare, Prison Ineraction, Domination War, Ward Conversion and etc)


Good idea, might be really easy to do as well.
 

19 hours ago, Randah said:

I am not following the logic in some of the code. I'm blind.

I'm looking at fascinare scheme outcome and see the roll in .002 triggering success_effect. I presume that effect has logic that calls one of the relevant .2301-.2311, but I don't see where that logic is.


It triggers an on_action, either the fascinare_success or fascinare_failure on_action, which you can find in common\on_action\schemes\fascinare_on_actions.txt
These on_actions then link back to the events, but a bit more randomly and with triggers for the events checked as well.
 

15 hours ago, Umgath said:

Mod for migration from 0.9x to 1.00

 

I've created a small mod for migration of active game state from Regula Magistri versions 0.94-0.99 to 1.00.

This mod is needed ONLY if you played with Regula Magistri like 0.94 and want to update to 1.00.

 

This is my very first mod for CK3 but it's simple in nature and so far works fine.

 

Usage:

1. Install this mod as any other CK3 mod

2. Load a game with this mod enabled.

3. Check that migration was successful (see details below).

4. Save current game into a new save file.

5. [optional] Disable or remove the mod. It's not needed to stay in your rule set forever. Just load the game once with it.

 

How to check that it worked?

  • Check Regual Magistri settings decision and open stats. If you see any non-zero values then all things are good.
  • Check file Documents\Paradox Interactive\Crusader Kings III\logs\debug.log and search for text "RegulaMigration". You should contain records like this:
  • [22:18:22][jomini_effect_impl.cpp:438]:  file: common/on_action/regula_migration_actions.txt line: 13: RegulaMigration: check start
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_fascinare_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_domitans_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_contubernalis_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_domination_war_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_servitude_war_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_potestas_queen_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/scripted_effects; regula_migrate_variable_from_magister_to_global line: 17: RegulaMigration: migrated variable regula_obedience_tally$
    [22:18:22][jomini_effect_impl.cpp:438]:  file: common/on_action/regula_migration_actions.txt line: 72: RegulaMigration: check end

     

 

Regula_Migration_0_1.zip 3.96 kB · 1 download

 

PS: It would be nice to have this included in the RegulaMagistri mod itself but it's up to author


Good stuff, yeah my bad should have put a big warning at the top, which I'll do now.
I wont put this into the mod as this should just be a one off thing, I think its better for code to cut out bad code rather then bloat themselves for backwards compatibility.
 

14 hours ago, Umgath said:

Minor issue:

 

Event fascinare_outcome.2503 misses interface toast (unlike other fascinare events).


This doesn't need one. Its a guaranteed Fascinare event thats non-hidden (has the pop up for player to see) so you dont need to inform the player if the charm was a success/failure by a notification.
 

11 hours ago, byehi said:

it seems almost impossible to have sons after a while as the Magister with all holy sites has anyone got any tips?

As already said, get more wives. Honestly surprised you are having trouble, given all the fertility bonuses you get.
The percentage chance is 75% female and 25% male once you have the female offspring effect. 
That means if you have six wives (enough for the orgy event), with three kids each that would mean 18 kids, which on average should give you at least 4 sons.

Link to comment
3 hours ago, ban10 said:

This doesn't need one. Its a guaranteed Fascinare event thats non-hidden (has the pop up for player to see) so you dont need to inform the player if the charm was a success/failure by a notification.

I understand that's it guaranteed but I say that it just feels inconsistent with other cases. I think it would be better to show notification in the same way all the time. Without making a different behavior for probability of the outcome 90% and for 100%.

Link to comment

I removed the infertility then had it add_trait fecund and pure_blooded. Then I call regula_rank_up on both physical and beauty traits, 50% for one step 50% for two steps (simply lifted code straight from mutare event). In theory this creates a breeder, but haven't used in practice yet. I wonder if maybe there is a way to add them as knights/champions while leaving them flagged incapable for other actions? Low martial skill but give a prowess bonus? Won't pursue it unless the breeder change isn't enough on its own to warrant use.

A concept I had was add this as an option to claim orba in the form of "Ascension". They are despondent and wish to be claimed by the Keeper. Debating if that is sensible and whether it should entail some cost or penalty. If you are just swapping to a new heir you won't have a fat stack of piety, most likely. Maybe turn this into a 500 piety cost way to claim an orba and revoke their titles? Just to smooth over a transition?

Link to comment

There's nothing for you to do if you fascinare an empress as a duke, both of you independent of each other correct?

There's also an independent duchess and I'm also an independent duke, anything I can do with that, character interactions doesn't show much asides from improving them, kidnap husband (making her unmarried by killing him doesn't do anything) and the hook action?

Link to comment
15 hours ago, Smock said:

There's nothing for you to do if you fascinare an empress as a duke, both of you independent of each other correct?

There's also an independent duchess and I'm also an independent duke, anything I can do with that, character interactions doesn't show much asides from improving them, kidnap husband (making her unmarried by killing him doesn't do anything) and the hook action?

I mean you can use it to force an alliance & also a hook for marriage, and potentially an heir into your dynasty that would bring her realm into yours

 

Link to comment

I made a mod. Its my first mod. I made a hash of the mod. The intent was to have Domina bring a non-pregnant Paelex to your quarters, quarterly, with a random delay in days. It doesn't work. I know the quarterly pulse on action can work, I modified CSE and replaced one of its yearly pulses. So, predictably, the problem is in my code:

On action:

 

Spoiler
### Domina brings paelex to magister for impregnation every quarter. ###

### Future concept???: if no non-pregnant wife available domina spends piety and creates character? ###
### mulsa offers self? base on stress? ###
### courtier offers self? base on opinion? ### give option to reject, fascinare at discount or simply acccept offering?
### outsider/wanderer devotes self? base on fervor? ### converts, offers self.


quarterly_playable_pulse = {

	trigger = {
		if = {
			limit = {
				any_spouse = {
					is_available = yes
					has_trait = domina
					}
				}
			}			
		}	
	events = { 
		delay = { days = 15 40 }
		regula_offering.0001 } #domina offers wife
}

 

 


Should, maybe, hopefully, trigger:

 

Spoiler
### domina offers paelex 0001-2000

namespace = regula_offering

regula_offering.0001 = {
	type = character_event
	title = regula_offering.0001.t
	desc = regula_offering.0001.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}
					
###save domina as domina
		any_spouse = {
			has_trait = domina
			save_scope_as = domina
			}
		
###select and save wife as offering

		random_spouse = {
			if = {
				limit = {
					is_available_for_activity_trigger = yes					
					has_trait = paelex
					if = {
						limit = {
							NOT = {	has_trait = pregnant }
							}
						}
					}				
				}
			save_scope_as = offering
		}
	
	immediate = {
		scope:domina = {
			add_piety = 50
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}
		scope:offering = {
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}			
		debug_log = scope:domina offers scope:offering to root
		play_music_cue = "mx_cue_sacredrite"			
		}
		
	left_portrait = {
		character = scope:offering
		animation = ecstasy
		}
	
	right_portrait = {
		character = scope:domina
		animation = schadenfreude
		}
	
	
###accept. add prestige to offering.
		
	option = {
		name = regula_offering.0001.a
		trigger_event = { id = regula_wife_offering_event.1001 }
		}
		
###decline. insults dom/pae?

	option = {
		name = regula_offering.0001.d
		
		reverse_add_opinion = {
			target = scope:domina
			modifier = disappointed_opinion
			opinion -25
			}
		reverse_add_opinion = {
			target = scope:offering
			modifier = disappointed_opinion
			opinion -20
			}
		}
	}

#action event? IE?

regula_offering.1001 = {

	type = character_event
	title = regula_offering.1001.t
	desc = regula_offering.1001.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}
	
	right_portrait = {
		character = scope:offering
		animation = beg
	}
	
	immediate = {
		scope:offering = {
			add_prestige = 150
			}
		root = {
			add_character_flag = {
				is_naked
				days = 30
				}
			}
		}
		
	option = {
		name = regula_offering.1001a
		
		show_as_tooltip = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = root
				CHARACTER_2 = scope:offering
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
				}
			}
			
		carn_sex_scene_effect = {
			PLAYER = root
			TARGET = scope:offering
			STRESS_EFFECTS = yes
			DRAMA = yes
			}
		}
		
	after = {
		scope:domina = {
			remove_character_flag = { is_naked }
			}
		root = {
			remove_character_flag = { is_naked }
			}
		scope:offering = {
			remove_character_flag = { is_naked }
				}
		
		}
	}

 



I think I am either missing an obvious error, or just misunderstand the structure needed to trigger this. Can anyone spot what I did wrong? Think I am getting scopes wrong initializing the events.

regula_magistri.7z

Edited by Randah
add file
Link to comment
4 hours ago, Randah said:

I made a mod. Its my first mod. I made a hash of the mod. The intent was to have Domina bring a non-pregnant Paelex to your quarters, quarterly, with a random delay in days. It doesn't work. I know the quarterly pulse on action can work, I modified CSE and replaced one of its yearly pulses. So, predictably, the problem is in my code.
I think I am either missing an obvious error, or just misunderstand the structure needed to trigger this. Can anyone spot what I did wrong? Think I am getting scopes wrong initializing the events.

regula_magistri.7z 1.92 kB · 1 download

Have you checked your error.log? Generally it's useful to place a `debug_log = "Some unique text"` in each code blocks with effects to understand what parts of code get executed and what parts are not.

 

Also it's better to make all customizations as a separate mod.

Edited by Umgath
Link to comment
9 hours ago, Randah said:

I made a mod. Its my first mod. I made a hash of the mod. The intent was to have Domina bring a non-pregnant Paelex to your quarters, quarterly, with a random delay in days. It doesn't work. I know the quarterly pulse on action can work, I modified CSE and replaced one of its yearly pulses. So, predictably, the problem is in my code:

On action:

 

  Hide contents
### Domina brings paelex to magister for impregnation every quarter. ###

### Future concept???: if no non-pregnant wife available domina spends piety and creates character? ###
### mulsa offers self? base on stress? ###
### courtier offers self? base on opinion? ### give option to reject, fascinare at discount or simply acccept offering?
### outsider/wanderer devotes self? base on fervor? ### converts, offers self.


quarterly_playable_pulse = {

	trigger = {
		if = {
			limit = {
				any_spouse = {
					is_available = yes
					has_trait = domina
					}
				}
			}			
		}	
	events = { 
		delay = { days = 15 40 }
		regula_offering.0001 } #domina offers wife
}

 

 

 

I do not believe you need either the if = {} or the limit = {}, the trigger effectively is the limit in this case.

Link to comment
25 minutes ago, GallowsUK said:

 

I do not believe you need either the if = {} or the limit = {}, the trigger effectively is the limit in this case.

Yes, just noticed same (from the error.log): instead of

 

	trigger = {
		if = {
			limit = {
				any_spouse = {
					is_available = yes
					has_trait = domina
				}
			}
		}
	}

should be something like

	trigger = {
		any_spouse = {
			is_available = yes
			has_trait = domina
		}
	}

 

However I'm not sure that this is what was intended because the scope of the event is player character.

 

Also, I suspect that is not very useful to do `is_available` check because the domina may stop being available because of the event delay.

Edited by Umgath
Link to comment

I think that there are few errors in the Regula Magistri v100:

[18:37:51][jomini_script_system.cpp:263]: Script system error!
  Error: Undefined event target 'spouse'
  Script location: file: events/regula_virus_events.txt line: 60
Line    238: [16:57:01][pdx_persistent_reader.cpp:252]: Error: "Unexpected token: desc, near line: 1227" in file: "common/character_interactions/regula_character_interactions.txt" near line: 1227
[16:57:02][jomini_trigger.cpp:718]: Inconsistent trigger scopes (scheme vs. character) in file: common/scripted_effects; create_regula_virus_list_effect line: 41
[16:57:02][jomini_trigger.cpp:718]: Inconsistent trigger scopes (scheme vs. character) in file: common/scripted_effects; create_regula_virus_list_effect line: 51

 

Link to comment

Noted and changed, thank you both. I moved the scope definitions inside immediate = { } as well. Also switched encoding to UTF BOM, Was just UTF, don't think it matters but not sure - if anything that may be a runtime optimization? Dunno.

When I call offering.0001 via console it is finding and defining a paelex but not a domina, Going to work on that. As the event progresses it grants paelex her prestige and triggers a scene, which IE is able to catch if installed. But sometimes its not consensual, and sometimes its player sub noncon. Totally random, doesn't rely on traits opinions or anything. Think I need to add a consensual flag to the carn effect call, otherwise its picking a scene type out of a bag. They were staying naked, but I think I missed a flag = while putting their clothes back on at the end.

 

For reference, is this packing too much into an event? Should I be using a chain of hidden events to assign scopes in series? Say, on_action only fires with the delay, and without a triggering check.  0001 only contains the trigger. 0002 finds the domina and saves the scope, then calls 0003 which sets paelex and calls the event proper? Not sure if thats more appropriate/proper in this format. It relies on an assumption about how scope is saved and carried forward in the event chain.

I haven't done anything coding wise in... longer than I care to admit or think about. So any pointers are appreciated.

Link to comment

I rearranged the code a bit. The on_action is now a flat trigger for event 0001 with no conditions. The event chain starts with a sequence of hidden setups. Shouldn't need different events but this may help my understanding. One issue I had earlier was searching for domina and paelex within the event when the event title and description called them as variables.

Definitely hitting the limit of my comprehension. Earlier I had paelex being saved to scope properly. I broke it along the way. Now neither is being defined. And the event chain would trigger all the way through. Now it can't find regula_offering.1001. Says "not a valid event id". Odd, since I dont think I touched it. Thought I had braced something wrong but everything lines up, I think.

 

Spoiler
### domina offers paelex 0001-2000

namespace = regula_offering

#check domina exists, save as domina
regula_offering.0001 = {
	hidden = yes
	
	trigger = {
		any_spouse = {			
			has_trait = domina
			}				
		}
		
	immediate = {
		### bug - unable to assign domina
		any_spouse = {
			limit = { has_trait = domina }
			save_scope_as = domina	
			}
			
		trigger_event = { 
			#delay = { days = { 15 45 } }
			id = regula_offering.0002		
			} 
		}
	}

#check for non-pregnant paelex, save as paelex
regula_offering.0002 = {
	hidden = yes
	
	immediate= { ### bug - unable to assign paelex
		any_spouse = {
			limit = {
				has_trait = paelex
				NOT = { has_trait = pregnant }
					}
				save_scope_as = offering
				}
				
		trigger_event = {
			id = regula_offering.0003 #domina offers paelex
			}
		}
	}	

#display offering event. choose accept/decline
regula_offering.0003 = {
	type = character_event
	title = regula_offering.0003.t
	desc = regula_offering.0003.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}		
	
	#grant piety to the domina for fulfilling her role. give domina piety expenses? independent fascinare?
	immediate = {
		scope:domina = {
			add_piety = 50
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}
		scope:offering = {
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}	
			
		play_music_cue = "mx_cue_sacredrite"			
		}
		
	left_portrait = {
		character = scope:offering
		animation = ecstasy
		}
	
	right_portrait = {
		character = scope:domina
		animation = schadenfreude
		}
	
	
### accept. goal - hide option on high stress, except rakish, lustfull, sadistic.
		
	option = {
		name = regula_offering.0003.a 
		trigger_event = { id = regula_offering.1001 }
		}
		
### decline. insults dom/pae?

	option = {
		name = regula_offering.0003.d
		
		reverse_add_opinion = {
			target = scope:domina
			modifier = disappointed_opinion
			opinion = -25
			}
		reverse_add_opinion = {
			target = scope:offering
			modifier = disappointed_opinion
			opinion = -20
			}
		}
		
	after = {
		scope:domina = {
			remove_character_flag = { flag = is_naked }
			}
		}
	}

#action event? triggers IE?

### bug - cannot call .1001 from console or event. " regula_offering.1001 not a valid ID"
regula_offering.1001 = {

	type = character_event
	title = regula_offering.1001.t
	desc = regula_offering.1001.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}
	
	right_portrait = {
		character = scope:offering
		animation = flirtation
	}
	
	immediate = {
		scope:offering = {
			add_prestige = 150
			}
		root = {
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}
		}
		
	option = {
		name = regula_offering.1001.a
		
		### bug - falls back to default carn non-con scenes on occasion
		show_as_tooltip = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = root
				CHARACTER_2 = scope:offering
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
				}
			}
			
		carn_sex_scene_effect = {
			PLAYER = root
			TARGET = scope:offering
			STRESS_EFFECTS = yes
			DRAMA = yes
			}
		}
		
		### bug - is not returning clothes.
	after = {		
		root = {
			remove_character_flag = { flag = is_naked }
			}
		scope:offering = {
			remove_character_flag = { flag = is_naked }
				}
		
		}
	}

 


Oh, and I took the suggestion to make it a mod. No warranty expressed or implied. It does require manually changing filepath in .mod, I think.

iRegula.7z

Edited by Randah
Link to comment

Might be a visual error, but enacting famuli martial custom decision has a reverse requirement bug, where synkellos and above can't enact it, but a zelator can, despite the decision saying you have to be a synkellos or higher.

 

Edit: I've also noticed, if you use the Domitans Tribunal while you're not married, it makes the woman into a Domina as intended, but you don't marry them like you usually do with a paelex, forcing you to marry them matrilineally and allowing to you spam Dominas everywhere, is this intentional?

 

Edit+: If the above edit is not the intended result, I managed to copy shuffle around code to make it so that an unmarried Magister marries the resulting Domina, instead of staying unmarried and able to spam Domina's everywhere. Dunno how to do a patch mod, so I just modified the character interaction file of the mod proper. It's the event on line 1957 if looked at through notepad++.

Original

regula_make_paelex_interaction_effect = yes
			scope:recipient = {
				add_trait_force_tooltip = domina
			}
			scope:actor = {
				hidden_effect = {
					every_spouse = {
						remove_opinion = {
							modifier = polygamous_marriage_opinion
							target = scope:actor
						}
					}
				}
				trigger_event = {
					id = regula_paelex_event.2000
				}
			}

Modified

regula_make_paelex_interaction_effect = yes
			scope:recipient = {
				add_trait_force_tooltip = domina
			}
			scope:actor = {
			    marry = scope:recipient				
				hidden_effect = {
					every_spouse = {
						remove_opinion = {
							modifier = polygamous_marriage_opinion
							target = scope:actor
						}
					}
				}
				trigger_event = {
					id = regula_paelex_event.2000
				}
			}

 

Not too sure if this causes errors, since I don't really code, I just guessed at what would have the effect that I wanted and got the result.

Edited by Smock
Link to comment

@Randah

`quarterly_playable_pulse` is fired for each "playable character" (any count and above). So it will be fired on player, on all dominas, non-dominas and all many other characters.

 

Your current code tries to check spouses for each "playable" charactes, find dominas among them and then fire event `regula_offering.0002` with `domina` in saved scope.

 

With that approach your event will work correctly only when `quarterly_playable_pulse` was fired with current player as a root scope because all other characters can't have dominas as spouses. So your approach is quite ineffective. You should

a) filter out the root event to actually be executed only on player OR

b) let it run only on dominas and directly use current character as "domina":

 

quarterly_playable_pulse = {
	trigger = {
		has_trait = domina
	}
	
	on_actions = {
		regula_offering.0001 # Current root scope is character with "domina" trait
	}
}

 

I suggest you to write what logic of the event execution you expect (with step by step details).

 

Example (may not match what logic you actually planned):

1. Subscribe for quarterly_playable_pulse for each domina execute `regula_offering.0002` (passed root scope = domina character)

2. In regula_offering.0002 select randomly one non-pregnant phalex from the list of get all spouses of character defined by global_var:magister_character. If any such phalex found then save her into scope `offering` and trigger visible event `regula_offering.0003`

3. In regula_offering.0003 use root scope (with domina) and saved `offering` scope to show an event and update stats.

Link to comment

@Umgath@Randah

 

I'd suggest, for the on_action, something like this:

quarterly_playable_pulse = {
	trigger = { 
		has_trait = magister_trait_group 	#The magister will be playable. The domina might not be. (theocrat, courtier, whatever)
		is_available_for_activity_trigger
		any_spouse = { 
			has_trait = domina
			is_available_for_activity_trigger 
		}	
		any_spouse = {
			has_trait = paelex
			is_visibly_fertile	#Keeps our domina from bringing spouses that are infertile, too old, etc.
			is_available_for_activity_trigger 
			is_pregnant = no 	#Use "is_pregnant", the trait is less reliable and has compatibility issues
		}
	}
	events = { 
		delay = { days = { 5 80 } }	#quarterly_playable_pulse always fires the same 4 days a year per character, so lets add some randomness.
		<your.event.here>
	}
}

This should spare potential compatibility and performance headaches. (RM's scripting as a whole could be tightened up with regard to this, but that's an ongoing tinkering of mine.)

 

I don't want to go through your whole event right now, but since you mentioned scoping blues, here's what your scopes could and maybe should look like. As long as your event is a character event with the magister as root, those ought work OK.

 

random_spouse {                     #this probably looks weird but I don't trust the RM paelex/domina management to not accidentally make 2 dominae and this save us from oddity there
    limit = { has_trait = domina } 
    save_scope_as = domina
}

random_spouse {
    limit = {
        is_visibly_fertile = yes
        is_pregnant = no
        is_available_for_activity_trigger = yes
        has_trait = paelex
    }
    save_scope_as = offering
}

 

 

In theory, we could just use "root.primary_spouse" for the domina, but because RMs Paelex/Domina maintenance is on pulses, it's probably better not to.

 

Hope that helps!

 

 

Edited by Polyonamoose
Codeblock vs VSCode fun
Link to comment

@ban10

 

I've been tinkering under the hood a bit, some changes I thought I'd pass on (any word on setting up a gitlab?)

 

  • Regula_maintenance_on_actions issues quarterly_playable_pulse events for consorts only work if consorts are playble this affects :
    • regula_orba_event.0001 #Orba
      • This is fine just to set to a yearly pulse, although one could consider an on_action to cover divorces/etc. should not modify vanilla events for compat, obv
    • regula_paelex_event.0996 #domina/paelex updating
      • I fixed this by having the event fire on only the magister and iterating through spouses to update. Again, on_actions might be smart so that this doesn't only happen every 3mo
    • regula_paelex_event.0997 #HOF
      • Honestly not sure how to handle this one. HoF handling is hackish and fixing this might actaully break things like having a spiritual HoF. I'm intending to mess around with the religious/doctrinal components a lot anyway. Can move to yearly, but the whole thing needs looked at.

 

  • Most regula holy sites lack temple slots or special buildings. This can be partly rectified, depending on what kind of theme you want, by having them usurp existing holy sites (e.g., Canterbury, Jorvik, Iona, and Armagh in the new region), but we can also just add our own by modding the holy-site activation scripts to include the following
    • 		every_religion_global = {
      			limit = {
      				is_in_family = rf_regula
      			}
      			every_faith = {
      				every_holy_site = {
      					limit = {
      						title_province = {
      							has_special_building_slot = no
      						}
      					}
      					title_province = {
      						add_special_building_slot = holy_site_other_grand_temple_01
      					}
      				}
      			}
      		}

 

Otherwise, I'm mostly tinkering with oversights and compatibility. Want to see if I can rip out all of the hardcoded gender (allow M- or F-dom, etc.) so that if anyone wants to write more diverse content they can. It doesn't seem too hard to implement at present.

 

Link to comment

@Randah

The mod version that I've posted above has kind of issue that it may pick old infertile spouses for the event. Possible improvement (not 100% tested):

 

global_var:magister_character = {
			random_spouse = {
				limit = {
					has_trait = paelex
					NOT = { has_trait = pregnant }
				}
				
				weight = {
					base = 1
					
					#compare_modifier = {
					#	value = fertility
					#	multiplier = 1
					#}
					
					modifier = {
						add = {
							value = 0
							if = {
								limit = {
									fertility >= 0.5
								}
								add = 3
							}
							if = {
								limit = {
									fertility >= 0.7
								}
								add = 5
							}
							if = {
								limit = {
									fertility >= 0.9
								}
								add = 7
							}
						}
					}
				}
				
				save_scope_as = offering
			}
		}

This way fertile concubines will have much higher priority.

Link to comment
On 1/20/2023 at 6:28 AM, Smock said:

There's nothing for you to do if you fascinare an empress as a duke, both of you independent of each other correct?

There's also an independent duchess and I'm also an independent duke, anything I can do with that, character interactions doesn't show much asides from improving them, kidnap husband (making her unmarried by killing him doesn't do anything) and the hook action?


I mean it's my go-to tool for weakening powerful rulers of other faiths when I'm playing RM. Fascinare a queen or two, make them take power, and watch your neighbors kingdom burn to the ground from rebellions. If you're strong enough you can marry the queen and intervene, but it's not neccesary. 

Link to comment
On 1/19/2023 at 9:25 PM, Umgath said:

Why trait "Contubernalis" gives +100% Fertility but at the same time gives "Can't have children"? What is the idea behind that?

On 1/20/2023 at 4:15 AM, Randah said:

I removed the infertility then had it add_trait fecund and pure_blooded. Then I call regula_rank_up on both physical and beauty traits, 50% for one step 50% for two steps (simply lifted code straight from mutare event). In theory this creates a breeder, but haven't used in practice yet. I wonder if maybe there is a way to add them as knights/champions while leaving them flagged incapable for other actions? Low martial skill but give a prowess bonus? Won't pursue it unless the breeder change isn't enough on its own to warrant use.

A concept I had was add this as an option to claim orba in the form of "Ascension". They are despondent and wish to be claimed by the Keeper. Debating if that is sensible and whether it should entail some cost or penalty. If you are just swapping to a new heir you won't have a fat stack of piety, most likely. Maybe turn this into a 500 piety cost way to claim an orba and revoke their titles? Just to smooth over a transition?

 

I think Contubernalis should not be able to have children, once you lose your "soul" I think that you would be unable to "create life" as it were. Also they are immortal so it would be a headache managing kids etc.

I've made changes to the trait to give them a boost to diplomacy and prowess, making them useful as diplomacy courtiers or expendable champions/knights.

 

On 1/22/2023 at 12:04 AM, Randah said:

I rearranged the code a bit. The on_action is now a flat trigger for event 0001 with no conditions. The event chain starts with a sequence of hidden setups. Shouldn't need different events but this may help my understanding. One issue I had earlier was searching for domina and paelex within the event when the event title and description called them as variables.

Definitely hitting the limit of my comprehension. Earlier I had paelex being saved to scope properly. I broke it along the way. Now neither is being defined. And the event chain would trigger all the way through. Now it can't find regula_offering.1001. Says "not a valid event id". Odd, since I dont think I touched it. Thought I had braced something wrong but everything lines up, I think.

 

  Reveal hidden contents
### domina offers paelex 0001-2000

namespace = regula_offering

#check domina exists, save as domina
regula_offering.0001 = {
	hidden = yes
	
	trigger = {
		any_spouse = {			
			has_trait = domina
			}				
		}
		
	immediate = {
		### bug - unable to assign domina
		any_spouse = {
			limit = { has_trait = domina }
			save_scope_as = domina	
			}
			
		trigger_event = { 
			#delay = { days = { 15 45 } }
			id = regula_offering.0002		
			} 
		}
	}

#check for non-pregnant paelex, save as paelex
regula_offering.0002 = {
	hidden = yes
	
	immediate= { ### bug - unable to assign paelex
		any_spouse = {
			limit = {
				has_trait = paelex
				NOT = { has_trait = pregnant }
					}
				save_scope_as = offering
				}
				
		trigger_event = {
			id = regula_offering.0003 #domina offers paelex
			}
		}
	}	

#display offering event. choose accept/decline
regula_offering.0003 = {
	type = character_event
	title = regula_offering.0003.t
	desc = regula_offering.0003.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}		
	
	#grant piety to the domina for fulfilling her role. give domina piety expenses? independent fascinare?
	immediate = {
		scope:domina = {
			add_piety = 50
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}
		scope:offering = {
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}	
			
		play_music_cue = "mx_cue_sacredrite"			
		}
		
	left_portrait = {
		character = scope:offering
		animation = ecstasy
		}
	
	right_portrait = {
		character = scope:domina
		animation = schadenfreude
		}
	
	
### accept. goal - hide option on high stress, except rakish, lustfull, sadistic.
		
	option = {
		name = regula_offering.0003.a 
		trigger_event = { id = regula_offering.1001 }
		}
		
### decline. insults dom/pae?

	option = {
		name = regula_offering.0003.d
		
		reverse_add_opinion = {
			target = scope:domina
			modifier = disappointed_opinion
			opinion = -25
			}
		reverse_add_opinion = {
			target = scope:offering
			modifier = disappointed_opinion
			opinion = -20
			}
		}
		
	after = {
		scope:domina = {
			remove_character_flag = { flag = is_naked }
			}
		}
	}

#action event? triggers IE?

### bug - cannot call .1001 from console or event. " regula_offering.1001 not a valid ID"
regula_offering.1001 = {

	type = character_event
	title = regula_offering.1001.t
	desc = regula_offering.1001.desc
	theme = seduction
	override_background = {
		event_background = regula_bedchamber
		}
	
	right_portrait = {
		character = scope:offering
		animation = flirtation
	}
	
	immediate = {
		scope:offering = {
			add_prestige = 150
			}
		root = {
			add_character_flag = {
				flag = is_naked
				days = 30
				}
			}
		}
		
	option = {
		name = regula_offering.1001.a
		
		### bug - falls back to default carn non-con scenes on occasion
		show_as_tooltip = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = root
				CHARACTER_2 = scope:offering
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
				}
			}
			
		carn_sex_scene_effect = {
			PLAYER = root
			TARGET = scope:offering
			STRESS_EFFECTS = yes
			DRAMA = yes
			}
		}
		
		### bug - is not returning clothes.
	after = {		
		root = {
			remove_character_flag = { flag = is_naked }
			}
		scope:offering = {
			remove_character_flag = { flag = is_naked }
				}
		
		}
	}

 


Oh, and I took the suggestion to make it a mod. No warranty expressed or implied. It does require manually changing filepath in .mod, I think.

iRegula.7z 2.28 kB · 5 downloads


Nice! I can have a look at this (along with the changes by @Umgath and @Polyonamoose and add this to the mod, are you okay with that?
I assume yes but its always good to ask ?, I'll credit everyone in as well.
 

On 1/22/2023 at 9:57 AM, Smock said:

Might be a visual error, but enacting famuli martial custom decision has a reverse requirement bug, where synkellos and above can't enact it, but a zelator can, despite the decision saying you have to be a synkellos or higher.

 

Edit: I've also noticed, if you use the Domitans Tribunal while you're not married, it makes the woman into a Domina as intended, but you don't marry them like you usually do with a paelex, forcing you to marry them matrilineally and allowing to you spam Dominas everywhere, is this intentional?

 

Edit+: If the above edit is not the intended result, I managed to copy shuffle around code to make it so that an unmarried Magister marries the resulting Domina, instead of staying unmarried and able to spam Domina's everywhere. Dunno how to do a patch mod, so I just modified the character interaction file of the mod proper. It's the event on line 1957 if looked at through notepad++.

Original

regula_make_paelex_interaction_effect = yes
			scope:recipient = {
				add_trait_force_tooltip = domina
			}
			scope:actor = {
				hidden_effect = {
					every_spouse = {
						remove_opinion = {
							modifier = polygamous_marriage_opinion
							target = scope:actor
						}
					}
				}
				trigger_event = {
					id = regula_paelex_event.2000
				}
			}

Modified

regula_make_paelex_interaction_effect = yes
			scope:recipient = {
				add_trait_force_tooltip = domina
			}
			scope:actor = {
			    marry = scope:recipient				
				hidden_effect = {
					every_spouse = {
						remove_opinion = {
							modifier = polygamous_marriage_opinion
							target = scope:actor
						}
					}
				}
				trigger_event = {
					id = regula_paelex_event.2000
				}
			}

 

Not too sure if this causes errors, since I don't really code, I just guessed at what would have the effect that I wanted and got the result.


I've fixed the Famuli martial Custom bug, turns out the trait in the is_valid part was very wrong.
I've looked at the Domitans code and I think you are right, as that part of the if statement is for when the player is unmarried, so they should marry the women being dominated (making her a Domina) then marry her. Looking at the rest of the code though it looks like it needs refactoring, if only to make it easier to understand and more concise.
 

On 1/22/2023 at 6:30 PM, Polyonamoose said:

@ban10

 

I've been tinkering under the hood a bit, some changes I thought I'd pass on (any word on setting up a gitlab?)

 

  • Regula_maintenance_on_actions issues quarterly_playable_pulse events for consorts only work if consorts are playble this affects :
    • regula_orba_event.0001 #Orba
      • This is fine just to set to a yearly pulse, although one could consider an on_action to cover divorces/etc. should not modify vanilla events for compat, obv
    • regula_paelex_event.0996 #domina/paelex updating
      • I fixed this by having the event fire on only the magister and iterating through spouses to update. Again, on_actions might be smart so that this doesn't only happen every 3mo
    • regula_paelex_event.0997 #HOF
      • Honestly not sure how to handle this one. HoF handling is hackish and fixing this might actaully break things like having a spiritual HoF. I'm intending to mess around with the religious/doctrinal components a lot anyway. Can move to yearly, but the whole thing needs looked at.

 

  • Most regula holy sites lack temple slots or special buildings. This can be partly rectified, depending on what kind of theme you want, by having them usurp existing holy sites (e.g., Canterbury, Jorvik, Iona, and Armagh in the new region), but we can also just add our own by modding the holy-site activation scripts to include the following
    • 		every_religion_global = {
      			limit = {
      				is_in_family = rf_regula
      			}
      			every_faith = {
      				every_holy_site = {
      					limit = {
      						title_province = {
      							has_special_building_slot = no
      						}
      					}
      					title_province = {
      						add_special_building_slot = holy_site_other_grand_temple_01
      					}
      				}
      			}
      		}

 

Otherwise, I'm mostly tinkering with oversights and compatibility. Want to see if I can rip out all of the hardcoded gender (allow M- or F-dom, etc.) so that if anyone wants to write more diverse content they can. It doesn't seem too hard to implement at present.

 


Good stuff! Really glad that what started as just my personal edits revived some interest in the mod.
I'm going to be busy for a while but I might try and look at setting up a git repo. Could also maybe make a new thread on Loverslab so that I can post updates onto the main thread.

Finally, an update
 

0.101
By Ban10
 
Fixes
    - Refactor some Portrait modifiers (Charmed portraits)
 
    - Fix Martial Custom decision, had incorrect is_valid statement for Magister rank
 
    - Fix for unmarried Magister dominating a Mulsa, now you marry your target and make her your Domina
 
Changes
    - Edit Servitude faction AI weights, should incline AI to join Servitude faction a bit more
 
    - Nerf Magistri Submission, both its bad and good effects. Was a bit to easy to reach 100% stress reduction which basically removed it as a mechanic.
 
    - Modify Devoted traits (Mulsa/Paelex/Domina), Stats are generally more varied and a bit better.
 
    - Contubernalis Changes:
        - Contubernalis now have + 15 to diplomacy and prowess, making them useful as diplomacy courtiers or throwaway champions/knights. Build an army of thralls and send them to battle or keep them as slaves in your court, the choice is yours.
        - When turning someone into a Contubernalis, it will now remove ALL of their traits, give them lustful,zealous and humble, make them comely and heal them. I think this ties neatly into the idea that they lost their soul/memories and have become husks of their former self.
        - Add a flag to them that makes them unable to leave your court.
        - Change opinion modifers of turning someone into a Contubernalis (their family). Its now permenant and though not as bad as the murder opinion modifer, is pretty close.
 
    - Merge Domitans with Mutare Corpus, now triggers the same "boost" effects.
 
    - Mutare corpus now has the particpant wear blindfolds (I noticed someone tried to code this for the Domitans but coudnt get it to work)
 
    - Orgy start now heals a single disease from each participant on start, not just lovers/great pox
 
    - Magistri Submission AI war chance is now the same as Pacifist (-75%). My Vassals are still very bloodthirsty though :(
 
Features
    - Fascinare important action notification. Lets you know if any of your direct vassals (that have a county title or greater) can be charmed (>16 years old and female).


Regula_Magistri_git.zipRegula_Magistri.zip
Link to comment
54 minutes ago, ban10 said:

 

Nice! I can have a look at this (along with the changes by @Umgath and @Polyonamoose and add this to the mod, are you okay with that?
I assume yes but its always good to ask ?, I'll credit everyone in as well.

 

 

Please do. I wouldn't have gotten as far as I did without their help. I can somewhat figure out the logic of what I'm looking at but thats far from understanding how to properly get something working from scratch.

I left a few notes in comments on ideas to create further events. Just something to make it seem like the world/cult is doing something on its own. Like having characters undertake pilgrimages to you as the head of faith. Then giving the head options like discount fascinare, recruitment (cost prestige), proselytize and help convert their home realm, induce or empower a subordination faction from another realm (cost gold). I was thinking have men do it as well and ask for someone in your courts hand in marriage - or something.

Bigger ideas than I have coding chops for. But as the idea hits I can at least get a building block going.


 

Quote

        - Add a flag to them that makes them unable to leave your court.


Wait, if thats a thing why are my slaves escaping to the other side of the world damnit.

Link to comment

Doesn't seem high on the list, but it would be nice for the newer guys if the Postedas action had the red ! and the reason why it's greyed out, I think the code said the guy who did it couldn't figure it out, but maybe someone here could give it a shot.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use