Skip to content

[TF2] Add deletion of downloaded Particles Manifest from Servers - #2025

Draft
chocochocotorta wants to merge 1 commit into
ValveSoftware:masterfrom
chocochocotorta:particle-deletion
Draft

[TF2] Add deletion of downloaded Particles Manifest from Servers#2025
chocochocotorta wants to merge 1 commit into
ValveSoftware:masterfrom
chocochocotorta:particle-deletion

Conversation

@chocochocotorta

Copy link
Copy Markdown

When connecting to a Community Server, this one can provide downloads of any type (in this case, .pcf files for particles and a txt inside maps that contains a manifest for particles in a specific map).
While this is not an issue in custom maps that already packs it's own manifest file inside because it takes priority over the downloaded one, a server could maliciously send lots of particles manifest files for all the base game maps with a pcf that floods the "ParticleEffectNames" string table on precache, making some of the default particles from the base game not being precached and giving an error when it's played on a Local Server.

The solution i found is purging the particles that are inside download/maps/ when you:

  • Start joining a server
  • The server changes level
  • On server leave

This also allows servers to send a particle manifest to the client, allowing the use of Custom Particles without the need to pack them on a map.

Console warning about ParticleEffectNames for precaching a bad particle file
Warning:  Table ParticleEffectNames is full, can't add smoke_wispy_black_2fort
Warning:  Table ParticleEffectNames is full, can't add smoke_wispy_black_2fort
Warning:  Table ParticleEffectNames is full, can't add smoke_wispy_black_2fort
Warning:  Table ParticleEffectNames is full, can't add smoke_wispy_black_2fort
Warning:  Table ParticleEffectNames is full, can't add smoke_wispy_black_2fort
Server: Missing precache for particle system "smoke_wispy_black_2fort"!
Server: Missing precache for particle system "smoke_wispy_black_2fort"!
Server: Missing precache for particle system "smoke_wispy_black_2fort"!
Server: Missing precache for particle system "smoke_wispy_black_2fort"!
Server: Missing precache for particle system "smoke_wispy_black_2fort"!
CTFNavMesh: 0 nav areas in mesh.
[SteamNetworkingSockets] Waited 2.9ms for SteamNetworkingSockets lock
No such variable "$bloomamount" for material "dev/blurfiltery_nohdr"
No such variable "$C0_X" for material "dev/halo_add_to_screen"
L 08/23/2026 - 16:42:53: "coooco<4><[U:1:381638319]><Red>" changed role to "scout"
Warning:  Table ParticleEffectNames is full, can't add bullet_scattergun_tracer01_red
Warning:  Table ParticleEffectNames is full, can't add bullet_scattergun_tracer01_blue
Warning:  Table ParticleEffectNames is full, can't add bullet_scattergun_tracer01_red
Warning:  Table ParticleEffectNames is full, can't add bullet_scattergun_tracer01_blue
Warning:  Table ParticleEffectNames is full, can't add bullet_pistol_tracer01_red
Warning:  Table ParticleEffectNames is full, can't add bullet_pistol_tracer01_blue
Warning:  Table ParticleEffectNames is full, can't add bullet_pistol_tracer01_red
Warning:  Table ParticleEffectNames is full, can't add bullet_pistol_tracer01_blue
Warning:  Table ParticleEffectNames is full, can't add Explosion_bubbles
Warning:  Table ParticleEffectNames is full, can't add water_splash01
Warning:  Table ParticleEffectNames is full, can't add merasmus_tp_bits
Warning:  Table ParticleEffectNames is full, can't add Explosion_bubbles
Warning:  Table ParticleEffectNames is full, can't add water_splash01
Warning:  Table ParticleEffectNames is full, can't add merasmus_tp_bits
'scout.cfg' not present; not executing.
Client: Missing precache for particle system "bullet_pistol_tracer01_red"!
[SteamNetworkingSockets] Waited 2.8ms for SteamNetworkingSockets lock
Client: Missing precache for particle system "bullet_pistol_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
[SteamNetworkingSockets] No ping data available!
[SteamNetworkingSockets] Unable to communicate with ANY of 29 Steam Datagram routing cluster.  Possible problem with local internet connection?
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Soundscape: tf2.respawn_room
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!
Client: Missing precache for particle system "bullet_scattergun_tracer01_red"!

@neobenedict

neobenedict commented Aug 26, 2026

Copy link
Copy Markdown

If a malicious server forces download of multiple particle files this will only remove the first?

Better is just to reject "_particles.txt" suffix in the client download check but that's in engine.dll.

@chocochocotorta

chocochocotorta commented Aug 26, 2026

Copy link
Copy Markdown
Author

If a malicious server forces download of multiple particle files this will only remove the first?

In case the server does this, the client will just delete all files containing _particles.txt inside download/maps/.

Better is just to reject "_particles.txt" suffix in the client download check but that's in engine.dll.

That could also work, but i'm not sure how good would be for Valve to add that specific case inside the engine.
I made it this way so that servers could precache particles to the client and to prevent the client issue of having to deal with a server that sends so many particles (i based it the same way as the ConVar tf_delete_temp_files that got added on Scream Fortress XIII, if needed, i could make the logic only remove on Shutdown instead of server join/changelevel or server leave).

@KaelaSavia

Copy link
Copy Markdown

I recommend also doing same for following files:

_level_sounds.txt

For example:

cp_manor_event_level_sounds.txt

As these files can also be abused.

I'm personally against blocking things in engine.dll, as there are legitimate uses for uploading _level_sounds.txt or _particles.txt that is not packed into map. Removing these files just on disconnect would be most flexible in my opinion.

@chocochocotorta

chocochocotorta commented Aug 31, 2026

Copy link
Copy Markdown
Author

Replying to #2025 (comment)

I'll make the PR as draft and implement the same thing for level sounds too, it'll take me a bit of time since I'm outside.

@chocochocotorta
chocochocotorta marked this pull request as draft August 31, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants