irynfaery Posted November 12, 2024 Posted November 12, 2024 Hey all I'm very, very new to CK3 modding (as a creator)... I'm trying to work on my first ever mod, some semi-historically accurate sapphic angst. I need the events to trigger under a set of specific circumstances; that being that the player character is female, adult, has a male primary spouse, and is either homosexual or bisexual (WLW, basically). I'm really new to mod creation and I'm just bumbling my way through learning all of this, especially events - which is the main thing stumping me right now. I'm peeking at other code to get ideas / references, but I just really wanted to check that I'm on the right track with this (and if it's even possible?). This is the code I'm working on right now - trying to get it to only trigger on the above conditions. How far off am I? 😅 sapphic_aphroditeglitters.0045 = { #Glittering Aphrodite trigger = { gender = female is_adult = yes OR = { sexuality = homosexual sexuality = bisexual } primary_spouse = { gender = male } } Was also wondering if there was a way to space events out and make them non-repeatable to that particular character? Thanks y'all for any help, I'm so new at this and utterly hopeless.
Phaze Star Posted November 12, 2024 Posted November 12, 2024 8 hours ago, titaniumfaery said: This is the code I'm working on right now - trying to get it to only trigger on the above conditions. How far off am I? Looks to be fine, but the best way to find out is to test it. 8 hours ago, titaniumfaery said: Was also wondering if there was a way to space events out and make them non-repeatable to that particular character? An easy way would be to add a cooldown. This stops that character getting the event again until it is over, something like this: cooldown = { years = 100 } You can also use this for events you do want to repeat, but not back to back.
Lyskorie Posted November 12, 2024 Posted November 12, 2024 8 hours ago, titaniumfaery said: Hey all I'm very, very new to CK3 modding (as a creator)... I'm trying to work on my first ever mod, some semi-historically accurate sapphic angst. I need the events to trigger under a set of specific circumstances; that being that the player character is female, adult, has a male primary spouse, and is either homosexual or bisexual (WLW, basically). I'm really new to mod creation and I'm just bumbling my way through learning all of this, especially events - which is the main thing stumping me right now. I'm peeking at other code to get ideas / references, but I just really wanted to check that I'm on the right track with this (and if it's even possible?). This is the code I'm working on right now - trying to get it to only trigger on the above conditions. How far off am I? 😅 sapphic_aphroditeglitters.0045 = { #Glittering Aphrodite trigger = { gender = female is_adult = yes OR = { sexuality = homosexual sexuality = bisexual } primary_spouse = { gender = male } } Was also wondering if there was a way to space events out and make them non-repeatable to that particular character? Thanks y'all for any help, I'm so new at this and utterly hopeless. to check for sexuality, you would want to use "has_sexuality = homosexual" etc gender checks would be either "is_male" or "is_female" so you would want to use "is_male = yes" for checking gender of the primary spouse. the CK3 wiki has a good list of triggers and effects (though slightly outdated), you can try to crawl through vanilla implementation of events to see how things are done. re: spacing out: one way is to put a long cooldown, like what Phaze Star suggested. Another is to add a "has_character_flag = x" on the trigger block, and then fire a "add_character_flag = x" in the effect block when the event is fired, which will ensure the character will never get the event again until they die (or until something clears that character flag).
irynfaery Posted November 13, 2024 Author Posted November 13, 2024 Thanks so much for your help y'all! Back to the code mines I go 1
The Lord Posted November 13, 2024 Posted November 13, 2024 (edited) In case you want to check whether or not you understood Kieva correctly: The add_character_flag could also come in an option or an after block and the name of the flag is something you can freely choose (I just used had_sapphic_0045 as an example). You might also want to add an exists = primary_spouse to the trigger or change your primary_spouse = { to primary_spouse ?= {, otherwise the error log might complain (though it should still work even with it complaining). Worth noting, if you find yourself writing the same triggers over and over again for your individual events then it is often better to just group them together in the same on-action if feasible and write the conditions in said trigger. Saves you from having to write them for each and every individual event. And as a side note, you might want to consider joining Cheri's Discord server if you continue modding. You tend to get help there faster than over here on LoversLab. Edited November 13, 2024 by The Lord
irynfaery Posted November 14, 2024 Author Posted November 14, 2024 21 hours ago, The Lord said: In case you want to check whether or not you understood Kieva correctly: The add_character_flag could also come in an option or an after block and the name of the flag is something you can freely choose (I just used had_sapphic_0045 as an example). You might also want to add an exists = primary_spouse to the trigger or change your primary_spouse = { to primary_spouse ?= {, otherwise the error log might complain (though it should still work even with it complaining). Worth noting, if you find yourself writing the same triggers over and over again for your individual events then it is often better to just group them together in the same on-action if feasible and write the conditions in said trigger. Saves you from having to write them for each and every individual event. And as a side note, you might want to consider joining Cheri's Discord server if you continue modding. You tend to get help there faster than over here on LoversLab. Thank you so much, that's actually so helpful. I'm still wrapping my head around even just getting the basics to work (a lot of going in and out of the game to check for errors lol...). I'll try your suggestions out as well! I'll check out the Discord too, thanks for the rec!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now