Page 5 of 7

Re: Encyclopaedia / Bestiary Framework

Posted: Thu Dec 27, 2018 8:08 am
by AERenoir
Thabks, I will try that.

Re: Encyclopaedia / Bestiary Framework

Posted: Fri Jan 04, 2019 11:28 pm
by isak grozny
Right now, I just have one issue–when I bring up the entry screen via a hyperlink that appears on a say or nvl screen, Return() progresses the story to the next bit. I want it to return to the same dialogue line the entry screen was called from. How do I achieve that?

Re: Encyclopaedia / Bestiary Framework

Posted: Fri Jan 04, 2019 11:34 pm
by Human Bolt Diary
Off the top of my head, remove the Return action from the button that closes the encyclopaedia and just hide the screen. If that fails, provide a minimal example for what you're doing and I'll see what I can figure out.

Re: Encyclopaedia / Bestiary Framework

Posted: Tue Feb 12, 2019 9:02 am
by Nyanshua
Hi !

Your framework is really great and work like a charm on my project ! However I have some questions, if you do not mind.

- Then we make an entry, and update it after, is it possible to make a tag "update!", like the "new!" one then the player unlock an entry ?
- Is it possible to make a dropdown list with the subject label ? (like the screenshot below)

https://i.goopics.net/PyW8d.png
https://i.goopics.net/4grXP.png

And that's all !

Re: Encyclopaedia / Bestiary Framework

Posted: Thu Feb 21, 2019 12:02 am
by Human Bolt Diary
Nyanshua wrote:
Tue Feb 12, 2019 9:02 am
Hi !

Your framework is really great and work like a charm on my project ! However I have some questions, if you do not mind.

- Then we make an entry, and update it after, is it possible to make a tag "update!", like the "new!" one then the player unlock an entry ?
- Is it possible to make a dropdown list with the subject label ? (like the screenshot below)

https://i.goopics.net/PyW8d.png
https://i.goopics.net/4grXP.png

And that's all !
If you mean a tag that says "update!" instead of "new!", you can add an attribute to each of your EncEntries and use that to control the GUI.

Code: Select all

foobar = EncEntry(...)
foobar.updated = False

Code: Select all

"Lorem ipsum"
$ foobar.updated = True
and then in the entry_button screen, add:

Code: Select all

if entry.updated:
    text "Update!"
You can sort by subject to get a similar screen to what you want. If you want an actual dropdown, you'll have to code a custom dropdown interface. Once you have that, it's easy enough to populate each dropdown with only entries that match each subject.

Re: Encyclopaedia / Bestiary Framework

Posted: Thu Feb 21, 2019 12:06 am
by Human Bolt Diary
v2.2 of the Encyclopaedia Framework has been released. Download is available at: https://github.com/jsfehler/renpy-encyc ... a/releases

The following changes were made:

- Sort actions now use the get_selected method
- encyclopaedia_list screen no longer sorts by number on exit
- Sorting buttons on encyclopaedia_list screen implicitly inherit their style
- encyclopaedia_button style now has a selected background colour set

Re: Encyclopaedia / Bestiary Framework

Posted: Tue Mar 12, 2019 10:37 pm
by ameliori
I'm not sure if anybody has asked this already, but is there a way to make the bestiary conform to a save file? When I use the global encyclopedia, the unlocked entries are already unlocked whenever I start a new game. The only way to lock them again would be to delete the persistent file.

On the other hand, when I use local encyclopedia, restarting the game wipes out the unlocked entries. Even if I save my progress, the unlocked entries disappear when I restart the game. I would like the unlocked entries to stay locked when starting a new game, but be visible using a save file.

Is it possible?

Re: Encyclopaedia / Bestiary Framework

Posted: Wed Mar 20, 2019 12:07 am
by Human Bolt Diary
ameliori wrote:
Tue Mar 12, 2019 10:37 pm
I'm not sure if anybody has asked this already, but is there a way to make the bestiary conform to a save file? When I use the global encyclopedia, the unlocked entries are already unlocked whenever I start a new game. The only way to lock them again would be to delete the persistent file.

On the other hand, when I use local encyclopedia, restarting the game wipes out the unlocked entries. Even if I save my progress, the unlocked entries disappear when I restart the game. I would like the unlocked entries to stay locked when starting a new game, but be visible using a save file.

Is it possible?
I can't reproduce this issue. As long as an encyclopaedia is created after the start label, its state is saved in the save file like any other object. Can you post a minimal example of a script where this issue occurs?

Re: Encyclopaedia / Bestiary Framework

Posted: Wed Mar 20, 2019 6:00 am
by Nyanshua
Thank you very much for your reply! It's helped me a lot. : )

Re: Encyclopaedia / Bestiary Framework

Posted: Thu May 16, 2019 4:05 pm
by XxrenxX

