Jump to content

Recommended Posts

No More AI Abortion


No More AI Abortion

Version 1.7

(for CK3 Update 1.12.*)

 

Ever wonder why your lovers are pregnant one minute, and then the next they're mysteriously no longer pregnant, ill, or even dead after trying to cure themselves of some unknown affliction? It turns out that AI mothers may choose to terminate pregnancies that will result in a bastard, even when the Player is the father. The decision appears to be based solely on the mother's "ai_rationality" value and whether or not they belong to a faith with the polyamory tenet. This means that the game does not take into account whether they are your soulmate, if they are in your court, if they have been pardoned for giving birth to a bastard in the past, etc.

 

Features

 

This mod simply adds a game rule: "Pregnancy Termination", which when enabled, prevents the AI from doing so. This does not affect the Player's ability to do so, nor does is affect pregnancies from ending prematurely due to natural complications. Luckily Carnalitas already has a game rule, that when enabled, prevents natural pregnancy complications and works seamlessly with this mod. For those not using Carnalitas, I've included a second game rule in the standalone version of this mod: "Pregnancy Complications" which has four different options to allow you to tailor your game exactly how you'd like, including the ability to even the playing field by removing a hidden advantage the player normally has over the AI:

 

  • Default (no Player exception): The Player will no longer have the reduced risk of complications related to pregnancy and childbirth that they do by default. No changes are made to the risk of complications for the AI.
  • Default: No changes will be made to the risk of complications related to pregnancy and childbirth. The Player has a reduced risk of suffering complications compared to the AI.
  • Disabled (Limited): Complications related to pregnancy and childbirth will no longer occur for the Player and their close family members. No changes will be made to the risk of complications for the AI.
  • Disabled: Complications related to pregnancy and childbirth will no longer occur. Complications may still arise as a result of attempted termination, if enabled.

 

While the options for the "Pregnancy Termination" game rule are as follows:

 

  • Default: No changes will be made to the AI's behavior. The AI may choose to terminate pregnancies that will result in a bastard, even when the Player is the father.
  • Default (Player exception): The AI may choose to attempt to terminate pregnancies that will result in a bastard, except when the Player is the father.
  • Disabled: The AI will no longer choose to terminate pregnancies that will result in a bastard. Pregnancies may still end prematurely due to natural complications, if enabled.

 

Localization

 

Fully translated into English, German, and Russian. When playing in other languages officially supported by CK3, this mod's text will default to English rather than showing the raw code strings.

 

Requirements

 

Speaking of Carnalitas, to ensure all of the features related to pregnancy from Carnalitas are preserved while running both of the mods together, I've decided to have this mod's file incorporate elements of and carefully override Carnalitas', meaning running this mod without Carnalitas may lead to errors. For those not using Carnalitas, a standalone version of this mod is also available, which does not have any requirements. The standalone version may also be downloaded from the Steam Workshop, found here.

 

Compatibility

 

I've designed this mod to be as lightweight as possible. It should be compatible with all mods that don't change the events/pregnancy_events file. The standard version of this mod is designed specifically to be compatible with Carnalitas. If not running Carnalitas, please use the standalone version of this mod instead. This mod is not achievement compatible.

 

Installation Instructions

 

  • If using Carnalitas, download the standard version of the mod, and if not, download the standalone version instead.
  • Locate and open the appropriate .zip file using 7-Zip/WinRAR/etc. Inside, there should be a folder named "No More AI Abortion" and a file named "No More AI Abortion.mod".
  • Locate your mod folder. On Windows this is generally found at C:\Users\[your username]\Documents\Paradox Interactive\Crusader Kings III\mod\
  • Delete any older versions of the mod in the mod folder, if applicable.
  • Copy both files to the mod folder.
  • Run the CK3 launcher, navigate to the Mods section, and click the "Manage Mods (x/y)" button.
  • Find No More AI Abortion and click on the grey button to the right of "Disabled". It should have turned green and now read "Enabled."
  • If using the standard version of the mod, make sure you've similarly installed Carnalitas using the instructions found in that mods' Installation Instructions section.
  • If using the standard version of the mod, click and drag the three horizontal lines to the right of the "Enabled/Disabled" button until this mod is placed below Carnalitas in the load order.
  • When starting a new game, be sure to scroll to the bottom of the game rules screen where you will find this mod’s game rules. Here you can select the combination of settings that will give the desired experience.
  • Note: To enable this mod for existing save games, you’ll need to learn how to edit the desired save file in order to add the game rules. The method will also allow you to change the game rules mid-game if you change your mind later.

 

Changelog

 

Version 1.7

  • Updated for CK3 Version 1.12.1
  • Fixed a vanilla bug in pregnancy_events.txt that was preventing the "Beyond All Doubt" (pregnancy.6002) event from triggering for the real_father if he was married.

Version 1.6

  • Updated for CK3 Version 1.11.0

Version 1.5

  • Updated for CK3 Version 1.10.0.1
  • Added German translation courtesy of Doozer64 on Steam Workshop.

