About This File
The Lua Sandbox DLL provides a more secure environment for your mods.
This DLL plugin is designed to enhance your security by preventing mods from accessing potentially dangerous Lua functions. It blocks unsafe operations such as reading and writing files, executing shell commands, and other actions that could compromise your system's integrity. By restricting these functions, the sandbox helps ensure a safer environment for running untrusted Lua code from any mods you install.
Lua is a scripting language embedded within the game, commonly used for advisor messages, rewards, and automata generators. Although many plugins include Lua scripts, there is generally no need for a plugin to access the file system. To ensure security, the sandbox prevents plugins from performing such operations.
Compatibility
The Lua Sandbox DLL is compatible with nearly all plugins, so it is advisable to keep it always installed. You can monitor the DLL's .log file to see whether any plugin attempted to call a restricted Lua function.
Incompatible with: DAMN, BSC Regional Tracking, Cori Reports.
In case you have mods that only require read-access to the file system, you can enable file-read operations in an optional INI file, while still blocking write-access.
System requirements
- SimCity 4, version 1.1.641 (the digital edition) (more info)
- Windows 10+ or Linux
Installation
Copy the DLL into the top-level directory of either Plugins folder (place it directly in <Documents>\SimCity 4\Plugins or <SC4 install folder>\Plugins, not in a subfolder).
Alternatively, the mod can be installed with Sc4pac: memo:lua-sandbox-dll
Troubleshooting
The DLL should write a .log file in the folder containing the DLL. The log contains status information for the most recent run of the DLL. In particular, the log shows if another plugin attempted to call a restricted Lua function.
If no .log file is written, the DLL failed to load. In this case, make sure the Microsoft Visual C++ 2022+ x86 Redistributable is installed.
This DLL is provided on a best-effort basis, without guarantees it can prevent every potential exploit.
-
1
-
1

Supported
