Project Zomboid

Project Zomboid

B42 Sledgehammers in Tool Stores
Sandbox Option
I have seen people in the comment asking for a sandbox option so I spent some time figuring it out and I have found a way to add a sandbox option to this mod.
This discussion is supposed to tell the author a way to do this but you can do this yourself on the normal file.
What I did was add a "sandbox-options.txt" file in the "B42 Sledgehammers in Tool Stores\42\media\" directory, it contains this text:

VERSION = 1,

option SledgesInStores.Rate
{
type = double,
min = 0.01,
default = 1.0,
max = 20.0,
page = SledgeRate,
translation = SledgesInStores_SledgeRate,
}

The next step is only neccesary if you want text to tell you what is what in the sandbox options. What you need to do is go into the "lua" folder and make a "shared" folder and in that folder make a "Translate" folder and in that folder make a "EN" folder (i know its a lot of folder but thats how the game works).
Now in the "EN" folder you need to create a "Sandbox_EN.txt" file and in it you need to write:

Sandbox_EN = {
Sandbox_SledgeRate = "Sledgehammers in Tool Stores",
Sandbox_SledgesInStores_SledgeRate = "Spawn Rate",
Sandbox_SledgesInStores_SledgeRate_tooltip = "Sets the spawn rate of Sledgehammers in stores (Default = 1, Base Game = 0.01, Max = 20).",
}

Now for the last step you need to go back into the "lua" folder, into the "server" folder and into the "Items" folder. You need to edit the "SledgehammerSpawns.lua" file (notepad is fine) and replace all the "20"s with "sBVars.Rate".

That should be everything and now you should be able to set how many sledgehammers spawn from 0.01 (base game) to 20 (what this mod made the spawn rates be).
< >
Showing 1-2 of 2 comments
Oh and I forgot you need to add a new line in the "SledgehammerSpawns.lua" file:

local sBVars = SandboxVars.SledgesInStores;

I dont know if it matters but write it before the table.insert lines.
Can this mod be used in version B41
< >
Showing 1-2 of 2 comments
Per page: 1530 50