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

Stellaris Dev Diary #120 - New Economy System

Hello and welcome back to the Stellaris dev diaries! Today we're going to start talking about the next major update, which we have dubbed 2.2 'Le Guin' after Ursula K. Le Guin. Right now we're not ready to reveal anything about the precise nature of the update or whether it is accompanied by any DLC, other than to say that the Le Guin will have focus on trade and the economy, and that its release date is far away. Today's dev diary is going to be a bit on the foundational side, going over the new economic back-end we've implemented for 2.2.

New Economy System
The original economy system for Stellaris has always been something of a limitation for us. It's a sort of hybrid system, with resources being both scripted (and thus accessible to modders) and hard-coded (and thus inaccessible) in about equal measures. For example, under the old system ships would always cost minerals, as the code was set up for them to always cost minerals, and the only thing you could change was the amount of minerals they cost. Similarly, most things in the game that had an upkeep were hard-coded to use energy for upkeep, and again, only the amounts were able to be changed. A few things (such as for example Resettlement or the precise resources produced by a building) were more open than this, but generally the system made it quite hard to introduce new resources or change the way a particular empire might use a particular resource. The old system was also quite performance-intensive.

When we decided that we wanted to make the next major update be about the economy, the first thing we knew that we needed to do was to rewrite this system entirely. For the new system, we set out a number of goals:
1: The new system should make it easy to add new resources and swap the way resources are used
2: The new system should be as open to modding as we possibly could make it
3: The new system should improve performance

From this, we've created a new system that we call Economic Templates. Where previously there would be a jumble of different systems for how cost, production and maintenance of the different features in the game would work, there is now one unified system. Any single object in the game that can be owned by an empire and have an impact on the economy is called an Economic Unit. In the database files, an Economic Unit looks like this:

Code:
resources = {
    category = armies
 
    # Normal empires pay for armies with minerals
    cost = {
        trigger = {
            owner = { is_hive_empire = no }
        } 
        minerals = 100
    }
 
    # Hive Minds pay for armies partially with food
    cost = {
        trigger = {
            owner = { is_hive_empire = yes }
        }     
        minerals = 50
        food = 50
    }     

    # If Barbaric Despoilers, produce Energy while on enemy planets
    produces = {
        trigger = {
            owner = { has_valid_civic = civic_barbaric_despoilers }
            planet = { owner = { is_at_war_with = root.owner } }
        }
        energy = 3
    }     
 
    # Normal empires pay army upkeep with energy
    upkeep = {
        trigger = {
            owner = { is_hive_empire = no }
        }     
        energy = 1
    }
 
    # Hive Minds pay army upkeep with food
    upkeep = {
        trigger = {
            owner = { is_hive_empire = yes }
        }     
        food = 1
    }     
}

For those who cannot read our scripting language, this is an example I just created of how the new system can be used. It's for a regular assault army, which normally costs 100 minerals to build and has an upkeep of 1 energy, just as before. However, if your empire is a Hive Mind, the army will instead cost 50 minerals and 50 food, and costs 1 food in upkeep instead of 1 energy. Additionally, if you have the Barbaric Despoilers civic, armies that are located on enemy planets will produce 3 energy/month, paying for themselves and then some through wide-scale looting. This isn't an actual example from the internal build, but something I just created while writing this dev diary to show the possibilities that the new economic system opens up for for both us and modders - we could have fully biological empires that use food instead of minerals to build infrastructure, ships that produce research while in certain systems, leaders that give Unity... the possibilities are endless.
2018_08_09_1.png


Advanced Resources
With this system in place, we've been able to add several new 'advanced' resources to the game. They are as follows: Alloys, Rare Crystals, Volatile Motes and Exotic Gases. These resources are either manufactured from basic resources or found in rare planetary deposits (or both!) and are used to construct more advanced things in the game, such as ship components, megastructures, certain buildings and so on. There is also still a number of strategic resources such as Dark Matter and Living Metal that provide unique benefits, though precisely how many of these we will keep and how they are used is something we're still in the process of figuring out.

As part of these changes we're also in the process of reworking the top bar. Since we will now have rather too many resources to show them all, the top bar will now only show individual entries for resources that are important for your empire to always keep track of, with the rest shown as a consolidated entry that can be tooltiped for greater detail. Science is also consolidated into a total output of all 3 sciences, with tooltip showing the individual production of each. We're going to ensure that only relevant resources are shown individually, so most Machine Empires wouldn't have Food appear as an individual entry in the top bar, for example. We're also considering letting the player manually override this and decide which precise resources they want to keep track of within the available topbar space.

(Please note that the new topbar is nowhere near final and will have some ugly graphical issues. This is not how it will look on release)
2018_08_09_2.png


That's all for today! I know this dev diary was rather technical and perhaps primarily of interest to modders, but I felt it was important to explain the fundamental changes that have taken place in the game's back-end, both in relation to the changes coming in 2.2, and the possibilities that this opens up in the future for having empire types with radically different approaches to resource production and consumption. Next week we're going to finally start talking about the new Planetary Management system. See you then!
 
