Skip to content

Radoub Formats UTP

LordOfMyatar edited this page May 24, 2026 · 3 revisions

UTP Format

UTP files store placeable blueprints using the GFF format with a high-level API.


Overview

UTP (Universal Template Placeable) files define placeable object templates for NWN modules — chests, barrels, furniture, traps, etc. Radoub.Formats provides a typed reader/writer and a dedicated search provider (UtpSearchProvider) for the Marlinspike search engine.


Structure

flowchart TB
    UTP[UTP File] --> Identity[Identity]
    UTP --> Combat[Combat / Physical]
    UTP --> Lock[Lock / Trap]
    UTP --> Placeable[Placeable-Specific]
    UTP --> Scripts[Scripts]
    Identity --> Name[ResRef, Tag, LocName, Description]
    Combat --> HP[HP, Hardness, Saves]
    Combat --> Appearance[Appearance, Plot]
    Lock --> LockFields[Lockable, OpenLockDC]
    Lock --> TrapFields[TrapFlag, TrapType, DisarmDC]
    Placeable --> Inventory[HasInventory, ItemList]
    Placeable --> Flags[Static, Useable, BodyBag]
    Scripts --> Events[14 Event Scripts]
Loading

Identity fields

Property Type Description
TemplateResRef string Blueprint filename (max 16 chars)
Tag string Placeable tag (max 32 chars)
LocName CExoLocString Placeable name (localized)
Description CExoLocString Description (localized)
Comment string Designer comment
PaletteID byte Toolset palette ID
Conversation string Associated .dlg file

Combat and physical fields

Property Type Default Description
Appearance uint 0 Index into placeables.2da
HP short 0 Maximum hit points
CurrentHP short 0 Current hit points
Hardness byte 0 Damage reduction
Fort byte 0 Fortitude save
Ref byte 0 Reflex save
Will byte 0 Will save
Plot bool false Plot object (indestructible)
Faction uint 0 Faction ID from repute.fac

Lock fields

Property Type Default Description
Lockable bool false Can be re-locked
Locked bool false Currently locked
OpenLockDC byte 0 DC to pick lock
CloseLockDC byte 0 DC to re-lock
AutoRemoveKey bool false Key consumed on use
KeyName string "" Required key tag
KeyRequired bool false Key needed to unlock

Trap fields

Property Type Default Description
TrapFlag bool false Is trapped
TrapType byte 0 Index into traps.2da
TrapDetectable bool true Can be spotted
TrapDetectDC byte 0 DC to detect
TrapDisarmable bool true Can be disarmed
DisarmDC byte 0 DC to disarm
TrapOneShot bool true Fires once then gone

Placeable-specific fields

Property Type Default Description
HasInventory bool false Has inventory container
Useable bool true Player can interact
Static bool false Client-side only (no scripts)
BodyBag byte 0 Index into bodybag.2da

Inventory (ItemList)

PlaceableItem entries (only if HasInventory):

Property Type Description
InventoryRes string Item blueprint ResRef (.uti)
Repos_PosX ushort Inventory grid X position
Repos_PosY ushort Inventory grid Y position

Script fields

14 event scripts, all CResRef (string):

OnClosed, OnDamaged, OnDeath, OnDisarm, OnHeartbeat, OnInvDisturbed, OnLock, OnMeleeAttacked, OnOpen, OnSpellCastAt, OnTrapTriggered, OnUnlock, OnUserDefined, OnUsed


API

// Read
var utp = UtpReader.Read("chest.utp");
var utp = UtpReader.Read(byteArray);
var utp = UtpReader.Read(stream);

// Write
UtpWriter.Write(utp, "chest.utp");
byte[] bytes = UtpWriter.Write(utp);
UtpWriter.Write(utp, stream);

Search provider

UtpSearchProvider searches Name, Description, Tag, ResRef, Comment, Conversation, all 14 scripts, and VarTable. Registered in SearchProviderFactory.


2DA references

2DA File Field Purpose
placeables.2da Appearance Model and sound settings
bodybag.2da BodyBag Loot container appearance
traps.2da TrapType Trap effect properties
portraits.2da PortraitId Portrait image

BioWare spec

See Bioware-Legacy-DoorPlaceableGFF Section 4 (Placeable Struct).


Home | Index | Radoub-Formats

Page freshness: 2026-05-24


Parley

Getting Started

User Guide

Features

Help


Manifest


Quartermaster


Relique


Reliquary


Fence

  • Fence - Merchant/Store Editor

Trebuchet


Shared Features


Developers

Parley Internals

Manifest Internals

Quartermaster Internals

Relique Internals

Reliquary Internals

Fence Internals

Marlinspike (Search Engine)

Trebuchet Internals

Radoub.UI


Radoub.Formats

Library

Low-Level Formats

High-Level Parsers


Legacy Bioware Docs

Original BioWare Aurora Engine file format specifications.

Core Formats

Object Blueprints

Module/Area Files

Reference


Page freshness: 2026-05-24

Index

Clone this wiki locally