starbase building possible only in binary or trinary systems

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

Mr. Morague

Second Lieutenant
14 Badges
Dec 19, 2017
147
49
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Synthetic Dawn
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.
 

Bartazar

Private
Jun 19, 2020
12
0
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
            }
        }
    }
 

Mr. Morague

Second Lieutenant
14 Badges
Dec 19, 2017
147
49
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Synthetic Dawn
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
        }
    }
}
 

Bartazar

Private
Jun 19, 2020
12
0
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
    }
}