Xdata

From Sinfar

XDATA

XDATA is a Sinfar-exclusive string variable system that allows builders and players to customise the visual appearance of placeables, accessories, and visual effects beyond what the standard NWN toolset supports. Using the XDATA Generator tool on the Sinfar website, you can adjust scaling, position, orientation, colour (RGBA), and — most usefully — remap one texture to another on any supported object.

The feature is powered by the SinfarX client extender, which must be installed and running for XDATA effects to be visible in-game.


What XDATA Can Do

Feature Works on Notes
Texture remapping Placeables, accessories, VFX Replace any bitmap with any other bitmap resref
Scaling Placeables, accessories, VFX, creatures Float value between 0.001 and 100
Position offset (X/Y/Z) Placeables, accessories, VFX Any float; useful for fine-tuning accessories
Orientation (X/Y/Z) Placeables, accessories, VFX Degrees, 0–360
RGBA colour tint Placeables, accessories, VFX Integer values −128 to +127 per channel

Important limitations:

  • Placeables must be set as Static in the toolset, otherwise XDATA has no effect.
  • Accessories that use the Metal/Leather/Cloth colouring system (RGB/Transparency/Saturation) cannot have their textures remapped via XDATA.
  • Some textures will not render correctly on certain placeables or VFX — this is a trial-and-error process.
  • XDATA effects are client-side (rendered by SinfarX). Other players must also have SinfarX installed to see them.

The XDATA Generator

The XDATA Generator is a web form at nwn.sinfar.net/xdata.php. Fill in the fields you want to change, leave the rest blank, and click Generate to produce the XDATA string.

Field Type Range Description
Scaling Float 0.001 – 100 Uniform scale multiplier for the object
Position X/Y/Z Float −∞ to +∞ Offset the object's position on each axis
Orientation X/Y/Z Float 0 – 360 Rotate the object on each axis (degrees)
Red / Green / Blue / Alpha Integer −128 to +127 RGBA colour tint applied to all textures
Textures Mapping — From ResRef (texture name) The original bitmap name on the model
Textures Mapping — To ResRef (texture name) The replacement texture bitmap name

You can add multiple texture remapping pairs by clicking Add after each pair before generating. Once you have the full output string, copy it.


Applying XDATA

To a Placeable (in the Toolset)

  1. Open your area in the NWN Toolset.
  2. Select the placeable you want to modify.
  3. In its Properties, make sure Static is checked. XDATA will not work on non-static placeables.
  4. Go to the Variables tab.
  5. Add a new variable:
    • Type: String
    • Name: XDATA
    • Value: Paste the generated XDATA string
  6. Save and upload your ERF via the House Upload Page.

To an Accessory (In-Game)

  1. Equip or activate the accessory on your character.
  2. Open the Adjustment Menu for that accessory in-game.
  3. Select Set the adjustments string.
  4. Paste the generated XDATA string and confirm.

Finding Texture Bitmap Names (ResRefs)

To remap a texture you need to know the bitmap resref — the internal file name of the texture as it appears inside the model file. There are two main methods:

Method 1: NWN Explorer

NWNExplorer lets you browse and search the NWN hak files to find model bitmaps.

  1. Download and install NWNExplorer (note: it can be unstable on Windows 10/11 — contextual menus may crash it; a full NWN installation or at least the correct registry key pointing to your NWN folder is required).
  2. Open the relevant hak file:
    • Most Sinfar placeables are in the placeable hak files in your hak\ directory.
    • Most accessories are in sf_effects_v30.hak (version number may vary).
    • To speed up searching: click the relevant hak group (e.g. NWN Hak Files), then use Ctrl+S and type the resource name.
  3. Navigate to Models, find the model, double-click it and wait for it to load.
  4. Click ASCII Model and look for the line that starts with bitmap — that value is your resref.

Tip from the guide: NWNExplorer searches from the top of the list down. If you know the texture is in the custom haks, click NWN Hak Files first before searching to skip vanilla NWN resources.

Method 2: Sinfar Textures List

