jsfehler / renpy-encyclopaedia

A Ren'Py plugin for creating an Encyclopaedia/Glossary/Bestiary or similar system.
https://renpy-encyclopaedia.readthedocs.io/
MIT License
56 stars 6 forks source link

Help with setup? #6

Closed Alejo275 closed 4 years ago

Alejo275 commented 4 years ago

Hello, im attempting to use your framework to contribute with a friend's visual novel I have been reading your documentation but i dont seem to understand how to make a basic glossary work, i dont that much about programming, but is this that complicated? Can you help me? In renpy under which file should i start writing the statements for an encyclopaedia object and entries? Where can i ask about this?

jsfehler commented 4 years ago

As with the rest of renpy, it doesn't matter which file you use, as long as it's a rpy file.

Alejo275 commented 4 years ago

I only get one error using this formula but i dont understand it, what am i doing wrong?

init python: your_new_encyclopaedia = Encyclopaedia()

test = EncEntry( parent=your_new_encyclopaedia, name="001", text=[ "Test1." ], viewed_persistent=True, )

The game starts here.

label start:

File "game/script.rpy", line 13: expected statement. test = EncEntry( ^ parent=your_new_encyclopaedia, name="001", text=[ "Test1." ], viewed_persistent=True, )

jsfehler commented 4 years ago

init python blocks cannot be inside a label. python code in a label must be inside a python block

Alejo275 commented 4 years ago

I believe i fixed the python block issue, i dont get errors from it anymore, i hope its correctly declared

pyhton

Now im attempting to add an in-game button to open it, and i thought about using the quick menu at screens.rpy, ill keep looking for information about opening a menu and adding buttons

quick_menu

NameError: name 'encyclopaedia_list' is not defined

jsfehler commented 4 years ago

ShowMenu takes a string for the name of the screen, ie:

ShowMenu('encyclopaedia_list', your_new_encyclopaedia)

Alejo275 commented 4 years ago

Its working!! Thank you so much