• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Stahl-Opa

Marshall & Grossadmiral of Helvetia
72 Badges
Jun 16, 2011
749
169
www.vmods.org
  • Victoria 2: A House Divided
  • Europa Universalis IV: Call to arms event
  • Gettysburg
  • Heir to the Throne
  • King Arthur II
  • Leviathan: Warships
  • Magicka
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Crusader Kings II: Charlemagne
  • Victoria 2: Heart of Darkness
  • Warlock 2: Wrath of the Nagas
  • Pillars of Eternity
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Stellaris: Nemesis
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
Hi Guys,

I try to mod a new policy which allows to control the growth of your species/xenos. (like slaves, but without the enslavemant.

I've created the policy-file and this one works fine; if you activate the policy every growing pop becomes deletet.
But after this the pop regrow.
If I'm right I need a event wich checks every month if a pop is growing and then delets this pop if my policy_flag is active.

Code:
#########################################
#
# birthcontrol_events
#
#########################################

namespace = birthcontrol

# A pop has been enslaved, remove it if we have the no growing slaves policy.
pop_event = {
    id = birthcontrol.10
    hide_window = yes
    is_triggered_only = yes
   
    trigger = {
        is_growing = yes
        NOT = { is_same_species = ROOT }
        owner = {
            has_policy_flag = birthcontroll_xenos
        }
    }
   
    immediate = {
        kill_pop = yes
    }
}

pop_event = {
    id = birthcontrol.20
    hide_window = yes
    is_triggered_only = yes
   
    trigger = {
        is_growing = yes
        is_same_species = ROOT
        owner = {
            has_policy_flag = birthcontroll_own
        }
    }
   
    immediate = {
        kill_pop = yes
    }
}

pop_event = {
    id = birthcontrol.30
    hide_window = yes
    is_triggered_only = yes
   
    trigger = {
        is_growing = yes
        owner = {
            has_policy_flag = birthcontroll_all
        }
    }
   
    immediate = {
        kill_pop = yes
    }
}

this is my event; the flags are all set proper throu the policy. But something doesn't work, no effet after all...

maybe aomeone can help?

Greez
 
Hey, I did something very similar to what you want with my mod.

Check 00_rules ( should be in common/rules/) right at the end of that there's something for actually stopping pops grow. Hope this helps point you in the right direction.
 
hmm, I still don't get it working :(

added a 2nd rule file into my mod direction:
Code:
# Checks if a pop can procreate
# This = Pop
can_pop_procreate = {
OR = {
NOT = {
    AND = {
        NOT = { is_same_species = ROOT }
        owner = {
                has_policy_flag = birthcontroll_xenos
            }
        }
    }
   
  NOT = {
    AND = {
        is_same_species = ROOT
        owner = {
                has_policy_flag = birthcontrol_own
            }
        }
    }
   
    NOT = {
        owner = {
                has_policy_flag = birthcontrol_all
            }
        }
   
    }
   
}

any ideas how to get the whole thing working?

Greez
 
hmm, still not working :(

seems to be harder then I've excepted...

Code:
...standard rules (vanilla)...
line 321:
# Checks if a pop can procreate
# This = Pop
can_pop_procreate = {
    OR = {
        is_enslaved = no
        owner = {
            NOT = {
                has_policy_flag = slavery_procreation_not_allowed
            }
        }
    }
    OR = {
NOT = {
    AND = {
        NOT = { is_same_species = ROOT }
        owner = {
                has_policy_flag = birthcontroll_xenos
            }
        }
    }
   
    NOT = {
    AND = {
        is_same_species = ROOT
        owner = {
                has_policy_flag = birthcontrol_own
            }
        }
    }
   
        NOT = {
        owner = {
                has_policy_flag = birthcontrol_all
            }
        }
   
    }
}

any more ideas?

Thanks for your help! :)
 
So let
X = xeno and birth_control_xeno
O = own and birthcontrol_own
A = birth_control_all

if (X or O or A) is true you want to disallow pro creation for that pop, so something along the lines of

can_procreate =
AND{
default slave thing
NOT (X or O or A)
}

Also there might be some problems with your bracketing.

Glad to help :)
 
Okay, I now adjusted the rules.txt:

Code:
can_pop_procreate = {
    OR = {
        is_enslaved = no
        owner = {
            NOT = {
                OR = {
                has_policy_flag = slavery_procreation_not_allowed
                has_policy_flag = birthcontroll_xenos
                has_policy_flag = birthcontrol_own
                has_policy_flag = birthcontrol_all
                }
            }
        }
    }
}

..but still absolute no effet... :(

I despair^^ Why there is not just a birthcontrol mod which does the same?^^ Then I would just use this one :D
 
Sorry perhaps I should have been more clear, this is the code I think it should be:

Code:
# This = Pop
can_pop_procreate = {
    AND = {
        OR = {
            is_enslaved = no
            owner = {
                NOT = {
                    has_policy_flag = slavery_procreation_not_allowed
                }
            }
        }
        NOT = {
            OR = {
                AND = {
                    NOT = { is_same_species = ROOT }
                    owner = {
                        has_policy_flag = birthcontroll_xenos
                    }
                }
                AND = {
                    is_same_species = ROOT
                    owner = {
                        has_policy_flag = birthcontrol_own
                    }
                }
                NOT = {
                owner = {
                        has_policy_flag = birthcontrol_all
                    }
                }
            }
        }
    }
}

I can't guarantee it'll work though.
 
  • 1
Reactions:
Okay, after the first test this seems to work! I have to test it under real play conditions, but I'm full of confidence.

I think without you I could not have done this ;)
Do you have a Steam account? I would be happy if I can you give credits on the Workshop!

Thanks a lot!