Closed merasmus44 closed 1 year ago
If you add a file that is already in a .pck the existing file is overwritten. If you mean about creating a patch or mod .pck file that overrides a file from the base game, that also works the same way, specify a file with the same path inside the .pck file than the inbuilt one and ensure then that the .pck file is loaded after the main .pck of the game to make it overwrite any resources specified in earlier loaded .pck files.
So if the original Globals.gd is located in res://scripts/Globals.gd, would I have to put the new Globals.gd in a folder named scripts, then add it?
Yes, all items inside .pck files are identified by a path. You can use this tool to list the contents of a .pck file to confirm what files exist, and also whether the overwrite succeeded (which can be seen based on the file size change to know when you managed to replace an existing entry, assuming the new file is different size).
Ok this worked, thanks!
If I were to add Globals.gd to the pck, is there any way to make it override the already built in Globals.gd?