Skip to content

Conversation

@betsruner
Copy link
Member

Due to rule updates a lil while back we can kinda tell if a vpk is legal based just on what directories it edits, and its whole file checksum. Thus if we just record those things then people (assuming they are following the rules) won't need to submit vpk files anymore (and mods can hopefully stop having to download as much bs).

Directory VPK files can contain a lot of directories so I added a whitelist. I went through all the major things I could think of, but there's probably more I haven't considered. Should be really easy to add to as time goes on.

  • Worked on all the major mods (Aperture Tag/Mel/Reloaded)
  • Plugin loading didn't seem impacted in any real capacity (I tried on a weaker computer).
  • I didn't test this on Linux at all O7

Parsing pseudocode:

if (sarDataType == 17 {
   const vpkFileCrc = readUint32();
   const vpkPath = readNullTerminatedString();
   const numEntries = readUint32();
   for (let i=0; i<numEntries; i++) {
      let crc = readUint32();
      let path = readNullTerminatedString();
   }
}

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.

1 participant