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

rsbrock20

Private
20 Badges
Oct 5, 2017
12
0
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Cities: Skylines
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines Deluxe Edition
For months now I've been trying to add a new Ascension perk, that does 1 thing. Grants a specific research. That's it. I tried with some code and this is what I came up with. I realize it is missing a lot, but I can't find any documentation on what to place in the empty spots. Any help will gratefully received. Thanks.

Code:
ap_star_power = {
    on_enabled = {
        add_research_option = tech_mega_engineering
        hidden_effect = {
            country_event = {}
        }
    }
    possible = {}
    modifier = {}
    
    potential = {
        host_has_dlc = "Utopia"
        NOT = {}
        Or = {
            And = {}}
    }
    
    ai_weight = {
        factor = 100
    }
}
 
hidden_effect --- effects that happen when AP is taken but aren't listed in the auto-generated tooltip. Useful for doing background stuff.
possible --- soft limits on who can take the AP. Stuff like "needs to have 2 picked APs" or "needs to have researched tech X" go there. If conditions listed in this block aren't met, AP will appear in the list but will be grayed out and unpickable (if you tick the checkbox to show such).
potential --- hard limits on who can take the AP. basically, a list of conditions that need to be met for AP to even appear on the list of theoretically-possible to be taken by the empire. If these conditions aren't met, you will not see AP at all - this is how, for example, psionic APs are hidden from machine empires.
modifier --- empire level modifiers added when AP is taken (like +2 leader max level for transcendent learning).
 
hidden_effect --- effects that happen when AP is taken but aren't listed in the auto-generated tooltip. Useful for doing background stuff.
possible --- soft limits on who can take the AP. Stuff like "needs to have 2 picked APs" or "needs to have researched tech X" go there. If conditions listed in this block aren't met, AP will appear in the list but will be grayed out and unpickable (if you tick the checkbox to show such).
potential --- hard limits on who can take the AP. basically, a list of conditions that need to be met for AP to even appear on the list of theoretically-possible to be taken by the empire. If these conditions aren't met, you will not see AP at all - this is how, for example, psionic APs are hidden from machine empires.
modifier --- empire level modifiers added when AP is taken (like +2 leader max level for transcendent learning).

Hey thanks for replying but I figured it out. Took an eternality but I did it! Yay.

And here is the code - This is for a hive mind. Change the no to a yes on the regular empire and normal empires can take this AP. I really wish the wiki was better at explaining things.

YAML:
ap_star_power = {
    potential = {
        host_has_dlc = "Megacorp"
        NOT = {
            has_ascension_perk = ap_star_power
        }
    is_regular_empire = no
    }

    modifier = {
        megastructure_build_speed_mult = 0.1
    }

    possible = {
        custom_tooltip = {
            fail_text = "requires_technology_habitat_1"
            has_technology = tech_habitat_1
        }
    }

    on_enabled = {
            if = {
                limit = {
                    NOT = { has_technology = tech_mega_engineering }
            }
                    add_research_option = tech_mega_engineering
        }
    }

    ai_weight = {
        factor = 10
        modifier = {
            factor = 2
            has_ethic = ethic_xenophile
        }
        modifier = {
            factor = 3
            has_ethic = ethic_fanatic_xenophile
        }
    }
}