Would it be possible to have different sections of a same ship type cost different ressources? Like for corvettes, you could have the normal missile boat (1 small, 1 missile) and a more advanced version that would cost some kind of extra ressource that give (2 smalls, 1 missile).
 
Hello and welcome back to the Stellaris dev diaries! Today we're going to start talking about the next major update, which we have dubbed 2.2 'Le Guin' after Ursula K. Le Guin. Right now we're not ready to reveal anything about the precise nature of the update or whether it is accompanied by any DLC, other than to say that the Le Guin will have focus on trade and the economy, and that its release date is far away.

...

Oooo one of my favourite authors. Here’s hoping for some of the flavour/ themes of ‘The Dispossed’ come through. :)
 
How performance-intensive was the old system? Twitter teasers reveal that you've completely redone not only the resource system, but entire economy and population - do you have any idea if the rework will have a noticeable impact on game performance, especially late game lag?
Kinda arbitrary, old system was not that performance heavy in my opinion (yeah i was the one rewriting it). but it scaled poorly by design but i do not think it was any major culprit for the late game tbh
Would it be possible to have different sections of a same ship type cost different ressources? Like for corvettes, you could have the normal missile boat (1 small, 1 missile) and a more advanced version that would cost some kind of extra ressource that give (2 smalls, 1 missile).
Sure you can, but why not have 2 different sections in that case?
 
@Wiz I have a question unrelated to this dev diary but related to the future 2.2 update. How has the new planetary management system in general, and the removal of the tile system in particular, affected mid-late game performance on your end, or is it too early to tell? I can only imagine how much memory is put in to tracking the thousands and thousands of pop being shuffled around by the AI on a daily basis, but this is theoretically not as severe an issue without the tile system.

On an even more unrelated note, have you considered causing all claims on a particular system to be revoked if that system changes ownership? It's a real pain to suddenly lose an ally because they took systems I had claims on, causing them to hate me because I now have claims on them. At least the player can revoke their own claims, but as far as I can tell, the AI doesn't do this, making their alliances suddenly fall apart. Just saying.

With food being used for more than one purpose, could it be renamed to "biomass" with the apple symbol being replaced with a leaf?

Oh man, I really hope that hive minds get some special attention in 2.2. Devouring Swarms in particular are all about getting "food," but food is probably the most useless resource in the game right now. If hives starting using food for things other than growing pops, like paying minerals AND food to making buildings, that could potentially make them more interesting.
 
Last edited:
Imam looking forward to the dev diary, explaining the difference between the market and the trading enclaves.
Also maybe after a politics update it would be possible to embargo other countries by un vote so to cut them off the market
 
I'd rather that be a trait.

I mean there are animals that perform photosynthesis by a few methods (seaslugs that actually can manage it themselves like plants, coral that have symbiotic bacteria) also there are plants that don't get the majority of their food from photosynthesis.

I forgot about parasitic plants. I'd be okay with a instead trait, though it'd be nice to see the trait limit increased.
 
With food being used for more than one purpose, could it be renamed to "biomass" with the apple symbol being replaced with a leaf?

I really hope for this as well, at least if they plan to make "non mineral builders" and "mineral eaters" a thing. I admit this is a nitpicky point but if you eat minerals, then those stones are just food and having them separate from another resource named food would feel wrong. Same if you build using "food" that material stops being food.

I guess what I'm trying to say is that food is a way of using a resource, not something inherent in a resource itself.
 
I guess my point is that there SHOULD NOT BE an alternative to war.

Why do you want there to be less viable playstyles? If somebody gets their kicks from being a Mycon to the neighboring Ur-Quan what's that to you?

Stellaris is only "war game" in the sense that everything but warfare is woefully underdeveloped. If that finally gets fixed, and playing a non-purifier gets interesting, surely that's a good thing?

Ultimately, wargames are so common because violence is the most primitive and thus simplest way to depict conflict and competition. That simplicity is also ultimately the reason for spacegod mechanics which slow expansion and try (and fail) to cripple larger empires. Introducing more complex political, social and economic system should help smaller ones to find niches allowing them to at least survive to the game's end despite having no chance to match bigger ones militarily.

I guess my point is that THERE SHOULD BE alternatives to war; in fact war should be mostly for purifier or militaristic empires or between ideological enemies, and becoming a satellite to a powerful overlord should be a viable strategy rather than a prelude to a game over via diplo-annexation.
 
Yes, please let us choose which resources to display. Could we also be able to chose in which order the planets are listed? Pretty please? :D

I guess my point is that THERE SHOULD BE alternatives to war; in fact war should be mostly for purifier or militaristic empires or between ideological enemies, and becoming a satellite to a powerful overlord should be a viable strategy rather than a prelude to a game over via diplo-annexation.

Yeah this. Playing an Inward Perfection game and they get sort of boring eventually, as there's literally no way to expand if you don't go to war ... which I can't, and at this point not even the FE's declare war on me no matter what I do. Just waiting for an Awakening or Crisis, and even afterwards there won't be much to do.

