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

SeamusFD

Corporal
45 Badges
Aug 31, 2015
29
14
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Tyranny: Archon Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • War of the Roses
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • 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
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
So as the above title explains, I have a problem with max rank buildings.

As of now I am creating a total conversion with my own terrain etc using the wiki and forums posts as my guide. One thing I can't find out though is how do you control the history of built buildings. As of now when I launch my game all buildings in all holdings are at max rank no matter what.

At first I thought this was controlled by technology, but alas no. Is it something specified in the titles' history? This has me stumped, if anyone can tell me that would be helpful.

If you need any sample files, I would be willing to provide, but It is safe to say that I have followed the title modding page of the wiki to a tea.

Thanks -
 
If you've replaced vanilla buildings, you may have forgotten to include 'extra_tech_building_start' attributes. It defines the additional tech required to randomly build buildings on game starts, stacking with the tech required for earlier buildings in the same chain.
 
If you've replaced vanilla buildings, you may have forgotten to include 'extra_tech_building_start' attributes. It defines the additional tech required to randomly build buildings on game starts, stacking with the tech required for earlier buildings in the same chain.
I will take a look, but my mod hasn't overwritten any vanilla buildings as of now so that shouldn't be a problem. I have edited the defines.lua file and the earliest start date is 14000, could that contribute to the problem in any way?
 
That would do it yes. The game's technology setup is set to be minimum at 700 and fully unlocked at 1500, so in 14000, all tech is there in every single country, satisfying the requirements for every single building. See 'Ahead penalty' here.
 
That would do it yes. The game's technology setup is set to be minimum at 700 and fully unlocked at 1500, so in 14000, all tech is there in every single country, satisfying the requirements for every single building. See 'Ahead penalty' here.
AFAICT, that's not strictly true. The way extra_tech_building_start works is that on startup, the game generates a random number between (province tech level - 1) and (province tech level) for each building in that province, and if the random number is less than or equal to extra_tech_building_start, the building will be built in that province at startup. Since there are only 8 tech levels in vanilla and you're probably not going to change that, what you can do is set extra_tech_building_start to a value like 10.0 and it will never be built at startup. This is even used in vanilla: check the buildings for trade posts in common/buildings/00_tradepost.txt.
 
AFAICT, that's not strictly true. The way extra_tech_building_start works is that on startup, the game generates a random number between (province tech level - 1) and (province tech level) for each building in that province, and if the random number is less than or equal to extra_tech_building_start, the building will be built in that province at startup. Since there are only 8 tech levels in vanilla and you're probably not going to change that, what you can do is set extra_tech_building_start to a value like 10.0 and it will never be built at startup. This is even used in vanilla: check the buildings for trade posts in common/buildings/00_tradepost.txt.

Ok, however this still doesn't seem to fix my current problem. In my defines.lua I have changed the NTechnology to reflect the changes in the times. As well I created a custom technology file for the kingdom I have added. Thus surely I would't have this problem. Any ideas?
 
Ok, however this still doesn't seem to fix my current problem. In my defines.lua I have changed the NTechnology to reflect the changes in the times. As well I created a custom technology file for the kingdom I have added. Thus surely I would't have this problem. Any ideas?
Let's say you've changed technology to have 20 levels instead of 8. To my knowledge, setting extra_tech_building_start to a value like 25.0 should make it so that the building is never built... however, there may be hardcoded limitations to this system that I am not aware of. If what I said fails, see if changing NTechnology defines back to 8 levels and then setting extra_tech_building_start to 10.0 does what you want it to, then start slowly tweaking your way to the endgoal. For example, it may be possible that the extra_tech_building_start system only really supports numbers up to 10.0, which would mean that it could still be used with 9 technology levels, but would fail if there were 10 levels or more.

As helpful as the CK2 wiki is, much of CK2 modding is still pretty undocumented. In absence of other mods that have done similar things (in your case, working with more than 8 technology levels), you'll most likely have to do your own experimentation to see what the hardcoded limits of CK2 actually are.
 
Let's say you've changed technology to have 20 levels instead of 8. To my knowledge, setting extra_tech_building_start to a value like 25.0 should make it so that the building is never built... however, there may be hardcoded limitations to this system that I am not aware of. If what I said fails, see if changing NTechnology defines back to 8 levels and then setting extra_tech_building_start to 10.0 does what you want it to, then start slowly tweaking your way to the endgoal. For example, it may be possible that the extra_tech_building_start system only really supports numbers up to 10.0, which would mean that it could still be used with 9 technology levels, but would fail if there were 10 levels or more.

As helpful as the CK2 wiki is, much of CK2 modding is still pretty undocumented. In absence of other mods that have done similar things (in your case, working with more than 8 technology levels), you'll most likely have to do your own experimentation to see what the hardcoded limits of CK2 actually are.

Yes I see that, however I have tried that as well as setting the
IDEAL_YEAR_LEVEL_0 and
IDEAL_YEAR_LEVEL_8 to appropriate years. I have also set all the default buildings' extra_tech_building to 10. Is there anything else in the way you define provinces or titles that might cause this, because I am still always seeing max buildings everywhere.

Edit: Removing all buildings from the project and overwriting the default ck2 building does lead to no buldings being made at all, if that help.

Creation of a new holding however ends up with the intended unleveled buildings, so it definitely something being done at the start off the game

Also my current tech level is set to 0.2 for everything on the map
 
Last edited:
That would do it yes. The game's technology setup is set to be minimum at 700 and fully unlocked at 1500, so in 14000, all tech is there in every single country, satisfying the requirements for every single building. See 'Ahead penalty' here.

Not only that, but IIRC there is a bug (regardless of the tech end year / province techs) which makes every building in dates 10,000 and over start built (if the potential is fulfilled).
 
Not only that, but IIRC there is a bug (regardless of the tech end year / province techs) which makes every building in dates 10,000 and over start built (if the potential is fulfilled).

Ok, are there any documentation or fixes for this bug? I would prefer to not have to change all my history files to a prior date xD
 
Ok, are there any documentation or fixes for this bug? I would prefer to not have to change all my history files to a prior date xD

Adding this to each building's "potential" block seemed to solve the issue for me (and the automatic building presence due to technology still worked!):
Code:
           has_game_started = yes

It could be worth a try for you.
 
Adding this to each building's "potential" block seemed to solve the issue for me (and the automatic building presence due to technology still worked!):
Code:
           has_game_started = yes

It could be worth a try for you.

Fantastic. This worked, now to go into all my files and change the potentials. Thanks for the solution, this has been bugging (pun intended) for weeks!