Jump to content

Recommended Posts

Hi all,

Long-time lover of Don't Starve, and I've recently gotten in to modding. I'm having trouble finding examples of mods that already do or instructions on how to change the settings below, and would appreciate any ideas you might be able to point me to.

I'm trying to add new resource frequency levels that will be available when you customize a new world via the Customize Screen. In addition to "None", "Less", "Default", and "More", I've added "Quite Less", "Much Less", and "Hardly at all".

I've been able to successfully do this, but only by hacking core files. (The specific file changes are below.) Obviously this isn't ideal. Any pointers on how I can move this to a mod instead? I've spent a couple hours going through the source and searching online, and I haven't been able to figure this one out. Thanks in advance!

To get the functionality working, here's what I did:

1. In the customise* files:
data/scripts/map/customise.lua
data/DLC00001/scripts/map/customise.lua
data/DLC00002/scripts/map/customise_rog.lua
data/DLC00003/scripts/map/customise_rog.lua
* might need to also do the other customize.lua and customize_base.lua files in the DLC directories, but if you play RoG, this is sufficient.

inserting into frequency_descriptions, (line 5)

{ text = STRINGS.UI.SANDBOXMENU.SLIDEHARDLY, data = "hardly" },
{ text = STRINGS.UI.SANDBOXMENU.SLIDEVERYRARE, data = "veryrare" },
{ text = STRINGS.UI.SANDBOXMENU.SLIDEQUITERARE, data = "quiterare" },
{ text = STRINGS.UI.SANDBOXMENU.SLIDERARE, data = "rare" },

2. In the forest_map.lua files:

data/scripts/map/forest_map.lua
data/DLC00001/scripts/map/forest_map.lua
data/DLC00002/scripts/map/forest_map.lua
data/DLC00003/scripts/map/forest_map.lua

inserting into MULTIPLY, (line 58)

["hardly"] = 0.05,
["veryrare"] = 0.1,
["quiterare"] = 0.25,

3. In data\scripts\strings.lua, inserting into STRINGS[SANDBOXMENU], (line 5831)

SLIDEHARDLY = "Hardly at all",
SLIDEVERYRARE = "Much Less",
SLIDEQUITERARE = "Quite Less",

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...