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

Arttie

Recruit
44 Badges
Dec 23, 2018
1
0
  • Stellaris: Megacorp
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
I'm trying to get megastructures such as the dyson to do what would actually happen and make the next megastructure faster/cheaper marginally.

This is what I have: (Be warned it's the whole file.)
Code:
#Dyson Sphere Site
dyson_sphere_0 = {
    entity = "construction_platform_entity"
    construction_entity = "construction_platform_entity"
    portrait = "GFX_megastructure_construction_background"
    place_entity_on_planet_plane = no
    entity_offset = { x = -7 y = -7 }
    construction_blocks_others = no
    build_time = 360
    resources = {
        category = megastructures
        cost = {
            alloys = 5000
            influence = 300
        }

        upkeep = {
            energy = 5
        }
    }

    potential = {
        has_gw_dyson_sphere = yes
    }
  
    possible = {
        exists = starbase
        custom_tooltip = {
            fail_text = "requires_inside_border"
            is_inside_border = from
            }
        custom_tooltip = {
            fail_text = "requires_surveyed_system"
            NOT = {
                any_planet = {
                    is_surveyed = {
                        who = prev.from
                        status = no
                    }
                }
            }
        }
        custom_tooltip = {
            fail_text = "requires_no_habitable_planets"
            NOT = {
                any_planet = {
                    AND = {
                        colonizeable_planet = yes
                    }
                }
            }
        }
        custom_tooltip = {
            fail_text = "requires_no_black_hole_neutron_star_pulsar"
            NOT = {
                is_star_class = sc_black_hole
                is_star_class = sc_neutron_star
                is_star_class = sc_pulsar
            }

        custom_tooltip = {
            fail_text = "requires_no_existing_megastructure"
            #NOT = { has_any_megastructure = yes }
            has_no_non_gate_megastructure = yes
        }
        }
    }
  
    placement_rules = {
        planet_possible = {
            custom_tooltip = {
                fail_text = "must_build_around_star"
                is_star = yes
            }
            custom_tooltip = {
                fail_text = "requires_no_anomaly"
                NOT = { has_anomaly = yes }
            }
            custom_tooltip = {
                fail_text = "requires_no_orbital_station"
                has_orbital_station = no
            }
        }
    }
  
    # root = system
    # from = country 
    ai_weight = {
        factor = 15
      
        country_modifier = {
            factor = 0.1
            starbase = { NOT = { has_starbase_size >= starbase_starfortress } }
        } 
      
        country_modifier = {
            factor = 0.1
            any_neighbor_system = {
                exists = owner
                NOT = {
                    owner = { is_same_value = from }
                }
            }
        }
    }
  
    on_build_start = {}
    on_build_cancel = {}
    on_build_complete = {
        set_star_flag = dyson_sphere_built
        from = { set_country_flag = built_dyson_sphere }
    }
}

#Dyson Sphere Frame
dyson_sphere_1 = {
    entity = "dyson_sphere_phase_01_entity"
    construction_entity = "dyson_sphere_frame_entity"
    portrait = "GFX_megastructure_construction_background"
    construction_blocks_others = no
    upgrade_from = {
        dyson_sphere_0
    }
    build_time = 1080
    resources = {
        category = megastructures
        cost = {
            alloys = 10000
        }
    }

    possible = {
        from = { has_gw_dyson_sphere = yes }
    }
}

#Partial Dyson Sphere
dyson_sphere_2 = {
    entity = "dyson_sphere_phase_02_entity"
    construction_entity = "dyson_sphere_part_1_entity"
    portrait = "GFX_megastructure_construction_background"
    construction_blocks_others = no
    upgrade_from = {
        dyson_sphere_1
    }
    build_time = 1080
    resources = {
        category = megastructures
        cost = {
            alloys = 10000
        }
      
        country_modifier = {
            megastructure_build_speed_add = 1.0
        }

        produces = {
            energy = 250
        }
    }

    possible = {
        from = { has_gw_dyson_sphere = yes }
    }
}

#Partial Dyson Sphere
dyson_sphere_3 = {
    entity = "dyson_sphere_phase_03_entity"
    construction_entity = "dyson_sphere_part_2_entity"
    portrait = "GFX_megastructure_construction_background"
    construction_blocks_others = no
    upgrade_from = {
        dyson_sphere_2
    }
    build_time = 1080
    resources = {
        category = megastructures
        cost = {
            alloys = 10000
        }
      
        country_modifier = {
            megastructure_build_speed_add = 5.0
        }

        produces = {
            energy = 500
        }
    }

    possible = {
        from = { has_gw_dyson_sphere = yes }
    }
}

#Partial Dyson Sphere
dyson_sphere_4 = {
    entity = "dyson_sphere_phase_04_entity"
    construction_entity = "dyson_sphere_part_3_entity"
    portrait = "GFX_megastructure_construction_background"
    construction_blocks_others = no
    upgrade_from = {
        dyson_sphere_3
    }
    build_time = 1080
    resources = {
        category = megastructures
        cost = {
            alloys = 10000
        }
      
        country_modifier = {
            megastructure_build_speed_add = 25.0
        }

        produces = {
            energy = 750
        }
    }

    possible = {
        from = { has_gw_dyson_sphere = yes }
    }
}

#Dyson Sphere
dyson_sphere_5 = {
    entity = "dyson_sphere_phase_05_entity"
    construction_entity = "dyson_sphere_part_4_entity"
    portrait = "GFX_megastructure_dyson_sphere_background"
    construction_blocks_others = no
    upgrade_from = {
        dyson_sphere_4
    }
    build_time = 1080
    resources = {
        category = megastructures
        cost = {
            alloys = 10000
        }
      
        country_modifier = {
            megastructure_build_speed_add = 50.0
        }

        produces = {
            megastructure_cost_mult = 10.0
            energy = 1000
        }
    }

    possible = {
        from = { has_gw_dyson_sphere = yes }
    }

    on_build_complete = {
        every_system_planet = {
            limit = {
                OR = {
                    is_planet_class = pc_molten
                    is_planet_class = pc_toxic
                }
            }
            change_pc = pc_frozen
        }
        every_system_planet = {
            limit = {
                is_planet_class = pc_barren
            }
            change_pc = pc_barren_cold
        } 
    }
}

# Ruined Dyson Sphere
dyson_sphere_ruined = {
    entity = "dyson_sphere_destroyed_entity"
    portrait = "GFX_megastructure_construction_background"

    potential = {
        always = no
    }
}

# Restored Dyson Sphere
dyson_sphere_restored = {
    entity = "dyson_sphere_phase_05_entity"
    construction_entity = "dyson_sphere_part_4_entity"
    portrait = "GFX_megastructure_dyson_sphere_background"
    upgrade_from = {
        dyson_sphere_ruined
    }
    build_time = 500
    resources = {
        category = megastructures
        cost = {
            alloys = 20000
        }

        produces = {
            energy = 1500
        }
    }

    possible = {
        from = { has_technology = tech_mega_engineering }     
    }

    on_build_start = {
        fromfrom = {
            set_graphical_culture = root.from
        }
    }

    on_build_complete = {
        every_system_planet = {
            limit = {
                OR = {
                    is_planet_class = pc_molten
                    is_planet_class = pc_toxic
                }
            }
            change_pc = pc_frozen
        }
        every_system_planet = {
            limit = {
                is_planet_class = pc_barren
            }
            change_pc = pc_barren_cold
        }
        every_system_ambient_object = { destroy_ambient_object = this }
        from = {
            country_event = { id = utopia.2011 }
        }
    }
}

I will note I have attempted both megastructure_build_cost_mult and add in both modifier{} and country_modifier{}

Solved
 
Last edited: