Xdata: Difference between revisions

From Sinfar
(updated to new format)
 
Line 1: Line 1:
__NOTOC__


== XDATA ==
<div style="
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 [https://nwn.sinfar.net/xdata.php 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.
  background: linear-gradient(180deg, #0b090a 0%, #181214 45%, #0b090a 100%);
  border: 1px solid #6f5730;
  color: #e8dcc8;
  padding: 26px;
  box-shadow: 0 0 28px rgba(0,0,0,0.45);
">
 
<!-- HERO -->
<div style="
  text-align: center;
  padding: 34px 20px;
  border: 1px solid #8b6b3a;
  background:
    radial-gradient(circle at center, rgba(143,36,50,0.35), rgba(11,9,10,0.18) 62%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12));
">
 
<div style="
  font-family: Georgia, serif;
  font-size: 44px;
  letter-spacing: 4px;
  color: #d8b46a;
  text-shadow: 0 0 12px rgba(143,36,50,0.65);
">
XDATA TEXTURE MAPPING
</div>
 
<div style="
  margin-top: 10px;
  font-size: 17px;
  letter-spacing: 1px;
  color: #c9bda9;
">
Customize visual appearance of placeables, accessories, and effects.
</div>
 
</div>
 
 
<!-- INTRO -->
<div style="
  margin-top: 26px;
  padding: 20px 24px;
  background: #181214;
  border-left: 4px solid #8f2432;
  border-top: 1px solid #6f5730;
  border-bottom: 1px solid #6f5730;
  line-height: 1.65;
">
 
<div style="
  font-family: Georgia, serif;
  font-size: 26px;
  color: #d8b46a;
  margin-bottom: 8px;
">
About XDATA
</div>
 
'''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 [https://nwn.sinfar.net/xdata.php 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.
The feature is powered by the '''SinfarX client extender''', which must be installed and running for XDATA effects to be visible in-game.


----
</div>
 
 
<!-- CAPABILITIES -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
What XDATA Can Do
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">


=== What XDATA Can Do ===
{| style="width:100%; border-spacing:0; border-collapse:collapse;"
{| class="wikitable"
!Feature
!Works on
!Notes
|-
|-
|Texture remapping
| style="width:25%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Feature
|Placeables, accessories, VFX
| style="width:25%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Works on
|Replace any bitmap with any other bitmap resref
| style="width:50%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Notes
|-
|-
|Scaling
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Texture remapping
|Placeables, accessories, VFX, creatures
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeables, accessories, VFX
|Float value between 0.001 and 100
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Replace any bitmap with any other bitmap resref
|-
|-
|Position offset (X/Y/Z)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Scaling
|Placeables, accessories, VFX
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeables, accessories, VFX, creatures
|Any float; useful for fine-tuning accessories
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Float value between 0.001 and 100
|-
|-
|Orientation (X/Y/Z)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Position offset (X/Y/Z)
|Placeables, accessories, VFX
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeables, accessories, VFX
|Degrees, 0–360
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Any float; useful for fine-tuning accessories
|-
|-
|RGBA colour tint
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Orientation (X/Y/Z)
|Placeables, accessories, VFX
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeables, accessories, VFX
|Integer values −128 to +127 per channel
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Degrees, 0–360
|-
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | RGBA colour tint
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeables, accessories, VFX
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Integer values −128 to +127 per channel
|}
|}
'''Important limitations:'''


* Placeables '''must be set as Static''' in the toolset, otherwise XDATA has no effect.
</div>
* 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.
<div style="
* XDATA effects are '''client-side''' (rendered by SinfarX). Other players must also have SinfarX installed to see them.
  margin-top: 14px;
  padding: 16px 20px;
  background: #181214;
  border: 1px solid #8f2432;
  color: #e8dcc8;
  line-height: 1.6;
">
 
<div style="color:#d8b46a; font-weight:bold; margin-bottom:8px;">Important limitations:</div>
 
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.
 
</div>


----


=== The XDATA Generator ===
<!-- GENERATOR TOOL -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
The XDATA Generator
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.65;
">
 
The [https://nwn.sinfar.net/xdata.php XDATA Generator] is a web form at <code>nwn.sinfar.net/xdata.php</code>. Fill in the fields you want to change, leave the rest blank, and click '''Generate''' to produce the XDATA string.
The [https://nwn.sinfar.net/xdata.php XDATA Generator] is a web form at <code>nwn.sinfar.net/xdata.php</code>. Fill in the fields you want to change, leave the rest blank, and click '''Generate''' to produce the XDATA string.
{| class="wikitable"
 
!Field
{| style="width:100%; border-spacing:0; border-collapse:collapse; margin-top:12px;"
!Type
!Range
!Description
|-
|-
|Scaling
| style="width:20%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Field
|Float
| style="width:15%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Type
|0.001 – 100
| style="width:20%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Range
|Uniform scale multiplier for the object
| style="width:45%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Description
|-
|-
|Position X/Y/Z
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Scaling
|Float
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Float
|−∞ to +∞
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | 0.001–100
|Offset the object's position on each axis
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Uniform scale multiplier for the object
|-
|-
|Orientation X/Y/Z
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Position X/Y/Z
|Float
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Float
|0 – 360
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | −∞ to +∞
|Rotate the object on each axis (degrees)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Offset the object's position on each axis
|-
|-
|Red / Green / Blue / Alpha
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Orientation X/Y/Z
|Integer
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Float
|−128 to +127
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | 0–360
|RGBA colour tint applied to all textures
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Rotate the object on each axis (degrees)
|-
|-
|Textures Mapping — From
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Red / Green / Blue / Alpha
|ResRef
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Integer
|(texture name)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | −128 to +127
|The original bitmap name on the model
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | RGBA colour tint applied to all textures
|-
|-
|Textures Mapping — To
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Textures Mapping — From
|ResRef
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | ResRef
|(texture name)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | (texture name)
|The replacement texture bitmap name
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | The original bitmap name on the model
|-
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Textures Mapping — To
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | ResRef
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | (texture name)
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | 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.
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 ===
</div>
==== To a Placeable (in the Toolset) ====
 
 
<!-- APPLYING XDATA -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Applying XDATA
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">


# Open your area in the [https://nwn.fandom.com/wiki/Toolset NWN Toolset].
<div style="
# Select the placeable you want to modify.
  font-family: Georgia, serif;
# In its Properties, make sure '''Static''' is checked. XDATA will not work on non-static placeables.
  font-size: 18px;
# Go to the '''Variables''' tab.
  color: #d8b46a;
# Add a new variable:
  margin-bottom: 12px;
#* '''Type:''' String
">
#* '''Name:''' <code>XDATA</code>
To a Placeable (in the Toolset)
#* '''Value:''' Paste the generated XDATA string
</div>
# Save and upload your ERF via the [https://nwn.sinfar.net/houses_uploadform.php House Upload Page].


==== To an Accessory (In-Game) ====
Open your area in the [https://nwn.fandom.com/wiki/Toolset NWN Toolset]. Select the placeable you want to modify. In its Properties, make sure '''Static''' is checked — XDATA will not work on non-static placeables. Go to the '''Variables''' tab. Add a new variable with Type '''String''', Name <code>XDATA</code>, and Value set to your generated XDATA string. Save and upload your ERF via the [https://nwn.sinfar.net/houses_uploadform.php House Upload Page].


# Equip or activate the accessory on your character.
</div>
# Open the '''Adjustment Menu''' for that accessory in-game.
# Select '''Set the adjustments string'''.
# Paste the generated XDATA string and confirm.


----
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">


=== Finding Texture Bitmap Names (ResRefs) ===
<div style="
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:
  font-family: Georgia, serif;
  font-size: 18px;
  color: #d8b46a;
  margin-bottom: 12px;
">
To an Accessory (In-Game)
</div>


==== Method 1: NWN Explorer ====
Equip or activate the accessory on your character. Open the '''Adjustment Menu''' for that accessory in-game. Select '''Set the adjustments string'''. Paste the generated XDATA string and confirm.
[https://neverwintervault.org/project/nwn1/other/tool/nwnexplorer NWNExplorer] lets you browse and search the NWN hak files to find model bitmaps.


# 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).
</div>
# Open the relevant hak file:
#* Most Sinfar placeables are in the placeable hak files in your <code>hak\</code> directory.
#* Most accessories are in <code>sf_effects_v30.hak</code> (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.
# Navigate to '''Models''', find the model, double-click it and wait for it to load.
# Click '''ASCII Model''' and look for the line that starts with <code>bitmap</code> — 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 ====
<!-- FINDING TEXTURES -->
The [[Textures]] page on this wiki lists 31,000+ texture resrefs cross-referenced from Sinfar's 2da files and model data
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Finding Texture Bitmap Names (ResRefs)
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.65;
">
 
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 three main methods:
 
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">
 
<div style="
  font-family: Georgia, serif;
  font-size: 18px;
  color: #d8b46a;
  margin-bottom: 12px;
">
Method 1: NWN Explorer
</div>
 
[https://neverwintervault.org/project/nwn1/other/tool/nwnexplorer NWNExplorer] lets you browse and search the NWN hak files to find model bitmaps. 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). Open the relevant hak file: most Sinfar placeables are in the placeable hak files in your <code>hak\</code> directory; most accessories are in <code>sf_effects_v30.hak</code> (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. Navigate to '''Models''', find the model, double-click it and wait for it to load. Click '''ASCII Model''' and look for the line that starts with <code>bitmap</code> — that value is your resref.
 
Tip: 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.
 
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">
 
<div style="
  font-family: Georgia, serif;
  font-size: 18px;
  color: #d8b46a;
  margin-bottom: 12px;
">
Method 2: Sinfar Textures List
</div>
 
The [[Textures|Textures page]] on this wiki lists 31,000+ texture resrefs cross-referenced from Sinfar's 2da files and model data.
 
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">
 
<div style="
  font-family: Georgia, serif;
  font-size: 18px;
  color: #d8b46a;
  margin-bottom: 12px;
">
Method 3: Coldest's Texture Database
</div>


==== Method 3: Coldest's Texture Database ====
A community-maintained thread on the Sinfar forum has many textures with their bitmap resrefs already identified: [https://forum.sinfar.net/viewtopic.php?f=315&t=14318 Coldest's Textures Database] (forum login required). This is especially useful for common patterns and tileset textures.
A community-maintained thread on the Sinfar forum has many textures with their bitmap resrefs already identified: [https://forum.sinfar.net/viewtopic.php?f=315&t=14318 Coldest's Textures Database] (forum login required). This is especially useful for common patterns and tileset textures.


----
</div>


=== Step-by-Step Example: Retexturing a Carpet with Lava ===
This example (from the [https://sinfar.net/building/xdata_mapping original guide]) walks through replacing the texture on a carpet placeable with a lava texture.


'''Step 1 — Find the source texture resref'''
<!-- EXAMPLE 1 -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Example: Retexturing a Carpet with Lava
</div>


Look up "Carpet: Rug 16" in the placeables 2da. Open its model in NWNExplorer and note the bitmap: <code>tni01_burlap</code>.
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.65;
">


'''Step 2 — Find the target texture resref'''
This example walks through replacing the texture on a carpet placeable with a lava texture.


Look up "Floor: Lava 1 1×1". Its bitmap is: <code>tde01_lava01</code>.
'''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: <code>tni01_burlap</code>.


Alternatively, look this up in the [[Textures]] reference — search for lava textures in the [[Textures#Tileset Textures|Tileset Textures]] section.
'''Step 2 — Find the target texture resref:''' Look up "Floor: Lava 1 1×1". Its bitmap is: <code>tde01_lava01</code>. Alternatively, look this up in the [[Textures|Textures reference]] — search for lava textures in the [[Textures#Tileset_Textures|Tileset Textures section]].


'''Step 3 — Generate the XDATA string'''
'''Step 3 — Generate the XDATA string:''' Open [https://nwn.sinfar.net/xdata.php XDATA Generator]. Leave Scaling, Position, Orientation, and RGBA blank (no changes needed). Under '''Textures Mapping''': From <code>tni01_burlap</code> → To <code>tde01_lava01</code>. Click '''Add''', then '''Generate'''. Copy the resulting string.


# Open [https://nwn.sinfar.net/xdata.php XDATA Generator].
'''Step 4 — Apply to the placeable:''' In the Toolset, select the carpet placeable, verify it is '''Static''', and add a String variable named <code>XDATA</code> with the copied value. Upload the ERF. The carpet will now display the lava texture in-game (for all players with SinfarX installed).
# Leave Scaling, Position, Orientation, and RGBA blank (no changes needed).
# Under '''Textures Mapping''':
#* '''From:''' <code>tni01_burlap</code>
#* '''To:''' <code>tde01_lava01</code>
# Click '''Add''', then click '''Generate'''.
# Copy the resulting string.


'''Step 4 — Apply to the placeable'''
</div>


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


The carpet will now display the lava texture in-game (for all players with SinfarX installed).
<!-- EXAMPLE 2 -->
----
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Example: Retexturing an Accessory (Horns)
</div>


=== Step-by-Step Example: Retexturing an Accessory (Horns) ===
<div style="
'''Step 1 — Find the accessory bitmap'''
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.65;
">


Open NWNExplorer, click '''NWN Hak Files''' → open <code>sf_effects_v30.hak</code> → navigate to '''Models''' → search for the curved horns model. Double-click, load the ASCII model, and find the bitmap line: <code>horn_01</code>.
'''Step 1 — Find the accessory bitmap:''' Open NWNExplorer, click '''NWN Hak Files''' → open <code>sf_effects_v30.hak</code> → navigate to '''Models''' → search for the curved horns model. Double-click, load the ASCII model, and find the bitmap line: <code>horn_01</code>.


'''Step 2 — Find the target texture'''
'''Step 2 — Find the target texture:''' Use any texture from the [[Textures|Textures reference]] or from Coldest's database. For this example: <code>tde01_lava01</code>.


Use any texture from the [[Textures]] reference or from Coldest's database. For this example: <code>tde01_lava01</code>.
'''Step 3 — Generate and apply:''' Open [https://nwn.sinfar.net/xdata.php XDATA Generator]. Under Textures Mapping: From <code>horn_01</code> → To <code>tde01_lava01</code>. Click '''Add''' → '''Generate''' → Copy. In-game, open the accessory adjustment menu → '''Set the adjustments string''' → Paste → Apply.


'''Step 3 — Generate and 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.


# Open [https://nwn.sinfar.net/xdata.php XDATA Generator].
</div>
# Under Textures Mapping: From <code>horn_01</code> → To <code>tde01_lava01</code>.
# Click '''Add''' → '''Generate''' → Copy.
# 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 ===
<!-- TROUBLESHOOTING -->
{| class="wikitable"
<div style="
!Problem
  margin-top: 30px;
!Likely cause
  font-family: Georgia, serif;
!Solution
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Troubleshooting
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
">
 
{| style="width:100%; border-spacing:0; border-collapse:collapse;"
|-
|-
|XDATA has no visible effect on a placeable
| style="width:30%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Problem
|Placeable is not set as Static
| style="width:35%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Likely cause
|Open in Toolset, check the Static property
| style="width:35%; background:#21171a; border:1px solid #6f5730; padding:10px; color:#d8b46a; font-weight:bold;" | Solution
|-
|-
|Texture doesn't appear / shows as white
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | XDATA has no visible effect on a placeable
|Incorrect resref, or texture not in haks
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Placeable is not set as Static
|Double-check the bitmap name in NWNExplorer; confirm the texture exists in the Sinfar haks
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Open in Toolset, check the Static property
|-
|-
|Other players can't see the XDATA effects
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Texture doesn't appear / shows as white
|They don't have SinfarX installed
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Incorrect resref, or texture not in haks
|XDATA is client-side; direct them to [https://sinfar.net/nwncx SinfarX]
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Double-check the bitmap name in NWNExplorer; confirm the texture exists in the Sinfar haks
|-
|-
|NWNExplorer crashes on contextual menus
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Other players can't see the XDATA effects
|Known bug on Windows 10/11
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | They don't have SinfarX installed
|Avoid right-click menus; use Ctrl+S to search; ensure NWN registry key is set
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | XDATA is client-side; direct them to [[Sinfar Client Extender|SinfarX]]
|-
|-
|XDATA string rejected on house upload
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | NWNExplorer crashes on contextual menus
|XDATA variables are stripped from non-static placeables during upload validation
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Known bug on Windows 10/11
|Set placeable as Static before uploading
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Avoid right-click menus; use Ctrl+S to search; ensure NWN registry key is set
|-
|-
|Texture looks wrong / distorted
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | XDATA string rejected on house upload
|UV mapping mismatch between source and target texture
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | XDATA variables are stripped from non-static placeables during upload validation
|Experiment with different target textures; this is trial and error
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Set placeable as Static before uploading
|-
|-
|Colour changes affect remapped texture
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Texture looks wrong / distorted
|Expected behaviour
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | UV mapping mismatch between source and target texture
|Apply RGBA values carefully; set all to 0 if you only want a texture swap
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Experiment with different target textures; this is trial and error
|-
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Colour changes affect remapped texture
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | Expected behaviour
| style="background:#21171a; border:1px solid #6f5730; padding:10px; color:#e8dcc8;" | 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 [https://forum.sinfar.net/ Sinfar Forum] or ask on the [https://discord.gg/AAhXQtH Builders Discord].
For additional help, post in the Builders section of the [https://forum.sinfar.net/ Sinfar Forum] or ask on the [https://discord.gg/AAhXQtH Builders Discord].
----


=== Known Limitations and Notes ===
</div>
 
 
<!-- LIMITATIONS -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
Known Limitations and Notes
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.65;
">
 
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.


* '''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.
</div>
* 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 ===
<!-- REFERENCES -->
<div style="
  margin-top: 30px;
  font-family: Georgia, serif;
  font-size: 24px;
  color: #d8b46a;
  border-bottom: 1px solid #6f5730;
  padding-bottom: 6px;
">
See Also
</div>
 
<div style="
  margin-top: 14px;
  padding: 20px 24px;
  background:#181214;
  border:1px solid #6f5730;
  line-height:1.75;
">


* [https://nwn.sinfar.net/xdata.php XDATA Generator] — official tool
* [https://nwn.sinfar.net/xdata.php XDATA Generator] — official tool
* [https://sinfar.net/building/xdata_mapping XDATA Mapping: A Comprehensive Guide] — original builder's guide (old wiki)
* [https://sinfar.net/building/xdata_mapping XDATA Mapping: A Comprehensive Guide] — original builder's guide
* [https://forum.sinfar.net/viewtopic.php?f=315&t=14318 Coldest's Texture Database] (forum)
* [https://forum.sinfar.net/viewtopic.php?f=315&t=14318 Coldest's Texture Database] (forum)
* [[Textures]] — Sinfar texture reference (31,000+ resrefs)
* [[Textures]] — Sinfar texture reference (31,000+ resrefs)
* [[Textures/Objects_and_Characters]] — objects, placeables, and character textures
* [[Textures/Objects_and_Characters]] — objects, placeables, and character textures
* [[Player_Housing]] — how to build and upload player houses
* [[Player_Housing]] — how to build and upload player houses
* [https://sinfar.net/nwncx SinfarX Client Extender] — required to see XDATA effects
* [[Sinfar Client Extender]] — required to see XDATA effects
* [https://www.sinfar.net/placeables.html Placeables List] (old Sinfar site)
* [https://www.sinfar.net/placeables.html Placeables List] (old Sinfar site)
* [https://neverwintervault.org/project/nwn1/other/tool/nwnexplorer NWNExplorer] — tool for browsing NWN hak files
* [https://neverwintervault.org/project/nwn1/other/tool/nwnexplorer NWNExplorer] — tool for browsing NWN hak files
</div>
<!-- FOOTER NAV -->
<div style="
  margin-top: 28px;
  padding: 16px 20px;
  text-align: center;
  background:#120d10;
  border-top:1px solid #6f5730;
  color:#b7a995;
  font-size:14px;
">
[[Main Page|Return to Main Page]] · [[Player Tools]] · [[Builders Tools]]
</div>
</div>


[[Category:Player Tools]]
[[Category:Player Tools]]
[[Category:Builders Tools]]
[[Category:Builders Tools]]

Latest revision as of 02:58, 22 June 2026


XDATA TEXTURE MAPPING

Customize visual appearance of placeables, accessories, and effects.


About 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)

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

To an Accessory (In-Game)

Equip or activate the accessory on your character. Open the Adjustment Menu for that accessory in-game. Select Set the adjustments string. 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 three main methods:

Method 1: NWN Explorer

NWNExplorer lets you browse and search the NWN hak files to find model bitmaps. 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). 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. Navigate to Models, find the model, double-click it and wait for it to load. Click ASCII Model and look for the line that starts with bitmap — that value is your resref.

Tip: 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.


Example: Retexturing a Carpet with Lava

This example 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: Open XDATA Generator. Leave Scaling, Position, Orientation, and RGBA blank (no changes needed). Under Textures Mapping: From tni01_burlap → To tde01_lava01. Click Add, then Generate. 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).


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: Open XDATA Generator. Under Textures Mapping: From horn_01 → To tde01_lava01. Click AddGenerate → Copy. 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