Postal 2-Time for Punishment:A mod by the newcomer "Alexgoesnoob".

Report RSS Change Select/Holster Sounds in Postal 2 (and other Unreal Engine based Games)

A basic Coding Tutorial from Alexgoesnoob to change your Postal 2 Weapon Holster and Select sound. You can use this also for changing Weapon shoot Speed and so on!

Posted by on - Basic Client Side Coding

Well I start now:
At first extract all Scripts from your Unreal Editor*.Go to the weapon folder which include the weapon you want to edit (here I explain on the P2 MG which is located in the Folder: Inventory->Classes).Open the "Weaponname"Weapon.uc (here MachineGunWeapon.uc) and scroll down to "defaultproperties".Now add two new Lines in the script,for example:

Someone wrote: Before:

RecognitionDist=1300.000000
AI_BurstCountMin=6
AI_BurstTime=0.150000
holdstyle=WEAPONHOLDSTYLE_Both
switchstyle=WEAPONHOLDSTYLE_Both
firingstyle=WEAPONHOLDSTYLE_Both


Someone wrote: After:

RecognitionDist=1300.000000
AI_BurstCountExtra=10
AI_BurstCountMin=6

AI_BurstTime=0.150000
holdstyle=WEAPONHOLDSTYLE_Both
switchstyle=WEAPONHOLDSTYLE_Both
firingstyle=WEAPONHOLDSTYLE_Both


Now you have to add in the script follow things(without the 2 lined quotes, the ` Have to be in the code!):
"SelectSound=Sound'WeaponSounds.machinegun_select"
"HolsterSound=Sound'WeaponSounds.machinegun_holster"

This is only a example,you can create a own sound package,but thats only useful when you create a own gun,if you edit the old inventory you better add the Holster and Select sounds to your old WeaponSounds.uax(how to add sounds scroll down).The sound namens and the names you wrote in the code must be the SAME or it won't work!It should look like now like this:

Someone wrote: RecognitionDist=1300.000000
AI_BurstCountExtra=10
AI_BurstCountMin=6
SelectSound=Sound'WeaponSounds.machinegun_select
HolsterSound=Sound'WeaponSounds.machinegun_holster
holdstyle=WEAPONHOLDSTYLE_Both
switchstyle=WEAPONHOLDSTYLE_Both
firingstyle=WEAPONHOLDSTYLE_Both

Now close the Script and save it!
Now go to your system folder and delete your Inventory.u (better you only drag and drop it to another section).
(You can skip this step of you already done this)Now create a new .txt file,open it,write cmd in it,save it as "bah.bat" remove the .txt and run it. Now should a Sys32 application pop up. you now have to write "ucc make" in it.Wait until everything is done.When everything is compiled close the application and run your game. Get the weapon you edited and try it!

Some other things you may need to do:

Adding sounds:

Look for a sound(must be .wav!) and put it in a folder which should be in your C: drive because Unreal ED is bitchin around if it's not! Now go to your Unreal ED,go to the little Windows and go to sounds,go to the category you have written in your codes(in this Tutorial WeaponSounds). Now click on file->import and import the files you saved in you C: category! Now a little windows will pop up rename the files EXACTLY like you written in the codes. Now save the WeaponSounds.uax and well it's done!

If you have coustom weapon package(not old Inventory a new weapon like Inventory2 which comes out after compiled as Inventory2.u):

You have to open the Postal2.ini and scroll to the list of editpackages. Now delete any EditPackage name and replace it with your package name like:

Someone wrote: EditPackages=BasePeople

in

EditPackages=Coustomweapon


* Go to your unreal Editor, go to the little Screen in the Tab "Actor Classes", click on File and extract all scripts.

Self written for Ressurrection Studios and MODDB by -Alexgoesnoob-
Thanks to Wolve for basic teaching !

Good Luck!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
POSTAL 2
Game
POSTAL 2
Creator
Alexgoesnoob
Contact
Send Message
Release date
Mod watch
Follow
Tutorial
Browse
Tutorials
Report
Report
Share
Related Games
POSTAL 2
POSTAL 2 First Person Shooter