Page 3 of 8

Re: Encyclopaedia / Bestiary Framework

Posted: Wed Dec 06, 2017 9:25 pm
by Katy133
Thank you so much for this framework!

I'm not sure if you've seen this already, or whether it can help you adjust the framework, but PyTom recently made a post about making a Codex/Wiki screen using Ren'Py's new GUI. The tutorial and coding can be found here.

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Dec 10, 2017 10:11 am
by Human Bolt Diary
Katy133 wrote: Wed Dec 06, 2017 9:25 pm Thank you so much for this framework!

I'm not sure if you've seen this already, or whether it can help you adjust the framework, but PyTom recently made a post about making a Codex/Wiki screen using Ren'Py's new GUI. The tutorial and coding can be found here.
There's no plans for Wiki-esque links in the 2.0 release, but I can definitely look into it in the future. From that article, I think it's definitely doable.

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Mar 11, 2018 6:11 pm
by AERenoir
Just tried to install this, but I got this error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/encyclopaedia_screens.rpy", line 313, in script
    style encyclopaedia_scrollbar is scrollbar:
  File "game/encyclopaedia_screens.rpy", line 314, in <module>
    base_bar Frame(Solid(color_dark_orange), gui.scrollbar_borders, tile=gui.scrollbar_tile)
AttributeError: 'StoreModule' object has no attribute 'scrollbar_borders'
What went wrong? My Engine is Renpy 6.99.14

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Mar 11, 2018 10:44 pm
by Human Bolt Diary
I can't reproduce this with a fresh project on 6.99.14.1. Have you made any customizations to the default gui.rpy file?
Can you provide a minimum example game where the error occurs?
AERenoir wrote: Sun Mar 11, 2018 6:11 pm Just tried to install this, but I got this error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/encyclopaedia_screens.rpy", line 313, in script
    style encyclopaedia_scrollbar is scrollbar:
  File "game/encyclopaedia_screens.rpy", line 314, in <module>
    base_bar Frame(Solid(color_dark_orange), gui.scrollbar_borders, tile=gui.scrollbar_tile)
AttributeError: 'StoreModule' object has no attribute 'scrollbar_borders'
What went wrong? My Engine is Renpy 6.99.14

Re: Encyclopaedia / Bestiary Framework

Posted: Mon Mar 12, 2018 5:12 am
by AERenoir
Aaah, OK! Silly me. I accidentally typed something into the gui.rpy when I was scrolling through the codes, and saved the file.

Re: Encyclopaedia / Bestiary Framework

Posted: Thu Aug 09, 2018 1:06 am
by ocimpean
I have the same error like the one above:
File "game/encyclopaedia_screens.rpy", line 313, in script
style encyclopaedia_scrollbar is scrollbar:
File "game/encyclopaedia_screens.rpy", line 314, in <module>

Brand new project, Renpy 6.9.14 & 7.0. just imported the files.

Re: Encyclopaedia / Bestiary Framework

Posted: Thu Aug 09, 2018 8:51 pm
by Human Bolt Diary
If you have same error, then I have to ask the same question: Have you made any customizations to the default gui.rpy file?

Re: Encyclopaedia / Bestiary Framework

Posted: Fri Aug 10, 2018 9:32 pm
by ocimpean
No, I have not made any customization of gui.rpy, I started a brand new project in v.6.99.14 and import files. It gave me errors so I started a new project in v.7.01 and imported the files just to test it and got same errors. Probably is something I am doing wrong, but I can not figure it out.

Re: Encyclopaedia / Bestiary Framework

Posted: Sat Aug 11, 2018 4:59 pm
by Human Bolt Diary
ocimpean wrote: Fri Aug 10, 2018 9:32 pm No, I have not made any customization of gui.rpy, I started a brand new project in v.6.99.14 and import files. It gave me errors so I started a new project in v.7.01 and imported the files just to test it and got same errors. Probably is something I am doing wrong, but I can not figure it out.
Can you post an example game where this error occurs?

Re: Encyclopaedia / Bestiary Framework

