Resources

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Resources

#1 Post by gvdm »

This is a change to the resource management of FreeOrion. The resource system has been changed to produce small quantities of the resources generally and the focus system to greatly boost production.

Something I came across was the slow startup of a FreeOrion game. Untill you have more than 3 planets managing your economy is a plain hassle. The current focus system of FreeOrion allows only resource to be produced, the focused one.
The Cultural Archive is a hack to allow a single planet empire to exist. With a larger empire this management system is still noticed as switching the focus of planets creates major swings, resulting in a 'sensitive' feel for the economy.

This change greatly helps the beginning of an empire, allowing a much smoother startup without so many 'dead turns' at the beginning.

The blockaded planets dying quickly was also a symptom of this economic setup. Planets that are blockaded and not food focused no longer die, they just famine and shrink to their smaller food production, which is usually still crippling unless on a planet suited to that species.
This change still requires an interdependent economy in the empire as most planets won't reach their target population without a farming focus or food surplus from somewhere, especially if the planet is not favourable for the species. Specialised planets with high focused resource output are still integral to the gameplay as the focus is a multiplier effect.

Currently Humans are the only species using the new resource layout, if I receive any postive feedback I will edit the rest of the species to work similarly.
Changes include:
  • Seperated general and focused production for farming, mining, industry and research in the species definition.
    Making some (not all, especially not the very powerful ones, just the ones where the tech sounds generally applicable) techs apply to all producing planets.
    Updated the descriptions for techs I changed.
    Balancing of the new resource layout (gameplay tested but further balancing will no doubt happen).
    Removal of Cultural Archive as a startup building.
    I noticed that due to bitrot some of the tech descriptions no longer matched the techs so I fixed that.
Attached are new techs.txt, eng_stringtable.txt and also a patch file (please let me know if a different format is required). I would attach species.txt, the most important one, but it is too large (a good indication that a template/inheritance system is required for species, most of the file is repetitive biolerplate). Also, starting_buildings.txt would have been attached but 3 files is the limit for attachments (and change is simple, remove cultural archive line).

What is still lacking is more descriptive text in the breakdown of a resource's production. As these changes are partially in the species definition the hover breakdown of a resource creates more than one "Species Human +X" text in the hoverbox when a resource is focused. My suggestion is to allow descriptions for EffectsGroup which would involve a change to the parser. This could than have "Human Farming +X, Focused Farming +Y" which I believe is much nicer. This would also be nice for brief expanded descriptions for species which have a species specific bonus to a resource stat.

Suggestions are of course welcome, considerations I've been tossing up is making Good planets not food sustainable without a farming focus and making mining be just population dependent (unless focused, in which case give a fixed gain along with a population bonus).
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

eng_stringtable.txt
(222.97 KiB) Downloaded 111 times
techs.txt
(106.25 KiB) Downloaded 98 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Resources

#2 Post by eleazar »

gvdm wrote:This is a change to the resource management of FreeOrion. The resource system has been changed to produce small quantities of the resources generally and the focus system to greatly boost production.
I agree that there are issues remaining with the current focus system. For those of us who can't readily patch and recompile, can you explain in more detail what the focus system is like with your changes?

gvdm wrote:The Cultural Archive is a hack to allow a single planet empire to exist. With a larger empire this management system is still noticed as switching the focus of planets creates major swings, resulting in a 'sensitive' feel for the economy.
It is sorta a hack as implemented, but i like the general concept-- that a homeworld is more suitable, and valuable for your species than a random planet of the same type.
gvdm wrote:Attached are new techs.txt, eng_stringtable.txt and also a patch file (please let me know if a different format is required). I would attach species.txt, the most important one, but it is too large (a good indication that a template/inheritance system is required for species, most of the file is repetitive biolerplate). Also, starting_buildings.txt would have been attached but 3 files is the limit for attachments (and change is simple, remove cultural archive line).
You could probably zip them all together and thus meet the file size limit.
gvdm wrote:...and making mining be just population dependent...
I lean towards doing that.

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#3 Post by gvdm »

The great thing about the effects script is that no recompilation is necessary. Just overwrite the files in FreeOrion/default with the supplied files and viola, when the game starts new scripting is used.
I do however concede that a .patch is not the most effective method of distributing updates for non technical people.

In more detail. Food is always generated and is generated in accordance with planet type and population size. Focusing doubles the production. Similar for mining although planet size and population are taken into account, focusing once again increases the amount. Industry and research are produced in relation to population size, and being focused greatly increases output.

Some techs were made to apply regardless of focus. As a downside of this the techs now also apply to species that do not have that focus. Two solutions, make these techs be multipliers of the species bonus (0*x=0) or add a condition checking for that. As this condition doesn't exist I'm going to make techs just be multipliers. Which actually makes sense, a species good at industry would be able to make use of robotics better than a species which is not. Techs which only apply to focused resources are left to population dependent if they were already as the species must have that available as a focus

As a booster I have nothing against the cultural archives, maybe just tweak it to be a bit more unique, not just resource boosting but also adding some other element.

So far, I've found it plays well.

Update coming.
Attachments
resources.zip
(86.56 KiB) Downloaded 92 times

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#4 Post by gvdm »

And here is the update.
Lots of balancing along with more tech updates to fit in the new system.
Also, the computronium moon special updated.
The Chato species has also been reworked to work with the new resource layout
Attachments
resources.zip
(89.18 KiB) Downloaded 86 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Resources

