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

BeingDS

Sergeant
64 Badges
Jan 3, 2015
67
35
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Leviathan: Warships
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Mandate of Heaven
  • Empire of Sin
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • The Showdown Effect
  • Europa Universalis III Complete
  • Europa Universalis III Complete
How can I make a building that can only go in certain provinces?

For example, a Port building that can only go in port cities, or a Farm building that can only go in cities with "Farmland" terrain, or a Mine building that can only go in Hill provinces that have Iron, Gemstones, Base Metals, etc.?

This is not working (building shows up, but can be built in any city, not just ports, even in provinces with zero coastal cities):
Code:
port_building = {
    trigger_if = {
        AND = { 
            province.is_port = yes
            NOT = { province.owner.is_tribal = yes }
        }
    }
    local_commerce_modifier = 0.15
    supply_limit_modifier = 0.1
    local_ship_recruit_speed = -0.025
    local_state_trade_routes = 1
    global_capital_trade_routes = 0.1
   
    cost = 200
    time = 210
   
    order = 5
}

I have also tried can_build_building = { limit = { ... }} instead of trigger_if... but no success.
 
I haven't sat there and tried every possible iteration but I would guess the buildings don't support triggers because of how simplified they made the system. Four buildings applied to all provinces and that's it; maybe they will add trigger functionality if they ever expand their own buildings options or if there is strong enough modding request.

Your best bet for this would be to remove their building UI and create your own building system from scratch (not easy, but doable).
 
I haven't sat there and tried every possible iteration but I would guess the buildings don't support triggers because of how simplified they made the system. Four buildings applied to all provinces and that's it; maybe they will add trigger functionality if they ever expand their own buildings options or if there is strong enough modding request.

Your best bet for this would be to remove their building UI and create your own building system from scratch (not easy, but doable).
Thanks for replying. I can't understand why they would ever think that making things like this hard/impossible to mod would be a good idea. They know their modders by now. It's like they want us to be mad at them.
 
How can I make a building that can only go in certain provinces?

For example, a Port building that can only go in port cities, or a Farm building that can only go in cities with "Farmland" terrain, or a Mine building that can only go in Hill provinces that have Iron, Gemstones, Base Metals, etc.?

This is not working (building shows up, but can be built in any city, not just ports, even in provinces with zero coastal cities):
Code:
port_building = {
    trigger_if = {
        AND = {
            province.is_port = yes
            NOT = { province.owner.is_tribal = yes }
        }
    }
    local_commerce_modifier = 0.15
    supply_limit_modifier = 0.1
    local_ship_recruit_speed = -0.025
    local_state_trade_routes = 1
    global_capital_trade_routes = 0.1
 
    cost = 200
    time = 210
 
    order = 5
}

I have also tried can_build_building = { limit = { ... }} instead of trigger_if... but no success.
have you tried the keyword
Code:
allow = {
    province.is_port = yes
}
that might work becuase the use that for miltary_party
Code:
allow = {
   NOT = { is_tribal = yes }
}
the sope might be country not provence so try this one too
 
You could theoretically go and make a "visible =" argument to the container of buildings that are created.
You can then write:
Code:
visible = "[Not(And(EqualTo_string(BuildingItem.GetBuilding.GetName, 'YourBuilding'), EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Hills')))]"

For a building named, YourBuilding (Name from localisation) you can just make the second EqualTo_string argument to an Or() and include several TerrainNames that this building should not appear in. So, it is certainly doable, but you would have a very big line of conditional logic that is very hard to read.

Example for YourBuilding, appearing in every terraintype but not in Forest and Hills:
Code:
visible = "[Not(And(EqualTo_string(BuildingItem.GetBuilding.GetName, 'YourBuilding'), Or(EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Hills'), EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Forest'))))]"
 
You could theoretically go and make a "visible =" argument to the container of buildings that are created.
You can then write:
Code:
visible = "[Not(And(EqualTo_string(BuildingItem.GetBuilding.GetName, 'YourBuilding'), EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Hills')))]"

For a building named, YourBuilding (Name from localisation) you can just make the second EqualTo_string argument to an Or() and include several TerrainNames that this building should not appear in. So, it is certainly doable, but you would have a very big line of conditional logic that is very hard to read.

Example for YourBuilding, appearing in every terraintype but not in Forest and Hills:
Code:
visible = "[Not(And(EqualTo_string(BuildingItem.GetBuilding.GetName, 'YourBuilding'), Or(EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Hills'), EqualTo_string(ProvinceWindow.GetProvince.GetTerrainName,'Forest'))))]"
So instead of making it so that the building cannot be built in a certain province, it would be "buildable" there, but not visible.
 
have you tried the keyword
Code:
allow = {
    province.is_port = yes
}
that might work becuase the use that for miltary_party
Code:
allow = {
   NOT = { is_tribal = yes }
}
the sope might be country not provence so try this one too


I tried this and didn't work:

Code:
aestii_building = {
    global_population_growth = 0.5

    allow = {
        OR = {
            country_culture_group = baltic
            country_culture_group = proto_european
        }
    }
 
    order = 5
    cost = 10
    time = 30
}
 
I had this problem too.
I'm making mod "War of Conquest". We, as Targaryens, can conquer all world, but I've decided, that I'll add some magic and magical buildings. I've just made them too expensive to build them and I've made decision. But it's not good decision, when you'd like to spam it everywhere.
 
It looks like they do not have any intention of making buildings moddable based on the screenshots for upcoming version; they are putting the building list horizontal which means they don't intend for it to scroll or expand. I plan to work on a building system at some point with a scripted GUI that allows flexibility for modding; when I do I will make the framework available for other people to use for buildings in their own mods. (no promises on when that'll be done though).
 
How? Would be interesting to see. ;) I did building mods for Hoi4 and IR, too.

Since the actual building system is threadbare and no real modding commands (you can add a level of building but you can't start construction or remove buildings) I was going to use the scripted GUI functions to create a new interface and the "buildings" would just be province modifiers. Similar to what I've done with state-level buildings for the next version of my I:R mod.
 
Since the actual building system is threadbare and no real modding commands (you can add a level of building but you can't start construction or remove buildings) I was going to use the scripted GUI functions to create a new interface and the "buildings" would just be province modifiers. Similar to what I've done with state-level buildings for the next version of my I:R mod.
I'd certainly be interested in that.

Does anyone know if there is a guide on the forums for the scripted GUIs? I've messed around with them a bit and figured out the basics, but there's a lot I don't know.
 
I'd certainly be interested in that.

Does anyone know if there is a guide on the forums for the scripted GUIs? I've messed around with them a bit and figured out the basics, but there's a lot I don't know.

Same here. This could solve many of my problems.