jsfehler / renpy-encyclopaedia

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

Unread entry label appears even if the entry has been already read #5

Closed Dumcem closed 6 years ago

Dumcem commented 6 years ago

Hi,

if I use this simplified code to create an encyclopaedia, and then click on the encyclopaedia entry, the unread entry tag "New!" disappears. Hovewer, if after that I exit the game and launch it again, the "New!" tag will appear again, despite I already read the entry.

init 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."
        ]
    )

label start:

    "Hello World!"

    return

To access the encyclopaedia, I just added this code in the screens.rpy file (main menu navigation screen):

textbutton _("Encyclopaedia") action ShowMenu("encyclopaedia_list", your_new_encyclopaedia)

This happens on Windows 10 Pro, with Ren'Py 7.0.0.196

jsfehler commented 6 years ago

There was missing documentation around EncEntry's viewed_persistent argument. The docs have been updated: http://renpy-encyclopaedia.readthedocs.io/en/latest/getting-started.html#persistent-entries

This should handle your use case.

Dumcem commented 6 years ago

Yeah, this worked, thanks again!