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

mac2636

Major
76 Badges
Mar 14, 2011
648
85
  • Crusader Kings II
  • Crusader Kings II: Reapers Due
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Cities in Motion
  • 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
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Hearts of Iron 4: Arms Against Tyranny
  • 500k Club
  • Victoria 2
Sorry if this has been answered somewhere before, but searching from my phone is a little difficult.

Is it possible to make either a trait, tech, or a building species specific?

I've created a new trait and given it the below code, and have not seen it appear in other empires, but setting a trait as a preq for a technology or building does not seem to work.

Thanks in advance for any assistance.

Trait Code
Code:
trait_innovative = {
    cost = 2
    modification = no
    initial = no
    modifier = {
        tile_resource_engineering_research_mult = 0.2

        ### num_tech_alternatives_add = 2 ### Does not seem to work here
    }
}

Tech Code
Code:
#Innovative
tech_innovative = {
    area = physics
    tier = 2
    cost = @tier2cost2
    category = { computing }
    prerequisites = { "trait_innovative" }
    weight = @tier2weight2
   
    modifier = {
        num_tech_alternatives_add = 2
    }
   
    weight_modifier = {
        modifier = {
            factor = 1.25
            research_leader = {
                area = physics
                has_trait = "leader_trait_expertise_computing"
            }
        }
    }
   
    ai_weight = {
        modifier = {
            factor = 1.25
            research_leader = {
                area = physics
                has_trait = "leader_trait_expertise_computing"
            }
        }
    }
}

Building Code
Code:
building_innovation_center = {
    base_buildtime = 720
    empire_unique = yes
   
    cost = {
        minerals = 600
        influence = 50
    }
   
    produced_resources = {
        engineering_research = 5
        physics_research = 5
        society_research = 5
    }
   
    required_resources = {
        energy = 10
    }
   
    country_modifier = {
        all_technology_research_speed = 0.10
    }
   
    allow = {
        custom_tooltip = {
            text = "requires_building_capital_2"
            planet = {
                OR = {
                    has_building = "building_capital_2"
                    has_building = "building_capital_3"
                }
            }
        }
    }
   
    prerequisites = {
        "trait_innovative"
        ###"tech_global_research_initiative"
    }
   
    ai_special_building = yes
}
 
It appears to me that buildings only take techs as prerequisites.


Have you tried to make an event that gives your empire a modifier and/or set a flag at the start of the game? A lot of trait mods appear to do just that to allow for empire-wide modifiers. That way, you could try and make a tech that assigns everyone who doesn't have that empire modifier a weight of 0, effectively making that tech unique to specific traits.
 
Last edited:
Trait: Yes, but only for prescripted empires, the code you have works for that but will also prevent you from choosing it in the custom creator. It is possible to make a workaround of some sort if you would like to do that, but it might be a bit of a hassle.

Techs: Yes, by virtue of factor which could use a specific trait, a country flag or pretty much anything. Look at the tile blocker or ethics specific techs to see how it works.

Buildings: Yes, by using the potential. Look at buildings like the Grand Mausoleum or other government specific buildings, which can instead of using has_government use has_flag or has_trait or pretty much anything else.
 
Trait: Yes, but only for prescripted empires, the code you have works for that but will also prevent you from choosing it in the custom creator. It is possible to make a workaround of some sort if you would like to do that, but it might be a bit of a hassle.

Techs: Yes, by virtue of factor which could use a specific trait, a country flag or pretty much anything. Look at the tile blocker or ethics specific techs to see how it works.

Buildings: Yes, by using the potential. Look at buildings like the Grand Mausoleum or other government specific buildings, which can instead of using has_government use has_flag or has_trait or pretty much anything else.

Thank you for the info Axelius. I really appreciate it.
 
It appears to me that buildings only take techs as prerequisites.


Have you tried to make an event that gives your empire a modifier and/or set a flag at the start of the game? A lot of trait mods appear to do just that to allow for empire-wide modifiers. That way, you could try and make a tech that assigns everyone who doesn't have that empire modifier a weight of 0, effectively making that tech unique to specific traits.

Good info. Thank you.