Installation

2 min readUpdated Today

Overview

ML Recycler is a placeable salvage machine. Players carry a recycler item, drop the prop in the world, and operate it through a screen rendered on the machine itself. Items are inserted into processing slots, break down over a timer into configurable outputs, and are collected from the same screen. The machine runs on optional fuel, wears down with use, and accepts upgrade modules. Server owners can also pin permanent community stations to the map.

Quick Start

  1. Download from CFX Portal
  2. Extract to your resources folder as ml_recycler
  3. Add to server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_recycler
Load Order

ml_recycler must start AFTER ml_bridge. Start xsound before it if you use the ambient sound.

Database

Tables are created automatically on first start. No manual SQL import is needed.

ml_recyclers: Position, owner, type, fuel, durability, upgrades, upgrade wear, fixed-station id

ml_recycler_slots: Per-slot processing state (item, count, metadata, status, timestamps)

ml_recycler_config: Runtime config snapshots written by the script

Auto Created

The schema is built by server/database.lua on start. Do not import an older SQL dump over an existing install: a table created with missing columns is not migrated by CREATE TABLE IF NOT EXISTS.

Item Registration

Register the items from _INSTALL/items.lua in your inventory, and copy the PNGs from _INSTALL/images/ into your inventory's image folder.

  • recycler: Placeable recycler
  • turbo_motor, extra_tank, silencer_kit, solar_panel: Upgrade modules
  • repair_kit, patch_kit, lubricant: Repair items
  • fuel_canister, industrial_battery: One-shot fuel items

Item names are configurable in Config.Recycler, Config.Upgrades, Config.RepairItems and Config.Fuel. Every recyclable input item and every output item must also exist in your inventory.

Verify

After starting, the console prints the banner and:

lua
1[ml_recycler] Resource started

Give yourself a recycler item and use it to enter placement mode.

  • Recycler not placing: Check Config.PlacementDistance, and that the recycler item is registered in your inventory.
  • Processing not starting: Check fuel level and Config.Features.fuelSystem. An empty tank pauses processing.
  • Sound not playing: Verify xsound is running and Config.Features.ambientSounds = true.
  • Screen not rendering: Check the F8 console for errors and verify Config.DuiResolution.
  • Insert/collect does nothing: Confirm the input item has a matching entry in Config.RecycleRecipes.