Well this is officially diving me mad, I somehow managed to permanently break one of my packaged scenes because the engine is still complaining at me with these 'resource non-existent' errors even though I deleted the scripts it was complaining about to try and refresh anything and even made a new scene to link to the scripts among other things. Does anyone have any idea what the hell is going on? I think it's because I accidentally clicked the reset button on the resource path and now for some reason things are borked. Loading the project up again as advised seems to do absolutely nothing, posting screenshot proof that everything should be linked up correctly.

I think this is the first time I've managed to properly break something in this engine lol.

  • Best solution I can think of is to wipe anything related to my NorseFemaleVillager including the script, I'll copy and paste the code to a blank notepad to make sure I don't have to write all that again and the engine should interpret that as just blank text so it won't attempt any kind of recovery or automated nonsense. Will let you guys know if that fixes it, I think just to be on the safe side I'll wipe the blender import as well and re-import that just to make sure that the engine thinks everything is gone.

    This is exactly why though I'm making sure to built my game modular and test everything setup first so I can do this without it causing too much pain. It only seems to be specifically for my packed scene so it should all end up fixed after that.

Try to open the tscn file in a text editor and delete the lines that refer to problematic resources.

I'd be very wary about breaking something doing that, I wonder if I've not somehow managed to come across a Godot specific bug.

  • xyz replied to this.

    Lethn Just backup the files beforehand and you'll be fine.
    Tscn and tres are human readable textual formats for a reason - you can read and edit them if something goes wrong.
    Even Godot's gui supports that. If you right-click on a tscn file in Godot's FileSystem window you'll get the "Open in External Program" option in the popup menu, which will open the file in your system's default text editor.
    Take a look at what's in these files. It's interesting.

      xyz Tscn and tres are human readable textual formats for a reason - you can read and edit them if something goes wrong.

      I understand how to make manual fixes in Godot 3.x. Godot 4 has new stuff that I don't understand.

      • xyz replied to this.

        DaveTheCoder I haven't made any fixes with v4 either, but most of the stuff is similar and self explanatory really. Fixing references to missing resources shouldn't be much of a problem in either version.

          DaveTheCoder Hm, it may or may not be relevant here. Either way, the first thing I'd try in regards to the original problem is to backup the files and delete the lines with offending resource references. Then restart the project and manually reload the resources in question, if needed.

          Okay, I've backed it up now and I'll give it a shot, the most that should happen is my packed scene gets broken but we'll see.

          Well this is exactly why we make backups.

          I'll try deleting the path this time and see if that fixes the problem without breaking things.

          nope same result when just making the path blank, corrupts the scene.

          • xyz replied to this.

            Lethn That selected line is missing the uid. Looks like it might be related to what @DaveTheCoder was referring to after all.
            What happens if you delete this whole line?

            This is the first time I've ever managed to break anything like this in Godot so I'm finding it pretty lulzy even if it is frustrating I'll need to wait and see what the others think of I guess?

            By the way @xyz when I delete it that's when the scene gets corrupted, I mean I could delete the whole scene and anything to do with it then the scene should fix itself, but I've done quite a bit of setting up on it so I'd rather not if I can fix it normally.

            One approach, if you have the inclination and time, is to recompile the engine with debug print statements to find out what's going on. Don't ask me where to put them. 🙂

            Best solution I can think of is to wipe anything related to my NorseFemaleVillager including the script, I'll copy and paste the code to a blank notepad to make sure I don't have to write all that again and the engine should interpret that as just blank text so it won't attempt any kind of recovery or automated nonsense. Will let you guys know if that fixes it, I think just to be on the safe side I'll wipe the blender import as well and re-import that just to make sure that the engine thinks everything is gone.

            This is exactly why though I'm making sure to built my game modular and test everything setup first so I can do this without it causing too much pain. It only seems to be specifically for my packed scene so it should all end up fixed after that.

            • xyz replied to this.

              Lethn I still think this should be an easy fix. If you delete that line you'll also need to delete references to it from all the nodes that use the resource. Since this is a script resource you'll have to look for something like script = ExtResource("1_s7d6y") in node definition blocks and remove these lines as well. In fact it's best to search for that specifc id and remove all lines that refer to it. Try it and see what happens.

              Solved it already unfortunately and I don't think I can be bothered messing with the text files, wiping the nodes and any other references to it in the project did the trick. It won't take that long to set up the packaged scene again, it's just annoying lol. That's a very strange bug though, I wonder if it shouldn't be reported.

              I went and triple checked everything to make sure this method worked and it does, so if you ever come across this bug really the best thing to do is to wipe the associated stuff. Unfortunately @xyz when I did try just deleting that line in notepad it corrupted the scene itself, I didn't try the ID but it might be worth someone else doing.