Pre-Order the Game!

Desura Digital Distribution

Monday, July 30, 2012

Resources and Population

I'm in progress of implementing "Resources" into the game.  Instead of having resources hard-coded, they are defined in a xml file.

Each resource type have several attributes:  "Storable" (can be stored between turns, or be converted into another resource type), "ConvertsTo" (which resources it converts to if it's not storable, as well as how much of that resources it converts to).  It also defines which icon and display text to show.

For example, food would have "Storable = False", and "ConvertsTo = "Billion Credits,0.5", so for each extra food not consumed this turn, you get 0.5 BC.

Region types, region specials, and planetary specials also defines which resources they produce and consume.  There are six attributes that you can define for each region/special/building:  "produces", "consumes", "multiplyProduce", "multiplyConsume", "addProduce", and "addConsume".  Produce types are resources generated, and Consume are resources that are consumed.

The base "produces" and "consumes" are how much of resources consumed per unit of population.  So if a mining region has this: "produces=Ores,2", it would produce 2 Ores resource for each 1 unit of population.

MultiplyXXX multiplies the amount produced or consumed.  So if you have an automated factory that doubles the industry generated, but also consumption, it would have "multiplyProduce=Industry,2" and "multiplyConsume=Ores,2"

AddXXX adds the amount after the population factor has been calculated.  If the above automated factory adds 3 industry and consumes 3 ores regardless of population in the region, it would have "addProduce=3" and "addConsume=3"

Races also can have those attributes as perks/weaknesses.  For example, Zero People have no use for food, so they have "multiplyProduce=Food,0" which forces the race to never output any food.  The only way is if the region or planet has a building that "addsProduce=Food,X".

This will allow people to really mod the regions, resources used, and racial perks.  Also, I plan on having research projects consume resources (Research Points will be a resource), so I can have some technologies require some exotic materials such as radioactives or rare gems to research.


Now, for population.  I've been kicking around the idea of having each race define how much population per region they can have for each planet type, instead of having the planet type define the amount.  As an example, right now, it have 15 population per region for terran planets.  So if a terran planet has 8 regions (as shown in previous screenshots), it has 120 max population.  If Zero People prefers the Arctic planet type (they love the cold, it's good for electronics), Humans prefers the Terran, Space Hamsters prefers Steppe, and Salix Cybornia prefers Jungles, it'd make for a more racial feeling, instead of making them be the same except for attributes and graphics.

I could then have them define different regional population limit for each planet type, but then the problem arises.  If Humans and Zero People occupy the same planet, and shares all the regions, and the climate is Arctic.  The humans would then have a population limit of 5, and Zero People have limit of 15 per region.  Obviously it don't make sense to add them up for a limit of 20, or you'd just fill every planet with every race.  The question then is, how do it allocate the "space" between the two races?  If I use a "space percentage" in that Zero People uses 25% less space for arctic (base of 10, so it uses 7.5 space for 10 population, and 10 space for 15 population), and 100% more space for humans (base of 10, but have 5 population since each uses 2 space), it could work, but would be so complicated that the players would just get confused.  There's no simple answer to this, aside from restricting each region to have only one race.

If there's only one race for each region, there will be UI issues that I will need to resolve.  So, unless a good solution is found, I will scrap this idea of having different racial region max population for each planet type, and just keep it the way it is now, with the planet type defining the max population.

Ideas and suggestions are welcome!

No comments:

Post a Comment