Skip to content

PCF parser to lazy-load particles to avoid loading 700mb of vram + fix map pacs - #1478

Merged
thegrb93 merged 6 commits into
CapsAdmin:developfrom
Earu:lazy-particles
Oct 26, 2026
Merged

thegrb93 merged 6 commits into
CapsAdmin:developfrom
Earu:lazy-particles

Conversation

@Earu

@Earu Earu commented Oct 21, 2026

Copy link
Copy Markdown

This PR resumes the work of @Python1320 in #1464

It helps reduce pac's VRAM usage by about ~700mb, this is primarily due to the fact that pac loads all tf2 effects regardless of whether they're being used.

This PR introduces a small .pfc parser that will retrieve the name of the used effects and load the corresponding file only when needed. As a side bonus it also fixes the pac_spawn_map feature that seemed to be broken since 2013.

Earu and others added 2 commits October 21, 2026 22:41
…azy load pcf particles

Co-authored-by: Python1320 <python1320@users.noreply.github.com>

@thegrb93 thegrb93 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. My only concern is how large pcf files are. I think using filestream to just read the header's effect list would be more efficient, but maybe the pcf files are really small and it doesn't matter.

Comment thread lua/pac3/libraries/pcfparser.lua Outdated
Comment thread lua/pac3/libraries/pcfparser.lua Outdated
Comment thread lua/pac3/libraries/pcfprovider.lua Outdated
Comment thread lua/pac3/extra/client/map_outfit.lua
Comment thread lua/pac3/libraries/pcfparser.lua Outdated
Comment thread lua/pac3/libraries/pcfprovider.lua Outdated
@thegrb93

Copy link
Copy Markdown
Collaborator

@Earu

@Earu

Earu commented Oct 24, 2026

Copy link
Copy Markdown
Author

Haven't had the time to look into it yet, traveling.

@thegrb93 thegrb93 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think changes are good if you could test and be sure whenever you're available again.

@Earu

Earu commented Oct 25, 2026

Copy link
Copy Markdown
Author

So i've double checked everything on particle casing, and yeah everything is case insensitive, also fixed a slight bug in the parser

@thegrb93
thegrb93 merged commit d6ceb6b into CapsAdmin:develop Oct 26, 2026
1 check passed
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.

2 participants