Crusader Kings III

Crusader Kings III

43 ratings
Birth Gender Control
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
14.485 KB
Oct 1, 2024 @ 1:29am
1 Change Note ( view )

Subscribe to download
Birth Gender Control

Description
各位CK3的领主或女士们好,鉴于工坊内另一个mod已失效且不存在同类mod。本人花了一些时间自学P语言做出了这个mod,经过简单测试功能正常有效,详情如下:

本mod允许玩家进行节育和决定新生儿性别。
1、角色互动:可以对目标进行节育或决定其新生儿性别,性别设置中母亲的设置优先于父亲。
2、决议:若一个角色进行了新生儿性别设置并怀孕但尚未分娩,读档后性别设置会失效。运行决议中的“恢复胎儿性别设置”可解决此问题,让设置重新生效。
注意:
1、互动对象仅限:自己、配偶、侍妾、子女、情人
2、性别设置会覆盖,以最后一次为准。
已知问题:
1、若一个角色进行了新生儿性别设置并怀孕但尚未分娩,读档后性别设置会失效。之后的怀孕不受影响。
2、解决上述问题的事件是通过决议触发,我不知道如何让其在加载游戏后立刻触发。

我不是模组制作者,并且几乎完全不懂P社的脚本语言。因此,如果您发现任何其他bug我不保证能够解决,同样我也不保证此mod能够持续更新。感谢您的谅解。

Greetings noble lords and ladies,

Due to another mod in the workshop being outdated and the absence of similar mods, I took some time to self-study Paradox's scripting language and created this mod. After some basic testing, it appears to function correctly. Hope this can help.Details are as follows:

This mod allows players to perform sterilization and decide the gender of newborns.
1. Character Interaction: You can sterilize a target or decide the gender of their newborn. When setting the gender, the mother's preference takes priority over the father's.
2. Decision: If a character has set the gender of their unborn child but is still pregnant, loading a save game will cause the gender setting to be lost. Running the decision "Restore Birth Gender Setting" will resolve this issue.

Notes:
1. Interaction targets are limited to: yourself, your spouse, concubine, children, or lovers.
2. The gender setting can be overwritten and is determined by the most recent setting.

Known Issues:
1. If a character has set the gender of their unborn child but is still pregnant, the setting will be lost upon loading a saved game. This doesn't affect later pregnancy.

I am not a modder, and I have almost no knowledge of Paradox's scripting language. Therefore, if you encounter any other bugs, I cannot guarantee that I will be able to fix them, and I also cannot guarantee that this mod will continue to be updated. Thank you for your understanding.

【I'm not a native English speaker, sorry for all inconvenience.】
25 Comments
Thallan  [author] Jan 17 @ 8:31pm 
@Rüdiger
Yes, the decision must be made after loading. I tried to make it trigger automatically, but failed.
[Sorry for reply late, I'm quite busy IRL. ]
Rüdiger Dec 17, 2024 @ 5:10pm 
does this work ?

The other mod has issue with gender settings after loading a save game with preg active.

Does your decision has to be made after loading your game before birth ?
Thallan  [author] Nov 3, 2024 @ 7:12am 
@Zylo234
Finally get some time to check. When using the mod normally—i.e., gaining the pregnancy trait as expected and running the "Restore Birth Gender Setting" decision after loading savegame—the mod should work in most cases, except for the two newly discovered exceptions mentioned above.
If your issue doesn't fall under these two cases, it might be due to a mod conflict or using the console. If you're sure it's a problem with the mod itself, please provide details if possible, such as:

  1.Set "only boys" for the spouse.
  2.Use the console to make the spouse pregnant.
  3.The pregnancy trait is gained as expected.
  4.Use the console to speed up the birth.
  5.The newborn is a girl.
Thallan  [author] Nov 3, 2024 @ 7:11am 
Greetings, lords and ladies. Two new issues have been discovered, but unfortunately, I don't have time to fix them for now. Below is a description of the issues and possible solutions:

   1.In rare cases, the "only twins" setting might not work. Solution: Use the "Decide Birth Gender" interaction on the pregnant target and reapply the "only twins," "only twins+only boys," or "only twins+only girls" setting.

  2.When setting only the birth gender for the target, if the game system gives twins upon pregnancy, the gender of the second child will be random. Solution: Use "Decide Birth Gender" interaction on the pregnant target and set it to "only twins+only boys," or "only twins+only girls"

If you encounter other cases that cause this mod to malfunction, please leave a comment.
Thallan  [author] Nov 3, 2024 @ 7:11am 
各位领主、女士们好,新发现了两个问题,不过很抱歉暂时没有时间来修复,以下是问题描述和可行的解决方案:

  1、罕见的情况下,双胞胎设置会失效。解决方案:对相应的怀孕目标进行"设置胎儿性别"互动,并重新设置仅双胞胎,或者仅双胞胎+性别。

  2、当对目标仅设置胎儿性别时,若目标怀孕时系统判定为双胞胎,则另一胎的性别为随机状态。解决方案:对相应的怀孕目标进行"设置胎儿性别"互动,并重新设置仅双胞胎,或者仅双胞胎+性别。

如果您发现其它情况会导致该mod异常,请在评论区留言。
Zylo234 Oct 16, 2024 @ 1:30pm 
@Thallan
No worries at all! Seriously, thank you so much for your help!
Thallan  [author] Oct 15, 2024 @ 6:06pm 
@Zylo234
I'll check it at sometime.I'm a bit busy in real life now.

However, there's something you can check by yourself:

1. You can impregnate your wife with no debug menu or something like that to check whether the setting works.(It should work as I have tested it many times.)

2. If you need to use debug menu:
a. When using the debug menu to impregnate your wife, you should choose the top option (the other options are for having just one child, twins, triplets, etc.).
b. Whether it’s a normal pregnancy or impregnated through the debug menu, the pregnancy trait will be added after a certain period, along with a notification for the pregnancy event. Gender settings will only work after that point. So, the time when you use the debug menu to expedite the process should be after this event is triggered.
Zylo234 Oct 15, 2024 @ 1:24pm 
@Thallan
Thank you I found it! However, it still doesn't seem to be working. I am using a cheat menu to impregnate my wife and then use the debug menu to expedite the process. Could that be messing with the mod?
Thallan  [author] Oct 14, 2024 @ 5:26pm 
@Zylo234
On the right side of the screen, there is a column of icons. Among them, the one featuring a feather pen and an ink bottle represents "Decision". Click on it, and you will find the decision named "Restore Birth Gender Setting" in the list, which translates to "恢复胎儿性别设置" in Chinese.
It may also be the code name like "xxx_xxx_xxx". I didn't test the English translation, sorry about that.

(Here's Chinese)
在屏幕右侧有一列图标,其中图标为羽毛笔和墨水瓶的就是“决议”。点击“决议”后,会打开决议列表其中一个就是"Restore Birth Gender Setting",其中文名为"恢复胎儿性别设置"。
它也有可能是一个类似于"xxx_xxx_xxx"这样的代码名称。因为我没有测试英文翻译,所以不太确定其具体文本,不好意思。
Zylo234 Oct 14, 2024 @ 10:05am 
@Thallan
This might be a stupid question, but how do I run the decision "Restore Birth Gender Setting"?