Configuration
The main configuration file is shiva.config.lua in your server root. Each module also has its own config.lua inside the module directory.
shiva.config.lua
lua
Shiva = {}
-- Database connection
Shiva.db = {
host = '127.0.0.1', -- string — database hostname
port = 3306, -- number — database port (default: 3306)
user = 'shiva', -- string — database user
password = '', -- string — database password
database = 'shiva', -- string — database name
}
-- Framework-wide locale
Shiva.locale = 'en' -- string — default language ('en', 'es', 'de', ...)
-- Developer mode — enables verbose logging and hot reload
Shiva.devMode = false -- boolean — default: false
-- Maximum players (must match server.cfg)
Shiva.maxPlayers = 64 -- number — default: 64Module Config
Each module lives at resources/[shiva]/<module-name>/config.lua. Below are the keys common to all modules.
| Key | Type | Default | Description |
|---|---|---|---|
Config.enabled | boolean | true | Whether the module is loaded |
Config.debug | boolean | false | Enable verbose logging for this module |
Config.locale | string | inherits | Override locale for this module |
Disabling a Module
Set Config.enabled = false in the module's config or comment it out of server.cfg:
ini
# ensure shiva-economy <-- disabled
ensure shiva-playerEnvironment Variables
Sensitive values (passwords, API keys) can be loaded from environment variables instead of committed to config files:
lua
Shiva.db = {
password = GetConvar('SHIVA_DB_PASSWORD', ''),
}In server.cfg:
ini
set SHIVA_DB_PASSWORD "your-secure-password"Hot Reload (Dev Mode)
With Shiva.devMode = true, config files are watched for changes. Most config changes apply without a full server restart. Use shiva reload <module-name> from the CLI.