Jump to content

Resource regeneration


Recommended Posts

I know I'm probably not the first to bring this idea up but I found it worth discussing. What are your thoughts on making some resources renewable, meaning they either regrow or regenerate? I namely had three in mind which would make a lot of sense in my view:
 
  1. Tree regrowth is one of the first that seems logical. With how often you struggle to find wood on some maps and how difficult everything gets if you run out, this would help from a gameplay perspective too alongside added realism. Best implementation feels like having trees spawn saplings near them when there's enough room: The little tree offers fewer resources but gradually grows if you don't cut it right away... since trees are static models they should be easy to just resize without requiring any new assets. For example: A sapling can be 0.25 the scale of a grown tree and offer 50 wood if cut, but if you wait 15 minutes it grows into a full tree offering 200.
  2. Animals should be able to reproduce too. Not going to suggest a realistic simulation as this isn't a Pokemon game, just a simple mechanism to have some animals spawn another identical animal on random occasion. Like trees we could simulate babies by having them start out small and offer less food if killed until they grow up... for animals this might be more complicated than it's worth though, simple probabilistic duplication might be enough for starters.
  3. Fish banks are prolly the easiest to do. As fishing boats consume them, the resource should slowly regenerate over time and have its "health" climb back up... once they're gone though they stay gone forever. Regeneration should be very slow, just enough to emphasize fish in that bank reproducing. This would require players to be more careful about how fast they consume fish if they don't want to run out, fish too fast and the source is gone!
  • Like 1
Link to comment
Share on other sites

31 minutes ago, MirceaKitsune said:
  1. Tree regrowth is one of the first that seems logical. With how often you struggle to find wood on some maps and how difficult everything gets if you run out, this would help from a gameplay perspective too alongside added realism.

As @Stan` wrote, I guess it's a deliberate decision; some maps with scarce or even no wood have the description 'tough to play'. There's a bunch of maps I simply don't play because I don't enjoy those 'hunger games'.

As for realism, the coasts of Italy were full of forests, but Roman fleet...

Link to comment
Share on other sites

4 hours ago, Stan` said:

It's implemented, but it was rejected for balancing considerations. It doesn't grow new trees and produce animals though.

Meaning the code still exists? If that's the case what about having it as a game option, even if it remains disabled by default for gameplay reasons? One extra checkbox hopefully wouldn't hurt to add for players who would enjoy this. Is there a config setting or console command to test it for the time being?

Link to comment
Share on other sites

36 minutes ago, MirceaKitsune said:

Meaning the code still exists? If that's the case what about having it as a game option, even if it remains disabled by default for gameplay reasons? One extra checkbox hopefully wouldn't hurt to add for players who would enjoy this. Is there a config setting or console command to test it for the time being?

Well these are relevant commits and diffs https://code.wildfiregames.com/rP24963 https://code.wildfiregames.com/D3868 https://code.wildfiregames.com/D2658 https://code.wildfiregames.com/D2657

Link to comment
Share on other sites

Thanks for all the info! I'd definitely be happy if we had this in some form. Mainly for added realism: If gameplay was the issue we could simply make it so the resource has more health and you can mine it for a longer time. Oppositely, if it's considered that this would overpower factions, we could reduce the health of resources that regenerate / reproduce to make sure players typically get roughly the same amount of resources overall.

Link to comment
Share on other sites

Playing again I remembered one of the reasons why I thought this would be nice: Deforestation looks pretty ugly and often ruins the mood and aspect of a map once too many trees are cut. I figured it would be nice if trees could regrow so entire forests don't just disappear when you have a lot of workers cutting wood.

Link to comment
Share on other sites

  • 2 weeks later...

A possibility I suddenly realized: What if we supported this as a map defined feature? The map already decides the biome, trees, minerals, etc: It could as easily specify whether to enable resource regeneration, what for, in which form (regain health over time or reproduce). Heck mappers could to define rocks that make babies if they feel like it if this were implemented as a generic override for any resource or map item :P I haven't created any maps yet though, I don't know the details of how items are defined and if this would simply be something like an xml parameter you can add to your biome.

Link to comment
Share on other sites

Well, I agree that deforestation is in general, i.e. also in real life, ugly. But for realism in 0 A.D. I would doubt that trees regrowing during a match would be good. If you built too many e.g. ships, you should cope with "empty forests". And if trees would regrow, you could not chop some away to later have place for e.g. a new CC. On the other hand, it could be fun. Anyway, I understand it's only possible via a mod and not a simple toggle to implement.

One could maybe consider it new fish spots could apparate from time to time, but that's maybe connected with the same technical consequences said before.

