Site Tools


tutorial:smithbox-havok-editor-collisions

Smithbox: Creating and Modifying Collisions

Authors: Vawser

Disclaimer: this information is accurate for Smithbox 2.2.5

Fundamentals

Havok collisions are used for all collisions within the game. They determine where the player and enemies can walk, as without it they will simply pass through the floor and objects.

Within the Havok Editor there are three types of collision, denoted by the first letter in the names of the files within the Source List:

  • f → Fall Protection collision, used to surround arenas where enemies might fall off.
  • h → High detail collision, used for foot IK, which determines foot and leg adjustments for the player when traversing.
  • l → Low detail collision, used for all other usages, such as player, enemy, camera collision, death planes, etc.

Within the collisions themselves, there are two mesh types:

  • hknpExternMeshShape
  • fsnpCustomParamCompressedMeshShape

Only fsnpCustomParamCompressedMeshShape supports hit materials; which determine the visual and sounds effects when a player hits the colision with a weapon. They also determine if a HitMtrlParam entries is used, which can apply damage (i.e. lava) or slow the player (i.e. water).

Unfortunately the Collision Generator tool only supports hknpExternMeshShape, which provides simple collision without hit materials.

Tool Overview

In the Tools window within the Havok Editor, there is a tool called the Collision Generator. This allows you to generate a new collision mesh, replacing the existing in mesh within the collision you have selected within the editor.

You can use the tool with:

  • Map Collision
  • Asset Collision

This tool only supports Elden Ring and Nightreign projects currently.

Modifying Collision

The editor supports modifying any field within a collision havok file. This is mainly useful for adjusting properties such as position, drag, friction, etc, as well as some FromSoftware specific elements such as hit materials.

First, you need to select the Havok Category. Since havok files cover a variety of different formats, this narrows down the Source List to only files relevant to the category.

Second, you should select the source file that belongs to the map that contains the collision you want to edit from within the Source List.

Third, select the collision itself that you want to edit from the File List.

The properties section will now populate with all of the properties you can edit.

There is an extensive context menu in the File List that allows you to manipulate the contents of a collision binder easily and quickly.

Actions of note:

  • Copy → This copies the current selection to clipboard (you can multi-select by holding Ctrl whilst selecting an entry in the list)
  • Paste → This will duplicate any entries from your clipboard into the file list (these are brand new files)
  • Rename → Use this with the duplicated files so they have a suitable name that follows the standard convention (<letter><map_id>_<six digit id>)
  • Insert → This will allow you to insert external .hkx files directly into the binder.

If you have duplicated a file and renamed it, remember to edit the Name within the properties tree too.

Editing Hit Materials

Once you have a collision selected, if you type 'mat' in the search bar, you will filter the fields down to those that contain 'mat' in their name. This will expose the Hit Material field quite easily.

The number here refers to the HitMtrlParam row ID.

Creating New Collision

In this example, we shall be creating a new collision for a map piece.

First, we need to select the Source File we want to add the collision too.

Then select an existing collision from the File List and duplicate it.

Rename the file to a new ID that is unique from the others (i.e. l_10_01_00_00_031000 didn't exist in the original binder, that is the addition).

With the duplicated collision selected, we can now open the Collision Generator.

This tool allows you to generate a new mesh, replacing the existing mesh within the collision.

You can select from the following shapes:

  • Square
  • Circle
  • Triange
  • Semi-Circle
  • FLVER

All of them act as they are described, however FLVER allows you to supply a FLVER model (and meshes) which are then used to generate the mesh. In this case, since we want the collision to match the map piece's shape, you should select FLVER.

You can determine the facing of the collision, typically you will want it to be facing upwards so it is easy the manipulate in the Map Editor.

You can click Select FLVER to bring up a selection menu similar to that from the Model Editor.

From this list, select the map piece you want to generate from. You will see the Source File text in the Collision Generator section once done.

Click Generate to create the new collision shape, which is then automatically placed in your selected collision.

Open the Map Editor and create a new Collision map object and give it the Model Name of your new collision (without the map ID part).

tutorial/smithbox-havok-editor-collisions.txt · Last modified: by admin