starbase building possible only in binary or trinary systems

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

Bartazar

Private
Jun 19, 2020
12
0
Hey there,

can someone help to script a condition that a starbase building can be built only in binary or trinary systems?
I can't find something working or that don't break the mod.


I find this proposition for something else, and tryed it to fullfill my needs, but it don't work at all, it even show unknow building in the stabase building list.
Code:
        custom_tooltip = {
            fail_text = "requires_multiple_stars"
            count_planets = {
                limit = { is_star = yes }
                count = 2
            }
        }

## tooltips
requires_multiple_stars:0 "$TRIGGER_FAIL$Can only be build around binary or trinary stars."
 
Code:
custom_tooltip = {
     fail_text = "requires_no_binary_trinary"
     NOR = {
         is_star_class = sc_binary_1
         is_star_class = sc_binary_2
         is_star_class = sc_binary_3
         is_star_class = sc_binary_4
         is_star_class = sc_binary_5
         is_star_class = sc_binary_6
         is_star_class = sc_binary_7
         is_star_class = sc_binary_8
         is_star_class = sc_binary_9
         is_star_class = sc_binary_10
         is_star_class = sc_trinary_1
         is_star_class = sc_trinary_2
         is_star_class = sc_trinary_3
         is_star_class = sc_trinary_4
     }
 }
From the dyson sphere megastructure file.
 
I've already tryed that, it doesn't work at all
Code:
    possible = {
        custom_tooltip = {
            fail_text = "requires_multiple_stars"
            OR = {
                is_star_class = sc_binary_1
                is_star_class = sc_binary_2
                is_star_class = sc_binary_3
                is_star_class = sc_binary_4
                is_star_class = sc_binary_5
                is_star_class = sc_binary_6
                is_star_class = sc_binary_7
                is_star_class = sc_binary_8
                is_star_class = sc_binary_9
                is_star_class = sc_binary_10
                is_star_class = sc_trinary_1
                is_star_class = sc_trinary_2
                is_star_class = sc_trinary_3
                is_star_class = sc_trinary_4
            }
        }
    }
 
I wonder if maybe adding solar_system is needed, try
Code:
custom_tooltip = {
    fail_text = "requires_multiple_stars"
    solar_system = {
        count_planets = {
            limit = { is_star = yes }
            count >= 2
        }
    }
}
 
it doesn't work, also it broke the building list in the starbase building possibility

there is something wrong with that command and/or the { }

Code:
multiple_stars_enigmatic_reactor = {
    icon = "GFX_multiple_stars_enigmatic_reactor"
    construction_days = 160

    potential = {
        exists = owner
        owner = { has_technology = tech_lythuric_coolant_condenser }
    }

    possible = {
        custom_tooltip = {
            fail_text = "requires_multiple_stars"
            solar_system = {
                count_planets = {
                    limit = { is_star = yes }
                    count = 2
                }
            }
        }
    }

    resources = {
        category = starbase_buildings
        cost = {
            alloys = 200
        }

        produces = {
            energy = 25
            physics_research = 25
            society_research = 25
            engineering_research = 25
        }

        upkeep = {
            sr_lythuric = 0.25
            exotic_gases = 0.25
        }
    }

    show_in_tech = "tech_lythuric_coolant_condenser"

    ai_build_at_chokepoint = yes
    ai_build_outside_chokepoint = yes
    ai_weight = {
        weight = 150
    }
}