Crusader Kings III

Crusader Kings III

A New Sensible Family 3
Jashkar 8 Dec, 2023 @ 8:59am
Suggestions
Hi Rylock!
Your mod is really amazing, but I have a couple of suggestions:

a) Would be possible (maybe enabling/disabling it with a game rule) to add an interaction which would allow to create (or alter) a sensible family even for NPCs?

b) By looking into the code I seem to understand that the parents' (or ancestors) DNA is random...wouldn't be possible to tweak it in the following (a bit more complex) way?

1) Generate a clone of the son or daughter (which will be one parent).
2) Generate a random character from an appropriate culture.
3) Produce a son or daughter from those parents and transfer the DNA to the parent.

This would leverage the game in-built gene-mixing mechanics and produce random parents (or ancestors) which have a much closer resemblance to the character. Obviously the suggestion to "transfer the DNA" instead of using directly the created character would minimize any risk of messing with the family tree.

c) Would be possible to pick up the son's active and inactive genetic traits and "attach" them to the parents (i.e., to both if are active or to one of them if are inactive*?)? ...and maybe temporarily tracking which parent got the genetic trait?

d) Would be possible to flag parents to be from mixed culture (i.e., a born from a French and a Norman parent?) or from a different culture (i.e., a Norman born from a Norse father)? This would be especially interesting if the more complex DNA generation of point "b" was introduced, because, for example, you could have a Greek parent that look more Norse because was the bastard son of a Varangian guard and a Byzantine noble woman! 🤔

e) Would be possible to tweak the personality of children to take in account the personality of parents and siblings...as in the "Improved Personality Formation System"?

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2488151099&searchtext=child+personality

f) Would be possible to set the resemblance of a bastard's parent to an existing in-game character? Assuming that you'd consider the "b" option, this would involve the generation of a DNA from the "similar character" and the son or daughter...which would obviously lead to some randomness in the appearance, but retain that "resemblance" element!

g) Would be possible to add appropriate memories to the family member in a similar way as happens with "Crusaders Adoption Agency"?

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2839721206&searchtext=crusader+kings+3+adoption

h) Would be possible to set specific relationships between family members (i.e., a best friend relationship with a brother to simulate a very close bond or a rival or even nemesis with one's father to represent an especially conflicted relationship)? 🤔

I know these are a lot of suggestions, but while your mod is already mind-blowing, I feel these additions would make it even more incredible!

P.S.: If both parents are generated from a cloned son or daughter DNA, they are bound to have a certain resemblance to each other, which would be probably reduced by the random parent from the selected culture...however, they would have still have a greater resemblance than if they were random and a lesser resemblance than a clone... 🤔


* = Based on the trait inheritance mechanics, the simplest way to attach the son's or daughter's active and inactive traits would be the following:
- Assume that both have the active trait if the son or daughter have it as active (80% inheritance chance).
- Assume that one has an active trait and the other has it inactive if the the son or daughter have it as inactive (100% inheritance chance).
Last edited by Jashkar; 8 Dec, 2023 @ 9:06am
< >
Showing 1-15 of 28 comments
Rylock  [developer] 9 Dec, 2023 @ 7:41am 
Originally posted by Jashkar:
a) Would be possible (maybe enabling/disabling it with a game rule) to add an interaction which would allow to create (or alter) a sensible family even for NPCs?

Not sure what you mean. You want the NPC's to create families on their own? Or you want to create a family for someone else? Either could, I suppose, technically be done... but the former seems like it'd be adding a lot of extra characters for no real benefit and I'm not sure why the latter would be useful.

b) By looking into the code I seem to understand that the parents' (or ancestors) DNA is random...wouldn't be possible to tweak it in the following (a bit more complex) way?

1) Generate a clone of the son or daughter (which will be one parent).
2) Generate a random character from an appropriate culture.
3) Produce a son or daughter from those parents and transfer the DNA to the parent.

This would leverage the game in-built gene-mixing mechanics and produce random parents (or ancestors) which have a much closer resemblance to the character. Obviously the suggestion to "transfer the DNA" instead of using directly the created character would minimize any risk of messing with the family tree.

No, I'm afraid that can't be done. You can't create "fake" parents for a character solely to grab their DNA. Once you assign a parent, you can only assign another character as parent... when you discard a sibling, for instance, the only way I can remove them from their current family connections is to assign the dummy male or female characters as their replacement parent.

So we'd be making real grandparents, and suddenly that's going to open up a whole kettle of fish to determine what they should look like and whose dynasty they should have (if you want to maintain a dynastic tree your character will now need to join a grandparent's dynasty instead of a parent's). Not to mention they'll be really old characters who I could instantly kill off, but they'll have died on day 1 just like your father. You can't make someone die in the past.

c) Would be possible to pick up the son's active and inactive genetic traits and "attach" them to the parents (i.e., to both if are active or to one of them if are inactive*?)? ...and maybe temporarily tracking which parent got the genetic trait?

That's do-able, yes. Though it does get complicated if we're dealing with multiple traits and I then let the player step in and change their genetic traits (which is one of the options). I can't let the player pick and choose which to keep or lose... I only have so many options in an event, so they're all grouped together as one "category".

d) Would be possible to flag parents to be from mixed culture (i.e., a born from a French and a Norman parent?) or from a different culture (i.e., a Norman born from a Norse father)? This would be especially interesting if the more complex DNA generation of point "b" was introduced, because, for example, you could have a Greek parent that look more Norse because was the bastard son of a Varangian guard and a Byzantine noble woman! 🤔

Again, not really, not without creating the grandparents.

e) Would be possible to tweak the personality of children to take in account the personality of parents and siblings...as in the "Improved Personality Formation System"?

Yes, but considering you can alter the personality traits individually, you're already free to set them to whatever you prefer.

f) Would be possible to set the resemblance of a bastard's parent to an existing in-game character? Assuming that you'd consider the "b" option, this would involve the generation of a DNA from the "similar character" and the son or daughter...which would obviously lead to some randomness in the appearance, but retain that "resemblance" element!

I assume you mean the "other" parent of the bastard - the one that isn't your PC's parent? Technically I could set them to resemble another character... but who? The bastard is already generated as a mix of your own parent (who you can make look like you) and you can discard the generated "other" parent until you get one that looks like you want, if that's important, so I'm really not sure what this would help accomplish.

g) Would be possible to add appropriate memories to the family member in a similar way as happens with "Crusaders Adoption Agency"?

You'll need to tell me what that mod does. Memories can be added, yes, but like with deaths you can't add a memory in the past. So any memories added would all be added on the same current date.

h) Would be possible to set specific relationships between family members (i.e., a best friend relationship with a brother to simulate a very close bond or a rival or even nemesis with one's father to represent an especially conflicted relationship)? 🤔

Hmm. Yes, that could be done. It'd require a new event, like a follow-up once they've been created, something that asks "what's your relationship with this character?" Not sure how much it adds, but I might consider it.
Last edited by Rylock; 9 Dec, 2023 @ 7:58am
Jashkar 10 Dec, 2023 @ 4:23pm 
Originally posted by Rylock:
Not sure what you mean. You want the NPC's to create families on their own? Or you want to create a family for someone else? Either could, I suppose, technically be done... but the former seems like it'd be adding a lot of extra characters for no real benefit and I'm not sure why the latter would be useful.

I mean like adding an interaction "Reflect on his family" (maybe enabling/disabling it with a game rule) which could be used by the player on NPCs (in essence, the focus character instead of the player, would be the "character X" selected with the interaction)...well...no...I do not mean to allow the AI to be able to use it...I mean to be able to use your events to create an interesting family for a NPC for role-playing purpose...

I mean...the game itself tends to create families for your courtiers, but would be interesting to be create interesting narratives for your important people like your councillors or other important members of your court!

( I know it would create a lot of NPC, but would allow to have a more interesting court too! 😊)

No, I'm afraid that can't be done. You can't create "fake" parents for a character solely to grab their DNA. Once you assign a parent, you can only assign another character as parent... when you discard a sibling, for instance, the only way I can remove them from their current family connections is to assign the dummy male or female characters as their replacement parent.

So we'd be making real grandparents, and suddenly that's going to open up a whole kettle of fish to determine what they should look like and whose dynasty they should have (if you want to maintain a dynastic tree your character will now need to join a grandparent's dynasty instead of a parent's). Not to mention they'll be really old characters who I could instantly kill off, but they'll have died on day 1 just like your father. You can't make someone die in the past.

Mmmmh...I understand!
So the only way to tweak appearance like I suggested above would be to create a "parallel"
family which is only used to generate appearances... 🤔...and then transfer the appearance to the parent or other family member...

It's ok...I get your point that would become complicated! 🤔
Moreover...well...since one can "pause" the reflection on one's family, I think this bit isn't really that much necessary... 🤔

Thanks for the useful clarification anyway! :)


That's do-able, yes. Though it does get complicated if we're dealing with multiple traits and I then let the player step in and change their genetic traits (which is one of the options). I can't let the player pick and choose which to keep or lose... I only have so many options in an event, so they're all grouped together as one "category".

If you could that would be really amazing! :)


