pebble_looting · v0.1.0
Looting
Template-driven looting for props, search areas, dead NPCs and ground pickups, with an in-game manager and an API other resources use to own their own loot tables.
Get Looting- Frameworks
- QBCoreQboxESXStandalone
- Requires
- ox_liboxmysqlpebble_bridge 1.x
pebble_looting decides what players find when they search something. Every container rolls its items from a template: a set of rarity pools, roll counts and a cooldown. Staff build templates in the in-game manager, and other resources can register and roll their own.
What can be looted
| Source | How it's set up |
|---|---|
| Props | Placed in the world from /lootadmin, or registered at runtime by another resource. |
| Search areas | Invisible boxes, for example a shelf or a car boot, placed from /lootadmin. |
| Model rules | Every prop or ped of a model becomes searchable with a template. |
| Dead NPCs and animals | Searchable with the zone's ped template (Config.Peds). Dead players aren't. |
| Crate rotations | Crates that move between a set of positions on a timer (Config.CrateRotations). |
| Ground loot | Items lying around in an area that go straight into the inventory (Config.GroundLoot). |
How a search works
- The player targets the container and searches it, with a progress bar and animation. Cancelling gives nothing.
- Items are rolled from the container's template and put in a stash.
- Everyone who opens that container sees the same stash until the template's cooldown runs out. Then the loot refreshes.
- A player who already searched it during the cooldown searches faster the next time (
Config.RevisitSearchMultiplier).
Templates can also need an item to search (a crowbar), have a lock that someone has to pick once per refresh, and remove the prop after it's looted.
Zones
Zones are polygons drawn on the map in /lootadmin. A container without a template of its own uses the template of the zone it stands in. Zones nest: a city block inside a city inside the map, each falling back to the one around it. Zones also hold free-form metadata that other resources read, for example a zombie script's difficulty per area.
Features
- In-game manager with a live roll simulator, item picker with icons, zone drawer and in-world prop and area placer.
- Rarity tiers from COMMON to LEGENDARY plus FIXED items that drop every time.
- Locks with lockpick items and break chances, required items and no-loot zones.
- Server API so other resources own their own templates, roll loot without a stash and add hooks (skill bonuses, extra drops, conditions).
- Audit log of every staff change, optionally posted to Discord.
Open files
config/ and docs/example.lua are readable and editable. Every player-facing message is in locales/en.json.