Help with a character list screen [Solved]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Help with a character list screen [Solved]

#1 Post by Rhapsy »

Hello.
I want to add a screen to my project so that it works as a book or character list in my game.
But with the following code I have a problem. When I create a new page/screen and press the back button on the new pages it takes me to the previous page/screen. When I want that button to always take me back to the game directly.
I need help with scripts so that the Next and Previous buttons only serve to change page screens and that on all these screens the Back button takes you back to the game directly. Or some new command or function.
Thanks.

Example screen
[/img]https://prnt.sc/4NicQX94P5dT[/img]

Code: Select all

screen char_list():

    imagemap:
        ground "screens/screen_char.jpg"
        hover "screens/screen_char_hover.jpg"
        
        hotspot (826, 472, 106, 113) #i need code for prev page here
        hotspot (1727, 472, 106, 112) action ui.callsinnewcontext("char_list1") # This code doesn't works. i need code for next page here
        hotspot (1242, 783, 181, 78) action Return()
    
    bar:
        range 20
        value char1_points
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55

screen char_list1:
    
    imagemap:
        ground "screens/screen_char.jpg"
        hover "screens/screen_char_hover.jpg"
        
        hotspot (826, 472, 106, 113) #i need code for prev page here
        hotspot (1727, 472, 106, 112) #i need code for next page here
        hotspot (1242, 783, 181, 78) action Return() #Pressing it here takes me back to the previous page/screen, not back to the game directly.
    
    bar:
        range 20
        value char2_points
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55

label char_list:
    call screen char_list
    return

label char_list1:
    call screen char_list1
    return
Last edited by Rhapsy on Mon Mar 11, 2024 10:35 am, edited 1 time in total.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#2 Post by jeffster »

Hello, Rhapsy!

To clearly understand your task, please picture what elements you need and what they need to do.

You have figured how to create and call screens. Now the question is:
How those screens should interact with each other and with your data?

Answer to this question would define how we make those screens, buttons and characters.

It makes sense to use the same screen for all characters, and by clicking Previous / Next we would change only screen parameters:
* the picture,
* the name
* and the description of the character.

Then, for simplicity, let's assume that we have a list of characters:

Code: Select all

# Just for readability, I define a constant "ID" here.
# (Could use just 0 instead, or any other constant):
define ID = 0

define characters = [
    {ID: "cat", "name": "Kitty", "desc": "Kitty is an independent and quiet girl.", "points": 0},
    {ID: "dog", "name": "Doggy", "desc": "Doggy is a brave and curious boy.", "points": 0},
    {ID: "owl", "name": "Owl", "desc": "Owl is a retired professor, an avid knitter.", "points": 0},
    {ID: "man", "name": "The Man", "desc": 'As The Man likes to say, "Oh boy!"', "points": 0},
    ]
And let's make the pictures' file names of every character using the same template:

Code: Select all

# For "cat":
        ground "screens/cat.jpg"
        hover "screens/cat_hover.jpg"

# For "dog":
        ground "screens/dog.jpg"
        hover "screens/dog_hover.jpg"

# and so on
We can automatize it like this, substituting a part of file name with the character's id:

Code: Select all

        ground f"screens/{char[ID]}.jpg"
        hover f"screens/{char[ID]}_hover.jpg"

        # Here i use f-strings because I assume you use Ren'Py 8 (it allows Python 3 syntax).
There char is a variable containing the current character, and char[ID] is its ID.

Then we can call the screen with a character like this:

Code: Select all

    call screen char_list(n)
where n is an index of the character in the list.

As default, we will use index "0", meaning the first character in the list:

Code: Select all

screen char_list(char_n=0):
    $ char = characters[char_n]

    imagemap:
        ground f"screens/{char[ID]}.jpg"
        hover f"screens/{char[ID]}_hover.jpg"
        
        if char_n > 0:
            hotspot (826, 472, 106, 113) action Return(char_n - 1)
        if char_n < len(characters) - 1:
            hotspot (1727, 472, 106, 112) action Return(char_n + 1)
        hotspot (1242, 783, 181, 78) action Return(None)
    
    bar:
        range 20
        value characters[char_n]["points"]  # or something, I'm not sure
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55
And here's how we are going to call the screen:

