Installation

3 min readUpdated 2 weeks ago

Overview

ML Crafting is a workbench crafting system where the menu renders on a screen attached to the bench, in the world, players walk up and click through it like a terminal. Stations, recipes, categories and blueprints are all created from an in-game admin panel and stored in the database, so there is nothing to predefine in config files. Recipes support interchangeable OR-ingredients, skill gating, blueprints, timed queues, and benches can burn fuel and wear down.

Quick Start

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

ml_crafting must start AFTER ml_bridge. If you use ml_skills or ml_fuel, start them before it as well. The resource folder must keep the exact name ml_crafting.

Database

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

  • ml_crafting_bench_types / ml_crafting_bench_type_access / ml_crafting_bench_type_categories: Workstation definitions, their access lists and allowed categories
  • ml_crafting_bench_locations: Every placed bench, coordinates, owner, per-bench camera and interact point, portable flag
  • ml_crafting_categories / ml_crafting_color_presets: Recipe categories and the editor color palette
  • ml_crafting_recipes / ml_crafting_recipe_ingredients / ml_crafting_recipe_results / ml_crafting_recipe_blueprints: Recipes with their ingredients, results and blueprint requirements
  • ml_crafting_blueprints / ml_crafting_blueprint_uses: Blueprint definitions and per-player remaining uses
  • ml_crafting_players / ml_crafting_xp_log: Player progression, permanent blueprint unlocks, awarded-XP ledger
  • ml_crafting_queue / ml_crafting_pending_refunds: Active and ready crafts, plus refunds delivered on next login when an inventory was full
  • ml_crafting_station_models / ml_crafting_default_interact / ml_crafting_migrations: Custom station models from the model builder, the saved default interact point, schema migration markers
Fresh reinstall

_INSTALL/drop_old_tables.sql drops every ml_crafting table. Run it only if you want to wipe the install and start clean, the schema is recreated on the next start.

Item Registration

There is no fixed item list, register in your inventory the items you actually use:

  • ml_workstation: Generic placeable station item (Config.PortableStations.GenericItemName). The bench type comes from metadata.stationType. Alternatively, bind a dedicated item per bench type in the admin panel
  • ml_blueprint: Generic blueprint item (Config.Blueprints.GenericItemName) carrying metadata.blueprint, or one item per blueprint named blueprint_<label>
  • Every ingredient and result item referenced by your recipes must exist in your inventory. The recipe editor lists registered items, so typos are hard to make

Verify

After the database initializes, the server console prints the startup banner:

console
1[ml_crafting] Resource started
2[ml_crafting] Developed by Micio Mods | miciomods.it

In game, run /craftadmin with a staff account to open the editor, create a bench type, and place a first bench. It appears for everyone immediately.

  • Admin command does nothing: Your account does not pass the Config.Admin.Permission group check (or AcePermission if set). The denied attempt is logged to the exploit webhook
  • Bench prop not visible: Benches spawn within Config.Interaction.SpawnDistance. If a bench was just created remotely, walk Config.Stream.ReloadDistance meters or relog to refresh the area cache
  • Screen stays black: Content renders within Config.DUI.Range of the bench and at most Config.DUI.MaxActive screens run at once. Check the F8 console with Config.Debug = true
  • Recipes not visible to players: Config.Recipes.HideUnavailable and HideMissingBlueprint hide what cannot be crafted. Set ShowLockedPreview = true to show locked entries
  • No XP awarded: The console prints a yellow [ml_crafting][XP] warning when no ml_skills category could be resolved, bind a required skill on the recipe or map the category in Config.ExternalSkills.Mapping
  • Portable station item does nothing: The item must be registered as usable in your inventory and carry metadata.stationType. On inventories without metadata support, the console prints an INFO line and stations fall back to default values