| rpg | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| build.ps1 | ||
| CMakeLists.txt | ||
| README.md | ||
RocketLauncher: an RPG-7 for HITMAN World of Assassination
A ZHMModSDK 4.1.1 mod (no Simple Mod Framework). While it is enabled, the Jaeger Tiger sniper rifle is an RPG-7: pick it in mission planning as usual, and in the mission it fires rockets that explode like a propane tank and kill and throw every NPC near the impact.
Model Credits
"RPG-7" () by Willy Decarpentrie is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
Download it here: https://sketchfab.com/3d-models/rpg-7-da0deb112e734dd5b00cbb69cfb5f271
Install
Requires ZHMModSDK 4.1.1. Game version 3.290 needs a newer SDK release than 4.1.1: 4.1.1 can't find the function that fires a weapon in it, so the rifle fires plain bullets.
- Copy
RocketLauncher.dllto<HITMAN 3>\Retail\mods\. That'sC:\Program Files\Epic Games\HITMAN3\Retail\mods\for Epic, orC:\Program Files (x86)\Steam\steamapps\common\HITMAN 3\Retail\mods\for Steam. - Start the game, open the SDK overlay with the SDK's UI toggle key, open Mods, and tick
RocketLauncher. You can also add a
[rocketlauncher]line toRetail\mods.ini. - In mission planning, pick the Jaeger Tiger in the sniper slot (in Freelancer, bring it from your stash) and start the mission. In the mission it is the RPG-7.
The ROCKET LAUNCHER button in the SDK menu bar opens the settings window. Settings are saved to
Retail\mods\rocketlauncher.ini.
How it works
-
Loadout. Pick the Jaeger Tiger (
034ce4ab-b85a-4706-bdef-cba77f9b45f7) in mission planning, or bring it from your stash in Freelancer. 47's own Tiger is the launcher. The item itself isn't changed, so the inventory (including Freelancer's persistent one) works as usual, and the mod can be switched on mid-mission. Other Tigers, such as an NPC's or one on display in the safehouse, stay normal rifles. -
Model.
rpg/RPG.objis converted into a C++ header at build time (tools/obj_to_header.py) and drawn with the SDK's depth-tested renderer, anchored to the rifle's grip. The SDK renderer has no textures, so the converter bakesRPG_diffuse.bmpinto vertex colours andRPG_specular.bmpinto the highlight strength. It subdivides the parts that carry the most texture so the detail still shows.- The rifle's own model is switched invisible. It is built from skinned parts that can't be shrunk, so the mod hides the whole model and switches it off again whenever the game shows it.
- While you're scoped in (camera FOV below 25°) the rifle is shown for its scope and the RPG model is hidden.
- The warhead disappears from the tube when you fire and comes back after the bolt cycle.
-
Firing.
- The rifle fires as usual (sound, recoil, ammo), but its bullet is neutralised.
- A simulated rocket launches towards the crosshair, accelerating from 45 to 140 m/s.
- It detonates on the first surface or NPC it hits, or when it reaches the point the crosshair was on when you fired.
-
Explosion. At the impact point the mod spawns three of the game's own entities, all from
chunk0, so they are available in every level:FX_E_Explosion_Gas_Medium_S2: the fireball a propane flask makes, with the flask's settings, 1.5x bigger by default.Sound_ExplodingProps: playing the propane flask's explosion sound.PropHelper_Explosion: the splash damage exploding props use. It kills and pushes NPCs, alerts the AI, moves props and shakes the camera. With "Never let the game explosion hurt 47" on, 47 is made invincible for 3 s (the SDK Player mod'sSetHeroInvincibleswitch). If that fails while he's close, the explosion is skipped.
The entities are spawned, moved into place, and set off one frame later. They are deleted after 10 s.
-
Blast.
- Every NPC within the kill radius is also killed by the mod with
ZActor::KillActor, ragdolled and pushed away from the blast and upwards. The radius is 6 m by default, measured to the closest point of the body. - Bodies already on the ground are flung too.
- Every NPC within the kill radius is also killed by the mod with
-
VFX. Backblast smoke and fire, a muzzle flash, an exhaust flame and a light smoke trail. The mod's own explosion particles are only used if the propane effect can't be spawned. Every VFX slider is scaled by 0.2, so 1.0 is a restrained effect.
Settings worth knowing
| Setting | Default | Notes |
|---|---|---|
| Kill radius | 6 m | Also sets the game explosion's radii. |
| Fling force | 600 | The mod's own push on the pelvis (head and hands get a share). |
| Game explosion | on | Splash damage, AI reactions, camera shake, props. |
| Game explosion push | 3.0x | Multiplier on the game explosion's ragdoll push. |
| Propane tank explosion effect | on | Off uses the mod's own particle explosion. |
| Explosion size | 1.5x | Size of the propane fireball relative to a propane flask. |
| Propane tank explosion sound | on | |
| VFX intensity | 1.0 | Launch and trail effects (and the fallback explosion), scaled by 0.2 internally. |
| Rocket smoke trail | 1.0 | 0 turns it off. |
| Never let the game explosion hurt 47 | on | 47 is invincible for 3 s after each game explosion. |
| Hide the sniper rifle's model | on | Off shows the Tiger under the RPG. |
Build
Requires VS 2022 Build Tools, CMake 3.20 or newer, and Python 3. By default it uses the ZHMModSDK
4.1.1 dev package and DirectX-Headers. Point the build at them with -SdkDir / -DirectXHeadersDir
(the default is ..\reahitman\ghost-crossplay\third_party).
.\build.ps1 # configure, build Release, run the core unit tests
The output is build\Release\RocketLauncher.dll. tests/core_tests.cpp covers the SDK-independent
parts: mesh conversion, frames, rocket flight, blast falloff, particles and draw ordering.
Known limitations
- Crowd NPCs (Mumbai, Marrakesh...) are not killed or thrown. That's a game limitation: even a stack of propane flasks doesn't affect them, they only panic and flee.
- The RPG model is drawn by the mod, not the game's renderer. It uses a fixed sun and headlight and casts no shadows.