Skip to content

Installation

Requirements, load order, the shipped fonts, and how to confirm text is drawing on a vehicle.

One dependency, no database, no SQL. Drop the folder in, ensure it after tLib, and start.

The video picks up after the resource is in place and running. Do Requirements and Load order first — they are two lines of server.cfg and the video does not cover them. From Who may open the editor onward you can follow along: it goes from granting the ACE to a number drawing on a vehicle you chose.

Requirements

tLib v1.0 or newer, which is free, and lua54. tUnit declares tlib_min_version '1.0' and refuses to start below it. Do not edit that out to run on an older tLib — you get a stack trace mid-save instead of a clear message.

Load order

cfg
ensure tLib
ensure tUnit

The folder must be named tUnit. A renamed folder is the usual cause of an import that finds no layouts.

Who may open the editor

/tunitedit and every save it makes are gated on tLib's tlib.admin ACE. Without it the editor opens and silently refuses to save — the server logs the refusal, the player does not. tUnit has no ACE of its own; it asks tLib, so one grant covers every t* editor.

cfg
add_ace group.admin "tlib.admin" allow
add_principal identifier.fivem:YOUR_ID group.admin

Replace YOUR_ID with your own — /tunit prints nothing useful about this, but your FiveM identifier is in the server console when you connect, and in txAdmin under Players.

Fonts

Three faces ship in web/fonts/. Nothing to source.

Config.fonts keyFaceFileWeight
condensedBarlow Condensed Blackcondensed.woff2900
blockArchivo Blackblock.woff2400
stencilBig Shoulders Stencilstencil.woff2800

All three are SIL OFL 1.1; web/fonts/LICENSES.md carries the copyright lines. Delete one and nothing errors — that cell is painted in the generic sans instead, which looks like a styling bug.

Fonts must be local; a Google Fonts <link> falls back to sans. Pick a thick stroke relative to cap height — stroke thickness decides whether text survives at distance.

Adding your own typeface

  1. Put yourface.woff2 in web/fonts/.
  2. Add an @font-face to web/atlas.html with a distinct font-family.
  3. Add that family to the FAMILIES map in the same file's script block.
  4. Add a key to Config.fonts naming that family.

To replace a shipped face, overwrite the file and stop. web/fonts/**/* is escrow_ignored, so your typefaces survive an update.

Making text appear

tUnit seeds layouts for valor2rb and valor5rb, each with a left and right element on the unit source.

  1. Start the server and get into a valor2rb.
  2. Run /tunit and set Unit number.
  3. Text appears on both doors within a second.

Any other vehicle

The two seeded models are a demonstration, not the feature. For your own vehicle:

  1. Get into it and run /tunitedit.
  2. Add an element, drag it onto the panel you want, and size it.
  3. Save. The layout is written to data.json, keyed to that model.
  4. Run /tunit and set the number to confirm it draws.

A vehicle with no layout draws nothing, and nor does an element with an empty value — neither case is an error, so both look like tUnit is broken. If nothing appears, run tunit_diag before changing anything: Troubleshooting is organised around its output, and its line 2 tells you whether saves are being written at all.

You can also seed layouts ahead of time in Config.layouts rather than placing them in game — see Precedence for which wins.

What it writes to disk

data.json, in the resource folder, created on the first editor save. It is gitignored and not shipped: Config.layouts is the seed, data.json the authority — see Precedence. In tLib demo mode nothing is written at all; check line 2 of tunit_diag before hunting a broken editor.

Optional: help us fix tUnit

tUnit does not report its own faults to us. When it throws on your server the error sits in your console, and unless someone opens a ticket we never learn it happened — which means the bugs nobody reports are the ones that stay.

One line opts in, in server.cfg above ensure tLib:

txt
set tlib_telemetry 1

That sends errors, warnings, renderer crashes and slow-operation outliers from our own code. No IP, no licence key, no server name, no player names or identifiers, and <resource>_diag output is never included. tlib_telemetry_status in the console shows what is on and what decided it.

It is off unless you set it, nothing is gated behind it, and Diagnostics is the full account of what is and is not sent.

Still stuck? Support can answer it directly.

Was this page helpful?