Dev diary 106 - Back in the Saddle
Work has started up again -- it didn't completely stop as I found some assorted smaller things that were possible to fix in about as much time as it would have taken to make a "Fix later!" note, but still -- and the initial focus is on setting up some "infrastructure" that will be very useful in the future, both in the 14.2.0 update and in general. Note that this will be a fairly technical dev diary because of this.
Relationship scripted_effects:
As you might know if you've got some familiarity with the CK2 scripting language, friends/lovers/rivals are set up/removed with commands like "add_friend = <new friend>" and "remove_lover = <former lover>", which do hardcoded things. You might also know there's something known as an on_action, e.g. on_new_holder, which fires certain effects or events whenever the on_action happens (e.g. "If k_france is West Francia and a non-Karling gets the title, rename it to France").
Unfortunately, there are no such commands related to friends/lovers/rivals, which means that if something is supposed to happen whenever you get or lose one of those you cannot easily hook it in everywhere. This is annoying, and since "add_/remove_lover" use definitely needed to be reviewed as part of 14.2.0 we now have scripted_effects set up to handle relationship changes so that we can hook in various things; for example, vanilla has a "Budding Romance" modifier that it doesn't really bother to clean up if two characters definitely aren't pursuing any kind of romance any longer, which we now can clean up in our effects.
The scripted_effects related to adding friends have been hooked in already, and removing those and adding/removing rivals is next on my list, but the love-related ones will not be hooked in for a while due to the next item on the agenda for this dev diary.
Lovers and related topics:
As mentioned back in Dev diary 95, we have added separate traits for tracking romantic and sexual attraction, and this means we'll need to handle the topic of lovers differently than vanilla does... which probably is a good thing, because even ignoring that aspect vanilla's handling is pretty flawed:
- Rivals can become lovers while remaining rivals, and lovers can become rivals without ending the lover relationship. It might not be entirely unthinkable that characters that really don't like each other still would be fine with sleeping with each other even without societal pressure (e.g. marriage and an expectation of children), but from a scripting perspective it gets very messy because e.g. you can't assume that a lover would be willing to die for their lover because they like them or that a rival looking for dirt happily would expose any affair of their rival because it'll not hurt them.
- With only a small number of exceptions, vanilla makes no distinction between two characters falling in love and those two characters becoming lovers; there's basically no "We have confessed our love for each other, but we respect each other's partners too much to contemplate sleeping together", basically no "Yeah, we're having fun in bed every now and then, but both of us know it's nothing serious", and so forth. Society, religious authorities, relatives, and specific individuals can -- and could -- definitely be conflating the two, but it's far from ideal.
- Lover relationships are bidirectional. Obviously, that makes sense when it comes to characters sleeping together -- no matter the specifics of what they might be getting up to, both are involved in the activities in some manner -- but it means that the characters have the same feelings for each other (outside any extra modifiers), as opposed to one being rather more in love than the other.
- With only a few exceptions, characters are either deeply in love or not in love at all (not counting any "Am I in love with X?" choice events). There's little in the way of romance slowly growing or fading over time.
We'll be approaching things differently in 14.2.0:
- Rivalries and Lovers/love will be treated as opposites script-side; thanks to the aforementioned scripted_effects we're adding, this will work out very well.
- We'll remove nearly all the opinion boost from the "Lover" opinion/relationship -- a little will remain, because presumably the relationship is seen as a positive thing by the two characters -- and set up a separate system for love. We cannot add a new space in the character window for "Characters you love/that love you", but we'll add scripted_triggers as needed (e.g. is_romantically_involved_with_root_trigger = yes as a romantic (and not-guaranteed-lover) counterpart to is_friend = ROOT) and hook them in so that things work as intended everywhere (and the player will probably get some kind of "List my loves" self-targeted decision).
This will greatly help with the modelling of both asexual characters with no sex_interest trait that end up in a romantic relationship (as setting them up as lovers would mean that outside Celibacy/etc. the game would dictate that they very much were sleeping together, which outside a marriage/concubine relationship would be unwanted behaviour) and non-asexual but aromantic characters.
- While a Lover relationship will be treated as incompatible with a rivalry, it will generally not be considered sufficient on its own to make characters very self-sacrificing or completely opposed to scheming against you; that'll be for romantic love (and also friends).
- All events which can result in characters becoming lovers will be investigated to check whether they actually should just be starting some kind of romantic relationship (which over time might evolve); this will involve evaluating both the localisation and the context.
- Remaining lover/tumbling events (after the above) will generally be altered to be a modified version of the "Successiful Seduction; now what?" event. It will probably have at least four options -- 1) "It was just a one-time thing!" (just one tumble), 2) "Let's do this again!" (Lover relationship), 3) "I rather like you!" (Lover relationship plus initial/growing romance), and 4) "I love you!" (Lover relationship and full love); wording not final -- but might get a few trait/skill-specific adjustments (e.g. high Diplomacy will possibly unlock a gentler version of "No, this isn't happening again!").
There will be some checks on the availability -- e.g. a character that doesn't get romantic attraction towards the other's sex will not get the last two options, and a character already in love with their partner will also not get them because they're obviously superfluous -- and both parties will get a similar event and react to what the other went with -- e.g. if character A declares their everlasting love while character B decides that no, it was a one-time thing with no feelings attached, chances are character A will be less than happy -- and some events will possibly be a bit different due to the context, but generally speaking this will be the setup.
- Love will be handled in a unidirectional manner (though there will be some bidirectional checks as needed); you might be deeply in love with them, while they might still be unsure about their feelings or even feel somewhat hostile towards you. This will allow for characters to fall in love with characters that simply have an incompatible orientation with them without that being weird from the other direction, set up possibilities for one character to be taking advantage of the other's feelings for them or for them to attempt grand -- and possibly dangerous, in one way or another -- romantic gestures in order to make the other person finally notice them, and allow various other things that might be useful, whether in 14.2.0 or in the future.
- We will make better use of the "Budding Romance" opinion than vanilla did for handling not-quite-in-love-yet situations. Not all romantic feelings will grow into full love, but there will be some room for love to grow over time.
We will also make use of some things vanilla added but didn't exactly bother to use very much...
00_relation_triggers.txt:
Did you know vanilla has set up scripted_triggers like "potentially_interested_in_rivaling_root_trigger" and "possibly_romantically_interested_in_each_other_trigger"? Well, the vanilla devs sure didn't bother with them in many places, so maybe some of them didn't know about them.
These scripted_triggers certainly are not as thorough as they should be -- for example, the ones about possible "romantic interest" in vanilla terms (that'd be combined romantic and sexual interest in our terms) already checks for not being rivals (an indication that treating those as opposites isn't so odd, I'd say), it doesn't check for "minor" things like "Did they attempt to murder me?" that presumably should be blockers even if you somehow get them above the +45 opinion threshold (which sure isn't a requirement everywhere vanilla adds lovers...) -- but polishing them up (and adjusting things to work with our stuff) and hooking them into various things is certainly something we should do as part of our work to have more consistency when it comes to which characters end up as lovers (and the like).
There are also triggers in that file for rivals and friends; I currently think polishing them up a bit is a 14.2.0 goal, but that hooking them in where relevant -- again, vanilla didn't really bother with them -- will have to wait until 14.2.1.
Returning to the subject of the triggers related to lovers, there will of course also need to be triggers for stuff like "would_potentially_cheat_on_current_spouse_with_root_trigger" (name not final) since there is -- or at least should be -- a difference between finding someone hypothetically interesting under different circumstances and always being interested... which brings us to the next topic.
Adultery fallout:
We'll be reviewing adultery fallout, both as there might be cases where it should not be taken as poorly by the spouse (e.g. they have an incompatible orientation and are more upset over the perception of others than over you rather sleeping with someone else) and as there might be others that have a strong opinion (and should get imprisonment reasons/etc.) than the person cheated on, e.g. the reigning monarch if you sleep with the crown prince's wife or his son's wife. This has been mentioned in the past, but since it was relevant to the previous topic I thought it should be brought up again.
Regarding that CK3 announcement:
Finally, I think I need to take the opportunity to address the fact that CK3 today announced that they will be expanding the map much further east and cover areas such as
I will most definitely be paying attention to what they end up doing, seeing as I have some "small" amount of interest in the area. However, considering I still feel several hardcoded design decisions in CK3 are pretty terrible and that there are no indications that those are going anywhere, I wouldn't say the chances of me picking up CK3 has grown significantly, and the odds of me abandoning CK2 (and Tianxia) for CK3 just because they're adding the Far East are effectively zero. Still, I hope they do a good job so that the anti-"China" crowd doesn't feel vindicated, even if I suspect at least some design decisions will be very different from my tastes.
If they do end up doing something very nice in CK3, well, assuming it is feasible to do I think I shall engage in the sincerest form of flattery and attempt to add something similar to Tianxia (when time permits; it doesn't make sense to drop all other priorities).
That's all for today. Given that the focus in the near tearm will be on "infrastructure", I'm really not sure when the next dev diary will be posted as that might not be very interesting to write or read about, but maybe some tangential work will be done sooner rather than later.
Work has started up again -- it didn't completely stop as I found some assorted smaller things that were possible to fix in about as much time as it would have taken to make a "Fix later!" note, but still -- and the initial focus is on setting up some "infrastructure" that will be very useful in the future, both in the 14.2.0 update and in general. Note that this will be a fairly technical dev diary because of this.
Relationship scripted_effects:
As you might know if you've got some familiarity with the CK2 scripting language, friends/lovers/rivals are set up/removed with commands like "add_friend = <new friend>" and "remove_lover = <former lover>", which do hardcoded things. You might also know there's something known as an on_action, e.g. on_new_holder, which fires certain effects or events whenever the on_action happens (e.g. "If k_france is West Francia and a non-Karling gets the title, rename it to France").
Unfortunately, there are no such commands related to friends/lovers/rivals, which means that if something is supposed to happen whenever you get or lose one of those you cannot easily hook it in everywhere. This is annoying, and since "add_/remove_lover" use definitely needed to be reviewed as part of 14.2.0 we now have scripted_effects set up to handle relationship changes so that we can hook in various things; for example, vanilla has a "Budding Romance" modifier that it doesn't really bother to clean up if two characters definitely aren't pursuing any kind of romance any longer, which we now can clean up in our effects.
The scripted_effects related to adding friends have been hooked in already, and removing those and adding/removing rivals is next on my list, but the love-related ones will not be hooked in for a while due to the next item on the agenda for this dev diary.
Lovers and related topics:
As mentioned back in Dev diary 95, we have added separate traits for tracking romantic and sexual attraction, and this means we'll need to handle the topic of lovers differently than vanilla does... which probably is a good thing, because even ignoring that aspect vanilla's handling is pretty flawed:
- Rivals can become lovers while remaining rivals, and lovers can become rivals without ending the lover relationship. It might not be entirely unthinkable that characters that really don't like each other still would be fine with sleeping with each other even without societal pressure (e.g. marriage and an expectation of children), but from a scripting perspective it gets very messy because e.g. you can't assume that a lover would be willing to die for their lover because they like them or that a rival looking for dirt happily would expose any affair of their rival because it'll not hurt them.
- With only a small number of exceptions, vanilla makes no distinction between two characters falling in love and those two characters becoming lovers; there's basically no "We have confessed our love for each other, but we respect each other's partners too much to contemplate sleeping together", basically no "Yeah, we're having fun in bed every now and then, but both of us know it's nothing serious", and so forth. Society, religious authorities, relatives, and specific individuals can -- and could -- definitely be conflating the two, but it's far from ideal.
- Lover relationships are bidirectional. Obviously, that makes sense when it comes to characters sleeping together -- no matter the specifics of what they might be getting up to, both are involved in the activities in some manner -- but it means that the characters have the same feelings for each other (outside any extra modifiers), as opposed to one being rather more in love than the other.
- With only a few exceptions, characters are either deeply in love or not in love at all (not counting any "Am I in love with X?" choice events). There's little in the way of romance slowly growing or fading over time.
We'll be approaching things differently in 14.2.0:
- Rivalries and Lovers/love will be treated as opposites script-side; thanks to the aforementioned scripted_effects we're adding, this will work out very well.
- We'll remove nearly all the opinion boost from the "Lover" opinion/relationship -- a little will remain, because presumably the relationship is seen as a positive thing by the two characters -- and set up a separate system for love. We cannot add a new space in the character window for "Characters you love/that love you", but we'll add scripted_triggers as needed (e.g. is_romantically_involved_with_root_trigger = yes as a romantic (and not-guaranteed-lover) counterpart to is_friend = ROOT) and hook them in so that things work as intended everywhere (and the player will probably get some kind of "List my loves" self-targeted decision).
This will greatly help with the modelling of both asexual characters with no sex_interest trait that end up in a romantic relationship (as setting them up as lovers would mean that outside Celibacy/etc. the game would dictate that they very much were sleeping together, which outside a marriage/concubine relationship would be unwanted behaviour) and non-asexual but aromantic characters.
- While a Lover relationship will be treated as incompatible with a rivalry, it will generally not be considered sufficient on its own to make characters very self-sacrificing or completely opposed to scheming against you; that'll be for romantic love (and also friends).
- All events which can result in characters becoming lovers will be investigated to check whether they actually should just be starting some kind of romantic relationship (which over time might evolve); this will involve evaluating both the localisation and the context.
- Remaining lover/tumbling events (after the above) will generally be altered to be a modified version of the "Successiful Seduction; now what?" event. It will probably have at least four options -- 1) "It was just a one-time thing!" (just one tumble), 2) "Let's do this again!" (Lover relationship), 3) "I rather like you!" (Lover relationship plus initial/growing romance), and 4) "I love you!" (Lover relationship and full love); wording not final -- but might get a few trait/skill-specific adjustments (e.g. high Diplomacy will possibly unlock a gentler version of "No, this isn't happening again!").
There will be some checks on the availability -- e.g. a character that doesn't get romantic attraction towards the other's sex will not get the last two options, and a character already in love with their partner will also not get them because they're obviously superfluous -- and both parties will get a similar event and react to what the other went with -- e.g. if character A declares their everlasting love while character B decides that no, it was a one-time thing with no feelings attached, chances are character A will be less than happy -- and some events will possibly be a bit different due to the context, but generally speaking this will be the setup.
- Love will be handled in a unidirectional manner (though there will be some bidirectional checks as needed); you might be deeply in love with them, while they might still be unsure about their feelings or even feel somewhat hostile towards you. This will allow for characters to fall in love with characters that simply have an incompatible orientation with them without that being weird from the other direction, set up possibilities for one character to be taking advantage of the other's feelings for them or for them to attempt grand -- and possibly dangerous, in one way or another -- romantic gestures in order to make the other person finally notice them, and allow various other things that might be useful, whether in 14.2.0 or in the future.
- We will make better use of the "Budding Romance" opinion than vanilla did for handling not-quite-in-love-yet situations. Not all romantic feelings will grow into full love, but there will be some room for love to grow over time.
We will also make use of some things vanilla added but didn't exactly bother to use very much...
00_relation_triggers.txt:
Did you know vanilla has set up scripted_triggers like "potentially_interested_in_rivaling_root_trigger" and "possibly_romantically_interested_in_each_other_trigger"? Well, the vanilla devs sure didn't bother with them in many places, so maybe some of them didn't know about them.
These scripted_triggers certainly are not as thorough as they should be -- for example, the ones about possible "romantic interest" in vanilla terms (that'd be combined romantic and sexual interest in our terms) already checks for not being rivals (an indication that treating those as opposites isn't so odd, I'd say), it doesn't check for "minor" things like "Did they attempt to murder me?" that presumably should be blockers even if you somehow get them above the +45 opinion threshold (which sure isn't a requirement everywhere vanilla adds lovers...) -- but polishing them up (and adjusting things to work with our stuff) and hooking them into various things is certainly something we should do as part of our work to have more consistency when it comes to which characters end up as lovers (and the like).
There are also triggers in that file for rivals and friends; I currently think polishing them up a bit is a 14.2.0 goal, but that hooking them in where relevant -- again, vanilla didn't really bother with them -- will have to wait until 14.2.1.
Returning to the subject of the triggers related to lovers, there will of course also need to be triggers for stuff like "would_potentially_cheat_on_current_spouse_with_root_trigger" (name not final) since there is -- or at least should be -- a difference between finding someone hypothetically interesting under different circumstances and always being interested... which brings us to the next topic.
Adultery fallout:
We'll be reviewing adultery fallout, both as there might be cases where it should not be taken as poorly by the spouse (e.g. they have an incompatible orientation and are more upset over the perception of others than over you rather sleeping with someone else) and as there might be others that have a strong opinion (and should get imprisonment reasons/etc.) than the person cheated on, e.g. the reigning monarch if you sleep with the crown prince's wife or his son's wife. This has been mentioned in the past, but since it was relevant to the previous topic I thought it should be brought up again.
Regarding that CK3 announcement:
Finally, I think I need to take the opportunity to address the fact that CK3 today announced that they will be expanding the map much further east and cover areas such as
I will most definitely be paying attention to what they end up doing, seeing as I have some "small" amount of interest in the area. However, considering I still feel several hardcoded design decisions in CK3 are pretty terrible and that there are no indications that those are going anywhere, I wouldn't say the chances of me picking up CK3 has grown significantly, and the odds of me abandoning CK2 (and Tianxia) for CK3 just because they're adding the Far East are effectively zero. Still, I hope they do a good job so that the anti-"China" crowd doesn't feel vindicated, even if I suspect at least some design decisions will be very different from my tastes.
If they do end up doing something very nice in CK3, well, assuming it is feasible to do I think I shall engage in the sincerest form of flattery and attempt to add something similar to Tianxia (when time permits; it doesn't make sense to drop all other priorities).
That's all for today. Given that the focus in the near tearm will be on "infrastructure", I'm really not sure when the next dev diary will be posted as that might not be very interesting to write or read about, but maybe some tangential work will be done sooner rather than later.
- 7
- 2
- 2