POSTAL 2

POSTAL 2

Go POSTAL your way.
The world of Paradise (and beyond!) at your fingertips. Use the same tools as RWS to create your own weapons, maps, skins, mods, and any other content your heart desires, and then piss on it all!
Learn More
Enkay  [developer] 15 May 20, 2014 @ 5:54pm
New guide: Texture and sound replacements via script
I've uploaded a new guide for Workshop developers who want to replace textures and sounds. Using this guide you can create your own scripted replacements, and eliminate the requirements for end users to install your mod manually!

http://steamcommunity.com/sharedfiles/filedetails/?id=261974024

If you already have a texture or sound pack uploaded, I highly suggest you follow this guide to script your texture and sound replacements. We will be cracking down on "manual install" workshop mods because they defeat the purpose of the Steam Workshop.

If you have any questions on scripting your texture and sound replacements, do not hesitate to ask. Myself or one of the members of the community or dev team will be glad to help.
< >
Showing 1-11 of 11 comments
A-Mod 5 May 21, 2014 @ 6:51am 
Kamek, thanks)).
prawdziwy 666 May 21, 2014 @ 10:56am 
I think that AssetReplacer uc should be added to WorkshopSample
Last edited by prawdziwy 666; May 21, 2014 @ 10:57am
SamSerious 1 May 21, 2014 @ 12:12pm 
Interesting. I will check it out. But you guys really need to allow us to use mods with already existing saved games. Starting a new game just to be able to select a new skin,model,sound mod kinda sucks. Thanks.
Last edited by SamSerious; May 21, 2014 @ 12:12pm
Nickel Jackal 2 May 21, 2014 @ 7:22pm 
That's great! Thank you.
SamSerious 1 May 22, 2014 @ 3:16am 
Tried your tutorial. Finally managed to make it visible in-game workshop tab. Selected my mod, started new game, modified sounds dont work for sht. I only tested the line below just for the pistol sound. Nothing.

// Pistol.
if (PistolWeapon(Other) != None)
{
NewSound = ReplaceSound(PistolWeapon(Other).FireSound);
if (NewSound != None)
PistolWeapon(Other).FireSound = NewSound;
}

I also had to remove one } for SoundThings block and add another 1 to this new Pistol block, so it would be 2 } for both blocks. Otherwise the UCC compiler would give me an error about : unexpected if } bla bla and could not compile.


I archived my package for someone to look at it and maybe give me an advice or two.
http://www.megafileupload.com/en/file/533133/258927227-rar.html

If you put it in the Workshop content folder, it will be visible in-game but the no modified sounds will work. So i also included the raw .uc file to look at it and see possible mistakes made by me.

I cant believe how hard and susceptible to errors this is for such simple tasks. It's beyond my imagination what would take to compile something even more "complex" than replacing a sound or texture.
Last edited by SamSerious; May 22, 2014 @ 3:47am
Enkay  [developer] 15 May 22, 2014 @ 3:06pm 
mcquade, did you remember to add in the sounds in the default properties block?

Here is a working example that replaces the pistol fire sound for a fart. I've taken the code from the tutorial and changed just the default properties block: http://pastebin.com/BySEsjv3
SamSerious 1 May 23, 2014 @ 1:25am 
Of course. I added a line for each sound i replace. Anyway to test my suspicion, i added the fart sound to the pistol fire. It worked. Obviously a default sound.

This only leads me to one conclusion. The script has no idea where to look for the modified new sound. But it's obvious by default it should look into the workshop content folder.

One example.

SoundReplace[0]=(OldSound=Sound'WeaponSounds.pistol_fire',NewSound=Sound'WeaponSounds.pistol_fire')}

The new modified weaponsounds.utx being located in WorkshopContent\258927227\Sounds folder. I even gave it a custom name thinking maybe it conflicts with the original file. Still doesnt works.
Enkay  [developer] 15 May 24, 2014 @ 1:47pm 
You're trying to use a WeaponSounds.utx package when one already exists. The game can't differentiate between the two. If it could we wouldn't have to go through all this.

Export your custom sounds to a new package with a different name, and reference that package instead.
Nickel Jackal 2 May 24, 2014 @ 11:49pm 
Maybe I can't replace rectangle textures.
Square textures like Timb.sign.rc_ahead(256x256>1024x1024),Timb.sign.rs_hitchhiking(128x128>1024x1024) works very well.
But rectangle textures like Zo_Industrial-HD.Other.zo_electrical_box(512x256>2048x1024),STV-3.stuff.bruegel-procession(512x256>1024x512 or 2048x1024),STV-3.stuff.Opening(256x128>1024x512) doesn't work.
I did same way of these and I checked rectangle textures are normally replaced when direct overwrite original textures.
Last edited by Nickel Jackal; May 24, 2014 @ 11:50pm
SamSerious 1 May 26, 2014 @ 12:58am 
Originally posted by Kamek:
You're trying to use a WeaponSounds.utx package when one already exists. The game can't differentiate between the two. If it could we wouldn't have to go through all this.

Export your custom sounds to a new package with a different name, and reference that package instead.

I already wrote that i did and it doesnt work.

LE: ok it looks like i had to first copy my modified sound package to the Sounds folder in Postal2Editor so the script can be compiled properly. The compiler didnt showed any errors when doing it wrong (having the uax package in totally different folder).

Now it finally works! THANKS!

LE2: the sound for machinegun, shotgun doesnt seem to work. Made it like this :
// Shotgun.
if (ShotgunWeapon(Other) != None)
{
NewSound = ReplaceSound(ShotGunWeapon(Other).FireSound);
if (NewSound != None)
ShotGunWeapon(Other).FireSound = NewSound;

}

// Machinegun.
if (MachinegunWeapon(Other) != None)
{
NewSound = ReplaceSound(MachineGunWeapon(Other).FireSound);
if (NewSound != None)
MachineGunWeapon(Other).FireSound = NewSound;
}


I followed your instructions using notepad++ and i cannot even find the shotgun_ejectshell. Any tips?
Last edited by SamSerious; May 26, 2014 @ 8:07am
Nickel Jackal 2 May 31, 2014 @ 9:55pm 
I understand what textures can effect.
If "Staticmesh propaties>Display>Skins>+ mark" is like "[0]Texture 'aa.bb.cc'" can replace,nothing written on that cannot replace.
Last edited by Nickel Jackal; May 31, 2014 @ 10:26pm
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 20, 2014 @ 5:54pm
Posts: 11