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

Kayden_II

Banned
43 Badges
Jan 6, 2014
1.909
1.909
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Europa Universalis 4: Emperor
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Stellaris: Federations
Hai ...

I'm tweaking some Parameters in the defines.lua for my Stellaris-Game-Play (Economic-Part), but I'm a Little Bit confused about Something ...

NDefines.NAI.MILITARY_STATION_BUDGET_FRACTION = 0.00;
NDefines.NAI.SAVINGS_BUDGET_FRACTION = 0.00;
NDefines.NAI.ARMY_BUDGET_FRACTION = 0.05;
NDefines.NAI.NAVY_BUDGET_FRACTION = 0.15;
NDefines.NAI.STATION_BUDGET_FRACTION = 0.30;
NDefines.NAI.BUILDING_BUDGET_FRACTION = 0.40;
NDefines.NAI.ROBOT_BUDGET_FRACTION = 0.10;

NDefines.NAI.MINERAL_MILITARY_STATION_BUDGET_FRACTION = 0.00;
NDefines.NAI.MINERAL_NAVY_BUDGET_FRACTION = 0.15;
NDefines.NAI.MINERAL_STATION_BUDGET_FRACTION = 0.25;
NDefines.NAI.MINERAL_BUILDING_BUDGET_FRACTION = 0.25;
NDefines.NAI.MINERAL_SPACEPORT_BUDGET_FRACTION = 0.05;
NDefines.NAI.MINERAL_COLONY_BUDGET_FRACTION = 0.10;
NDefines.NAI.MINERAL_ARMY_BUDGET_FRACTION = 0.05;
NDefines.NAI.MINERAL_TILE_BLOCKER_BUDGET_FRACTION = 0.10;
NDefines.NAI.MINERAL_ROBOT_BUDGET_FRACTION = 0.05;

NDefines.NAI.ENERGY_COLONY_BUDGET_FRACTION = 0.3;
NDefines.NAI.ENERGY_FACTIONS_BUDGET_FRACTION = 0.15;
NDefines.NAI.ENERGY_TILE_BLOCKER_BUDGET_FRACTION = 0.2;
NDefines.NAI.ENERGY_ROBOT_BUDGET_FRACTION = 0.2;
NDefines.NAI.ENERGY_SAVINGS_BUDGET_FRACTION = 0.15;

NDefines.NAI.SECTOR_STATION_BUDGET_FRACTION = 0.40;
NDefines.NAI.SECTOR_BUILDING_BUDGET_FRACTION = 0.60;
NDefines.NAI.SECTOR_SPACEPORT_BUDGET_FRACTION = 0.00;
NDefines.NAI.SECTOR_ARMY_BUDGET_FRACTION = 0.00;

NDefines.NAI.SECTOR_BUILDING_MAINT_BUDGET_FRACTION = 0.60;
NDefines.NAI.SECTOR_STATION_MAINT_BUDGET_FRACTION = 0.40;
NDefines.NAI.SECTOR_ARMY_MAINT_BUDGET_FRACTION = 0.00;
 
NDefines.NAI.MILITARY_STATION_BUDGET_FRACTION = 0.00;
NDefines.NAI.SAVINGS_BUDGET_FRACTION = 0.00;
NDefines.NAI.ARMY_BUDGET_FRACTION = 0.05;
NDefines.NAI.NAVY_BUDGET_FRACTION = 0.15;
NDefines.NAI.STATION_BUDGET_FRACTION = 0.30;
NDefines.NAI.BUILDING_BUDGET_FRACTION = 0.40;
NDefines.NAI.ROBOT_BUDGET_FRACTION = 0.10;
What means this Stuff ? ...

NDefines.NAI.MINERAL_MILITARY_STATION_BUDGET_FRACTION = 0.00;
NDefines.NAI.MINERAL_NAVY_BUDGET_FRACTION = 0.15;
NDefines.NAI.MINERAL_STATION_BUDGET_FRACTION = 0.25;
NDefines.NAI.MINERAL_BUILDING_BUDGET_FRACTION = 0.25;
NDefines.NAI.MINERAL_SPACEPORT_BUDGET_FRACTION = 0.05;
NDefines.NAI.MINERAL_COLONY_BUDGET_FRACTION = 0.10;
NDefines.NAI.MINERAL_ARMY_BUDGET_FRACTION = 0.05;
NDefines.NAI.MINERAL_TILE_BLOCKER_BUDGET_FRACTION = 0.10;
NDefines.NAI.MINERAL_ROBOT_BUDGET_FRACTION = 0.05;
That is the AI-Behaviour to spend its STORED Minerals ?

NDefines.NAI.ENERGY_COLONY_BUDGET_FRACTION = 0.3;
NDefines.NAI.ENERGY_FACTIONS_BUDGET_FRACTION = 0.15;
NDefines.NAI.ENERGY_TILE_BLOCKER_BUDGET_FRACTION = 0.2;
NDefines.NAI.ENERGY_ROBOT_BUDGET_FRACTION = 0.2;
NDefines.NAI.ENERGY_SAVINGS_BUDGET_FRACTION = 0.15;
That is the AI-Behaviour to spend its STORED Energy-Credits ?

NDefines.NAI.SECTOR_STATION_BUDGET_FRACTION = 0.40;
NDefines.NAI.SECTOR_BUILDING_BUDGET_FRACTION = 0.60;
NDefines.NAI.SECTOR_SPACEPORT_BUDGET_FRACTION = 0.00;
NDefines.NAI.SECTOR_ARMY_BUDGET_FRACTION = 0.00;
What means this Stuff ? ...

NDefines.NAI.SECTOR_BUILDING_MAINT_BUDGET_FRACTION = 0.60;
NDefines.NAI.SECTOR_STATION_MAINT_BUDGET_FRACTION = 0.40;
NDefines.NAI.SECTOR_ARMY_MAINT_BUDGET_FRACTION = 0.00;
This means (for Example), that the AI-Sector aims to realize, that 60% of its Maintenance-Costs should be for Buildings and 40% of its Maintenance-Costs for Stations ?
 
All of these files are related to AI. Because Ai economies differ the game uses 100% being the full economy(or 1.00). Anything else is a fraction of that number and should equal 1.00.(in theory)
So in those files they dictate how much they AI will spent on building things.
For example the NDefines.NAI.ENERGY_SAVINGS_BUDGET_FRACTION = 0.15; Dictates how much energy the AI will save for future use.
NDefines.NAI.MINERAL_ROBOT_BUDGET_FRACTION = 0.05; Dictates how much the AI will spend on building robot pops etc.
 
Am I right with the Stuff in my Picture ?

007.jpg


And ...

NDefines.NAI.EXPECTED_ENERGY_PER_POP = 1.00;
... This is related to the Gross-Energy-Production (56.77 ECs in my Picture) or to the Net-Energy-Production (5.65 ECs in my Picture) ?
... It includes all Modifiers ? + It is related to the whole EC-Production (including Tile-Bonuses and Stations) ?
NDefines.NAI.EXPECTED_ENERGY_BASE = 20;
... Has This a (hidden) Relation to Above ?
 
Yes your right. Generally thats how it would look to the AI.
(Although they may not be 100% accurate there more of a general guideline the AI aims to meet) [For example the AI will sometimes make no minerals or energy.]

NDefines.NAI.EXPECTED_ENERGY_PER_POP = 1.00;
The Defines file is quite complicated and I haven't tested all the options, but I think this one is related to excess energy.(My reasoning is late game most Empires will have around 500 pops, but they will need vastly more energy, like 1000 credits a month) Yet they would also never need to make +500 energy a month.(So I think this is just telling the AI to maintain at least 1 energy per pop in total.)

And the NDefines.NAI.EXPECTED_ENERGY_BASE = 20;
is just the minimum energy the AI expects to have in reserves I think.(again I don't know all the commands there's 100s of them)

While I am very interested in testing all the different AI options and how to change them(I haven't yet had the time)

What you can do is use the human_ai console command to watch the AI run your country and then just change one of the variables to an absurdly high number or low number and see exactly how it impacts their behaviour.
 
afaik NDefines.NAI.EXPECTED_ENERGY_BASE = 20 (and same for research and minerals) is the targeted minimum income for each ressource per month. I tried to raise those numbers but it is difficult to tell by how much it is really affecting AI and what if this value is too big. So far i try to get the AI do more research, but sadly doesnt seems to get more research especially endgame. For minerals/energy, i think it works as i describe since AI gets lots of tradeable minerals/energy (if it is willing to trade) pretty quickly. I might be wrong, but it is what i've observed so far by tweaking those values, but i didnt done any math prior, just trying to raise those numbers to get near mid/end game player's values i observe myself running my modded empire.

Edit: Btw i suppose its better to tune those values with NDefines.NAI.MIN_RESOURCES_TO_BUILD_ORBITAL_STATION, NDefines.NAI.OUTPOST_STATION_RESOURCES_BUILD , NDefines.NAI.OUTPOST_STATION_RESOURCES_NEIGHBORS_BUILD and NDefines.NAI.OUTPOST_STATION_DISTANCE_MIN
in order to get the AI grab more resources.

I've yet to familiarize myself with the console for testing purposes, as i dont use it since i dont know proper commands for testing the AI ^^
 
Last edited: