Page tree
Skip to end of metadata
Go to start of metadata

surfacemat.2da contains the definitions of different surface materials for tiles in the game.

In NWN:EE the file was finally made available for modders using hakpacks or nwsync content since it originally was loaded when the game began (thus was only able to be altered by adding it to the override folder).

You can retrieve what a particular locations surface material is in nwscript with GetSurfaceMaterial which can be useful to work out if the given location is walkable (ie checking the Walk column below).

2da OnPlayerTileAction Event Usage

A new event OnPlayerTileAction was added in 1.84.8193.29. This allows up to 8 actions to appear in the radial when a certain surface is selected, and the relevant event script is called if such an action is chosen.

The radial is titled "More actions" (this menu always now appears when right clicking the ground, but will be usually blank by default):

You can have up to 8 actions defined with their own icon and name, but every column after Act1_XXX needs to be added manually:

2da Limits

You can have up to 64 valid lines in surfacemat.2da as of 1.84.8193.29. Previous to this it was 32.

2da Columns

Column NamesExampleValid ValuesDescription and Notes
LabelGrassTextHuman readable name of the surface material. Not used by the toolset or game.
Walk11 or 0If 1 allows the player to walk on this part of the walkmesh, if 0 it will not allow walking on it.
WalkCheck11 or 0Not sure since everything except Obscuring has this set to 1.
LineOfSight11 or 0Does the material block Line of Sight? For instance Grass will but Transparent will not.
SoundDTTextNot sure what this is used for but it is set whenever Name is set.
NameGrassText

A column name (well, kinda, they're named XXX0, XXX1 and XXX2) in footstepsounds.2da which defines the noise made when walking on the surface. The default available names there are:

  • Dirt
  • Grass
  • Stone
  • Wood
  • Water
  • Carpet
  • Metal
  • Puddles
  • Leaves
  • Sand
  • Snow

You can likely add your own if you add more columns in footstepsounds.2da

IsWater11 or 0If set then it is considered water, alters the visuals a bit I think?
Visualvfx_step_dustVFX MDL file name

Effect to place at the creatures feet when they're walking through this material (usually - I think there's some cases for very large creatures ignoring this?). The default ones available are:

  • fx_step_dust - Dust steps for dirt
  • fx_step_splash - Water splashes
  • fx_step_stbrdg - Steps on a stone bridge

Act1_Strref

...

Act8_Strref

2TLK line reference

The action (1 through 8) for the radial to display on this surface material type. See the notes above for OnPlayerTileAction.

This is the TLK entry to load for this action.

Act1_Icon

...

Act8_Icon

ir_useIcon texture file name

The action (1 through 8) for the radial to display on this surface material type. See the notes above for OnPlayerTileAction.

This is the icon to load for this action. An example generic icon would be ir_use (the generic yellow star).

2da Contents

Note the missing columns Act2_Strref etc. which need to be added manually.

2DA V2.0                                                                     
                                                                             
           Label           Walk   WalkCheck   LineOfSight   Sound   Name        IsWater    Visual               Act1_Strref   Act1_Icon
0          NotDefined      0      0           0             ****    ****        0          ****                 ****          ****
1          Dirt            1      1           1             DT      Dirt        0          fx_step_dust         ****          ****
2          Obscuring       0      0           1             ****    ****        0          ****                 ****          ****
3          Grass           1      1           1             GR      Grass       0          ****                 ****          ****
4          Stone           1      1           1             ST      Stone       0          ****                 ****          ****
5          Wood            1      1           1             WD      Wood        0          ****                 ****          ****
6          Water           1      1           1             WT      Water       1          fx_step_splash       ****          ****
7          Nonwalk         0      1           1             ****    ****        0          ****                 ****          ****
8          Transparent     0      1           0             ****    ****        0          ****                 ****          ****
9          Carpet          1      1           1             CP      Carpet      0          ****                 ****          ****
10         Metal           1      1           1             MT      Metal       0          ****                 ****          ****
11         Puddles         1      1           1             WT      Puddle      1          fx_step_splash       ****          ****
12         Swamp           1      1           1             WT      ****        1          fx_step_splash       ****          ****
13         Mud             1      1           1             WT      ****        1          fx_step_splash       ****          ****
14         Leaves          1      1           1             LV      Leaves      0          ****                 ****          ****
15         Lava            0      1           1             ****    ****        0          ****                 ****          ****
16         BottomlessPit   0      1           1             ****    ****        0          ****                 ****          ****
17         DeepWater       0      1           1             ****    ****        1          ****                 ****          ****
18         Door            1      1           0             ****    ****        0          ****                 ****          ****
19         Snow            1      1           1             SW      Snow        0          ****                 ****          ****
20         Sand            1      1           1             SD      Sand        0          ****                 ****          ****
21         Barebones       1      1           1             ****    ****        0          ****                 ****          ****
22         StoneBridge     1      1           1             ST      Stone       0          fx_step_stbrdg       ****          ****
23         Temp            0      0           0             ****    ****        0          ****                 ****          ****
24         Temp            0      0           0             ****    ****        0          ****                 ****          ****
25         Temp            0      0           0             ****    ****        0          ****                 ****          ****
26         Temp            0      0           0             ****    ****        0          ****                 ****          ****
27         Temp            0      0           0             ****    ****        0          ****                 ****          ****
28         Temp            0      0           0             ****    ****        0          ****                 ****          ****
29         Temp            0      0           0             ****    ****        0          ****                 ****          ****
30         Trigger         1      1           0             ****    ****        0          ****                 ****          ****

  • No labels