Again, not really, not without creating the grandparents.

I understand...well...no problem! :)

Yes, but considering you can alter the personality traits individually, you're already free to set them to whatever you prefer.

Mmmh...you are right! 🤔

I assume you mean the "other" parent of the bastard - the one that isn't your PC's parent? Technically I could set them to resemble another character... but who? The bastard is already generated as a mix of your own parent (who you can make look like you) and you can discard the generated "other" parent until you get one that looks like you want, if that's important, so I'm really not sure what this would help accomplish.

I mean...like adding an interaction to "pin" (and "unpin") NPC whose appearance you like (maybe with 10 slots) and you could make the other parent a "doppelganger" of one of the chosen references...maybe allowing to choose with a line like "his other parent resembled someone famous" or something like that... 🤔


You'll need to tell me what that mod does. Memories can be added, yes, but like with deaths you can't add a memory in the past. So any memories added would all be added on the same current date.

Oh...then I get...can't be done...
I was hoping father and mother could remember to have given birth to the character and his siblings...but yes...if has to be the current date wouldn't be useful... 🤔


[quoteHmm. Yes, that could be done. It'd require a new event, like a follow-up once they've been created, something that asks "what's your relationship with this character?" Not sure how much it adds, but I might consider it. [/quote]

That would be really nice...

Well...it might not add much mechanically, but would be very interesting as role-playing element! 🤔
Last edited by Jashkar; 10 Dec, 2023 @ 4:24pm
Jashkar 14 Dec, 2023 @ 7:06am 
Hi Rylock,
I have just a tiny minor request...it is something that is very much done in Stellaris modding, but doesn't seem to be much done in CK3 and is this:

Could you add a global flag on start-up to allow other mods to "see" that "A New Sensible Family 3" is loaded? Like I don't know..."a_sensible_family_3_mod_is_loaded"?

Literally...only takes adding a global flag on game start-up, but would greatly help in improving other mod's compatibility... 🤔
Rylock  [developer] 14 Dec, 2023 @ 12:47pm 
If another mod asked me to, sure. I'm not sure I see the need for ANSF3, however, because what would another mod need to check for? The features here are entirely self-contained.
Jashkar 14 Dec, 2023 @ 4:14pm 
Emmmh...you have a point! 🤔

The fact is this...what I'd really like would be to do a tabula rasa of my court (i.e., kicking out every courtier, revoking titles and banishing vassals, etc...) and then being able to create courtiers and their family according to a narrative that I have affected (as your mod allows to do with the player's family)...while it is not very realistic (in a real middle ages context even KINGS and EMPERORS had to deal with people they just "found" there), I'd really like to have a customized court composed by family which I kind of "shaped"!

