#Are EP2 particles compatible with GMod?

1 messages · Page 1 of 1 (latest)

hallow kayak
#

Getting this error when trying to use EP2 particles in gmod, EP2 content seems to be mounted fine, but the particles kick up a fuss when I try to use them

midnight heart
#

the particle files have to be put into gmod folders and the particle manifest file

hallow kayak
midnight heart
#

with gmod its better to make an addon instead of packing the bsp https://wiki.facepunch.com/gmod/Workshop_Addon_Creation

kindred chasm
midnight heart
#

no because the particles and particle manifest will only be used when your addon is played

cedar hearth
#

particle files have to be mounted using game.AddParticles("particles/your_particle_file.pcf")

#

you can put just this in a lua file in lua/autorun/client and lua/autorun/server

#

this exists specifically so you don't have to worry about the manifest files or causing conflicts

kindred chasm
hallow kayak
#

I figured the overwrite would be fine but I should do that

hallow kayak
#

To be honest I have literally no clue when it comes to lua so this is gonna take a bit of figuring out lol

cedar hearth
# cedar hearth particle files have to be mounted using `game.AddParticles("particles/your_parti...

put this string in a text file, change your_particle_file.pcf to whatever your particle file is named. save the file under "all types" as a .lua file. or just directly change the .txt extension to .lua. it doesn't matter. the file needs to go into your addon's lua/autorun/client and lua/autorun/server folders.

put your particle effect .pcf file into your addon's particles folder

when your addon is mounted, the game should now initialize your lua files automatically (because you put them into the autorun folders) and search all of the particles folders available to it for your particle file, then mount it

hallow kayak
#

So literally just like this in a lua file?
game.AddParticles("particles/your_particle_file.pcf") game.AddParticles("particles/your_particle_file.pcf") game.AddParticles("particles/your_particle_file.pcf")

cedar hearth
#

If you have three separate files

#

then yeah

#

it will parse it line by line then exit

hallow kayak
#

Okay, gonna be a little bit long because I think there's like 15 I'm gonna add lol

#

And the particle manifest doesn't need to be included in this or anything?

cedar hearth
#

Nope, the particle manifest is obsolete in gmod because of this lua mounting system

hallow kayak
#

Okay, thank you steamhappy

cedar hearth
#

as said above, this is so that addon particle files can be mounted without conflicts without needing to mount them in a map-specific context

hallow kayak
#

Thanks, I haven't worked much with particles at all so I'm just kinda figuring it out as I go along, this was kinda the last step in all of it that I had to figure out

cedar hearth
#

by default this will do late caching, so it will load everything relevant to it when called, but particle files are really light and most of the associated materials are usually very light or already cached, so it doesn't matter that much. you can precache the particle file too but I usually don't recommend this to people because gmod has a limit of 4096 cached particle systems at a time

cedar hearth
#

I remember going through this in ~2012 when gmod switched over to this system and having mixed feelings about it

#

but ultimately I find it a lot easier

hallow kayak
cedar hearth
#

that's what all of mine look like

hallow kayak
#

Okay, thank you

cedar hearth
#

for example, one of my addons "accursed adventures" has a file particles/accursed_adventures_pfx.pcf
and the lua/autorun/client/mount_accursed_particles.lua file looks like this

game.AddParticles( "particles/accursed_adventures_pfx.pcf" )
#

that's it