> For the complete documentation index, see [llms.txt](https://docs.lostdev.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lostdev.store/territories/dev-commands.md).

# Dev Commands

{% hint style="warning" %}
[`server/dev_commands.lua`](broken://pages/ebef94596402705d6a8b638cef164be78e51f0a7) is temporary. None of these commands check permissions — any connected player can use them. **Remove this file (and the matching line in `fxmanifest.lua`) before shipping to a production server.**
{% endhint %}

They exist to test the system solo, without needing a second account/player.

| Command            | Usage                                              | Description                                                                                                                           |
| ------------------ | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `/tt_help`         | `/tt_help`                                         | Lists all commands.                                                                                                                   |
| `/tt_showauth`     | `/tt_showauth`                                     | Shows the job/gang detected by the framework, the faction used by the tablet, and the result of each admin-panel authorization layer. |
| `/tt_list`         | `/tt_list`                                         | Lists every territory id.                                                                                                             |
| `/tt_setgroup`     | `/tt_setgroup <faction>`                           | Makes you appear to be a member of `<faction>` (until your next real job/gang change).                                                |
| `/tt_addplayers`   | `/tt_addplayers <territoryId> <faction> <count>`   | Simulates `<count>` extra players of `<faction>` inside the territory (you still need to be physically inside it too).                |
| `/tt_clearplayers` | `/tt_clearplayers <territoryId\|all>`              | Removes simulated players.                                                                                                            |
| `/tt_setowner`     | `/tt_setowner <territoryId> <faction\|neutral>`    | Forces a territory's owner directly (bypassing the admin panel).                                                                      |
| `/tt_complete`     | `/tt_complete <territoryId> <faction>`             | Instantly finishes a capture (tests win/lose sound + cooldown).                                                                       |
| `/tt_attack`       | `/tt_attack <territoryId> <attackerFaction>`       | Fires the "under attack" alert without a real attacker.                                                                               |
| `/tt_startcapture` | `/tt_startcapture <territoryId> <attackerFaction>` | Forces a real capture to start — useful for testing the **defender** role solo.                                                       |
| `/tt_admin`        | `/tt_admin`                                        | Grants yourself the `territories.admin` ACE permission, to test the tablet's ADMIN tab.                                               |

## Typical flow: testing as the defender, solo

{% stepper %}
{% step %}

### Log in as (or switch to) the owning faction

Use `/tt_setgroup <faction>` if needed.
{% endstep %}

{% step %}

### Stand inside the zone

{% endstep %}

{% step %}

### Force the capture state

Run `/tt_startcapture <territoryId> <attackerFaction>` to force the `CAPTURING` state as if an attacker had just walked in.
{% endstep %}

{% step %}

### Simulate attackers

Run `/tt_addplayers <territoryId> <attackerFaction> <count>` to simulate however many attackers you want and test the speed multiplier.
{% endstep %}

{% step %}

### Let the genuine capture loop run

The real loop (`TerritoryManager.ProcessTerritories`) processes everything from here on as a genuine capture — progress, attack banner, contested UI, all in real time.
{% endstep %}
{% endstepper %}

## How player simulation works (`PhantomPlayers`)

`dev_commands.lua` monkey-patches `TerritoryManager.UpdatePlayersInZone`: it calls the original implementation and, right after each real recompute (throttled to \~100ms), adds the counts from `PhantomPlayers[territoryId][faction]` on top of `territory.factionsInside`.

This means **you still need to be physically inside the territory** — phantom players are added *on top of* real detection, not instead of it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lostdev.store/territories/dev-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