My experiments with modding are very basic...but I have managed to understand that events could be easily triggered for different scopes through interactions...so I think (but, given its complexity, I am afraid isn't THAT EASY...) that if you were to add an interaction that is available when selecting non-player characters (maybe allowing to disable/enable with a game rule or using another game rule to restrict it to your courtiers, vassals or expand it to anyone) that might allow to build families also for NPCs*... 🤔 ...please...can I hope for that new feature? 😓

This is the last weird request, PROMISED!!! 😜

*= I suspect that the main issue with that would be the localization, which, I guess, probably is conceived to address the player...and to make things perfect would need to be adjusted to switch from the player's family to the NPC's family.
Rylock  [developer] 14 Dec, 2023 @ 8:09pm 
Well... what you suggest can, conceivably, be done. The amount of effort is far from trivial, however, and I have a hard time picturing anyone else wanting to use this particular system you suggest.

So, and I say this gently, you probably want to consider learning how to mod in order to get the effect you need for your roleplaying scenario.
Jashkar 15 Dec, 2023 @ 12:53am 
Well, Rylock...

If you could add this feature (while obviously get would not be as easy as I was making it) would be great (and obviously MUCH PREFERRED), but well...now you probably see why I felt adding a global flag to tell other mods that your mod is active would be useful...sure...I totally agree that your mod is self-contained within the scope you have set for it (and frankly, given one could just pause the reflection and then re-start it, my "appearance shifting" ideas could be implemented in a completely separated way...I mean...if I have just to generate characters to copy appearance, I could "cut corners"...and then my idea of "creating fathers and mothers from clones" gets simplified because well...I don't have really to manage relationships if I am just copying the appearance and the characters are just "blank states"*...), but some aspects that you rule out of the scope of your mod could leave some ground for sub-mods or to add features to other mods which would integrate your mod** (if they can tell it is loaded)!

Obviously I will admit, Rylock...I am trying my hand to modding, but I am not that skilled and I am super-lazy...so all my hopes were that I could manage to sway you into adding this much-desired feature! 😂

( However I don't seem to be succeeding in swaying you... 😭😭😭😭😭
I kind of get that you probably were a bit bothered by my suggestions, which is a pity...I
mean...I was suggesting because I REALLY LIKE your mod and think you DID AN AMAZING
JOB with it!! 😊😊😊 )

*= Although...emmmh... currently I am at the stage that adding a simple character interaction feels a daunting task!! 😂
** = Obviously one could add a game rule telling "Is Mod X loaded", but that would feel ultra-sucky! 😐
Last edited by Jashkar; 15 Dec, 2023 @ 1:06am
Jashkar 29 Dec, 2023 @ 8:52am 
Hi Rylock,
I have been trying to create a submod which I was hoping would be integrated into the main mod...but for now it is just a WIP as the game doesn't seem to like my Custom Localizations...

https+//www_mediafire_com/folder/i1ai392tl6e25/ansfnpc

( In order to open the link, replace "+" with ":" and "_" with "." ...I have shared the whole folder so that all its files could be checked... )

As I was looking in your code, I have noticed (just by looking at the localizations) that you seem being developing a lot of extremely interesting stuff, so I have thought maybe I could share the WIP while I am trying to solve its (many) problems (in fact for now the only part that "kind of works" are the new game rules...while the localizations, while I've done A LOT of variants, seem to be despised by the game!!! 😭)...

Emmh...should you want to cannibalize some parts of this draft to implement the character interaction feature in the main mod...well...feel free to do so...although my real hope was to offer a fully working submod for integration...which is a long way to go! 😱

Update (with fingers crossed): I might have messed up things due to abuse of an (unnecessary) ROOT and a few forgotten text = {}...but...emmh...let's hope is JUST THAT!! 😂

Update II: I have updated the mod:
- Removed all (probably counter-productive) ROOT in the custom localization.
- Added text = {} where was missing.
However, I am still getting the same errors as before. Unfortunately I am getting no feedback on Discord about these features, so for now I am putting the thing on hold...however, again...if you want to cannibalize any part of it...feel free to do so! :)
Last edited by Jashkar; 30 Dec, 2023 @ 6:06am
Jashkar 30 Dec, 2023 @ 3:05pm 
Hi Rylock,
I don't know what to say...it is completely insane:

a) The DataTypes that SUPPOSEDLY are NATIVE (i.e., [recipient.GetFirstNamePossessiveNoTooltip|U]) don't seem to work!
b) If I click forward on a NPC...it is INSANE...it doesn't show me ANYTHING (no window...no event shown...etc...), but a "orphan" NPC ends up with a FULL FAMILY (on whose creation I had absolutely no input!)!

https+//www_mediafire_com/folder/nu4kzk9ynntwi/ansfnpc

...you were TOTALLY RIGHT in saying that making your event into an interaction wasn't "so easy", but, frankly, I am speechless...I mean...I have modded before other Paradox games, but no Paradox game act in such a non-sensical way as CK3!! 🙄

( I have done the effort to try to make as many as your localizations usable for a landed or non-landed npc, but I am unable to have the stupid datatypes to work even in the most basic localizations! )

...so...I don't know...PLEASE...can you DO THE MIRACLE and allow for an interaction to create a NPC's family with the player's input (as with his own family)?

P.S.: I have asked to one of the developers of POD (Prince of Darkness) about this "crazy thing" of the randomly generated family and he explained me that ...yes...was really the AI who "saw the event" and generated that family...but RANDOMLY!

He suggested me that this could be avoided by saving the ROOT as "recipient" if the recipient doesn't exist (as when launched by an event or a decision) and by having it take the recipient from the interaction if the event is launched by an interaction...but seems a complex alteration of the mod, so I wanted to express my HUMBLEST APOLOGIES -WITH ASHES ON MY HEAD- for being so deluded to think that such a thing could have been easy!! 😭

...please, Rylock...DO THE MIRACLE!!

...make "A Sensible Family 3" both usable for pc (with decision) and npcs (with interaction)!
Last edited by Jashkar; 30 Dec, 2023 @ 3:40pm
Rylock  [developer] 30 Dec, 2023 @ 6:09pm 
Yeah, in order to make the events work for an NPC you'd need to do the following:

1) Create a character interaction (like I assume you did - that link you posted doesn't appear to work any longer) and have, in the on_accept, "scope:recipient = { trigger_event = asnf.1001 }".

2) In the normal decision, you need "root = { save_scope_as = recipient }" before it triggers the asnf.1001 event, so root in that case becomes the recipient.

