Jump to content

[mod] PrisonOverhaul


Recommended Posts

Posted

PrisonOverhaul


Prisoner Overhaul v1.2


Prisoner Pregnancy & Child Fixes for CK2


Handles two annoying edge cases with prisoners:

1. When a married prisoner gets pregnant by someone other than her spouse, the child's displayed father is set to "Unknown" at birth. The marriage stays intact (no divorce notifications), and the biological father is preserved for ABM/Evolution genetics.

2. When a prisoner or slave gives birth, the newborn is automatically imprisoned by the mother's jailer — preventing children of prisoners from appearing as free members of your court.


━ FEATURES

Unknown Father (prisoner.100 + prisoner.110):

  • Fires on_pregnancy — checks: mother is prisoner + is married + spouse is NOT the father
  • Sets prisoner_unknown_father flag on the mother
  • On birth: sets set_father = 0 on child (displayed father = "Unknown")
  • true_father (biological) is preserved — ABM uses true_father_even_if_dead, so Evolution genetics and ABM body traits work normally
  • Marriage stays intact: no divorce, no spouse notification spam

Auto-Imprison Children (prisoner.110 + prisoner.111):

  • Fires on_birth (ROOT = newborn)
  • Triggers if mother is a prisoner OR has any slave trait
  • Detected slave traits: xyz_slave, xyz_unbroken, xyz_broken, xyz_trained, xyz_courtesan, xyz_meretrix, xyz_breeder, xyz_milkcow, xyz_toilet, xyz_private_slave, xyz_in_training, tentacle_slave
  • Saves mother's host as event_target:prisoner_jailer, imprisons newborn immediately
  • Delayed backup event fires after 1 day in case immediate imprison fails


━ DEPENDENCIES

None. Standalone mod. Uses xyz_* trait names from xyz_comp_patcher if loaded.


━ EVENT MAP

  • prisoner.100 — on_pregnancy: flag prisoner for unknown father
  • prisoner.110 — on_birth: imprison newborn + clear displayed father if flagged
  • prisoner.111 — on_birth: imprison newborn (1-day delayed backup)


━ KNOWN LIMITATIONS

  • Only handles marriages, not concubinage. DWR's enslavement handles most concubinage cases already.
  • Delayed backup event (prisoner.111) adds 1 day where the child may briefly appear in court before being imprisoned.


━ VERSION HISTORY

  • v1.2 — Unknown Father system. Replaced auto-divorce: prisoner.100 now sets prisoner_unknown_father flag instead of dissolving marriages. On birth, displayed father set to "Unknown" via set_father = 0. Biological father preserved for ABM/Evolution genetics. Marriage stays intact.
  • v1.1 — Imprison syntax fix + slave trait detection. Fixed critical bug: host = { imprison = ROOT } was imprisoning the jailer by the baby (backwards). Corrected to imprison = event_target:prisoner_jailer from ROOT scope. Added xyz_* slave trait checks + tentacle_slave detection. Added delayed backup event (prisoner.111).
  • v1.0 — Initial release (split from Evolution mod). Auto-divorce on pregnancy, auto-imprison on birth.


  • Submitter
  • Submitted
    03/03/26
  • Category
  • Requirements
    DEPENDENCIES
    ------------
    None. Standalone mod.
    Uses xyz_* trait names from xyz_comp_patcher (if loaded).

 

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...