Link to comment
Share on other sites

On 22/08/2021 at 3:18 PM, MirceaKitsune said:

Playing again I remembered one of the reasons why I thought this would be nice: Deforestation looks pretty ugly and often ruins the mood and aspect of a map once too many trees are cut. I figured it would be nice if trees could regrow so entire forests don't just disappear when you have a lot of workers cutting wood.

@MirceaKitsune(specifically)

Resource regeneration is on my list. I'm already looking at various map object interactions. I'm planning on map object adjacency effects for building placement as well as building slots and tile type/object checks for foundations. Currently the game checks for cleared ground to allow placement but no reason you can't check other stuff.

Enabling these functions in Mandate/GAE was quite easy but the pyrogenesis coding style is much more difficult for me to understand casually.

I'm currently figuring out if I want to fork or do a major refactor vs more moderate changes. I probably won't fork unless something really messes me up. Just because I don't want to fiddle with low level stuff too much and forking would make it way harder to merge complex engine changes.

I'm definitey going to be splitting several components and adding regeneration to resources would be comparably simple to other changes.

  • Like 2
Link to comment
Share on other sites

2 hours ago, Ceres said:

Well, I agree that deforestation is in general, i.e. also in real life, ugly. But for realism in 0 A.D. I would doubt that trees regrowing during a match would be good. If you built too many e.g. ships, you should cope with "empty forests". And if trees would regrow, you could not chop some away to later have place for e.g. a new CC. On the other hand, it could be fun. Anyway, I understand it's only possible via a mod and not a simple toggle to implement.

One could maybe consider it new fish spots could apparate from time to time, but that's maybe connected with the same technical consequences said before.

I can see that point. On the other hand, this is in a world where an entire giant empire is created and established in less than an hour: Smaller trees regrowing in half an hour doesn't seem that unrealistic when you think about that :)

  • Like 5
Link to comment
Share on other sites

  • 3 months later...

in my computer I added a mod where:

there is water resource, you get it from wells or water treasures. and food is splitted into meat food and vegan food

wells have unlimited water.

you can order your workers to plant a tree (consumes water and some wood).

you can plant a field using some vegies and water but it has limited vegan resources.

from coral you can spend water and vegies to get meat.

this way you can afford realistic resource regeneration except for stone and metal.

it has a problem with AI tho, because it rely on harvesting the fruit bushes.

 

Edited by man_s_our
  • Like 1
Link to comment
Share on other sites

On 15/08/2021 at 10:24 PM, Stan` said:

No sadly you have to make a mod to make resources slowly decay or regenerate as it's handled in the xml templates that define object statistics.

what are the values to add to XML files to add regeneration or decay?

edit:

I've found it here:

https://code.wildfiregames.com/D3868

Edited by man_s_our
solved
Link to comment
Share on other sites

On 06/09/2021 at 10:16 AM, Ceres said:

Well, I agree that deforestation is in general, i.e. also in real life, ugly. But for realism in 0 A.D. I would doubt that trees regrowing during a match would be good. If you built too many e.g. ships, you should cope with "empty forests". And if trees would regrow, you could not chop some away to later have place for e.g. a new CC.

IMO it depends on the time it takes for trees to regenerate. If they take 20-30 minutes to regenerate or more, then you will still have to cope with wood overuse, while still having forests be reusable at some later point, especially if the match drags on.

About building locations, that could be solved by making it so trees don't regrow if a building was constructed on top of them. Or that trees don't regrow within a certain range of buildings, so that the latter don't get surrounded by regrown trees.

Link to comment
Share on other sites

On 16/08/2021 at 5:30 PM, MirceaKitsune said:

Mainly for added realism

Maybe it's good to remember that many games last half an hour, but a meadow takes many years to become a forest again. Would it really be more realistic if we could grow a tree halfway high in 20 minutes?

Link to comment
Share on other sites

On 6/9/2021 at 12:34 PM, MirceaKitsune said:

I can see that point. On the other hand, this is in a world where an entire giant empire is created and established in less than an hour: Smaller trees regrowing in half an hour doesn't seem that unrealistic when you think about that :)

It might be something only Druids can do, regenerating tree health.

Link to comment
Share on other sites

8 hours ago, rollieoo said:

It might be something only Druids can do, regenerating tree health.

We have to be careful with the currently very biaised visions of druids in pop culture :)

I did at some point want to have a root tree in middle of tree patches that would keep up with the trees around it and plant new ones. I believe however that you can do that on a unit that hasn't got unitmotion @Freagarach ?

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...