Code: Select all

label char_list:
    _return = 0
label char_list_call:
    call screen char_list(_return)
    if _return is not None:
        # Meaning "Previous" or "Next" button was pressed:
        jump char_list_call
    return
First we call it with 0 as the parameter, meaning "show the first character".
When the call screen returns, the result is returned in _return variable.
If it has any value like 0, 1, 2 - it means a button "Previous" or "Next" was pressed, and we call the screen again with the new parameter.
For example, if the screen was with the 1st character (meaning n was 0), and we pressed "Next", then the action was

Code: Select all

action Return(char_n + 1)
and _return will contain (n+1) == 1.
Calling screen char_list with the new parameter (n == 1) will show us the second character.

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#3 Post by Rhapsy »

jeffster wrote: Thu Mar 07, 2024 11:30 am Hello, Rhapsy!

To clearly understand your task, please picture what elements you need and what they need to do.

You have figured how to create and call screens. Now the question is:
How those screens should interact with each other and with your data?

Answer to this question would define how we make those screens, buttons and characters.

It makes sense to use the same screen for all characters, and by clicking Previous / Next we would change only screen parameters:
* the picture,
* the name
* and the description of the character.

Then, for simplicity, let's assume that we have a list of characters:

Code: Select all

# Just for readability, I define a constant "ID" here.
# (Could use just 0 instead, or any other constant):
define ID = 0

define characters = [
    {ID: "cat", "name": "Kitty", "desc": "Kitty is an independent and quiet girl.", "points": 0},
    {ID: "dog", "name": "Doggy", "desc": "Doggy is a brave and curious boy.", "points": 0},
    {ID: "owl", "name": "Owl", "desc": "Owl is a retired professor, an avid knitter.", "points": 0},
    {ID: "man", "name": "The Man", "desc": 'As The Man likes to say, "Oh boy!"', "points": 0},
    ]
And let's make the pictures' file names of every character using the same template:

Code: Select all

# For "cat":
        ground "screens/cat.jpg"
        hover "screens/cat_hover.jpg"

# For "dog":
        ground "screens/dog.jpg"
        hover "screens/dog_hover.jpg"

# and so on
We can automatize it like this, substituting a part of file name with the character's id:

Code: Select all

        ground f"screens/{char[ID]}.jpg"
        hover f"screens/{char[ID]}_hover.jpg"

        # Here i use f-strings because I assume you use Ren'Py 8 (it allows Python 3 syntax).
There char is a variable containing the current character, and char[ID] is its ID.

Then we can call the screen with a character like this:

Code: Select all

    call screen char_list(n)
where n is an index of the character in the list.

As default, we will use index "0", meaning the first character in the list:

Code: Select all

screen char_list(char_n=0):
    $ char = characters[char_n]

    imagemap:
        ground f"screens/{char[ID]}.jpg"
        hover f"screens/{char[ID]}_hover.jpg"
        
        if char_n > 0:
            hotspot (826, 472, 106, 113) action Return(char_n - 1)
        if char_n < len(characters) - 1:
            hotspot (1727, 472, 106, 112) action Return(char_n + 1)
        hotspot (1242, 783, 181, 78) action Return(None)
    
    bar:
        range 20
        value characters[char_n]["points"]  # or something, I'm not sure
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55
And here's how we are going to call the screen:

Code: Select all

label char_list:
    _return = 0
label char_list_call:
    call screen char_list(_return)
    if _return is not None:
        # Meaning "Previous" or "Next" button was pressed:
        jump char_list_call
    return
First we call it with 0 as the parameter, meaning "show the first character".
When the call screen returns, the result is returned in _return variable.
If it has any value like 0, 1, 2 - it means a button "Previous" or "Next" was pressed, and we call the screen again with the new parameter.
For example, if the screen was with the 1st character (meaning n was 0), and we pressed "Next", then the action was

Code: Select all

action Return(char_n + 1)
and _return will contain (n+1) == 1.
Calling screen char_list with the new parameter (n == 1) will show us the second character.
Hello. Thanks for answering.
I'll try it in a few minutes. And I take this opportunity to mention that I use Imagemap because I already have the images of the screens/pages of each character already defined with their description text, photos, and buttons (Previous page, Next page and Back) I would only need a code so that these buttons do not generate the problem previously mentioned.
This is because I had several complications locating each text and button separately from the Ren'Py engine.
The only thing I added from that engine was a bar that would serve as the affinity level.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#4 Post by jeffster »

In general, it's not advisable to bake everything in the images, because it's harder to edit them in case you want to change something.
Using simple "text" and "button" is easy and convenient, don't avoid to use them just because they require some learning.

And alright, the main purpose of my example is to show how to use data structures and combine them with screens with parameters.
If you understand that, you can use those approaches with your own creativity.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#5 Post by jeffster »

Rhapsy wrote: Thu Mar 07, 2024 11:59 am The only thing I added from that engine was a bar that would serve as the affinity level.
Hey, I tested my code and found a few errors:
* I forgot to put "$" before "_return = 0"
* Return(None) actually returns True
* bar value needs a different syntax:
https://www.renpy.org/dev-doc/html/scre ... #barvalues
* PS: "default characters", not "define characters". Otherwise Ren'Py doesn't save changed data like "points"...

With corrections:

Code: Select all

define ID = 0

default characters = [
    {ID: "cat", "name": "Kitty", "desc": "Kitty is an independent and quiet girl.", "points": 0},
    {ID: "dog", "name": "Doggy", "desc": "Doggy is a brave and curious boy.", "points": 0},
    {ID: "owl", "name": "Owl", "desc": "Owl is a retired professor, an avid knitter.", "points": 0},
    {ID: "man", "name": "The Man", "desc": 'As The Man likes to say, "Oh boy!"', "points": 0},
    ]

screen char_list(char_n=0):
    $ char = characters[char_n]

    frame:
        background None
        xfill True
        yfill True

        vbox:
            pos (1100, 80)
            xysize (800, 380)
            text f'Name: {char["name"]}'
            text f'{char["desc"]}'
            text f'Affinity: {char["points"]}'

        add f"screens/{char[ID]}.png" pos (1280, 472)

        if char_n > 0:
            textbutton "Prev" pos (826, 472) action Return(char_n - 1)

        if char_n < len(characters) - 1:
            textbutton "Next" pos (1727, 472) action Return(char_n + 1)

        textbutton "OK" pos (1242, 783) action Return(True)

    bar:
        range 20
        value DictValue(characters[char_n], "points", 10, style='bar')
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55

label char_list:
    $ _return = 0
label char_list_call:
    call screen char_list(_return)
    if type(_return) is bool:
        # "Back" button was pressed
        return
    # "Previous" or "Next" button was pressed:
    jump char_list_call

label start:
    "Start now:"
label loop:
    call char_list
    "Again:"
    jump loop
Unpack this attachment and run it with Ren'Py 8 SDK to check how it works with images & text:
Attachments
screens-prev-next.zip
(419.27 KiB) Downloaded 4 times

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#6 Post by Rhapsy »

jeffster wrote: Thu Mar 07, 2024 1:34 pm In general, it's not advisable to bake everything in the images, because it's harder to edit them in case you want to change something.
Using simple "text" and "button" is easy and convenient, don't avoid to use them just because they require some learning.

And alright, the main purpose of my example is to show how to use data structures and combine them with screens with parameters.
If you understand that, you can use those approaches with your own creativity.
Wow. There are many new commands and I'm barely understanding how to call a screen.
I have copied it the same with some changes, such as the name of the images, and it does not start the game due to errors.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#7 Post by jeffster »

Rhapsy wrote: Thu Mar 07, 2024 3:32 pm
jeffster wrote: Thu Mar 07, 2024 1:34 pm In general, it's not advisable to bake everything in the images, because it's harder to edit them in case you want to change something.
Using simple "text" and "button" is easy and convenient, don't avoid to use them just because they require some learning.

And alright, the main purpose of my example is to show how to use data structures and combine them with screens with parameters.
If you understand that, you can use those approaches with your own creativity.
Wow. There are many new commands and I'm barely understanding how to call a screen.
I have copied it the same with some changes, such as the name of the images, and it does not start the game due to errors.
If you unpack the file, there's "game" folder. You run renpy 8 sdk
* with that folder as a command-line parameter,
* or from started Ren'Py Launcher you select the folder that contains that "game" folder.

Note that it's a script for Ren'Py 8. If you use Ren'Py 7, that wouldn't work, because Ren'Py 7 is using older Python (Python 2), that doesn't have f-strings syntax. You can make the script work with Ren'Py 7, but you would have to change the syntax a bit.

If there's really some error in my script, could you maybe post what the traceback says? Like "line XXX, exception BlahBlahBlah"?

PS. You can find the error message not only on screen, but in "traceback.txt" file. You can send it to me in a message, and/or edit it to remove "sensitive" information like your folders path structure or home user name, if there is mentioned any.

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#8 Post by Rhapsy »

jeffster wrote: Thu Mar 07, 2024 2:11 pm
Rhapsy wrote: Thu Mar 07, 2024 11:59 am The only thing I added from that engine was a bar that would serve as the affinity level.
Hey, I tested my code and found a few errors:
* I forgot to put "$" before "_return = 0"
* Return(None) actually returns True
* bar value needs a different syntax:
https://www.renpy.org/dev-doc/html/scre ... #barvalues
* PS: "default characters", not "define characters". Otherwise Ren'Py doesn't save changed data like "points"...

With corrections:

Code: Select all

define ID = 0

default characters = [
    {ID: "cat", "name": "Kitty", "desc": "Kitty is an independent and quiet girl.", "points": 0},
    {ID: "dog", "name": "Doggy", "desc": "Doggy is a brave and curious boy.", "points": 0},
    {ID: "owl", "name": "Owl", "desc": "Owl is a retired professor, an avid knitter.", "points": 0},
    {ID: "man", "name": "The Man", "desc": 'As The Man likes to say, "Oh boy!"', "points": 0},
    ]

screen char_list(char_n=0):
    $ char = characters[char_n]

    frame:
        background None
        xfill True
        yfill True

        vbox:
            pos (1100, 80)
            xysize (800, 380)
            text f'Name: {char["name"]}'
            text f'{char["desc"]}'
            text f'Affinity: {char["points"]}'

        add f"screens/{char[ID]}.png" pos (1280, 472)

        if char_n > 0:
            textbutton "Prev" pos (826, 472) action Return(char_n - 1)

        if char_n < len(characters) - 1:
            textbutton "Next" pos (1727, 472) action Return(char_n + 1)

        textbutton "OK" pos (1242, 783) action Return(True)

    bar:
        range 20
        value DictValue(characters[char_n], "points", 10, style='bar')
        #thumb
        xysize (600,100)
        xalign 0.784
        yalign 0.55

label char_list:
    $ _return = 0
label char_list_call:
    call screen char_list(_return)
    if type(_return) is bool:
        # "Back" button was pressed
        return
    # "Previous" or "Next" button was pressed:
    jump char_list_call

label start:
    "Start now:"
label loop:
    call char_list
    "Again:"
    jump loop
Unpack this attachment and run it with Ren'Py 8 SDK to check how it works with images & text:
Edited:
It works, I had not seen this message, it seems that for now everything is fine. (But how do I configure the initial affinity of the characters? I changed the variables but they all still show 0 points) FIXED RESTARTING THE GAME/ NO Shift+R
Problem with the affinity bars, they are modified by dragging as if they were volume bars in the game.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#9 Post by jeffster »