Version 1.4.1

  • Updated for CK3 Version 1.9.2.1
  • The Player's consorts should now be sufficiently protected when using the "Disabled (Limited)" "Pregnancy Complications" game rule.

Version 1.4

  • Updated for CK3 Version 1.9.0.4
  • The effects of the game rules were not always active when they should have been. Includes changes to hopefully correct this issue.

Version 1.3

  • Updated for CK3 Version 1.8.1

Version 1.2.2

  • Updated for CK3 Version 1.7.2
  • Added Russian translation courtesy of What is Love? of on Steam Workshop.

Version 1.2.1

  • Updated for CK3 Version 1.7.1

Version 1.2

  • Updated for CK3 Version 1.6.1.2
  • Added a third "Pregnancy Termination" game rule option, "Default (Player exception)".
  • Improved the game rule presentation to be more in-line with Carnalitas' by adding text color and icons.

Version 1.1.2

  • Updated for CK3 Version 1.6.1.1
  • Standalone version of the mod first uploaded to the Steam Workshop, found here.
  • Added a "Pregnancy Complications" game rule with four options to the standalone version.

Version 1.1.1

  • Updated for CK3 Version 1.6.1
  • Added "dummy" localization. When playing in a language officially supported by CK3 other than English, this mod's text will default to English rather than showing the raw code strings.
  • Both standard and standalone versions of the mod are available and will be supported moving forward.

Version 1.1

  • Updated for CK3 Version 1.6 "Castle" / Fate of Iberia.
  • Standalone version of the mod that does not require Carnalitas.

Version 1.0

  • Initial release of the mod.

 

Credits

 

No More AI Abortion

  • Myself
  • What is Love? - Russian Translation
  • Doozer64 - German Translation

Carnalitas

 

Upcoming Features

 

I welcome any and all ideas regarding potential features for the mod going forward as well as any constructive criticism. I'd like to incorporate the additional "Pregnancy Complications" game rule options included in the standalone version of the mod to the main version as well. I briefly attempted to do so but had trouble overriding just the necessary components of the appropriate Carnalitas files, (namely carn_game_rules and the carn_game_rules_l localization files), without just overriding the entire file outright. I would really prefer not to do this as it would be unnecessarily messy compatibility-wise. I also wasn’t able to test the "Pregnancy Termination" game rule option, "Default (Player exception)" as much as I’d like, so please let me know if you encounter any bugs with this or any other parts of the mod not working as intended.


 

Edited by bakon_bitz
Version Update 1.7
Link to comment
1 hour ago, A_guy_with_the_plan said:

im not gonna lie i kinda want to ask if this mod is too soon for some people?

 

I admit, once I realized Mother's Day was coming up I did try to finish it in time. As for anything else, let's assume it was a coincidence in agreement with the forum rules. In reality, I got tired of the AI killing my bastards and finally found out what was doing it. Hopefully this mod is able to help others who have the same problem.

Link to comment
13 hours ago, bakon_bitz said:

 

I admit, once I realized Mother's Day was coming up I did try to finish it in time. As for anything else, let's assume it was a coincidence in agreement with the forum rules. In reality, I got tired of the AI killing my bastards and finally found out what was doing it. Hopefully this mod is able to help others who have the same problem.

You know, I was playing over the weekend and kept getting notices that my wife and/or lovers were pregnant, multiple notices again and again, yet never had any children being born. I was wondering what was going on. This explains it. Downloaded.

Link to comment
11 minutes ago, Allyson Wonderland said:

You know, I was playing over the weekend and kept getting notices that my wife and/or lovers were pregnant, multiple notices again and again, yet never had any children being born. I was wondering what was going on. This explains it. Downloaded.

I do want to note that if I'm understanding the base game's code correctly, AI mothers don't have the option to terminate pregnancies that will result in legitimate offspring, even without this mod. You may have experienced bad luck with natural complications when it came to your wife in tandem with the issue this mod seeks to correct when it came to your lovers. Hopefully this mod is able to alleviate the problem, please let me know.

Link to comment
1 hour ago, bakon_bitz said:

I do want to note that if I'm understanding the base game's code correctly, AI mothers don't have the option to terminate pregnancies that will result in legitimate offspring, even without this mod. You may have experienced bad luck with natural complications when it came to your wife in tandem with the issue this mod seeks to correct when it came to your lovers. Hopefully this mod is able to alleviate the problem, please let me know.

I will let you know. I am hoping that this will solve the problem.

Link to comment
  • bakon_bitz changed the title to [mod] No More AI Abortion v1.1 (Updated for Fate of Iberia / Patch 1.6 "Castle")

Version 1.1 updated for CK3 Patch 1.6 "Castle" / Fate of Iberia. Since Carnalitas has not yet been updated for the current patch, the current version of the mod is standalone and does not require Carnalitas. Please refer to the requirements section for more information. As always, please let me know if you have any feedback or ideas for the mod.

Link to comment
  • bakon_bitz changed the title to [mod] No More AI Abortion (for Update 1.6.1)
  • 1 month later...