The Textures page on this wiki lists 31,000+ texture resrefs cross-referenced from Sinfar's 2da files and model data

Method 3: Coldest's Texture Database

A community-maintained thread on the Sinfar forum has many textures with their bitmap resrefs already identified: Coldest's Textures Database (forum login required). This is especially useful for common patterns and tileset textures.


Step-by-Step Example: Retexturing a Carpet with Lava

This example (from the original guide) walks through replacing the texture on a carpet placeable with a lava texture.

Step 1 — Find the source texture resref

Look up "Carpet: Rug 16" in the placeables 2da. Open its model in NWNExplorer and note the bitmap: tni01_burlap.

Step 2 — Find the target texture resref

Look up "Floor: Lava 1 1×1". Its bitmap is: tde01_lava01.

Alternatively, look this up in the Textures reference — search for lava textures in the Tileset Textures section.

Step 3 — Generate the XDATA string

  1. Open XDATA Generator.
  2. Leave Scaling, Position, Orientation, and RGBA blank (no changes needed).
  3. Under Textures Mapping:
    • From: tni01_burlap
    • To: tde01_lava01
  4. Click Add, then click Generate.
  5. Copy the resulting string.

Step 4 — Apply to the placeable

In the Toolset, select the carpet placeable, verify it is Static, and add a String variable named XDATA with the copied value. Upload the ERF.

The carpet will now display the lava texture in-game (for all players with SinfarX installed).


Step-by-Step Example: Retexturing an Accessory (Horns)

Step 1 — Find the accessory bitmap

Open NWNExplorer, click NWN Hak Files → open sf_effects_v30.hak → navigate to Models → search for the curved horns model. Double-click, load the ASCII model, and find the bitmap line: horn_01.

Step 2 — Find the target texture

Use any texture from the Textures reference or from Coldest's database. For this example: tde01_lava01.

Step 3 — Generate and apply

  1. Open XDATA Generator.
  2. Under Textures Mapping: From horn_01 → To tde01_lava01.
  3. Click AddGenerate → Copy.
  4. In-game, open the accessory adjustment menu → Set the adjustments string → Paste → Apply.

Note: If the accessory uses the Metal/Leather/Cloth colour system, texture remapping will not work. Additionally, colour (RGBA) changes applied alongside a texture remap will affect the remapped texture.


Troubleshooting

Problem Likely cause Solution
XDATA has no visible effect on a placeable Placeable is not set as Static Open in Toolset, check the Static property
Texture doesn't appear / shows as white Incorrect resref, or texture not in haks Double-check the bitmap name in NWNExplorer; confirm the texture exists in the Sinfar haks
Other players can't see the XDATA effects They don't have SinfarX installed XDATA is client-side; direct them to SinfarX
NWNExplorer crashes on contextual menus Known bug on Windows 10/11 Avoid right-click menus; use Ctrl+S to search; ensure NWN registry key is set
XDATA string rejected on house upload XDATA variables are stripped from non-static placeables during upload validation Set placeable as Static before uploading
Texture looks wrong / distorted UV mapping mismatch between source and target texture Experiment with different target textures; this is trial and error
Colour changes affect remapped texture Expected behaviour Apply RGBA values carefully; set all to 0 if you only want a texture swap

For additional help, post in the Builders section of the Sinfar Forum or ask on the Builders Discord.


Known Limitations and Notes

  • Accessories with Metal/Leather/Cloth colouring (the RGB/Transparency/Saturation system used for dyeable gear) cannot be remapped. Only items that do not use this system are compatible.
  • The results of texture remapping can be unexpected — a texture that looks great on one model may appear stretched, tiled oddly, or invisible on another. Testing is essential.
  • Multiple texture pairs can be added in a single XDATA string (add each From→To pair before clicking Generate).
  • Scaling, position, orientation, and colour changes can all be combined with texture remapping in a single XDATA string.
  • XDATA is not a scripting variable — it is read by SinfarX on the client side. No NWN script can read or write it at runtime; it must be set in the Toolset or via the in-game accessory menu.

See Also

[[Category:Player_Tools]] [[Category:Builders_Tools]]