henpemaz / RWSceneEditor

A Krita plugin for editing Rain World scenes with depthmaps.
3 stars 1 forks source link

Can't open RW scene from game file #1

Closed IdeIdling closed 2 days ago

IdeIdling commented 1 week ago

Hello? I don't really know how to report bugs via github but when I try to open dream scenes from the game [steam folder] it doesn't work. Here is what pops up when I try open a RW scene:

Exception
Python 3.10.7: C:\Program Files (x86)\Krita (x64)\bin\krita.exe
Tue Sep  3 22:45:55 2024

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Users\Redacted\AppData\Roaming\krita\pykrita\RWSceneEditor\RWSceneEditor.py in openRWScene(self=<RWSceneEditor.RWSceneEditor.RWSceneEditor object>)
   47             files = known_scenes[foldername]
   48         else:
   49             raise Exception("layers.txt not found")
   50 
   51         progress = QProgressDialog("Loading scene...", None, 0, len(files) + 2)
builtinException = <class 'Exception'>
Exception: layers.txt not found
    __cause__ = None
    __class__ = <class 'Exception'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of Exception object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of Exception object>
    __doc__ = 'Common base class for all non-exit exceptions.'
    __eq__ = <method-wrapper '__eq__' of Exception object>
    __format__ = <built-in method __format__ of Exception object>
    __ge__ = <method-wrapper '__ge__' of Exception object>
    __getattribute__ = <method-wrapper '__getattribute__' of Exception object>
    __gt__ = <method-wrapper '__gt__' of Exception object>
    __hash__ = <method-wrapper '__hash__' of Exception object>
    __init__ = <method-wrapper '__init__' of Exception object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of Exception object>
    __lt__ = <method-wrapper '__lt__' of Exception object>
    __ne__ = <method-wrapper '__ne__' of Exception object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of Exception object>
    __reduce_ex__ = <built-in method __reduce_ex__ of Exception object>
    __repr__ = <method-wrapper '__repr__' of Exception object>
    __setattr__ = <method-wrapper '__setattr__' of Exception object>
    __setstate__ = <built-in method __setstate__ of Exception object>
    __sizeof__ = <built-in method __sizeof__ of Exception object>
    __str__ = <method-wrapper '__str__' of Exception object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ('layers.txt not found',)
    with_traceback = <built-in method with_traceback of Exception object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "C:\Users\Redacted\AppData\Roaming\krita\pykrita\RWSceneEditor\RWSceneEditor.py", line 49, in openRWScene
    raise Exception("layers.txt not found")
Exception: layers.txt not found

Thanks for looking into it, and I truly appreciate it for providing tool like this for free!

henpemaz commented 1 week ago

Hmm! So, the program can't figure out which order the images should be in from just the files. Despite them being named 1-2-3 etc they are OFTEN not loaded in that order by the game. (funny examples!)

When I made this tool I've included the layer order for all scenes in rainworld 1.5, but now either scenes changed name or you're trying to load a scene that is new or from the DLC

I can look into generating layer maps for the new scenes in the future, but if you want to solve your problem right now, add a layers.txt file in the scene folder that you are trying to load, and write in there the layer names one per line from bottommost to topmost layer. For instance layer names for the "Sleep Screen - White" scene are:

Sleep - 5
Sleep - 4
Sleep - 3
Sleep - 2 - White
Sleep - 1