![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I found a really neat bug that completely fucked up my whole customization part, hooray! 😠😡🤬
What happens is: on an exported project (the thing players will play), the game simply doesn't load player and princess' hairs, noses, eyes, etc.
It took a LOT of time for me to figure it out, but the "problem" (the png files aren't exported, they're converted into godot textures and stuck in another folder) was that I was checking specifically for the .png, which no longer existed. Obviously, I spent hours sifting through github and reddit for people with similar problems
Luckily, thankfully, I could still check for the ".import" files, so changing just some 6 lines of code fixed everything.
A bit more technical detail: my code checked for all existing .png files in the folders of the knight and princess. Because the check was specific for that, if those files ever go missing, which they do when you export the project for release, it fails. Mind you, even if the files "don't exist", they're still present as .ctex files in a hidden .godot folder, any attempt to load your images, like "load("res://image.png") will actually grab the contents within ".godot/imports/image.png-03u2r983y94212.ctex"
So, since the files still "exist", or at least trying to load them point to the "right" file, I changed my check from "image.png" to "image.png.import", and it worked. Loading still happens as "load(image.png)"
As for actual progress:
* Made the graphic for the entrance/exit
* Made the graphic for a "Kobold nest", so the player knows where enemies spawn from. - This also led to some previously placed spawners no longer working. Gotta love this kind of things breaking for what feels like unrelated reasons. Anyway, the fix was enabling the "Autostart" flag on them all. I still need to add some sort of minor animation to indicate when it's been destroyed. Since I didn't make it as separate layers, I'll probably have to take a easy way out, make the image tremble a bit and fall under the floor or something.

What happens is: on an exported project (the thing players will play), the game simply doesn't load player and princess' hairs, noses, eyes, etc.
It took a LOT of time for me to figure it out, but the "problem" (the png files aren't exported, they're converted into godot textures and stuck in another folder) was that I was checking specifically for the .png, which no longer existed. Obviously, I spent hours sifting through github and reddit for people with similar problems
Luckily, thankfully, I could still check for the ".import" files, so changing just some 6 lines of code fixed everything.
A bit more technical detail: my code checked for all existing .png files in the folders of the knight and princess. Because the check was specific for that, if those files ever go missing, which they do when you export the project for release, it fails. Mind you, even if the files "don't exist", they're still present as .ctex files in a hidden .godot folder, any attempt to load your images, like "load("res://image.png") will actually grab the contents within ".godot/imports/image.png-03u2r983y94212.ctex"
So, since the files still "exist", or at least trying to load them point to the "right" file, I changed my check from "image.png" to "image.png.import", and it worked. Loading still happens as "load(image.png)"
As for actual progress:
* Made the graphic for the entrance/exit
* Made the graphic for a "Kobold nest", so the player knows where enemies spawn from. - This also led to some previously placed spawners no longer working. Gotta love this kind of things breaking for what feels like unrelated reasons. Anyway, the fix was enabling the "Autostart" flag on them all. I still need to add some sort of minor animation to indicate when it's been destroyed. Since I didn't make it as separate layers, I'll probably have to take a easy way out, make the image tremble a bit and fall under the floor or something.
