PaulBommel7 Posted March 15, 2021 Posted March 15, 2021 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 ?
Mange2020 Posted March 15, 2021 Posted March 15, 2021 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 } }
PaulBommel7 Posted March 15, 2021 Author Posted March 15, 2021 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)
Mange2020 Posted March 16, 2021 Posted March 16, 2021 Hmm don't know, I always just check the error log and that will give you an idea of where to start.
PaulBommel7 Posted March 16, 2021 Author Posted March 16, 2021 I've already checked the error log but it doesn't give me a clue. Really, at the moment it feels like the game is laughing at me ^^
M4rocks Posted March 16, 2021 Posted March 16, 2021 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
PaulBommel7 Posted March 16, 2021 Author Posted March 16, 2021 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?
bunt776 Posted March 16, 2021 Posted March 16, 2021 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?
PaulBommel7 Posted March 16, 2021 Author Posted March 16, 2021 Yes, the event can be triggered with console and is UTF-8. It's like it doesn't work, just because it doesn't want to ...
PaulBommel7 Posted March 16, 2021 Author Posted March 16, 2021 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?
Mange2020 Posted March 16, 2021 Posted March 16, 2021 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.
Mange2020 Posted March 16, 2021 Posted March 16, 2021 on_primae_noctis = { trigger = { scope:spouse = { is_female = yes is_ai = yes } } effect = { scope:spouse = { primae_noctis_ai_effect = yes } } }
PaulBommel7 Posted March 16, 2021 Author Posted March 16, 2021 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 ?
M4rocks Posted March 16, 2021 Posted March 16, 2021 Ok, I don't know if you fixed it but here are the INFO files that you'll have to look at; _on_actions.info and the scope file wherever it is
Metzelnator Posted March 16, 2021 Posted March 16, 2021 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.
PaulBommel7 Posted March 17, 2021 Author Posted March 17, 2021 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
Mange2020 Posted March 17, 2021 Posted March 17, 2021 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.
PaulBommel7 Posted March 17, 2021 Author Posted March 17, 2021 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.
Metzelnator Posted March 19, 2021 Posted March 19, 2021 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...
Mange2020 Posted March 20, 2021 Posted March 20, 2021 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.