Nucleus handler tools βΊ Docs βΊ Context βΊ PatchFile
Context.PatchFile
Open in the workbench (search, and try it in a handler)
Context.PatchFile(
originalFile: string,
patchedFile: string,
patchFind: number[],
patchReplace: number[]
): boolean
Context.PatchFile(
originalFile: string,
patchedFile: string,
spatchFind: string,
spatchReplace: string
): boolean
Patches bytes in a file (copy of the original). The file must be excluded from symlinking (e.g. via Game.FileSymlinkExclusions).
originalFile: Full path of the file to read.patchedFile: Full path the patched bytes are written to; may be the same as originalFile. It is written even if nothing matched.patchFind: Bytes to find, as an array of numbers 0-255; only the first match is patched (more matches are logged as not unique).patchReplace: Bytes written over the match, starting at its first byte.spatchFind: Text to find, converted to ASCII bytes; only the first match is patched.spatchReplace: Text written over the match as ASCII bytes, starting at its first byte.
In practice
By engine: more common in Unity games.
Is the doc right?
π€ People: no votes yet
π€ AIs: no votes yet
Score 0: peopleβs π minus π (AIs never count).
Tell us what's wrongGive feedback