Jump to content

Modding question: On_marriage event won't start


PaulBommel7

Recommended Posts

Posted

Hello everyone!

 

I'm trying to make a Primae-Noctis event but I don't get it start.

 

I've tried both: start an event or an effect with on_marriage, but it doesn't work. This is my code:

 

on_marriage = {
    trigger = { 
		is_female = yes
		is_ai = yes 
    }
    effect = { primae_noctis_ai_effect = yes }
}

I have a made wedding night event which starts fine with on_action. Also the event works fine if I start it with console command.

 

This is the code of the effect:

primae_noctis_ai_effect = {
	save_scope_as = bride
	
	random_liege_or_above = {
		limit = {
			is_male = yes
			is_alive = yes
		}
		trigger_event = ft_primae_noctis.0100
	}
}

Can someone tell me, what I am doing wrong? I try it for days ?

Posted
2 hours ago, PaulBommel7 said:

Hello everyone!

 

I'm trying to make a Primae-Noctis event but I don't get it start.

 

I've tried both: start an event or an effect with on_marriage, but it doesn't work. This is my code:

 


on_marriage = {
    trigger = { 
		is_female = yes
		is_ai = yes 
    }
    effect = { primae_noctis_ai_effect = yes }
}

I have a made wedding night event which starts fine with on_action. Also the event works fine if I start it with console command.

 

This is the code of the effect:


primae_noctis_ai_effect = {
	save_scope_as = bride
	
	random_liege_or_above = {
		limit = {
			is_male = yes
			is_alive = yes
		}
		trigger_event = ft_primae_noctis.0100
	}
}

Can someone tell me, what I am doing wrong? I try it for days ?

The game won't let you use on_actions like that. There is some wierdness about certain things overwriting and other things not overwriting. It doesn't let you add triggers and effects into existing on_actions. But you can nest other on_actions in existing on actions without affecting the rest of it.

try this 

on_marriage = {

    on_actions = { 
            on_primae_noctis
            }
        }

 

on_primae_noctis = {

    trigger = { 
        is_female = yes
        is_ai = yes 
    }
    effect = { primae_noctis_ai_effect = yes }
}

Posted

Thanks for your answer! Sadly it is still not working :(

 

What I wonder is, I already have an event that works fine at:

on_marriage = {
	events = {
		delay = { days = { 3 5 } }
		ft_wedding_night.0001
	}
}

Now I've done the same, but it won't work … (I know, I posted above a code for an effect not an event. I tried the event in first place but it doesn't worked, so I tried it with an effect)

Posted
18 hours ago, Mange2020 said:

The game won't let you use on_actions like that. There is some wierdness about certain things overwriting and other things not overwriting. It doesn't let you add triggers and effects into existing on_actions. But you can nest other on_actions in existing on actions without affecting the rest of it.

try this 

on_marriage = {

    on_actions = { 
            on_primae_noctis
            }
        }

 

on_primae_noctis = {

    trigger = { 
        is_female = yes
        is_ai = yes 
    }
    effect = { primae_noctis_ai_effect = yes }
}

remove the on_actions (or remove the S its just on_action

Posted

Still no :( And I can't find anything about it in the error log.

 

I've put the code in a new file in the common/on_action folder. Should the code be on another position?

Posted
1 hour ago, PaulBommel7 said:

Still no :( And I can't find anything about it in the error log.

 

I've put the code in a new file in the common/on_action folder. Should the code be on another position?

Did you check if the files are UTF-8 with BOM?

 

Can the event be triggered ingame with the console?

Posted

Okay, now this is weird: After the patch I arranged a matrilineal marriage for one of my courtirs – and finally it worked! But why only matrilineal?

Posted

Ohhhh of course. From the game code for on_marriage.

# Characters getting married
# root = Major partner of the marriage
# scope:spouse = Minor partner of the marriage

Your trigger isn't properly scoped. on_marriage is only fired for the primary partner. So when you don't specifically set a scope it checks the root. So in a patrilineal marriage root is the male character, which means is_female returns false. 

Posted

on_primae_noctis = {

    trigger = { 
        scope:spouse = { 
                        
is_female = yes 
                        is_ai = yes 
        }
    }
    effect = { scope:spouse = { primae_noctis_ai_effect = yes } }
}

Posted

OMG you are right! Now everything makes sense, thanks a lot! So I just have to make opening effects (male & female) and my little event finally will work ?

Posted

Are you working on this mod on github? I had a plan for a similar mod some time back and ran into the scoping issues (I had a larger tree to decide how the people were related to the liege) and tried to implement a few special things for close family and how people react as in not invoking your power vs moral decision. At some stage I just got annoyed and gave up.

Attached the draft of my plan as a picture. If you want some support on this, I am sure I can get back into the coding game and start writing one or two events.

prima_map.png

Posted

Oh wow, that are nice ideas for the event!

 

At the moment I'm just working for myself, not on github, because I don't work in English.

 

My event is at the moment smaller than yours, but I want to add stuff time by time.

 

So far I have:

 

Your vassal wants to marry:

- Primae Noctis

- marriage tax instead

- I hate this tradition

 

- Primae Noctis:

- Sex (different text if she's still a virgin*)

- Let my heir do the work (if he's old enough)

 

- Marriage tax:

- She pays

- Her husband pays

- None of them can pay, so she comes for the PN on herself

- No answer

 

- No answer:

- I pay a visit with my guards

- I don't have time for this

 

- I visit her & husband:

- I take twice the tax forcefully

- I rape her

- I let the guards rape her

- (if bi-/homosexual) her husband offers himself instead of his wife

 

*I've made a virginity mod with events for the wedding night and a scripted effect, that I can add to other mods' sex effects. And it still works with the new patch, yay! But still: not in English :(

Posted

How did you do the virginity system? I was considering something of the sort using variable lists in a mod I'm working on to replace the monthly fertility check with a scheme that pulls up sex events but decided to leave it for now until I can be sure the thing works without slowing down the game too much.

Posted

I made 2 traits, 1 for virginity lost before marriage (no virgin trait) and 1 for virginity lost in marriage (good virgin trait). So every women without trait is a virgin.

 

I have 2 different effects for sex-events: 1 normal, which checks if she's still a virgin, if yes, she gets the no virgin trait. And one effect only for my wedding night event, where she can get the good virgin trait. At the moment my game isn't slow, but I have good hardware, so I don't know if this works for everyone. 

Posted

From your user name I would guess that we have the same first language (German), so if you need a translator I am also capable of helping. There is definitely interest in the community in such a mod, so just send me a quick pm if you feel like sharing it (also I am interested in how you actually set up the events). - There goes my plan to rest CK3 and finally actually finish RDR 2...

Posted
On 3/17/2021 at 1:15 PM, PaulBommel7 said:

I made 2 traits, 1 for virginity lost before marriage (no virgin trait) and 1 for virginity lost in marriage (good virgin trait). So every women without trait is a virgin.

 

I have 2 different effects for sex-events: 1 normal, which checks if she's still a virgin, if yes, she gets the no virgin trait. And one effect only for my wedding night event, where she can get the good virgin trait. At the moment my game isn't slow, but I have good hardware, so I don't know if this works for everyone. 

That shouldn't be too many calculations. I have a lot more calculations in my mod and its fine. I started running into trouble when I accidentally nested an every_living_character inside another every_living_character. So every living character was checking a value from every living character lol.

I'm thinking about trying to set up a variable list. Might be fun to have a list of sexual conquests like the kill list now. Problem is I have a lot more plans than I have time to code haha.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...