Open WestRodri opened 1 week ago
Ok I imported the "lib" and "renpy" folders from the repo to the game folder. Most of the warnings went away. Now the only warning left is on from renpy.store
import lines. What am I missing?
What does "into the main" mean? Do you mean the main directory of your project? If the Encyclopaedia object is not found it means Ren'Py has not seen the code. Did you place the files outside the game
directory?
You cannot naively use a python type checker on a Ren'Py project. Ren'Py is not a python project and has no type checking available. If you use a type checker on embedded python code it's your responsibility to configure mocks and stubs appropriately for whichever files you want to type check. You can use this project as a reference but I offer no support for type checking your project.
Apologies I should have been more specific, I appreciate you replying. I dragged the "encyclopaedia" folder that was in the repo into the "game" folder of my project.
From there I used the example code and gives me an immediate error ""NameError: name 'Encyclopaedia' is not defined"."
So renpy is not seeing the code even though it's in the game folder. Unfortunately this feels like something you can't help me with from what you've said.
Ren'Py loads files in alphabetical order. If the encyclopaedia files are loaded after the file which creates the Encyclopaedia instance, it will cause an error.
Try:
init 1 python
when you create an Encyclopaedia in order to force load order
I dragged an droped the Encyclopaedia folder from the github into the main and used the example code:
but it gives me an error "NameError: name 'Encyclopaedia' is not defined". Looking through the Encyclopaedia folder files I get quite a few warnings pertaining to imports. A lot of them say "Import "renpy" could not be resolvedPylance[reportMissingImports]"
is there something that isn't compatible? I'm using Renpy 8.3.2.