A tool to generate Navp and Airg files for Hitman: World of Assassination Scenes in the Glacier 2 Engine
The NavKit Guide is available on the Glacier Modding Wiki.
You can run NavKit by opening NavKit.exe. To use the View Navp in game and Scene Extraction features, you will need ZHMModSdk installed. For the Scene Extraction feature, you will also need to have Blender installed.
You will also need to install the latest Visual C++ Redistributable from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-140. Make sure you get the X64 version.
Functions available are loading and saving Navp and Navp.json, loading Airg and Airg.json, loading and saving Obj, scene extraction, building Navp, building Airg and viewing navp in game.
- Download the latest release of NavKit (https://github.com/glacier-modding/NavKit/releases/latest) and run the installer
- Install ZHMModSDK (Usually you will want to use https://github.com/OrfeasZ/ZHMModSDK/releases/latest, but for NavKit version 2.4.0 you will want to use the SDK artifact from this build: https://github.com/dbierek/ZHMModSDK/actions/runs/20363060518)
- Install Blender (tested with 3.4 and 4.3 https://download.blender.org/release/Blender4.3/)
- Install the latest Visual C++ Redistributable from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-140. Make sure you get the X64 version.
- Start Hitman and enter a mission
- Open NavKit
- On the "Settings > NavKit" menu of NavKit, set your file paths:
- Hitman 3 directory (e.g., C:\Program Files (x86)\Steam\steamapps\common\HITMAN 3)
- Output directory (e.g., C:\NavKit\Output)
- Blender Executable (e.g. C:\Program Files\Blender Foundation\Blender 4.3\blender.exe)
- On the "Extract menu" of NavKit, click the "Extract scene from game and build all" button. It may take up to around 10 minutes depending on the complexity of the mission being extracted, and whether the alocs have already been extracted from the rpkg files.
- When the OBJ finishes generating, you can save it to an OBJ file so you can load it later if you'd like by clicking "File > Save Obj" on the menu bar
- When the NAVP finishes generating, click on "File > Save Navp" on the menu bar
- When the AIRG finishes generating, click on "File > Save Airg" on the menu bar
- Include the .navp and .airg files in the chunk folder for your brick
- Choose an IOI string for it (for instance, [assembly:/_pro/scenes/missions/trapped/scene_wolverine_modified.navp].pc_navp)
- In GlacierKit, search the original scene file for "navp" and it should take you to the Pathfinder Configuration (usually at Scene\Scenario_[scene name]\Global\Pathfinder\PathfinderConfiguration
- Copy the entity id (in this example screenshot it is 0f374e8c1e033807) and put it somewhere easily accessible
- Open your new brick file in GlacierKit in the Editor
- In the Property overrides for your new brick, add this to add the navp:
{
"entities": [
{
"ref": "[pathfinder entity id]",
"externalScene": "[original scene file]"
}
],
"properties": {
"m_NavpowerResourceID": {
"type": "ZRuntimeResourceID",
"value": {
"resource": "[new navp ioi string]",
"flag": "5F"
}
}
}
}
- Where [pathfinder entity id] is the id you copied earlier for the pathfinder, [original scene file] is the ioi string of the original scene (e.g. [assembly:/_pro/scenes/missions/snug/mission_vanilla.brick].pc_entitytype), and [new navp ioi string] is your new ioi string for the navp.
- In GlacierKit, search the original scene file for "airg" and it should take you to the Pathfinder Configuration (usually at Scene\Scenario_[scene name]\Global\Pathfinder\ReasoningGridConfig
- Copy the entity id (in the other example screenshot it is 6c6e6c3217bf058e) and put it somewhere easily accessible
- In the Property overrides for your new brick, add this to add the airg:
{
"entities": [
{
"ref": "[reasoning grid entity id]",
"externalScene": "[original scene file]"
}
],
"properties": {
"m_pGrid": {
"type": "ZRuntimeResourceID",
"value": {
"resource": "[new airg ioi string]",
"flag": "5F"
}
}
}
}
- Where [reasoning grid entity id] is the id you copied earlier for the pathfinder, [original scene file] is the ioi string of the original scene (e.g. [assembly:/_pro/scenes/missions/snug/mission_vanilla.brick].pc_entitytype), and [new airg ioi string] is your new ioi string for the navp.
- Save your brick file
- In GlacierKit, under the Text Tools, paste your navp ioi string into the Hash Calculator
- Copy the Hex value, and rename your navp to [hex value].navp Where [hex value] is the Hex value you calculated
- Paste your airg ioi string into the Hash Calculator
- Copy the Hex value, and rename your airg to [hex value].airg Where [hex value] is the Hex value you calculated
- Deploy the mod
NavKit performs the following series of steps to be able to generate Navp files.
- Connect to the Editor server of the running Hitman game, and issue commands to: rebuild the entity tree, find the scene's ZGeomEntities, PFBox entities, and PFSeedPoint entities and send their data back to NavKit, where they are saved to
output.nav.jsonin the specified output folder. - Extract all the necessary Aloc or Prim files from the rpkg files to the
alocorprimfolder of the specified output folder using glacier2obj.exe (A rust program included in the installer). - Open the blender cli and run the
glacier2obj.pyscript to generate an obj by importing all the Aloc or Prim files, copy them the number if times they are used in the scene, and transform each one according to what was sent by the game, and save it tooutput.objin the specified output folder. - Load
output.objfrom the specified output folder or another specified Obj file. - At this point, the build Navp section of the menu will be available, and you can customize the parameters with "Settings > Recast Settings" on the menu bar, then press "Build > Build Navp" on the menu bar to call Recast to generate the Navmesh. Then you can save the Navmesh as a Navp or Navp.json file by pressing the Save Navp button.
- At this point, the build Airg section of the menu will be available, and you can customize the parameters, then press build to generate the Airg.
NavKit is still a work in progress, and there may be glitches or issues with Obj, Navp, or Airg generation in the current version. If you encounter any problems while running NavKit please create an issue on this GitHub repo.
- Faster Scene generation
- Linux and macOS support
- More issues on the Issues tab
- Clone this repository with the '--recurse-submodules' option
- Open in Visual Studio or CLion
- Cmake should load
- In the x64 command prompt make a build folder, cd into it, and run:
cmake -B . -S .. - Then change back to the main directory and run
cmake --preset x64-debug
You shouldn't need to build the MSI yourself, but here are the instructions:
- Install WiX 6.0 and add its bin/x64 folder to your PATH
- Run the installer target. For CLion there is an included run configuration that should automatically be added called Build MSI that runs this command:
cmake --build . --target installer --config Release
in this working directory:
build\x64-release
2kpr
Anthony Fuller
Atampy26
Dafitius
Dog
Dribbleondo
Invalid
IOI
Jojje
Kercyx
Kevin Rudd
LaNombre
Luka
Lyssa
NoFate
Notex
Pavle
Piepieonline
Rdil
Recast team
Someone Else
Voodoo Hillbilly
And everyone at the Glacier 2 discord!