Don't Starve Together

Don't Starve Together

135 ratings
World Resource Regeneration
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
31.175 KB
4 Dec, 2015 @ 3:59am
27 May, 2018 @ 9:46am
21 Change Notes ( view )

Subscribe to download
World Resource Regeneration

Description
END OF DEVELOPMENT AND GOODBYE
I have stopped the development of this and future mods.
More information can be found on the link below.
Goodbye[data.ewul.net].

MAIN FEATURES:
Enables the World Resources and Turfs to regenerate over set amount of time. This is useful for long running servers or simply for a lot of items that are not renewable in any way. Same goes for Turfs, these are spawned back in the world to prevent "naked worlds" situation where all the turfs are dug up. Each prefab can be configured separately on dedicated servers.
All the prefabs that are found in the game and could use a regeneration function are now going to be regenerated over a set amount of time.
The mod only works when you have it active during the world generation step and must not be disabled later because once the mod is disabled, resources can regenerate again only after a new world is created.
The resources that get destroyed or removed in any other way simply spawn back in the exact same place where they were removed unless a player has built a base on that spot in which case the item does not appear back.

Please note that some of this mods code is taken from icke's mod "Fix Multiplayer" who was kind enough to allow me to create a standalone mod out of the resource renewal part of his code.
Some additions have been added to this mod and more get added in the future. It is compatible with Fix Multiplayer mod too.
The standalone mod was simply created to prevent as many possible incompatibilities with other mods or server crashes and to add new features to it.

IMPORTANT NOTES:
The mod must be enabled during the start of a new world generation step. When enabled on an already created world, the mod does nothing.
When the mod gets bigger updates then the world reset is ONLY required if you want to have the new updates in your world, otherwise the world is just fine and players can keep playing in it normally without problems.
If you disable the mod completely from modoverrides.lua and restaret the server it is no longer possible to regenerate resources afterwards. If you simply don't want the resources to regenerate anymore, set the "WorldResourceRegenerationSpeed" option to 0.

If you are using "modoverrides.lua", here is an example configuration which you can simply copy/paste to yours and change values if needed so you don't have to manually write all the settings parameters yourself:
(If you use other mods as well, simply add this part into the existing "modoverrides.lua" you have)
Modoverrides for World Resource Regeneration[data.ewul.net]
Please note that the example "modoverrides.lua" uses default values of the mod. If you want to change something, go under mods install directory, open up "modinfo.lua" and check the correct configuration number values from there and then apply them to your "modoverrides.lua".


You can use modoverrides.lua to specify each prefab separately which you wish to regenerate.
Prefab specification is "prefabname:number", where number is that prefab's regeneration speed and it has to be added in "CustomPrefabs" configuration option. Speed 0 means prefab does not get regenerated.
Example: CustomPrefabs = "berrybush:5,grass:4,beehive:7,spiderden:9,wasphive:0"
The configuration option's value doesn't replace settings in modmain, it overwrites/adds to them. That is, if you want to add one new prefab to the regeneration list, specify just it, you don't need to list all other prefabs and if you want to change the regeneration speed of one prefab, specify just it, you don't need to list other prefabs. However, if you want to enable regeneration of just one prefab and disable regeneration of all other prefabs, you will need to specify all those other prefabs with the speed of 0.

This mod does not include the resource regeneration that is handled by the server itself simply to avoid preformance issues and heavy/double resource spawning rates in the server. To configure different aspects of the game, you have to use "worldgenoverride.lua" for dedicated servers or configure the values inside the game for in-game hosted servers.
For dedicated servers you can get a documented copy of said file from here WorldGenOverride[data.ewul.net]
You can replace "default" values with any valid values provided inside the sample "worldgenoverride.lua" file.
Simply copy the content from the link to a file placed in the correct location and named "worldgenoverride.lua", then change the default values to your liking or leave them default.


SIDE NOTES:
Some features are planned for the future as well, these I will implement when i have more time.
If you have recommendations to the mod, leave a comment down below.

Recommended mods to use together with this mod:
Less Lags - Mod that makes all the servers capable of running infinite number of days without getting laggy from all the prefabs that get generated in long running servers. When the mod is configured correctly it periodically deletes some or all prefabs (items, monsters, animals etc) from the entire world and keeps it lag free.

Supported 3rd Party mods: (If you want your mod items to be added in the resource regeneration list, contact me)
"Birds and Berries and Trees and Flowers for Friends", "Pickle It".

BUG REPORTING:
Add all your bug reports under "Discussions" > "Bug Reports". (To avoid Comment section cluttering)
Also a great help is if you can upload your crash log "log.txt" to PasteBin[pastebin.com] and link me the crash log that way in the bug section with a description what did you do before the crash occured.

LIVE CHAT:
If you wish to talk to Me or other players or users of this Mod, you can join us on Live chat where we can discuss problems, ask questions or simply chat about random things.
Join here and proceed to "Gaming" room: EWUL Public Chat[im.ewul.net]

SPECIAL THANKS TO:
icke for allowing to create a standalone mod out of one of the functions in his Fix Multiplayer mod, check out his stuff @ icke Steam Workshop
Muche for helping out with the code, check out his stuff @ Muche Steam Workshop
Popular Discussions View All (1)
6
19 Jul, 2021 @ 4:20pm
Bug Reports
Deja Vu
109 Comments
Doc Arc 26 Aug, 2020 @ 1:42pm 
Since the developer of this mod has stopped all developments...what is an alternative mod we can use? It looks like there are no current resource regeneration mods. :(
May 26 Mar, 2020 @ 2:21am 
could it regenerate tuft
Grimshackle 21 Nov, 2019 @ 3:00am 
does this work with tropical adventure
LiketheShore&theSea 20 Jul, 2018 @ 5:34pm 
Why do the pig village 3x3 setpieces not regenerate? Would love to have some of the secondary variant of the berrybush to decorate with, but when i dig the 9 up, they don't regen. Just tested by idling the game for over 30 min. The pig house and other berry bushes beside the 3x3 regenerated but the 3x3 of berrybush2 did not.
originalmaja 31 May, 2018 @ 5:37am 
Does anyone know why this keeps happening? {LINK REMOVED}
originalmaja 31 May, 2018 @ 12:29am 
what does spawn free zone mean?
UnnoticedShadow 27 May, 2018 @ 10:50am 
I tested it out, it works, bye!
Deja Vu  [author] 27 May, 2018 @ 9:51am 
@AwsomeDude107
Alright, i updated the mod, hope it helps you out.
Deja Vu  [author] 27 May, 2018 @ 9:41am 
@AwsomeDude107
You can try instead of using modoverrides.lua file to make changes. I'm not sure where the file is currently located for each server as i only used dedicated server for my own needs. Anyway I'll add an update which increases the day number count to 50 so you don't have to poke around in the mod.
UnnoticedShadow 27 May, 2018 @ 8:17am 
I am trying to edit the modinfo so that I can add the option to have a 40 day cooldown, but whenever I make ANY edit of any kind, the mod crashes, saying it needs an update and when I update it everything is back to normal, what am I doing wrong?