• 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!
 
This is great news. I dream of playing as a trade-based empire, and now that looks as if it may be possible. Along those lines, any consideration into allowing scientific research being committed directly to resource production? For example, instead of research for a new ship type, your research increases resource production and you in turn buy the new ship design from a non-hostile empire. Or something like that...
 
The most promising thing about the trade and economy rework is that it opens possiblities;

  1. The resources located in your empire may influence tech development. Such like in famous sci fi stories, alien race A may favor shields and lasers, while race B will favor armor and rockets or one empire has better sensors, while another have better shields.. I hope this is the case, as it makes each empire special and distinctive.
  2. Special resource - whether found or manufactured - now there is a reason to go to war. Need special metals for your warship, you don't have it and your neighbour does? WAR! Different kind of war - Economy war - Would you be able to withhold resource or have a monopoly of it, means that opponents may not easly build battleship or have lasers and you influence the galactic economy. Alternative market - Would there be black market or smuggling?
  3. Mod created or dev created new races - Now we can have bioships, energy beings, silicon life forms
  4. Unique empire - Create an empire that build and sells robots. Or one that sells slaves. Strata in society; One that is ruled by peacocks, adminstrated by parrots, hawks are soldiers and admirals, while the non birds are slaves.

Couldn't agree more. These have all been things I've long hoped for.

Especially #1. I'd love the idea of a game where empires are formed in part based on their geography and the available resources.
 
The old system was also quite performance-intensive.

How exactly was the old system performance-intensive?
 
I don't think this really makes sense. After all, if I have to defeat the guy who has the special metal in order to get it, I don't really need the special metal, do I?

I think it's more about getting the resource before you fall too far behind. Maybe he got to that good system before you. Or maybe you've gotten as big as you can without more resources. Or maybe he's getting big enough to finally make full use of it. Or maybe you've teched up to the point where that resource is now useful.

Maybe tensions are growing and the two of you are now in an arms race, in which case it may well be better to strike before you're ready in order to deny him that shipbuilding resource.

In any case, circumstances change. I'd be excited about a way of executing resources that allows those circumstances to change such that a previously stable status quo is now untenable. Here, there are resources that you have to go to war over.
 
I like the changes which sound very interesting for Stellaris. The UI coming with the update looks very unappealing. It resembles other PDx games way too much, I have the suspicion that loads of stuff will be hidden away by layers upon layers of confusing UI.
 
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.
 
If you think I am being hysterical, just wait until next week, the devs will (most probably) drop the bombshell then.

The removal of the tile system might lead to a forum-based clusterfuck worse than the FTL rework, but then again, people might be just so fed up with the tile system that they frankly don't give a damn.

In any case, you will have your chance to join the chorus of wailing tile-system lovers next week.

Or you can just go watch A-Spec's YouTube videos, if you want to become enlightened today.

 
If you think I am being hysterical, just wait until next week, the devs will (most probably) drop the bombshell then.

The removal of the tile system might lead to a forum-based clusterfuck worse than the FTL rework, but then again, people might be just so fed up with the tile system that they frankly don't give a damn.

In any case, you will have your chance to join the chorus of wailing tile-system lovers next week.

Or you can just go watch A-Spec's YouTube videos, if you want to become enlightened today.


I didn't have strong opinions about the tile system so I'm not that sad to see it scrapped to something with more potential.
 
The market will ensure that it's always possible to get your hands on fundamental resources that you need for things like ship building, though it might end up quite expensive. More on that in another DD though.

While I will certainly wait to see how you will implement this my fear is that you are making a system very similar to Endless Space 2. This game is actively hampered by it's market system and how RNG can hand you (or your opponent) a win before the game event starts.

The major problem in ES2 is that essential military technologies (and some development requirements) are gated behind these resources. It's probably avoidable so long as development and power are not restricted by resource access.

Worried but hopeful.
 
Good ideas seem so simple once they present themselves. It seem this systems offer a lot of flexibility. Great work!

@Wiz It's not entirely clear to me how this system improves performance or why the current one is so performance heavy. Is it possible to do a (filler) DD some time on this?
 
If you think I am being hysterical, just wait until next week, the devs will (most probably) drop the bombshell then.

The removal of the tile system might lead to a forum-based clusterfuck worse than the FTL rework, but then again, people might be just so fed up with the tile system that they frankly don't give a damn.

In any case, you will have your chance to join the chorus of wailing tile-system lovers next week.

Or you can just go watch A-Spec's YouTube videos, if you want to become enlightened today.

I hope you're wrong. I hated, and still hate, the removal of worm holes drives, however the Devs were right that it lead to a better game. The wormhole drive was unique and amazing. Even after getting PJD it had uses. That's how good it was. Now its gone.

Will I be rolling back to 1.9 any time soon? No. Any time in the distant future? Probably not. That one love of mine was cut out, but so much more was improved.

As for the tile system. Good riddance to bad rubbish. Its a mess of a click fest, and I hate click fests. In games like Civ or AoW it makes some sense, but on a planet it doesn't. a planet is just too vast. As an abstract construction (you have 12-25 abstract spaces to build stuff) it still doesn't make sense since there are positional bonus. You can go on and on explaining away the tile system, but its a contrived mess, and adds busy-work, plus it allows for Ring Worlds to really be what they should have been before: A single massive planet. Similarly, habitats shouldn't have size limits. They should, lets say, start off as a size 12 and then you should be able to pay to upgrade them endlessly. Similarly you can build sky cities, or habs orbiting your existing planet (and have their pops add as one big planet).

I could go on and on as to why the tile system should be removed, but I'll stop there.
 
This changes looks interesting, but i for one will wait to know how the planets economy work now before thinking anything.
 
While I will certainly wait to see how you will implement this my fear is that you are making a system very similar to Endless Space 2. This game is actively hampered by it's market system and how RNG can hand you (or your opponent) a win before the game event starts.

The major problem in ES2 is that essential military technologies (and some development requirements) are gated behind these resources. It's probably avoidable so long as development and power are not restricted by resource access.

Worried but hopeful.
The system being teased has apparent roots in Victoria, which used a global marketplace that made it so you could *usually* get needed resources. It was possible to close your economy and hog your resources, but it was enormously disadvantageous to do so.

It remains to be seen if it will actually encourage players to plug into it or if players will tend to just build their own refineries for every resource they get.
 
"The possibilities are endless"

I mean.. with at system like that in place, who knows... you could even... have.... an empire that eats minerals.... *cough*silicoid*cough*

:D
 
This sounds very promising. I like it.