sv_environment and log_level.
Setting the Environment
dev— Development mode (verbose logging, relaxed security)prod— Production mode (optimized performance, minimal logging)
Environment Behavior
Development (dev)
- Verbose console logging
- Detailed error messages
- Relaxed security checks
- Useful for debugging
Production (prod)
- Minimal logging (errors only)
- Optimized performance
- Full security features active
- Anti-cheat enabled
Log Level
Thelog_level convar controls logging verbosity. It uses a numeric value:
Higher values produce more verbose output. Use
0 in production, increase when troubleshooting issues.All Framework Convars
Here is a complete reference of convars used by Mythic Framework:Core Settings
Database Convars
Discord Webhook Convars
External Service Convars
Network / FiveM Convars
Reading Convars in Code
Lua (Server or Client)
Important: Convar Type Handling
Convars always return strings. Convert as needed:Custom Convars
You can define your own convars inserver.cfg for resource-specific configuration:
Use
set for convars that should only be readable server-side. Use setr for convars that should also be readable on the client via GetConvar.Complete server.cfg Reference
Troubleshooting
Convar Returns Empty String
Convar Returns Empty String
Problem:
GetConvar returns empty or default valueSolutions:- Verify the convar is set in server.cfg with
setkeyword: - Check for typos in the convar name
- Ensure server was restarted after changing server.cfg
- Always provide a default fallback:
Boolean Convars Always True
Boolean Convars Always True
Problem: Boolean check always evaluates to trueCause:
GetConvar returns strings, and any non-empty string is truthy in LuaSolution:Numeric Convars
Numeric Convars
Problem: Math operations fail on convar valuesSolution:
Next Steps
Server Configuration
Complete server.cfg guide
Database Connections
Configure database connection strings
Discord Webhooks
Set up webhook logging
Resource Management
Resource load order and dependencies