DWK files are Door walkmesh files.
The door MDL (model) has the main geometry, impact node definitions, and animations.
However the DWK has the variable things as the door state changes:
- Blocking geometry for closed, open1 and open2
- Nodes for closed and opened door states for where the player must reach to activate them
Editing DWK Files
You can edit this with NeverBlender - you have the MDL and DWK in the same folder it'll load the DWK alongside the MDL.
They are retained as text even when exported as well, so can be hand edited.
DWK Setup
There are several nodes - some are the door walkmesh/line of sight blocker, some are the nodes used to interact with the door in various states.
The dummy in dwk files determine where a character will walk to when interacting with a door. Doors may have up to three states. A closed state and two open states, as NWN doors may swing open to both sides. That means there may be up to may be up to six dummies - two for each state. As with placeables a character will walk to the closest dummy, when interacting with a door - depending on the state the door is currently in (open1, open2, closed)
Naming Convention
Two arbitrary alphanumeric characters followed by an underscore followed by a suffix.
Suffixes
The table below contains a list of valid suffixes. These are case sensitive, the DWK has to upper case, everything else is lower case. Doors may swing open to both sides, that means there may be two open states, each state having two dummies. Some doors go up and down (eg: Portcullis) so won't have all these states.
Name | Node Type | Suffix | Purpose |
---|---|---|---|
Closed Dummy 1 | dummy | DWK_dp_closed01 | Closed state Use dummy 1 |
Closed Dummy 2 | dummy | DWK_dp_closed02 | Closed state Use dummy 2 |
Open State 1 Dummy 1 | dummy | DWK_dp_open1_01 | Open state 1 Use dummy 1 |
Open State 1 Dummy 2 | dummy | DWK_dp_open1_02 | Open state 1 Use dummy 2 |
Open State 2 Dummy 1 | dummy | DWK_dp_open2_01 | Open state 2 Use dummy 1 |
Open State 2 Dummy 2 | dummy | DWK_dp_open2_02 | Open state 2 Use dummy 2 |
Open State 1 walkmesh | trimesh | DWK_wg_open1 | Walkmesh - open1 state |
Open State 2 walkmesh | trimesh | DWK_wg_open2 | Walkmesh - open2 state |
Closed state walkmesh | trimesh | DWK_wg_closed | Walkmesh - closed state |
Examples
This tables contains a list of example Closed Dummy 1 nodes for different door names. The two leading characters are completely arbitrary alphanumeric characters, they HAVE to be followed by an underscore, followed by the suffix.
Model name | Node name |
---|---|
t_door01 | 01_DWK_dp_closed01 |
dwc_gate04 | 04_DWK_dp_closed01 |
ddd_x99 | la_DWK_dp_closed01 |
abcdef | XY_DWK_dp_closed01 |
Node Information Needed
Each node type has limited information that is loaded, the game strictly loads only this necessary information likely for speed since the files cannot be compiled. Additional information is ignored.
If you really wanted to be completely optimal (although it's not advised, just export from Blender!) you can remove some of the other information.
Walkmesh Nodes (trimesh)
Node Data Needed | Example | Notes |
---|---|---|
orientation | orientation 1.0 0.0 0.0 0.0 | |
verts + positions | verts 8 | Also accepts the word "vertices" |
faces | faces 10 |
Interaction Nodes (dummy)
Node Data Needed | Example | Notes |
---|---|---|
position | position 0.178169 1.86896 0.0 |