Installation

3 min readUpdated Today

Overview

Outpost lets players build survival bases from snapping foundations, walls, floors, stairs and gates in wood, stone and metal. A cupboard or community flag claims the base and holds the upkeep, a power grid runs lights, defenses and elevators, and raids use explosives and weapons against the structures. Bases, crews, storages and circuits are saved to the database.

Quick Start

  1. Download from CFX Portal
  2. Extract the [ml_base_building] group to your resources folder. Keep the folders named ml_base_building and ml_base_building_props
  3. Add to server.cfg, after your framework and inventory:
server.cfg
1ensure ox_lib
2ensure oxmysql
3ensure ml_bridge
4ensure ml_base_building_props
5ensure ml_base_building
Load Order

ml_base_building must start after ml_bridge and ml_base_building_props. Your framework and inventory must already be running.

Change the lock pepper

Set Config.Locks.codePepper in server/config_server.lua to your own secret before players set any lock code. Changing it later makes every saved code invalid.

Database

Tables are created on first start. _INSTALL/sql.sql holds the same schema for manual setup. The main ones:

  • ml_bb_props: every placed piece with position, owner, health and state
  • ml_bb_flags: cupboards and community flags with their tier, stock and limits
  • ml_bb_storages: contents of base storages
  • ml_bb_circuits: power grid state
  • ml_bb_crews, ml_bb_crew_members, ml_bb_crew_log, ml_bb_crew_raid_locks: crews, members, crew history and raid locks
  • ml_bb_bed_spawns: respawn beds
  • ml_bb_raid_log, ml_bb_event_log: raid and admin history
  • ml_bb_build_bans: players banned from building
  • ml_bb_settings: settings and tiers saved from the admin panel
  • ml_bb_donors, ml_bb_owned_sets, ml_bb_donor_revocations, ml_bb_donor_compensation, ml_bb_donor_compensation_claims: furniture sets and their grants
  • ml_bb_mutation_journal: guards inventory and database changes so a failed step is not repeated

Back up these tables before an update and never drop them to apply one.

Item Registration

Copy the entries of _INSTALL/items.lua into the return { ... } table of ox_inventory/data/items.lua, and the PNG files of _INSTALL/images/ into ox_inventory/web/images/. The file holds the building pieces, furniture, materials (wood, stone, metal, metal_scrap), cables, fuel, lock items, lockpicks, the c4_charge and the construction_hammer. Item names must match the keys in shared/data/models.lua and the item names in shared/config.lua.

Verify

In game, give yourself a building item, use it, place it and check that it is consumed. Then place a cupboard and open its panel. bb_diag_items in the server console prints how many building models are defined. It does not check the inventory.

  • Using an item does nothing: the item is not registered in your inventory, or its name does not match shared/data/models.lua.
  • Pieces turn invisible or show the wrong model: ml_base_building_props is not started, or was renamed.
  • Placement is refused on roads or floors: Config.SurfaceCheck blocks foundations on those surfaces. See Configuration.
  • Building is refused everywhere in the city: the area is inside one of Config.Building.disabledZones.
  • No admin panel: the player needs the ACE ml_bb.admin.panel or framework admin rights. /bb_admin opens it when Config.AdminKey is empty.