Page 1 of 1

Modified economic model

Posted: 20 May 2019, 23:35
by wormer
Hello! I'm a Total Annihilation big fan, wondering is it possible to extend Spring engine to support slightly different economic model.

For metal it's different in two ways: finite resources and gradually distributed resources, and the combination of two.

Separately ideas are as follows:
1. Finitenes. Make metal spots finite, the more metal is extracted from the deposit the less is the income. In the end everything might finish at some small rate that is inexhaustible.
2. Distribution. Make metal underground distribution smooth like a gradient map for metal density. The extractor income is based on that underground metal density at the spot and in a small area around.

1+2 combined means the metal density on the area with a working extractor slowly falls over time.

More questions for energy tweaks.

3. Is it technically possible to incorporate day/night cycles to solar batteries?
4. Is it possible to incorporate a logic for a wind rose over terrain and underwater flows that affect wind generators and water energy generators as well?

Maybe I don't know and someone has already done that in a mod, please point me if you know. Thank you!

Re: Modified economic model

Posted: 21 May 2019, 11:16
by Forboding Angel
1. Yes, in fact this has already been done. Knorke, years ago, wrote a gadget that essentially made metal spots finite. Someone might remember what his thread was called. Unfortunately I don't.

2. This can already be done, but I would recommend doing it with luamex. Evolution RTS already has a dynamic metalmap that is randomized every game, so essentially playing the same map twice in a row will have a different metal layout. (Thanks to commonplayer)

3. I don't see why not. It would be best, imo, to control the sun cycle and move it around as you like in synced space, and then write a gadget that gives x amount of energy depending on the time of day for each solar collector that exists (I.E. The building itself doesn't actually do anything, but it's existence triggers the gadget to give resources to the allyteam it belongs to.

4. I mean... sure. Wind is already pretty dynamic, and I think it even has a direction in the engine. If you wanted this represented visually then that would take a bit of doing but should ofc be possible. Wrt water, directions here would be a bit superflous imo. But you can do all this with a gadget.

Ofc my answers are generic, so take them with a grain of salt. Others here can give you much more detailed and precise information.

Re: Modified economic model

Posted: 24 May 2019, 22:47
by wormer
Thank you very much for guiding me! I'll be looking into it.

Re: Modified economic model

Posted: 25 May 2019, 03:15
by Google_Frog
You don't need to look at editing or extending the Spring engine for these features. Instead, you would implement these things as lua scripts in your game. I disagree with Forboding Angel on points 1 and 2. You want a smooth metal extraction gradient, which the engine already supplies, so should not use luamex.

Point 4 sounds technically complicated depending on how deep you want to go. At the extreme end you are asking for a fluid dynamic simulation throughout the map.