Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches: Virtual move/remove/create game files patches #13483

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Mar 3, 2023

Two new patch types, "move_file" and "hide_file":

"hide_file":
Specify the PS3 path of the file to mark as non-existant in offset field, the value field is unused. This can be used to "remove" cutscenes for example without needing to make any modification to game files. When specifying an already non-existant file this will prevent its creation further on. (ENOENT error code)

"move_file":
Specify the PS3 path of the file to "move" in offset field, and the destination path in value field. The original PS3 path does not have to exist for this operation to work. This can be used to install configurable mods and texture packs without modifying the original game files.

Do note that this can also be used on directories and PS3 partitions.
You do not have to specify "/dev_" at the start of path.

Examples:

  • [ hide_file, /dev_hdd0/game/SERIAL/USRDIR/Video.mp4, "" ] # Mark the video as non-existant
  • [ hide_file, hdd0/game/SERIAL/USRDIR/Video.mp4, "" ] # Same
  • [ move_file, /dev_hdd0/game/SERIAL/USRDIR/Textures.tex, /dev_usbd/SERIAL/Textures.tex ] # Replace 'Textures.tex' with another file at /dev_usbd

@Megamouse Megamouse added the Patches Patches and Mods label Mar 3, 2023
@elad335 elad335 force-pushed the patch-20 branch 2 times, most recently from c8e28ea to 58f7ccf Compare March 3, 2023 14:22
@elad335 elad335 requested a review from Megamouse March 3, 2023 15:49
@elad335 elad335 requested a review from Megamouse March 3, 2023 17:25
@Megamouse Megamouse merged commit 382a7c9 into RPCS3:master Mar 3, 2023
@JimScript
Copy link

I wanted to test this on a game, but I have been unable to get RPCS3's patch system to recognize it:

  • [ move_file, hdd0/game/NPUA80908/USRDIR/built/game/scripts/arenas/pest_control.lc, usb000/pest_control.lc ]

Which spits out the error:
E PAT: Skipping patch data entry: [ move_file, 0x00000000, usb000/pest_control.lc ] (key: PPU-fadb0af6fb7bd0113e88fb9af3eb78fe3be05d08, location: line 68, column 8) yaml-cpp: error at line 69, column 92: bad conversion
Is this properly implemented with the patch manager? Because it seems like the offset doesn't want to take the string I've provided and instead replaces it with "0x00000000".

@Megamouse
Copy link
Contributor

see #13491

@JimScript
Copy link

I wonder, does this VFS patching include support for files that are located within container files(like PSARC commonly), or is it only loose files that your own file browser can see?

@elad335
Copy link
Contributor Author

elad335 commented Mar 6, 2023

Your own browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Patches Patches and Mods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants