-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Implement load_resource_pack
destination support
#82035
Conversation
load_resource_pack
destination support
note this does not imply the resource cache actually working for subfolders: |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
It seems like one of the checks has failed. |
yup it keeps doing that and incrementally telling me i forgot to do a single maintenance thing :P first it was tried to |
Check the instructions in: |
@AThousandShips that file almost makes sense to me, except the bit about what the |
Yes |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
yeah um, i think the check might've broken? it complains about not knowing what an |
The relevant issue is highlighted in red:
You need to add a compatibility method |
um, how, given that's literally the job of the optional parameter? 0.o |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
that one was my editor deciding to randomly start using 8 spaces for a tab somehow, despite my tabs literally everywhere being tabs and 2 wide. sorry this PR is such a pain :/ |
AARGH now i undid your space again ;_; |
You will need to pull the branch before making changes locally or any suggestions applied here will vanish |
|
Without this though, this functionality is extremely limited. Trying to load any scene will fail because all scripts and resources will try to fetch from However, I wonder if it's enough to actually account for the existence of multiple |
@rsubtil i think then you're still left with the (potentially bigger) issue of any resource paths being prefixed now, and how to specify whether i didn't feel really "comfortable enough" to mess with core workflows / design decisions that deeply, but i feel even just getting the option to open a pck file without potentially nuking and i mean technically this does now allow to do any of the things you described, just not builtin yet, by extensive filtering of the PackedScene onload while manually loading the assets (either by following the export path rewrite, or by using "importing" functions like |
Perhaps instead of mangling So in the pack you would use Of course, this would still allow for packs to be loaded into I'm not really sure how one would implement this as I have only looked at the engine code a little, but I might take a look into it when I have more time and if someone else doesn't pick up this or another suggestion. |
yeah all pretty good ideas imo, but probably best to put those in proposals instead of the PR, i guarantee they'll get lost otherwise ;) |
oh true, forgot this wasn't proposals lmao. I'll go ahead and do that |
@Jade-TheCat Just to point out most of those ideas (choosing what files can be overriden, and custom resource paths) are already being discussed in godotengine/godot-proposals#2689 and godotengine/godot-proposals#6307.
That's the issue though: it works technically, and requires a lot of manual stuff in order to get the functionality you desire. There has been an attempt at doing this before (#35261) which was subsequently reverted (#38035, #25815) precisely because the remapping issue isn't trivial. I agree, it's not pretty to dump everything on |
the functionality i desire is pretty much just to be able to open a pck at all without risking i would really like this first step to be a thing though until we figure out the "it just works" part, because right now it's literally impossible to do anything like that. like, there isn't even an that latter idea sounds like a GDExtension actually, i might take another look at that and release an addon :) |
I mean if you're using ZIPs there might be a way to do this but idk if it's available in GDScript. In other languages, you could open the .zip into a variable and play with its filesystem that way. That's how Minecraft mods load metadata afaik. That may require a GDExtension for Godot though. |
@Jade-TheCat there's a |
ah, right. I'm not super familiar with PCK files, are they a data blob like DOOM WADs? |
or like ZIPs, yeah. |
I thought ZIPs had more proper directory trees though, whereas WADs are a flat filespace with names acting for paths |
nope, and also out of scope of this PR |
Indeed, that's a good first step. There's currently no good solution to prevent this, other than loading a pack with There's actually |
How is the progress of this pr? |
@scgm0 as you can clearly read above, halted indefinitely. |
What a pity... |
@scgm0 not at all, for the reasons seen above. what is tho is spam. |
No, this PR is very useful for my mod function, because my mod will not use godot resources. |
Example usage:
Output:
ProjectSettings.load_resource_pack()
into a subfolder godot-proposals#7769