3) Then, in all the asnf events, you need to replace all instances or root with scope:recipient. You also need to enclose all effects and triggers which currently aren't enclosed in a scope inside a scope:recipient scope (as otherwise they all assume root scope).

4) And then ensure there is alternate localization text for ALL entries which checks to see if scope:recipient isn't equal to root. Not sure why your [recipient.GetFirstNamePossessiveNoTooltip|U]) entry wouldn't be working, but I guess that depends on where and how you're using it. If it's in any kind of tooltip, you'd need an object or subject entry and then use TARGET_CHARACTER or CHARACTER in the localization instead, as those don't inherently accept scopes.

I'll be frank with you, though - I have my own projects, and I'm honestly not going to spend time whipping up an entire version of my mod for something that only one person would ever even want to use. So if this is something you want to have happen, you'll have to make it yourself. I'm happy to offer advice, but please stop asking.
Last edited by Rylock; 30 Dec, 2023 @ 6:10pm
Jashkar 31 Dec, 2023 @ 7:10am 
Thanks for the advice, Rylock!

Point 1 is something I have tried, but seems that that causes the AI to make all the choices (randomly...was quite puzzling to see no window open and then find out the AI had "chosen" -randomly- how its family had to be composed)...

The other points I will follow them...

Just further questions on the point 4:

How I create an "object or subject entry"? Or it is sufficient that I use TARGET_CHARACTER (which I guess is like recipient) or CHARACTER (which I guess is like actor) in the localization?

...so tooltips are different from titles, descriptions and options? I mean...the latter should be able to "read" recipients, actors, etc..?

...and last question (...at least for now...)...

...should you succeed* in making the submod work would you consider it for an integration?

( I mean...I suspect that, once it's setup, it would not need to be kept as a separated mod...but obviously I get that, given it requires such an extensive manipulation, you'd not want to go through it... )

* = At this stage is a huge "IF"... 😂
Last edited by Jashkar; 31 Dec, 2023 @ 7:10am
Rylock  [developer] 31 Dec, 2023 @ 5:44pm 
Originally posted by Jashkar:
Point 1 is something I have tried, but seems that that causes the AI to make all the choices (randomly...was quite puzzling to see no window open and then find out the AI had "chosen" -randomly- how its family had to be composed)...

Oh, shoot. *slaps head*

Of course you don't want the recipient to receive the event. Pardon me. Definitely trigger the event for scope:actor instead.

How I create an "object or subject entry"? Or it is sufficient that I use TARGET_CHARACTER (which I guess is like recipient) or CHARACTER (which I guess is like actor) in the localization?

...so tooltips are different from titles, descriptions and options? I mean...the latter should be able to "read" recipients, actors, etc..?

This is specifically for things like custom_tooltip or custom_description. They don't inherit the event's scopes by default, so if you want to use those in the localization for those tooltips you need to queue them up in the actual command.

Let's say we have a command like so:

custom_tooltip = asnf.whatever.tt

Yet, in that tooltip, I want to use the recipient's actual name. That won't work. you'd need this for the command instead:

custom_tooltip = { text = asnf.whatever.tt subject = scope:recipient }

Then you can use CHARACTER in the localization (subject = CHARACTER, object = TARGET_CHARACTER) instead of the scope.

If the issue you were having, however, is that the recipient scope wasn't working in regular localization (meaning the event text), that's quite something else. Anything fired from a character interaction should automatically inherit the recipient and actor scopes, so your issue is likely elsewhere in your event -- bad brackets, perhaps, or a broken command which is breaking the parsing of the events by the engine.

...and last question (...at least for now...)...

...should you succeed* in making the submod work would you consider it for an integration?

Probably not, no. I can't see that there'd be much call for it, and I'd have to account for that character interaction sticking around for the entire game when ASNF is meant to be a one-and-done kind of effect.
Rylock  [developer] 26 Jan, 2024 @ 4:55am 
Well, Jashkar, you'll be happy to see in the latest update that I've added character interactions to create families for courtiers and landed rulers. Enjoy!
Jashkar 27 Jan, 2024 @ 1:42am 
You are MY HERO, RYLOCK!!! 🤩 THANK YOU!!! YOU ARE A-M-A-Z-I-N-G!!! 🤗🤗🤗
Pippintastic 16 Feb, 2024 @ 8:00am 
how possible is it to make so that when you connect a family member to a larger dynasty you can choose local dynasties not of the same heritage branch? For story reasons I'd really like for my Normandy character to have a Norse father and a French mother who is connected to a local dynasty.
< >
Showing 1-15 of 28 comments
Per page: 1530 50