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.

NameNode TypeSuffixPurpose
Closed Dummy 1dummyDWK_dp_closed01Closed state Use dummy 1
Closed Dummy 2dummyDWK_dp_closed02Closed state Use dummy 2
Open State 1 Dummy 1dummyDWK_dp_open1_01Open state 1 Use dummy 1
Open State 1 Dummy 2dummyDWK_dp_open1_02Open state 1 Use dummy 2
Open State 2 Dummy 1dummyDWK_dp_open2_01Open state 2 Use dummy 1
Open State 2 Dummy 2dummyDWK_dp_open2_02Open state 2 Use dummy 2
Open State 1 walkmeshtrimeshDWK_wg_open1Walkmesh - open1 state
Open State 2 walkmeshtrimeshDWK_wg_open2Walkmesh - open2 state
Closed state walkmeshtrimeshDWK_wg_closedWalkmesh - 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 nameNode name
t_door0101_DWK_dp_closed01
dwc_gate0404_DWK_dp_closed01
ddd_x99la_DWK_dp_closed01
abcdefXY_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 NeededExampleNotes
orientation
  orientation 1.0 0.0 0.0 0.0

verts + positions

  verts 8
    1.05 -0.15 0.0
    -1.05 -0.15 0.0
    1.05 -0.15 2.97
    -1.05 -0.15 2.97
    1.05 0.15 0.0
    -1.05 0.15 0.0
    1.05 0.15 2.97
    -1.05 0.15 2.97

Also accepts the word "vertices"

faces
  faces 10
    2 6 7  4  0 0 0  7
    7 3 2  4  0 0 0  7
    0 4 6  8  0 0 0  7
    6 2 0  8  0 0 0  7
    5 1 3  32  0 0 0  7
    3 7 5  32  0 0 0  7
    1 0 2  64  0 0 0  7
    2 3 1  64  0 0 0  7
    4 5 6  64  0 0 0  7
    7 6 5  64  0 0 0  7

Interaction Nodes (dummy)

Node Data NeededExampleNotes
position
  position 0.178169 1.86896 0.0

  • No labels