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

Soviet_Onion

First Lieutenant
57 Badges
Aug 21, 2009
230
90
  • Crusader Kings II
  • Steel Division: Normand 44 - Second Wave
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Sword of the Stars II
  • Semper Fi
  • Ancient Space
  • Naval War: Arctic Circle
  • King Arthur II
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - Campus
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Steel Division: Normandy 44 -  Back to Hell
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Age of Wonders: Planetfall
  • Cities: Skylines - After Dark
  • Stellaris: Ancient Relics
  • Supreme Ruler 2020
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings III
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Steel Division: Normandy 44
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
I'm thinking about revamping the way energy works. But however I'm playing to the mad scientist as I don't really know what I'm doing.

6f7d51788af74d5ab597dfc72fbbaa6852085d5f20c313acb8d1baaba8cf6376.jpg


Basically I didn't touch the energy and the food but I added a strategic resource called "power" to power all buildings. All buildings need it.

For the moment I have left this resource empire wide but ideally I want to make it "planet only" just like the food.

However I don't know how the AI will react if I make this resource "planet only". Is it able to handle that correctly?


In addition I would like to make the station dependant to a strategic resource like the enriched uranium I created but I would like the station able to "evolve" to another kind of "fuel" like the antimatter, dark matter etc... but these upgrades have to be possible in any ay.
I mean If I evolve from uranium powered station to Antimatter powered station I need to be able to go from the antimatter station to the uranium powered station if I need too.
That's the tricky part and I really don't know how to do that.
 
As far as I tested if you do something like that you need to go to every building that uses "power" and do something like this:

Let's imagine you have a building named "nuclear power plant" that gives 5 "power", you need to go to any building that uses power and put an ai condition so they only build this if there is a nuclear power plant. It's not a perfect system but it's a nice way (since I think you can't check "this planet has X resource being collected) to ensure the ai will have power to mantain the building.

Example from one of the buildings on SEGO:

ai_weight = {
weight = 0

modifier = {
weight = 15
from = {
any_tile = {
has_building = "building_plasticrefinery"
}
}
}
}

This makes the AI unable to build this if there is not a "plastic refinery" built on the planet.



About the stations, I don't have any idea about how to do that.

P.S.: Im also very interested in creating a accumulative resource that works only on the planet it's produced, like food. (in my case it will be pollution and will be invisible for the player, just used as check for events). Let's summon the masters on this matter @AlphaAsh and @Naselus
 
Last edited:
The AI won't handle it very well, no. You'll need to trick it, so that obtaining the power resource is a consequence of its more usual behaviour.

Weighting a building that collects an SR extremely high will cause conflict with some of the AI's usual choices. It then isn't uncommon to see the AI starve a planet just to obtain SRs on tiles.

Elth is correct that it is a good idea to restrict buildings to having dependencies. This makes the AI tend towards creating self-sufficient planets SR-wise, resulting in less problems with resource chains falling apart due to stupid sector restrictions. (@Wiz Please address this for the SR redo for Heinlein, thank you sir).

Local resources, like how food operates, doesn't work when tagging in soft-code. At least, when I've tried using the tags used with food, I still end up with a galactic-wide SR. is_rare only determines if an SR is shown in the SR inventory. I can't remember if it's still shown on tiles.
 
Many thanks for the explanations.

I believe it is a bit too ambitious right now to create a power SR. I need to get a better understading of how the AI runs its business


You'll need to trick it, so that obtaining the power resource is a consequence of its more usual behaviour.
Apparently.

Elth is correct that it is a good idea to restrict buildings to having dependencies. This makes the AI tend towards creating self-sufficient planets SR-wise, resulting in less problems with resource chains falling apart due to stupid sector restrictions. (@Wiz Please address this for the SR redo for Heinlein, thank you sir).

For a chain of building that grows larger it is perfect. However I intend to create several type of power stations, some are planet specific (like the windtraps for desert), to flavor the universe a bit. Oceanic planets will rely a lot on hydrokinetic power, desert planets will rely primarily on wind farms, etc....

I can't really constraint the building of the first ressource production building on the existence of a given power facility. But for the next buildings in the specific ressource chains that will be perfect for sure.


Going to scratch my head :)