I am currently considering the architecture of a game project I'm starting, and one thing that I want to consider from the ground up is mod support. To this end, I want to allow users to temporarily modify scripts contained in both the game's .pck file and .pck files distributed with other mods. Ultimately, I want to have a system that does to GDScript as the Harmony library does to compiled C#/IL for Unity games (https://harmony.pardeike.net/).
In practice, what I want is a way for mods containing packaged GDScript to be able to access and modify other packaged GDScripts as though they were plain text strings, preferably without any significant impact on performance.
To be clear, I don't want to change the actual .pck files in any way. Instead, I want to change the scripts loaded by the game.