#5 Post by eleazar »

gvdm wrote:I noticed that due to bitrot some of the tech descriptions no longer matched the techs so I fixed that.
I have a flu, so i'm not doing any higher-order thinking/testing today, but if you can split out the fixed text descriptions from the ones you changed for your focus changes, i'll commit those today, and thus decrease the difference between your patch and the repository.

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#6 Post by gvdm »

I think it was symbiotic biology and maybe another tech or two (which I have also changed and therefore I can't find the separate fix). I'll look into this a bit further.
Also, all my contributions are GPL 2.0 or later and CC-BY-SA 3.0

Zireael
Space Dragon
Posts: 429
Joined: Mon Aug 15, 2011 5:33 pm

Re: Resources

#7 Post by Zireael »

Love gvdm's changes. Brilliant!

Now, if only I could download the newest build without all the hassle with compiling (sorry, tried my hand at it once and never again!) ...

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#8 Post by gvdm »

As I'm going through the list I've noticed that some species just seem weak in general, the Cynos for example, can't mine or do industry but get no bonuses to farming or research. Now I'm aware that some species are non playable so I'll just assume this is a conscious design decision and leave as is. However I seem to remember there being more variation between species in game than what species.txt describes for their resource production. Even the Hidden Gardeners which should be awesome at farming have only the standard farming boost and its the only focus they have. So either this boost happens somewhere other than species.txt or...

Thanks for the positive feedback :-) attached is a fully reworked species.txt
Attachments
species.txt.zip
(8.4 KiB) Downloaded 97 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Resources

#9 Post by eleazar »

gvdm wrote:As I'm going through the list I've noticed that some species just seem weak in general, the Cynos for example, can't mine or do industry but get no bonuses to farming or research. Now I'm aware that some species are non playable so I'll just assume this is a conscious design decision and leave as is. However I seem to remember there being more variation between species in game than what species.txt describes for their resource production. Even the Hidden Gardeners which should be awesome at farming have only the standard farming boost and its the only focus they have. So either this boost happens somewhere other than species.txt or...
The boost doesn't happen yet. Species are currently all the same except for the EP, what kinds of ships they can or can't build, and what foci they can use. And the super-testers have near omniscience.
I judged it would be too much of a pain (and too error prone) to try to make any improvements to the current basic focus system if various species had more of their currently planned variations. So they are still pretty much the same.

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#10 Post by gvdm »

...and it's back again. This time round the changes were way more simple due to macros being around. I spent most of my time hunting after a typo, "Scope = = [".

What still annoys me is effects ordering, that is, I would like the focus multiplier to kick in after all the techs and specials have been tallied, to make it really count, whereas, at the moment it just currently boosts on population. Has there ever been any discussion on a weight/priority for effects, and then just sorting the effects list after parsing so that they are applied in a certain order? I did do something in this direction but it was just to keep the parse ordering (and this was before macros and the ExecuteEffects code looks quite different now) - see viewtopic.php?f=9&t=6211

Here it is as a patch, contributions are GPL 2.0 or later and CC-BY-SA 3.0

Playtesting most welcome.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Resources

#11 Post by Dilvish »

Could you please explain what changes you expect the patch to implement and why? Some things from your original post, about planets no longer dying from food shortage / starvation if supply blocked, for example, wouldn't apply now (although an essentially equivalent effect could occur from losing the benefit of supply connected growth specials). It's not at all clear to me what you're trying to accomplish here.

Code: Select all

 Has there ever been any discussion on a weight/priority for effects, and then just sorting the effects list after parsing so that they are applied in a certain order?
Yes there has been some discussion ~ a couple months ago about Effects being able to specify a priority. I believe the idea was overall viewed with favor, but was not itself given a priority for implementation.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#12 Post by gvdm »

This patch is meant to enable both production and research to take place on a planet with focus being a boost rather than an enabling toggle.

Weights on Effects would have a scope much beyond this type of situation. At the moment multiplicative effects are largely unused to due uncertainty of stacking (4*1.5 + 2 + 1 vs (4 + 2 + 1)*1.5). Having a general design guideline like "multipliers after additive effects" or vice versa would add clarity for both player and balancing. ATM additive effects outweigh multiplicative ones to a fairly large degree as even suboptimal colonies provide a nice full +5 bonus (to, say, production).

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Resources

#13 Post by eleazar »

Dilvish wrote:Could you please explain what changes you expect the patch to implement and why?
(emphasis added).

I understand why you would consider this an improvement in Nov 2011, but i don't see the advantage now. It seems to me, that it blurs the different between planets.

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Resources

#14 Post by gvdm »

You are correct in that this patch is not as necessary as it used to be. I do still however feel that this is nicer than having a cultural archives building for the express purpose of allowing both production and research simultaneously (at num_planets=1). This rather than changes the way the research/production system works and (IMO) feels like a much nicer game.
My 2 cents.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Resources

#15 Post by Dilvish »

gvdm wrote:...I do still however feel that this is nicer than having a cultural archives building for the express purpose of allowing both production and research simultaneously (at num_planets=1)...
To my (inferred) understanding, the purpose is to simply give a production and research bonus at empire starting homeworlds. Fixed bonuses like that are quite distinct from Focus-triggered bonuses; the operation, and I think intent, are really quite distinct from a mixed Focus.

Regardless of the intent of the current archives, I don't find myself any wiser about what you think is preferable about your scheme.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply