Scriptname RBTZ_RocketpackThrustSound extends objectreference

Sound Property CustomThrustSound Auto
Sound OBJRocketPackLPM
DefaultObject JetpackThrustSound_DO

Event OnEquipped(Actor akActor)
 JetpackThrustSound_DO = Game.GetFormFromFile(0x00125C90, "Fallout4.esm") as DefaultObject
 JetpackThrustSound_DO.Set(CustomThrustSound)
EndEvent

Event OnUnequipped(Actor akActor)
 OBJRocketPackLPM = Game.GetFormFromFile(0x0012440D, "Fallout4.esm") as Sound
 JetpackThrustSound_DO.Set(OBJRocketPackLPM)
EndEvent



This script is meant to be attached to the Armor, not Magic Effect. When you add the script to the armor in CK, the only property you need to fill is CustomThrustSound. As the name suggests, this will be the custom thrust sound used by the jetpack. I won't go into details how to create new sound, because I've done this only once and used existing one from the game.

This is how the script works. Upon equipping the jetpack, the Default Object JetpackThrustSound_DO will be overridden and set to your custom sound. On unequipping, the DO is reverted back to the default thruster sound OBJRocketPackLPM. This way we make sure that the sound override works only for the armor(non-PA jetpack) that is equipped to the character, and does not interfere with PA jetpack sounds. If the script is attached to magic effect instead of armor, the override will stop working after exiting a workbench. The script function that overrides Default Objects comes with the Script Extender, it is required to install F4SE and run the game through its loader.

With a little "know how" it's possible to combine the features of this script and the script for attaching visual effects upon jump press/release. This is how the script would look:


Scriptname RBTZ_JetpackFXOnJumpControl extends objectreference

ObjectReference selfRef
VisualEffect Property VisualEffect1 Auto
VisualEffect Property VisualEffect2 Auto
Sound Property CustomThrustSound Auto
Sound OBJRocketPackLPM
DefaultObject JetpackThrustSound_DO

Event OnEquipped(Actor akActor)
 selfRef = akActor
 RegisterForControl("Jump")
 JetpackThrustSound_DO = Game.GetFormFromFile(0x00125C90, "Fallout4.esm") as DefaultObject
 JetpackThrustSound_DO.Set(CustomThrustSound)
EndEvent

Event OnControlDown(string control)
 If (control == "Jump") && !Utility.IsInMenuMode()
 VisualEffect1.Play(selfRef)
 VisualEffect2.Play(selfRef)
 EndIf
EndEvent

Event OnControlUp(string control, float time)
 If (control == "Jump") && !Utility.IsInMenuMode()
 VisualEffect1.Stop(selfRef)
 VisualEffect2.Stop(selfRef)
 EndIf
EndEvent

Event OnUnequipped(Actor akActor)
 UnregisterForControl("Jump")
 VisualEffect1.Stop(selfRef)
 VisualEffect2.Stop(selfRef)
 OBJRocketPackLPM = Game.GetFormFromFile(0x0012440D, "Fallout4.esm") as Sound
 JetpackThrustSound_DO.Set(OBJRocketPackLPM)
EndEvent



Again, the script is meant to be attached to Armor, because it extends object reference.

Important: The override of the Default Object may stop working when you start the game and load a save with the jetpack. At the moment I don't know a better solution except re-equipping the armor(jetpack).  <-- Read below!


The new version of the script contains the following changes:

Scriptname RBTZ_RocketpackThrustSound extends objectreference

Sound Property CustomThrustSound Auto
Sound OBJRocketPackLPM
DefaultObject JetpackThrustSound_DO

Event OnEquipped(Actor akActor)
JetpackThrustSound_DO = Game.GetFormFromFile(0x00125C90, "Fallout4.esm") as DefaultObject
JetpackThrustSound_DO.Set(CustomThrustSound)
RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
EndEvent

Event Actor.OnPlayerLoadGame(Actor akActor)
JetpackThrustSound_DO = Game.GetFormFromFile(0x00125C90, "Fallout4.esm") as DefaultObject
JetpackThrustSound_DO.Set(CustomThrustSound)
EndEvent

Event OnUnequipped(Actor akActor)
OBJRocketPackLPM = Game.GetFormFromFile(0x0012440D, "Fallout4.esm") as Sound
JetpackThrustSound_DO.Set(OBJRocketPackLPM)
UnregisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
EndEvent


Thanks to these changes, the custom thrust sound no longer goes back to default upon game start and loading a save with the jetpack.

Article information

Added on

Edited on

Written by

robotized

0 comments