Question About Packing Particles In P2

Avatar
Gemarakup
1,183 Posts
Posted Dec 03, 2013

People say that it's not possible with pakrat or PackBSP.

There's this tool called VIDE, and one of it's functions is BSPzipping. It's known to be more reliable than Pakrat, and it packs particles for other games. I don't have any custom particles to test, so I'm not sure if it works in Portal 2.

http://www.tophattwaffle.com/downloads/vide/

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Dec 03, 2013
Replied 2 hours later
Unfortunately it's not a problem with Pakrat, it's a problem with Portal 2. Particle files are loaded before the BSP is, so when the BSP is unzipped it's too late for the particles to work.
Avatar
Tmast98
210 Posts
Posted Dec 03, 2013
Replied 1 hour later
SickleBrick could answer this more then me, but I'll try.

If you make a new particle system and save it as the name of a pre-existing particle system, you can override the stock ones, and pack it. That way, when the map loads it thinks your custom system is one of the stock systems.

I'm not sure all the details myself, but I know it's possible, as seen in Aperture Valentines.

Goodluck :thumbup:

Avatar
User
630 Posts
Posted Dec 03, 2013
Replied 32 minutes later
hm, i thought overriding is brocken, doesnt have the vpk a higher priority?
Avatar
Tmast98
210 Posts
Posted Dec 03, 2013
Replied 1 hour later

TheTobbell wrote:
hm, i thought overriding is brocken, doesnt have the vpk a higher priority?

Note sure :sad:

I'll poke Sicklebrick later to look at this topic though so he can actually help :lol:

Avatar
FelixGriffin
2,680 Posts
Posted Dec 03, 2013
Replied 6 hours later
The VPK does, but I think a few of the PCFs are just loose in the folder.
Advertisement
Registered users don’t see ads! Register now!
Avatar
sicklebrick
876 Posts
Posted Dec 06, 2013
Replied 2 days later

Ahoyhoy, uhm I think there's a wee bit of confusion as to what I actually did in Ap valentine.
3 real issues at play here:

Can you override stuff packed in your BSP?
Nope, only from files packed into .VPK files now (i.e. portal2_dlc2/pak01_dir.vpk or poartal2_dlc3/pak02_dir.vpk, etc)
You can create a folder called portal2_dlc3 and portal2_dlc4 and put your own stuff in there though.
A good example - custom portal gun:

mapping-help/tutorial-modifying-your-portal-gun-texture-t7597.html

Can you add particles from your BSP?
Nope :sad: Like Felix said, the load order is wrong - and you'd have to add your .PCF file into portal 2\portal2\particles\particle_manifest.txt
Note: Felix pointed out that you add a "!" in front of the name to have it automatically precached, so you don't need to reference it in your map first. Super handy.

And ofc you can't replace them because of the point made about .VPK files.

What I did was extract the .pcf files from one of the game's GCF files so you can view them in hammer:
(use GCFScape http://nemesis.thewavelength.net/index.php?p=26 on portal2\pak01_dir.vpk , in the folder "particles" ).
From there use the particle emitter in hammer and the previews will work.
Some of them though use the "missing" purple and black checked texture.

All I did was open the .pcf file in a hex editor and find the name of the texture that a particular effect that was missing - and made a new texture for it. You're not technically replacing anything, so it doesn't have to go in a VPK. The particle is already in the manifest, so that's fine, and you can pack the texture into your VPK.
In this case.. hearts.

So I made the files:
materials\particle\fire_particle_2\fire_particle_2.vmt
materials\particle\fire_particle_2\fire_particle_2.vtf

And we packed them into the map.

Since each .PCF can contain multiple effects, I think it was from fire_01.pcf, and if I remember right, there are other missing ones (fire_particle_6, fire_particle_7) from the same file, and other ones.

You could probably find the name of the missing texture just by using developer 1 (or higher) from the console or something, but I was just nosing around with the hex editor when I found this.

Edit:

Found this note I left to the guys in the Ap Valentine source:

Quote:
This simply supplies a missing texture to an existing particle.
It doesn't use a spritesheet like some of the others, so the entire texture space is used.

Enables particle effects:

fire_medium_01_fillerb
fire_medium_01_fillerb Version #2
fire_ploom_01

It would likely not be a problem if the texture was shrunk to say 512x512, as the current 1024 seems a little excessive.

Most of the other fire_particle_# do nothing, but 8 is still free if you need it.
It affects the following effects:

fire_medium_01
fire_incinerator_window_base
fire_incinerator_window_constant_flames
fire_incinerator_constant_flames2