> For the complete documentation index, see [llms.txt](https://5scripts-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://5scripts-1.gitbook.io/docs/assets/5s_building/standalone.md).

# Standalone

Base Building is not limited to ESX, QBCore, or QBox. It runs on any framework, or standalone, because all it needs from a framework is **player identity**:

* `getIdentifier` - owns tool cupboards, doors, codelocks, and chests.
* `getName` - logs and ownership.

On `Config.framework = "standalone"` both already work (Rockstar license and player name), so there is nothing to set up.

{% hint style="info" %}
This page is about Base Building. For the shared standalone system, see [5s\_lib > Standalone & Custom Frameworks](/docs/assets/5s_lib/standalone.md).
{% endhint %}

## Steps

### 1. Select standalone

`5s_lib/config.lua`:

```lua
Config.framework = "standalone"
Config.inventory = "standalone" -- only if your inventory is unsupported
```

### 2. Identity

Nothing to do. Base Building gets license and name from the standalone bridge automatically. If you want a custom ID source, change `getIdentifier` in `5s_lib/resource/bridge/framework/standalone/server.lua`.

### 3. Inventory

If your inventory is one 5s\_lib supports (`ox_inventory`, `qs-inventory`, `qb-inventory`, `tgiann-inventory`, `core_inventory`, `basic-framework`), just set it in the config and skip this. If not, implement the standalone inventory stubs: [Custom Inventory](/docs/assets/5s_building/custom-inventory.md).

### 4. Item usage

Placing objects starts when a player uses an item (`building-plan`, `tc`, `chest`, doors, windows, and so on). When your inventory reports that an item was used, fire this event from the server with the action that matches the item:

```lua
-- server side, inside your inventory's "item used" handler:
RegisterNetEvent('myInventory:itemUsed', function(source, itemName)
    local action = buildingActions[itemName]
    if not action then return end
    TriggerClientEvent('5s_building:runFunction', source, action, itemName)
end)

-- which action each item maps to:
local buildingActions = {
    ['building-plan'] = 'openEditorWithDefaultObject',
    ['toolbox']       = 'openEditorSpecialWithResources',
    ['hammer']        = 'startUpgrading',
    ['tc']            = 'openEditorSpecial', -- also: codelock, chest, doors, windows, gates
    ['outer-wood-wall'] = 'openEditorBuildModel', -- exterior walls and gate frames
}
```

The full item to action mapping lives in `5s_building/server/editable/inventory.lua`.

With identity from the standalone bridge and your inventory wired up, Base Building runs standalone.
