Skip to content

Templates ​

A template is a furnished tent saved once, so a faction can set it up again with a single placement. Templates belong to the faction.

lua
template = {
  name, tent = "<item key>", label = ref,
  door = { locked, minGrade } | nil,
  items = { { key, x, y, z, h } },   -- offsets in the tent's frame (m, degrees), rounded to mm / 0.1°
  author, updated, uses,
}

Saving ​

Needs medic.fieldplan and a faction.

  1. Set up a tent and furnish it with /feld <part>: every part placed inside the tent's interior belongs to it.
  2. Stand within 12 m of the tent, open the tablet (/feld vorlage or /feld lager) and save it as a template.

Every part parented to the tent is stored. The tent's label and door settings are taken unless the request sets door (minimum grade 0 to 20). Limits: maxItems (24) parts per template, maxPerFaction (12) templates per faction, maxName (32) characters in the name. An empty tent cannot be saved (empty_tent).

Deploying ​

Needs medic.deploy.

  1. In the tablet, pick a template. The tablet closes and the client shows np_prophandler's gizmo for the tent only. It then sends np_medic_field:deploy { template, variant, x, y, z, heading }.
  2. The server checks the faction's template, every part's item gate, the same pose, distance and limits as for a single part (counting the tent plus all its parts) and deployCooldownS (20 s).
  3. It places the tent, then builds one part every buildIntervalMs (900 ms), each at a pose it computes from the tent pose. Each part settles on the ground (placeOnGround).
  4. Packing the tent stops the build.
  5. The player sees the progress as a small progress pill, also while the tablet is closed (np_medic_field:progress). When the last part stands, the local server event np_medic_field:built fires.

The Feldlager tablet ​

A Nimbus UI page (web/index.html) with three views:

Opened by View
/feld Templates: the faction's templates with a floor plan, deploy
/feld schild Label designer: the faction's labels (Labels)
/feld vorlage, /feld lager Tents within 30 m: relabel, save as template
Tent interaction "Schild wechseln" Change that tent's label

The tablet only asks the server. Every change goes through a server RPC that checks permission, faction, distance and limits; on a refusal the player gets a German message with the reason.

Storage ​

Config.Templates.store:

  • "kvp" (default): resource KVP, keys <kind>:<faction>, no database;
  • "oxmysql": the table np_medic_field_store from sql/install.sql (Installation). If oxmysql is not running, it falls back to KVP with a warning.

Labels use the same store.