Posted: Sat Aug 11, 2018 6:45 pm
by ocimpean
Here It is right from the start.
...............................................

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/encyclopaedia_screens.rpy", line 313, in script
style encyclopaedia_scrollbar is scrollbar:
File "game/encyclopaedia_screens.rpy", line 314, in <module>
base_bar Frame(Solid(color_dark_orange), gui.scrollbar_borders, tile=gui.scrollbar_tile)
AttributeError: 'StoreModule' object has no attribute 'scrollbar_borders'

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/encyclopaedia_screens.rpy", line 313, in script
style encyclopaedia_scrollbar is scrollbar:
File "C:\Users\Ovidiu\Downloads\renpy-7.0.0-sdk\renpy\ast.py", line 2410, in execute
self.apply()
File "C:\Users\Ovidiu\Downloads\renpy-7.0.0-sdk\renpy\ast.py", line 2393, in apply
value = renpy.python.py_eval(expr)
File "C:\Users\Ovidiu\Downloads\renpy-7.0.0-sdk\renpy\python.py", line 1943, in py_eval
return py_eval_bytecode(code, globals, locals)
File "C:\Users\Ovidiu\Downloads\renpy-7.0.0-sdk\renpy\python.py", line 1936, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/encyclopaedia_screens.rpy", line 314, in <module>
base_bar Frame(Solid(color_dark_orange), gui.scrollbar_borders, tile=gui.scrollbar_tile)
AttributeError: 'StoreModule' object has no attribute 'scrollbar_borders'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Encyclopedia_test 0.0
Sat Aug 11 07:37:55 2018
.....................................
#Script.rpy

init python:
your_new_encyclopaedia = Encyclopaedia()




python:
your_new_encyclopaedia = Encyclopaedia()



about_zeus = EncEntry(
parent=your_new_encyclopaedia,
name="Zeus",
text=[
"Zeus is the sky and thunder god in ancient Greek religion, who ruled as king of the gods of Mount Olympus."
" His name is cognate with the first element of his Roman equivalent Jupiter."
" His mythologies and powers are similar, though not identical, to those of Indo-European deities such as Indra, Jupiter, Perun, Thor, and Odin."
],
viewed_persistent=True,
)



label start:
"..."
"...test."

Re: Encyclopaedia / Bestiary Framework

Posted: Sat Aug 11, 2018 8:36 pm
by Human Bolt Diary
I need an actual example game that crashes, all files and directories. I have no other way to reproduce the exact conditions in your environment that lead to the crash.

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Aug 12, 2018 12:16 pm
by ocimpean
I archived whole project here as you requested.

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Aug 12, 2018 1:40 pm
by Human Bolt Diary
gui.rpy isn't present, this is why you're getting that error. gui.rpy is a default file when creating a new Ren'Py project, so most likely you created the project on an old version of Ren'Py before the new gui was introduced, and haven't updated the project to use the new gui.

What happens when you create a new project from the launcher? Is gui.rpy present in the created files?

If you don't want to use the new gui as the base, you'll have to edit the styles to use whatever values you prefer.

Re: Encyclopaedia / Bestiary Framework

Posted: Mon Aug 13, 2018 6:49 pm
by ocimpean
You are, of course, 100% right. Now that you mention it, I got hit by a flash of recollection, the project was started in 6.9, and it gave errors. So instead of making a new one in 7.0, probably next I just open the old one in 7.
Thank you for helping me figure it out.

Re: Encyclopaedia / Bestiary Framework

Posted: Tue Sep 11, 2018 5:51 am
by AERenoir
After creating entries I tried to make a button to open the Encyplopedia.

I inserted the Encyclopedia button at the start menu. The documentation says it needs two arguments, but I'm not sure what the format is supposed to be.
I wrote it like this, and it's obviously wrong:

Code: Select all

 textbutton _("Encyclopedia") action ShowMenu("encyclopaedia_list",Encyclopaedia)
The sample entry, as copy-pasted from the documentation

Code: Select all

init python:
    your_new_encyclopaedia = Encyclopaedia()




python:
    your_new_encyclopaedia = Encyclopaedia()

        
        
    about_zeus = EncEntry(
    parent=your_new_encyclopaedia,
    name="Zeus",
    text=[
        "Zeus is the sky and thunder god in ancient Greek religion, who ruled as king of the gods of Mount Olympus."
        " His name is cognate with the first element of his Roman equivalent Jupiter."
        " His mythologies and powers are similar, though not identical, to those of Indo-European deities such as Indra, Jupiter, Perun, Thor, and Odin."
    ],
    viewed_persistent=True,
)