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

PresFox

Private
41 Badges
Dec 13, 2006
20
1
  • Stellaris: Distant Stars
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Prison Architect: Psych Ward
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Island Bound
  • Victoria 2: Heart of Darkness
  • Cities in Motion
  • Crusader Kings II
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Arsenal of Democracy
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
Hello,

As a added question to my last thread:

Would it be possible to create a new wargoal, where the attacked civ gives up all his planets / systems?

Could be called unconditional surrender, and have a base warscore of 90-95.

Is it possible to mod this in?

Regards
 
  • 1
  • 1
Reactions:
Allright, been playing with it myself, and got 2 problems

- The command surrender is shown 10 times, instead of just one. Probably something in the counter
- Nothing happens when they give up.... Something in the effect code.

If someone who is better in modding then me could help me out, that would be greatly appriciated

Code:
surrender = {
    execution_order = 1
   
    parameters = {
        country = {
            type = country
        }
    }
   
    warscore_cost = {
        base = 95
    }

       
   
    possible = {
        always = yes
    }
   
    proposable = {
        always = yes   
    }
   
    demandable = {
        always = yes
    }
   
    effect = {
        parameter:from:every_owned_planet = {       
            add_threat = {
                who = fromfromfrom
                amount = 3 # scales to pops
            }       
           
            # Create nationalists
            fromfromfrom = {
                if = {
                    limit = {
                        count_pop_factions = {
                            limit = {
                                is_pop_faction_type = nationalist
                                check_pop_faction_parameter = {
                                    which = country
                                    value = parameter:planet.owner
                                }
                            }
                            count > 0
                        }
                    }
                    random_pop_faction = {
                        limit = {
                            is_pop_faction_type = nationalist
                            check_pop_faction_parameter = {
                                which = country
                                value = parameter:planet.owner
                            }
                        }
                        parameter:planet = {
                            every_owned_pop = {
                                set_pop_faction = prevprev
                            }
                        }
                    }
                    else = {
                        create_pop_faction = {
                            type = nationalist
                            pop = parameter:planet.unhappiest_pop
                            parameter:country = parameter:planet.owner
                        }
                        parameter:planet = {
                            every_owned_pop = {
                                set_pop_faction = last_created_pop_faction
                            }
                        }
                    }
                }
            }
       
            set_owner = root
        }
    }

    counters = {
        num_owned_planets = {
            context = parameter:planet.owner
            value = {
                base = -1
            }
        }
        ceded_or_liberated = {
            context = parameter:planet
            value = {
                base = 1
            }           
        }
    }
   
    ai_weight = {
        base = 100
       
        modifier = {
            factor = 0.1
            NOT = {
                this = { has_ai_personality_behaviour = conqueror }
            }
        }

        scaled_modifier = {
            scope = parameter:planet
            div = 2
            calc = planet_distance_empire
        }
       
        scaled_modifier = {
            scope = parameter:planet
            add = 2
            calc = planets_in_country
        }

        modifier = {
            factor = 0
            is_country_type = fallen_empire
        }

        modifier = {
            factor = 0
            NOT = {
                parameter:planet = {
                    owner = {
                        is_neighbor_of = root
                    }
                }
            }
        }
    }
   
    AI_invasion_target = yes
}
 
Do i need to start a new game to see effects in action?

I just tried editing the vassalize code, and took the make_subject_off part out completely, but in a saved game im still getting a vassal??

How does that work?

This is my vassalization code now:

Code:
vassalize_country = {
    execution_order = 1
   
    parameters = {
        country = {
            type = country
        }
    }
   
    warscore_cost = {
        base = 60   

        scaled_modifier = {
            scope = parameter:country
            add = 0.5
            calc = pop_count
        }       
       
        modifier = {
            factor = 0.5
            parameter:country = {
                exists = overlord
            }
        }
    }

    potential = {
        custom_tooltip_fail = {
            text = "war_demand_vassalize_country_not_opponent"
            parameter:country = {
                OR = {
                    AND = {
                        exists = fromfrom
                        from = {
                            from = {
                                is_war_participant = {
                                    who = prevprev
                                    side = prev
                                }
                            }
                        }
                    }
                    AND = {
                        NOT = { exists = fromfrom }
                        would_join_war = {
                            attacker = root
                            defender = from
                            side = from
                        }
                    }
                   
                }
            }
        }
        custom_tooltip_fail = {
            text = "war_demand_vassalize_country_no_overlords"
            parameter:country = {
                OR = {
                    AND = {
                        exists = fromfrom
                        from = {
                            from = {
                                count_war_participants = {
                                    side = root
                                    limit = {
                                        parameter:country = {
                                            OR = {
                                                can_be_subject = {
                                                    overlord = prev
                                                    subject_type = vassal
                                                }
                                                AND = {
                                                    is_proposing_war_demands = no
                                                    can_be_subject = {
                                                        overlord = prev
                                                        subject_type = protectorate
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    count > 0
                                }
                            }
                        }
                    }
                    AND = {
                        NOT = { exists = fromfrom }
                        count_potential_war_participants = {
                            attacker = root
                            defender = from
                            side = from

                            limit = {
                                parameter:country = {
                                    can_be_subject = {
                                        overlord = root
                                        subject_type = vassal
                                    }
                                }
                            }

                            count > 0
                        }
                    }
                }
            }
        }
        custom_tooltip_fail = {
            text = "war_demand_vassalize_country_missing_tech_all"
            any_country = {
                has_technology = tech_xeno_supremacy
                OR = {
                    AND = {
                        exists = fromfrom
                        fromfrom = {
                            is_war_participant = {
                                who = prev
                                side = root
                            }
                        }
                    }
                    AND = {
                        NOT = { exists = fromfrom }
                        would_join_war = {
                            attacker = root
                            defender = from
                            side = root
                        }
                    }
                }
            }
        }
        custom_tooltip_fail = {
            text = "war_demand_vassalize_country_wrong_type"
            parameter:country = {
                is_country_type = default
            }
        }
        custom_tooltip_fail = {
            text = "war_demand_cede_planet_no_vassals"
            NOT = { exists = overlord }
        }
    }
   
    possible = {           
        hidden:parameter:country = {
            custom_tooltip_fail = {
                text = "war_demand_vassalize_country_liberated"
                war_demand_counter = {
                    type = liberated_or_vassalized
                    value < 1
                }
            }
            custom_tooltip_fail = {
                text = "war_demand_vassalize_country_no_planets"
                war_demand_counter = {
                    type = num_owned_planets
                    value > 0
                }
            }
        }
        hidden:fromfromfrom = {
            custom_tooltip_fail = {
                text = "war_demand_vassalize_country_no_vassals_of_vassals"
                NOT = { exists = overlord }
            }
            custom_tooltip_fail = {
                text = "war_demand_vassalize_country_missing_tech"
                has_technology = tech_xeno_supremacy
            }
        }
    }
   
    proposable = {
        parameter:country = {
            can_be_subject = {
                overlord = fromfromfrom
                subject_type = vassal
            }
        }
    }
   
    effect = {
        add_threat = {
            who = fromfromfrom
            amount = 2 # scales to pops
        }       
        parameter:country = {       
            every_system_owned = {
                set_owner = fromfromfrom
        }
    }
   
    counters = {
        liberated_or_vassalized = {
            context = parameter:country
            value = { base = 1 }
        }
    }
   
    ai_weight = {
        base = 1000
       
        modifier = {
            factor = 0
            NOT = { this = { is_domineering_to = parameter:country } }
        }
    }
}
 
This seems really OP. Warscore should be no less than 100 to demand this and it will still need alot of balancing with super duper unhappy pops as a result.
 
Well, for now it doesnt even work :(

Not sure why it would be OP though, a nation is essentially beaten. In HOI you can also take over entire countries.

We would use it in multiplayer games, its also weird that you can only take 2 planets at a time

it takes hours to take over a large empire.