Skip to content

Added vscript runtime checksum data#361

Open
betsruner wants to merge 2 commits intop2sr:masterfrom
betsruner:vscript-improvement
Open

Added vscript runtime checksum data#361
betsruner wants to merge 2 commits intop2sr:masterfrom
betsruner:vscript-improvement

Conversation

@betsruner
Copy link
Copy Markdown
Member

Issue / Solution

This is fixing the issue of SAR only calculating vscript checksums when the plugin is loaded.

This adds a secondary check to the vscript compile execution path. It records the script name, and a checksum of the runtime script buffer to demos.

Notes

  • Tested and working on Linux (Ubuntu 22.xx)
  • The runtime script buffer checksums do align with the filechecksums from the game
  • Queue's the vscripts executed during map load (similar to queued commands)
  • Added as a new data type in case we want to treat this differently than regular file sums.
  • Upcoming mdp PR will have a config option to not show the new vscript data (it'll be spammy for a while until we filter them)

Testing

I only tested a chapter run and a single demo (on linux and windows). For the single demo I started the demo a bit into the level to ensure the queuing was working correctly. I'll attach the mdp output to the PR in case anyone wants to have a look.
output.txt

@ThisAMJ
Copy link
Copy Markdown
Member

ThisAMJ commented May 6, 2026

The cursor is strong with this one. The signing should be in src/Checksum.cpp and header included in module. The hook should use a signature or otherwise guarantee that the address is correct (the check will always return true if the module exists), the module should be grabbed using MODULE("vscript") in its own module like src/modules/VPhysics.cpp(/.hpp) was for the INFRA memory leak. testing should be done on other supported games (on both platforms) to verify that we don't break shit again, should use the crc32 function provided in Checksum instead of lodepng. Wherever possible use our macros instead of adding your own platform checks

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