There should be more victory conditions.

And I still like the idea of scenarios: Start in an already developed galaxy with a pre-set goal. Defeat X. Become a great federation. Amass X resources. Build Y Megastructure
 
Last edited:
Mods can add new resources easily, you say...

This is going to get really interesting.
 
@Wiz So judging from your twitter posts, we no longer build robots, but instead let them "grow" from "Roboticists"?
I think they just grow. Robotocists are only nessesary to maintain them, not to build them. A unique Consumer goods resource for Robots.
 
Yeah this. Playing an Inward Perfection game and they get sort of boring eventually, as there's literally no way to expand if you don't go to war ... which I can't, and at this point not even the FE's declare war on me no matter what I do. Just waiting for an Awakening or Crisis, and even afterwards there won't be much to do.

There should be more victory conditions.

I can't even win the Conquest victory condition as anything other than a FP/DE/DS since, as far as I can tell, the planets controlled by vassals/protectorates count towards the number of planets you control for the purposes of the Domination victory condition, so I always win the Domination victory because I conquered enough people. Add the fact that the Federation victory condition is basically borked because Federations are a complete mess right now there is only the Domination victory condition as far as I'm concerned.
 
I really think it's time to replace Dark Matter with something else.

It's a silly notion that will never be proven. When the actual phenomena in the standard model is found responsible for it, those who suggested dark matter are going to feel quite embarrassed.
I think you quite misunderstand the notion and concept of dark matter. Astronomers and physicists very much do not know what it is and make no claim to do so. That is why its coined "dark". It simply denotes: We do not understand this yet. Same deal as dark energy.
That dark matter is real is beyond despute. Just google rotation of galaxies and the bullet cluster.
 
Why do you want there to be less viable playstyles? If somebody gets their kicks from being a Mycon to the neighboring Ur-Quan what's that to you?

Stellaris is only "war game" in the sense that everything but warfare is woefully underdeveloped. If that finally gets fixed, and playing a non-purifier gets interesting, surely that's a good thing?

Ultimately, wargames are so common because violence is the most primitive and thus simplest way to depict conflict and competition. That simplicity is also ultimately the reason for spacegod mechanics which slow expansion and try (and fail) to cripple larger empires. Introducing more complex political, social and economic system should help smaller ones to find niches allowing them to at least survive to the game's end despite having no chance to match bigger ones militarily.

I guess my point is that THERE SHOULD BE alternatives to war; in fact war should be mostly for purifier or militaristic empires or between ideological enemies, and becoming a satellite to a powerful overlord should be a viable strategy rather than a prelude to a game over via diplo-annexation.

Personally, I think the right answer is somewhere in the middle.

I like Stellaris as a war game in the sense that it challenges you to survive in a hostile galaxy and to, eventually, occupy all of the map. I think this works because it makes your goal clear. As a player, I know that to survive and win this game I have to build a strong empire.

At the same time, I think you're right in that the player should have a wide variety of ways to do that. You should have ways to grow strong beyond mere conquest. Alliances, economic development, technological superiority, resource monopolies all should be viable paths, and you should be able to paint the map either as a conqueror or as a diplomatic envoy of peace.

That's at least the best case vision I would have for the game: A clear, simple purpose with complex ways of achieving it.
 
Personally, I think the right answer is somewhere in the middle.

I like Stellaris as a war game in the sense that it challenges you to survive in a hostile galaxy and to, eventually, occupy all of the map. I think this works because it makes your goal clear. As a player, I know that to survive and win this game I have to build a strong empire.

At the same time, I think you're right in that the player should have a wide variety of ways to do that. You should have ways to grow strong beyond mere conquest. Alliances, economic development, technological superiority, resource monopolies all should be viable paths, and you should be able to paint the map either as a conqueror or as a diplomatic envoy of peace.

That's at least the best case vision I would have for the game: A clear, simple purpose with complex ways of achieving it.

I don't see why painting the map should be any particular goal at all. In fact I think that achieving just 50% of the galaxy should be an incredible feature that should be almost impossible to do given the games time span. One of the goal should be to just survive one of the end game crisis. Painting the map or even making it possible is not really good game balance in my opinion. The only thing this promotes are warlike behaviors... eliminating all competition is by definition the most efficient way of surviving in a binary environment.

I do hope they soon scrap this ridiculous victory conditions... I really can't ever see myself play the game long enough to ever reach them to begin with... soo boring. What they need to do is make the game interesting and things always happening and mechanics to always interact with.

You should be able to play anything from a flesh eating hive to a peaceful xenophobe and have things to do until that crisis hit and you survive it intact.

When it comes to reason for playing I hope they will soon add some interesting mechanic that make each games focus different. More like individual mid term goals and things that can change during a game depending on what happens around you... perhaps a system where you somehow can choose what focus you want to take and when you reach it you get some ability and can choose a new one... perhaps it might also be a contest with others trying to do the same.