Installation
Overview
ML Camps adds raidable NPC camps. A camp stays empty until a player walks in, then spawns its defenders, tracks the fight, pays out loot on the clear and respawns after a cooldown. Camps are built in an in-game admin panel with a map view, a live overview and an editor for every NPC group.
Quick Start
- Download from CFX Portal
- Extract to your
resourcesfolder asml_camps - Add to
server.cfg:
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_campsml_camps must start AFTER ml_bridge. Optional resources such as ML Inventory and ml_battlepass start before it.
Database
Tables are created on first start. The first three are also in _INSTALL/ml_camps.sql if you prefer to import them by hand.
ml_camps: camp definitions written by the admin panelml_camp_state: camp status and respawn time, so cooldowns and depleted camps survive restartsml_camps_settings: HUD and loot key settings saved from the panelml_camps_bp_runs,ml_camps_bp_outbox,ml_camps_bp_cache,ml_camps_bp_sources,ml_camps_bp_guard: battlepass progress queue. They are only filled whenml_battlepassruns
Item Registration
No item is needed by default. The loot key runs in 'virtual' mode and is tracked by the server. Register the key item from _INSTALL/items.lua only if you switch Config.LootKey.Mode, or the panel setting, to 'item':
1['camp_key'] = {
2 label = 'Camp Key',
3 weight = 100,
4 stack = false,
5 close = true,
6 description = 'A key looted from a camp defender. Opens the stash of the camp it came from.',
7},Loot items are your own. Every item name in a camp loot table must exist in your inventory.
Verify
The console prints the version banner and:
1[ml_camps] [INFO] ml_camps server readyRun /campsadmin as an admin to open the panel. Walking into a camp spawns its NPCs and shows the raid HUD.
/campsadmindoes nothing: the player lacks the Creator permission. Grant an ACE fromConfig.Permissions.Creator, for exampleadd_ace group.admin ml_camps.creator allow.- No camps on the map: the server starts with no camps. Create one from the panel.
- No blips: check
Config.Settings.BlipsEnabledand the blip toggle of the camp. - NPCs do not spawn: the ped model is wrong or not streamed. The console warns
Model "x" not in CDImage, and a camp that spawns no NPC goes back to idle. - Loot items never drop: the item names in the loot table must exist in your inventory.
- No key in item mode: register
camp_key. The console prints an error that points to_INSTALL/items.lua. Or switch the key mode back to'virtual'. - A camp stays cleared: a spawn-once camp stays depleted until you press Force Reset in the Live tab.