Installation
1
Download
Get the latest release from our Tebex store and download it from your Keymaster
2
Extract
Extract the
spooni_ambientPedManager folder to your server’s resources directory3
Configure
Add
ensure spooni_ambientPedManager to your server.cfg4
Customize
Edit
config.lua to match your server logic and requirementsConfiguration
The script is configured through theconfig.lua file. Here are the main configuration sections:
Relationship types
Define the numeric values for each relationship type:Group relationships
Set static relationships between two AI groups:Player relations
Configure how groups behave around the player:Conditional rules
Dynamic rules based on game context (time, job, weather, etc.):Use
"player" in conditional rules to dynamically resolve the player’s group. The rel_cop group maintains persistent relationships via a background loop.Spawn frequency
Set global ambient spawn values (0.0-1.0):Location-specific spawn frequency
Area-specific spawn density overrides:Location restrictions
Restrict or allow ped types in volumes (box or sphere):Model replacements
Replace ped appearances visually in a zone:Advanced configuration
Custom conditions
Define custom conditions as Lua functions directly in the config:Debug mode
Enable verbose logging for development:Usage examples
Creating faction conflicts
Time-based behavior
Event zones
Performance considerations
The script is optimized for performance with several key features:
- Conditional checking: Configurable tick rate via
ConditionCheckTimer - Volume-based restrictions: Efficient area-based ped control
- Selective spawning: Location-specific spawn density management
- Background processing: Persistent relationship maintenance for critical groups
Performance tips
- Check timer: Increase
ConditionCheckTimerfor less frequent condition checks - Volume optimization: Use appropriate volume sizes for restrictions
- Spawn limits: Set reasonable spawn frequencies to prevent performance issues
- Debug mode: Disable debug mode in production for optimal performance
Troubleshooting
Relationships not working
Relationships not working
Verify group names are correct, check that conditional functions return proper boolean values, and ensure the script is properly started in your server.cfg.
Spawn restrictions not applying
Spawn restrictions not applying
Confirm volume names exist in the game map or are manually created, check coordinate accuracy, and verify spawn frequency values are between 0.0 and 1.0.
Model replacements not visible
Model replacements not visible
Ensure model types match (human with human, animal with animal), verify coordinates and radius are correct, and check that target models exist on your server.
Performance issues
Performance issues
Reduce condition check frequency, limit the number of conditional rules, optimize volume sizes, and disable debug mode in production.
Volume restrictions not working
Volume restrictions not working
Verify volume names are valid, check coordinate positioning, and ensure the volume is properly defined in the game world or created manually.
Framework integration
The script includes built-in support for multiple frameworks:Support
If you encounter issues or need assistance:Discord support
Join our Discord community for support and updates.
Documentation
Docs home - installation basics and links to every script.