Months ago I had made something similar when I was making changes to the pregnancy_events.txt to stop seduced NPC from aborting pregnancies or publicly naming the true father when player is the real father. Not as elegant as yours with integration to Carnalitas, but it gets the job done.

 

	option = { #Attempt to terminate the pregnancy
		name = pregnancy.2001.d
		pregnancy_termination_attempt_effect = yes
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
			modifier = { # Never hide the truth in faiths with the Polyamory tenet.
				factor = 0
				faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active }
			}
			modifier = { # ai will never terminate player's child
				add = -1000
				scope:real_father = { is_ai = no }
			}
		}
	}

 

I haven't try but I imagine an AND with game_rule_flag = yes and scope:real_father = {is_ai = no} would work.

Edited by Academus
Link to comment

Version 1.2 updated for CK3 Version 1.6.1.2. Please refer to the Changlog section for more information. As always, please let me know if you have any feedback or ideas for the mod.

 

On 7/27/2022 at 1:27 AM, nall82 said:

I don't know how to tie this to a game rule, but maybe you could use this to make the termination choice only valid if the real father is an ai?
 

is_valid = {
	pregnancy_real_father = {
		is_ai = yes
	}
}

 

On 7/29/2022 at 7:09 PM, Academus said:

Months ago I had made something similar when I was making changes to the pregnancy_events.txt to stop seduced NPC from aborting pregnancies or publicly naming the true father when player is the real father. Not as elegant as yours with integration to Carnalitas, but it gets the job done.

 

	option = { #Attempt to terminate the pregnancy
		name = pregnancy.2001.d
		pregnancy_termination_attempt_effect = yes
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
			modifier = { # Never hide the truth in faiths with the Polyamory tenet.
				factor = 0
				faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active }
			}
			modifier = { # ai will never terminate player's child
				add = -1000
				scope:real_father = { is_ai = no }
			}
		}
	}

 

I haven't try but I imagine an AND with game_rule_flag = yes and scope:real_father = {is_ai = no} would work.

 

Thank you both very much for your help. I've gone ahead and updated the mod with a third game rule option allowing for a player exception. I tested it briefly and it appears to be working as intended. As always, please do not hesitate to let me know if this is not the case on your end. The next challenge is incorporating additional game rule options regarding pregnancy complications while overriding Carnalitas the least amount possible.

Edited by bakon_bitz
Link to comment
7 hours ago, dtmr said:

I'm having a problem where my ck3 launcher says that "the path in this mod's descriptor file is unavailable or does not exist". I've tried to delete and reinstall the mod, but this did not solve the problem.

 

I know what the problem is and uploaded a fixed version of the mod. This should no longer occur with a fresh download and installation. I apologize for the inconvenience. 

 

As a head's up if this is happening with any mod, not just this one, it can be fixed by:

  • Navigating to the mod's .mod file, in this case "No More AI Abortion.mod"
  • Editing it with a file editor (I use Notepad++)
  • Replacing whatever follows path=, usually "C:/Users/(user)/Documents/Paradox Interactive/Crusader Kings III/mod/(name of mod)" with "mod/(name of mod)", in this case "C:/Users/(user)/Documents/Paradox Interactive/Crusader Kings III/mod/No More AI Abortion" with "mod/No More AI Abortion"
  • Saving your changes to the .mod file

The reason why this problem occurs relatively often is every time a mod creator runs their game, the path line in the descriptor file is overwritten with a path specific to their machine. If they forget to change it back before packaging and uploading the mod, this error will occur for everyone without this specific path.

Link to comment
  • 2 weeks later...
  • 8 months later...

Version 1.4 updated for CK3 Version 1.9.*. Please refer to the Changelog section for more information. As always, please let me know if you have any feedback or ideas for the mod.

 

On 5/23/2023 at 2:49 PM, ravensm785 said:

still current?

 

Yes, thank you for your patience. I just bought the DLC yesterday, so was finally able to start a quick game to test and make sure everything is working properly.

Link to comment
14 hours ago, Voltanis said:

Is there anyway to still download 1.3? I didn't see it listed under files. I'm still running 1.8.1 with all my mods and havent made the move to 1.9.

 

Due to my laziness, that version of the mod was only uploaded to the Steam Workshop (solely in it's standalone form) and never made it's way here. Luckily I had the necessary spare files from before the 1.9 update lying around to be able to retroactively create the Carnalitas compatible version. Both that and the aforementioned standalone version should now be available in the downloads section. Hopefully this helps all those running 1.8.* at the moment and in the future.

Link to comment
1 hour ago, bakon_bitz said:

 

Due to my laziness, that version of the mod was only uploaded to the Steam Workshop (solely in it's standalone form) and never made it's way here. Luckily I had the necessary spare files from before the 1.9 update lying around to be able to retroactively create the Carnalitas compatible version. Both that and the aforementioned standalone version should now be available in the downloads section. Hopefully this helps all those running 1.8.* at the moment and in the future.

Thank you! I really do appreciate it.

Link to comment
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use