Project Zomboid

Project Zomboid

105 ratings
Hidden Sandbox Options
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
332.428 KB
Jun 6, 2024 @ 11:22pm
Jul 1, 2024 @ 7:03am
5 Change Notes ( view )

Subscribe to download
Hidden Sandbox Options

Description
I am on an indefinite hiatus from Project Zomboid. Feel free to use my code for future mods, and feel free to update my mods for B42. Please do not reuse their exact names or mod id's to avoid confusion and bugs for B41 players. I can only guarantee my mods worked when used alone before B42 dropped. I will no longer be retesting them when people have conflicts. Thanks for the support over the years.

This mod provides a framework that allows modders to easily hide specific sandbox options.

If you are not creating or using a mod that hides sandbox options, you do not need this mod.

Important Information for Server Hosts

There are a handful of important things to consider when you are hosting servers that rely on this mod to hide sandbox options.
  • Hosts of multiple servers may need to disable mods that hide sandbox options in order to work on servers that utilize those options.
  • Be aware that saving a server configuration while one of its mods is disabled in the MODS menu will reset that mod's sandbox options to their default values on that server.
  • Always be sure to enable the sandbox options required by a server before you edit that server's config.
  • Please note that this mod does nothing to prevent you from loading saved presets that can impact hidden settings, nor does it reset hidden settings to any standard defaults.
  • This mod only edits the visibility of sandbox options to reduce user confusion about what they ought to be changing when they configure their servers.
  • Modders that hide options are responsible for enforcing reasonable default values for hidden options.
  • Forcing hidden sandbox options to reset to default values that specific mods require is beyond the intended scope of this mod.

Important Information for Mod Creators

In order to use this mod to hide sandbox options, you will need to begin by identifying the internal names of the sandbox options you want to hide. This mod provides helper functions for simplifying this process:

HiddenSandboxOptionsExplorer = require("HiddenSandboxOptionsExplorer") HiddenSandboxOptionsExplorer.reveal() -- Shows relationship between internal names and translated settings names. HiddenSandboxOptionsExplorer.prepare() -- Applies internal names as keys in a list of key-value pairs ready for your mod.

Once you have determined the internal names for the sandbox options you plan to hide, simply import HiddenSandboxOptions from its file and use it to hide the options:

HiddenSandboxOptions = require("HiddenSandboxOptions") HiddenSandboxOptions["ElecShutModifier"] = true -- Hides the Electric Shutoff Modifier. HiddenSandboxOptions["WaterShutModifier"] = true -- Hides the Water Shutoff Modifier. HiddenSandboxOptions["the droids you're looking for"] = true -- These aren't the droids you're looking for.

Please keep the following things in mind when requiring and using this mod:
  • When you use this mod to hide options for your own mods, please remember to tell your users! Otherwise, they may be confused and assume the worst when they see important settings disappear from their menus!
  • Please list exactly which settings you have chosen to hide somewhere on your Workshop page where people can find the information quickly.
  • Be aware that saved server presets can still update sandbox options that are hidden via this mod.
  • You are responsible for enforcing reasonable default values for hidden options.
  • Forcing hidden sandbox options to reset to default values that specific mods require is beyond the intended scope of this mod.

Compatibility Notes

Due to the nature of the required edits, this mod must overwrite three nearly equivalent vanilla functions that are responsible for determining the contents of each panel of sandbox options in different game contexts:
  • Page3:createPanel
  • SandboxOptionsScreen:createPanel
  • ISServerSandboxOptionsUI:createPanel

These functions use local variables to perform behaviors that need to be conditionally skipped.
  • The functions above can still be decorated if you require HiddenSandboxOptions.
  • This mod works with Change Sandbox Options (by Star).
  • This mod works with Change Sandbox Options (by 菜喵球BIBI).
  • This mod works with Wookiee Server Options (by me).
  • Modders can access functions replaced by this mod through HiddenSandboxOptionsExplorer.Vanilla if necessary.
  • See HiddenSandboxOptionsExplorer.lua for details.

Enjoy the Mod!

This mod is made possible by using a variation on DOME (the Derived Object Module Extractor, which is available on the Steam Workshop). This variation is included in this mod and will not conflict with the Workshop Item version of DOME.

Please let me know if you have any feedback, requests, or issues, and feel free to try my other mods if you like this one! My personal favorites are Interface Reflexes, Wookiee Gamepad Support, and True Music Jukebox.

Thanks in advance to everyone who helps the visibility of my mods by clicking thumbs up. I put a lot of effort into making bug-free mods that play nicely alongside hundreds of others, so it's nice to know they're being appreciated by everyone who might want them, and upvotes make that happen!

Monetary support in the form of donation (using the link below) is also appreciated, but please do not feel obligated if you don't have resources to spare!

[ko-fi.com]

Workshop ID: 3262742704
Mod ID: HiddenSandboxOptions
3 Comments
Burryaga  [author] Jun 8 @ 11:45am 
Why, yooooooou! :steamhappy:
diGGa Jun 7 @ 9:37am 
The name is bad change it

it means something else
Burryaga  [author] Jul 1, 2024 @ 7:05am 
I removed Wookiee Server Options as a requirement of this mod because that was not intended. However, I still strongly recommend Wookiee Server Options if you like happiness.