Encyclopaedia / Bestiary Framework
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Re: Encyclopaedia / Bestiary Framework
Thabks, I will try that.
- isak grozny
- Regular
- Posts: 46
- Joined: Mon Apr 11, 2016 10:17 am
- Projects: The Bitter Drop [Modern Fantasy][Gay Romance][BxB]
- itch: grrozny
- Location: Edinburgh, UK
- Contact:
Re: Encyclopaedia / Bestiary Framework
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?
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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
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 !
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 !
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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.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 !
Code: Select all
foobar = EncEntry(...)
foobar.updated = False
Code: Select all
"Lorem ipsum"
$ foobar.updated = True
Code: Select all
if entry.updated:
text "Update!"
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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
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
- ameliori
- Veteran
- Posts: 201
- Joined: Sun Apr 06, 2014 9:20 am
- Completed: Who is Mike?, Cupid
- Projects: The Black Beast [Fairytale]
- Organization: FERVENT
- Tumblr: ameliori
- itch: fervent
- Contact:
Re: Encyclopaedia / Bestiary Framework
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?
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?
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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?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?
Re: Encyclopaedia / Bestiary Framework
Thank you very much for your reply! It's helped me a lot. : )
- XxrenxX
- Veteran
- Posts: 267
- Joined: Tue Oct 02, 2012 2:40 am
- Projects: Chasing
- Deviantart: bara-ettie
- Location: Canada
- Contact:
Re: Encyclopaedia / Bestiary Framework
Code: Select all
Exception: Required parameter enc has no value.
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.
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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 pmGet error when testing the zip of it as well. Haven't edited anything within the original files.Code: Select all
Exception: Required parameter enc has no value.
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.
- XxrenxX
- Veteran
- Posts: 267
- Joined: Tue Oct 02, 2012 2:40 am
- Projects: Chasing
- Deviantart: bara-ettie
- Location: Canada
- Contact:
Re: Encyclopaedia / Bestiary Framework
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.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 pmGet error when testing the zip of it as well. Haven't edited anything within the original files.Code: Select all
Exception: Required parameter enc has no value.
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.
-
- Regular
- Posts: 82
- Joined: Fri Apr 07, 2017 2:17 pm
- Projects: Imperial Grace (on going), Autumn Spirit, Ballads at Midnight
- Contact:
Re: Encyclopaedia / Bestiary Framework
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 :
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 :
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 !
- 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,
)
Code: Select all
textbutton _("Encyclopédie") action ShowMenu("encyclopaedia_list", your_new_encyclopaedia )
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 !
Last edited by Ayael on Sun Oct 27, 2019 4:45 pm, edited 1 time in total.
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
Re: Encyclopaedia / Bestiary Framework
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.
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.
-
- Regular
- Posts: 82
- Joined: Fri Apr 07, 2017 2:17 pm
- Projects: Imperial Grace (on going), Autumn Spirit, Ballads at Midnight
- Contact:
Re: Encyclopaedia / Bestiary Framework
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 !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.
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 ?
Last edited by Ayael on Sat Nov 02, 2019 7:30 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users