Code: Select all

Exception: Required parameter enc has no value.
Get error when testing the zip of it as well. Haven't edited anything within the original files.

If possible is there a simpler version of this code? I'm using it because I can't find anything else but I only want one list sorted with the newest unlock (scrollable) at the top and then a simple screen to show selected entry. I have no use for most of this code as I only want a screen similar to the notes function in a cell-phone, just not editable by the player.

Re: Encyclopaedia / Bestiary Framework

Posted: Sat May 18, 2019 12:51 pm
by Human Bolt Diary
Most likely, you're calling a screen that takes an argument, but have not provided an argument. As per the documentation, calling the screen requires passing an Encyclopaedia object to it.
XxrenxX wrote:
Thu May 16, 2019 4:05 pm

Code: Select all

Exception: Required parameter enc has no value.
Get error when testing the zip of it as well. Haven't edited anything within the original files.

If possible is there a simpler version of this code? I'm using it because I can't find anything else but I only want one list sorted with the newest unlock (scrollable) at the top and then a simple screen to show selected entry. I have no use for most of this code as I only want a screen similar to the notes function in a cell-phone, just not editable by the player.

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Jul 07, 2019 10:04 pm
by XxrenxX
Human Bolt Diary wrote:
Sat May 18, 2019 12:51 pm
Most likely, you're calling a screen that takes an argument, but have not provided an argument. As per the documentation, calling the screen requires passing an Encyclopaedia object to it.
XxrenxX wrote:
Thu May 16, 2019 4:05 pm

Code: Select all

Exception: Required parameter enc has no value.
Get error when testing the zip of it as well. Haven't edited anything within the original files.

If possible is there a simpler version of this code? I'm using it because I can't find anything else but I only want one list sorted with the newest unlock (scrollable) at the top and then a simple screen to show selected entry. I have no use for most of this code as I only want a screen similar to the notes function in a cell-phone, just not editable by the player.
That was my first thought and I had assumed I had fixed said issue but I have the issue when testing the original files test version as well as my own so I am unsure if it's just a simple argument not provided issue.

Re: Encyclopaedia / Bestiary Framework

Posted: Wed Sep 18, 2019 5:23 am
by Ayael
Hello, for all the people who had trouble with the documentation (which is great but a bit confusing sometime). Here are an example !

- First of all, you need to create a new encyclopedia, and at least 1 entry to it :

Code: Select all

init python:
    your_new_encyclopaedia = Encyclopaedia() #The encyclopedia is name "your_new_encyclopaedia"

    about_zeus = EncEntry( #My entry is named "about_zeus".
        parent=your_new_encyclopaedia, #The "about_zeus" entry, is inside the "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,
    )
Then to go on it your need to create a button to it. I choose to do it global (look the documentation to see the difference), so in my main menu I did :

Code: Select all

textbutton _("Encyclopédie") action ShowMenu("encyclopaedia_list", your_new_encyclopaedia )
Witch mean : I want to show the encyclopedia_list screen (witch is the default screen they created), and open the encyclopedia I created.

I struggle a lot to understand it, I hope it will help ! Please look the documentation to see all the details you can add on this amazing feature !

Re: Encyclopaedia / Bestiary Framework

Posted: Sun Sep 29, 2019 9:45 pm
by Human Bolt Diary
I've released version 2.3. The Encyclopaedia now takes the optional argument `tint_locked_image`. If set to False, EncEntries without a specified locked_image will not use a tinted version of the image, instead just using the image.

This is mainly for times when a Displayable is used for the image and no locked_image is provided. Image Manipulators can't handle Displayables, so the tinting attempt would cause a crash. When/If Transforms support color manipulation, I'll switch over to that completely.

Re: Encyclopaedia / Bestiary Framework

Posted: Mon Oct 21, 2019 6:52 am
by Ayael
Human Bolt Diary wrote:
Sun Sep 29, 2019 9:45 pm
I've released version 2.3. The Encyclopaedia now takes the optional argument `tint_locked_image`. If set to False, EncEntries without a specified locked_image will not use a tinted version of the image, instead just using the image.

This is mainly for times when a Displayable is used for the image and no locked_image is provided. Image Manipulators can't handle Displayables, so the tinting attempt would cause a crash. When/If Transforms support color manipulation, I'll switch over to that completely.
Wow, I didn't expect this to be updated anymore ! First of all, Human Bolt Diary, let me thank you a lot for your huge work on this framework, it's amazing ! Truly it goes beyond my dreams !

Second, I was wandering why I don't have the "new!" displaying when I have a new sub_entry unlocking ! I did some modification on the screens so I probably broke something, but I can't find which part of the screen code is handling this >.<

Also, on your documentation, you don't explain how we can declare image we want to use inside the entry, even so there is on the code two screen, one without, and one for the entry with images so I guess it's possible ?