Rhapsy wrote: Thu Mar 07, 2024 4:27 pm ...
Problem with the affinity bars, they are modified by dragging as if they were volume bars in the game.
You set "points": <some value> instead of 0 in the list "characters".

If you want bars to be not modifiable by dragging, then maybe use StaticValue():
https://renpy.org/doc/html/screen_actio ... taticValue

Code: Select all

    bar value StaticValue(characters[char_n]["points"], max_value)
where "max_value" (range) can be set as variable or number.

Example:

Code: Select all

    bar:
        value StaticValue(characters[char_n]["points"], 20)
        xysize (600,100)
        xalign 0.784
        yalign 0.55

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#10 Post by Rhapsy »

jeffster wrote: Thu Mar 07, 2024 5:43 pm
Rhapsy wrote: Thu Mar 07, 2024 4:27 pm ...
Problem with the affinity bars, they are modified by dragging as if they were volume bars in the game.
You set "points": <some value> instead of 0 in the list "characters".

If you want bars to be not modifiable by dragging, then maybe use StaticValue():
https://renpy.org/doc/html/screen_actio ... taticValue

Code: Select all

    bar value StaticValue(characters[char_n]["points"], max_value)
where "max_value" (range) can be set as variable or number.

Example:

Code: Select all

    bar:
        value StaticValue(characters[char_n]["points"], 20)
        xysize (600,100)
        xalign 0.784
        yalign 0.55
NIce. Then I would just need to create buttons.png and buttons_hover.png to replace the text buttons now.
And if I want to add more character to the list, do I just add a command here or do I have to modify something else?

Example:

Code: Select all

define characters = [
    {ID: "cat", "name": "Kitty", "desc": "Kitty is an independent and quiet girl.", "points": 0},
    {ID: "dog", "name": "Doggy", "desc": "Doggy is a brave and curious boy.", "points": 0},
    {ID: "owl", "name": "Owl", "desc": "Owl is a retired professor, an avid knitter.", "points": 0},
    {ID: "man", "name": "The Man", "desc": 'As The Man likes to say, "Oh boy!"', "points": 0},
    {ID: "newchar", "name": "Newchar", "desc": "New char desc", "points": 0},
    ]

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#11 Post by jeffster »

Correct. Something like

Code: Select all

    button:
        auto "right_%s.png"
would use "right_idle.png" and "right_hover.png" as button background (normal and hover).

define characters = [ {}, {}, ...] means it's a list (because the brackets in its definition are square), and it's a list of dictionaries (curly brackets and "key: value" pairs inside). There are good tutorials and docs on
https://docs.python.org/
and
https://realpython.com

E.g. about lists etc.
https://docs.python.org/3/tutorial/intr ... html#lists

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#12 Post by Rhapsy »

jeffster wrote: Thu Mar 07, 2024 6:28 pm Correct. Something like

Code: Select all

    button:
        auto "right_%s.png"
would use "right_idle.png" and "right_hover.png" as button background (normal and hover).

define characters = [ {}, {}, ...] means it's a list (because the brackets in its definition are square), and it's a list of dictionaries (curly brackets and "key: value" pairs inside). There are good tutorials and docs on
https://docs.python.org/
and
https://realpython.com

E.g. about lists etc.
https://docs.python.org/3/tutorial/intr ... html#lists
Ok, I could consider this resolved. Thank you.
This may already be outside of this post, I will open another one if necessary and if I don't find a post or guide that has already resolved my following questions.

1_What commands should I execute to unlock pages of new characters in the game?
Example. The command is already written in the Script, but I want it to remain blocked or invisible in the game until the protagonist meets that character.

2_If the protagonist of the game reaches maximum affinity with a character and I would like to add a special event when that happens.
What commands should I write here?

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Help with a character list screen

#13 Post by jeffster »

Rhapsy wrote: Thu Mar 07, 2024 6:51 pm 1_What commands should I execute to unlock pages of new characters in the game?
Example. The command is already written in the Script, but I want it to remain blocked or invisible in the game until the protagonist meets that character.
One way is to add more characters at some point in the script. To add an element to a list, usually do my_list.append(new_element). E.g.:

Code: Select all

    eel "Hello! My name is Eel."
    $ characters.append({ID: "eel", "name": "Eel", "desc": "Some guy with long hair.", "points": 4})
Another way is to add some parameter to characters, like "hidden" or "show", and filter the list by that parameter when showing screens etc.:

Code: Select all

define characters = [
    {ID: "cat", "name": "Kitty", "desc": "...", "points": 2, "show": True},
    {ID: "dog", "name": "Doggy", "desc": "...", "points": 6, "show": False},
    ]
Here "cat" has "show" == True to show it since the start. And "dog" would be hidden until you set its "show" to True:

Code: Select all

    dog "Hello! I'm the famous Doggy!"
    $ characters[1]["show"] = True
From that moment "dog" character would be shown.

Note:
You see here "dog" character is referred to as characters[1], because 1 is its index in the list. I.e. it's second, right after "cat".
It's easy to address a list element like that, but it's not very convenient to remember maybe dozens of indexes for characters. And if you happen to add or delete one from the middle, the rest of the indexes change, and it can become a nightmare to maintain such code.
Therefore it would be better if you could use something like char["dog"] instead. Hence you can make "characters" a dictionary instead of a list. Then elements would be addressed by "key" instead of "index".
But to show screens "previous" and "next", a list with simple indexes is more convenient.
As the best solution, you can either
(1) Use a dictionary and get a list (converted from dictionary) when needed.
(2) Or use a function to access a list element containing proper ID. For example:

Code: Select all

init python:
   def char(char_id):
       for n in range(0, len(characters)):
           if characters[n][ID] == char_id:
               return characters[n]
Then instead of $ characters[1]["show"] = True you could write

Code: Select all

    $ char("dog")["show"] = True
Note first the parentheses there, not square brackets.

Now to filter list elements with certain fields ("show" True or False), we can either
(1) change our code by adding checks and skipping hidden elements; But that's a bit complex.
(2) Or when we need filtered "characters", we use another list, a filtered one.
E.g. we can create such list before showing characters' screens. (Or when we change a character's visibility).

Code: Select all

label char_list:
    $ _return = 0

    # Create the filtered list, using so called list comprehension:
    $ ch = [x for x in characters if x["show"]]

    # And in the screen, use list "ch" instead of "characters"
It seems that it's easier to add new characters dynamically (1st approach here), but if there are different branches and different conditions to start showing characters, the 2nd approach (with "show" parameter) might be more reliable (bug-resilient). I think.
2_If the protagonist of the game reaches maximum affinity with a character and I would like to add a special event when that happens.
What commands should I write here?
Yeah, it's a question that might deserve a separate topic.
I mean, if you don't know at which exactly point in your story this would happen, and want to put some effect there, it's one thing.

But if you just want to show the character screen differently when "points" are maxed, use "if" or maybe "showif":
https://renpy.org/doc/html/screens.html#if
https://renpy.org/doc/html/screens.html ... -statement

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#14 Post by Rhapsy »

Yeah, it's a question that might deserve a separate topic.
I mean, if you don't know at which exactly point in your story this would happen, and want to put some effect there, it's one thing.

But if you just want to show the character screen differently when "points" are maxed, use "if" or maybe "showif":
https://renpy.org/doc/html/screens.html#if
https://renpy.org/doc/html/screens.html ... -statement
Ok and thanks again.

Rhapsy
Newbie
Posts: 20
Joined: Fri Mar 01, 2024 3:45 pm
itch: Rhapsy
Contact:

Re: Help with a character list screen

#15 Post by Rhapsy »

Oh wait
What commands should I execute if under any circumstances I wanted the description text of one of the characters to change or be updated on the list screen at some point in the game's progress?
Example:
old desc: Maria is 18 years old.
new desc: Maria is 19 years old now. (Replacing the old desc)

Post Reply

Who is online

Users browsing this forum: Houseofmine, Lacha