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

Bridger15

Major
80 Badges
Feb 14, 2009
575
1.175
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Jade Dragon
  • Sword of the Stars II
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • For the Motherland
  • Cities: Skylines - Mass Transit
  • Steel Division: Normandy 44
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris: Nemesis
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
I've always been confused as to why this focus is so useless, as the in-game tooltip only shows that it causes some news events to fire and some opinion modifiers to change. I decided to improve it's effects in my mod, but when i dug into the code I found this part of the focus (which has never shown up in tooltips)

Code:
completion_reward = {
            640 = {
                if = {
                    limit = { is_controlled_by = ROOT }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 2
                        instant_build = yes
                    }
                }
            }
            325 = {
                if = {
                    limit = { is_controlled_by = ROOT }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 2
                        instant_build = yes
                    }
                }
            }
            601 = {
                if = {
                    limit = { is_controlled_by = ROOT }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 1
                        instant_build = yes
                    }
                    add_extra_state_shared_building_slots = 1
                    add_building_construction = {
                        type = arms_factory
                        level = 1
                        instant_build = yes
                    }
                }
            }

The problem is that this is coded so that these effects will fire if ENG controls them (as it is an ENG focus, so ENG is the ROOT). However, they start in control of either RAJ or China or Yunan. They will never reasonably be controlled by ENG.

Here's how I fixed it:
Code:
completion_reward = {
            640 = {
                if = {
                    limit = {
                        OR = {
                            ENG = { controls_state = 640 }
                            any_other_country = {
                                is_in_faction_with = ENG
                                controls_state = 640
                            }
                        }
                    }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 2
                        instant_build = yes
                    }
                }
            }
            325 = {
                if = {
                    limit = {
                        OR = {
                            CHI = { controls_state = 325 }
                            any_other_country = {
                                is_in_faction_with = CHI
                                controls_state = 325
                            }
                        }
                    }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 2
                        instant_build = yes
                    }
                }
            }
            601 = {
                if = {
                    limit = {
                        OR = {
                            CHI = { controls_state = 601 }
                            any_other_country = {
                                is_in_faction_with = CHI
                                controls_state = 601
                            }
                        }
                    }
                    add_building_construction = {
                        type = infrastructure
                        level = 2
                        instant_build = yes
                    }
                    add_building_construction = {
                        type = air_base
                        level = 1
                        instant_build = yes
                    }
                    add_extra_state_shared_building_slots = 1
                    add_building_construction = {
                        type = arms_factory
                        level = 1
                        instant_build = yes
                    }
                }
            }
 
  • 3
Reactions:
Upvote 0