Ren'Py Question about indirect consequenzes

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
This is a little complicated.

I like to find out, if and indirect consequence, where the player chose an option, gets perhaps irritated.

So, the way i have it designed so far is very simple.
Option a yes/no
Option b yes/no

But i was thinking if i add behind the scene so to speak points that are a consequence of players choice.
For that i have to check every time there is a choice if conditions are met.
Though i realize that it is out of the hand of the user.

Example.

Code:
menu:

    "I will help him. Though i am not sure how.":
        $ love = True
        jump choice_base01

    "I need to think of myself!":
        $ love = False
        $ nolove +=1
        jump choice_base01

label choice_base01:

    label flags:

        if love:
                scene
                show psychiatrist08a_nvidia
                with dissolve
                e "I will help but i need your support."

        else:
            scene
            show psychiatrist08b_nvidia
            with dissolve
            e "I can't do this anymore. Please try to understand."
For this, i want to have the MC answer based on conditions. But, should the player determine what the answer should be?

My knowledge is of course limited so that will be already a challenge but what i am seeking is, if this is a good mechanic or a bad one.
So this example just checks what you have selected. In addition i add a point to nolove because the player selected the other option.
This is what the player doesn't know.
At one point the value could be in favor of nolove vs. love which will determine how the story will unfold down the line.
So i would love to have the player select, i love you so i do that, but if he/she answer previously differently, the choice the player made will be taken away and he/she will act in another way.
This coding reminds me so much of basic in the old days.
Anyway, i'll appreciate the input.
p.s. i realize there is more coding for this needed.
I hope i really explained right.
 

TDoddery

Member
Apr 28, 2020
170
160
I don't think you need special tricks for this kind of thing - just code it how you want it to work.
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,040
3,136
if the consequences are hit before the menu choice shows up you can have something this

Python:
menu:

    "I will help him. Though i am not sure how.":
        $ love = True
        jump choice_base01

    "I need to think of myself!":
        $ love = False
        $ nolove +=1
        jump choice_base01
        
    "I will go to my sister for help instead." if love_sis >= 65: #this only show up when it hits/above 65
        $ love = True
        jump choice_base01

that's if I read your post right
 
  • Like
Reactions: coffeeaddicted

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,189
3,053
Personally I greatly prefer that the consequences are visible when asking the question. For example:

"Sure I'll help you!\n\nSister love +1"

Not sure if that was the question though so I'll throw in an opinion too: The code becomes more readable if you separate it into more labels. For the above scenario I'd do
call choice_base01_yes (or jump if your game is based around jumps)
call choice_base01_no

label choice_base01_yes:
all the stuff for yes in here.

There will also be less indentations this way.

Cheers
 
  • Like
Reactions: coffeeaddicted

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,318
15,208
For this, i want to have the MC answer based on conditions. But, should the player determine what the answer should be?
Well, it depend if the answer is the condition or not.

Python:
label whatever:
    # The answer is the condition
    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friend":
            $ love = False
            mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."
            [...]

        "Tomorrow is good for you ?":
            $ love = True
            mc "Of course I want to. I'm free tomorrow, and you ?"
            [...]

    [...]

label nextDayMorning:

    [...]
    mc "Hi [girlName], how are you doing ?"
    girl "Fine, and you ?"

    # The answer is not the condition
    if love is True:
        girl "You haven't forgot about our date, right ?"
        menu:
            "Invite her to watch a movie.":
                mc "Of course not, there's this movie everyone talk about, we can watch it ?"
                [...]
                jump movie
            "Invite her to share a coffee.":
                mc "Of course not. Have you heard about this coffee shop that just opened ?"
                [...]
                jump coffeeshop

    # Implicit /else/
    mc "Yeah, me too. What are you doing ?"
    girl "I'm going to see a movie with my best friend."
    mc "Oh well, good movie."
    girl "Thanks."
    jump nextDayNoon
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
if the consequences are hit before the menu choice shows up you can have something this

Python:
menu:

    "I will help him. Though i am not sure how.":
        $ love = True
        jump choice_base01

    "I need to think of myself!":
        $ love = False
        $ nolove +=1
        jump choice_base01
       
    "I will go to my sister for help instead." if love_sis >= 65: #this only show up when it hits/above 65
        $ love = True
        jump choice_base01

that's if I read your post right
Yes, i am aiming for meaningful choices.
And this looks what i am looking for. If some value isn't met yet, it won't be shown.
I think the challenge for me is to set enough points so players could in theory make the choice or not.
Thanks for that suggestion.
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
Personally I greatly prefer that the consequences are visible when asking the question. For example:

"Sure I'll help you!\n\nSister love +1"

Not sure if that was the question though so I'll throw in an opinion too: The code becomes more readable if you separate it into more labels. For the above scenario I'd do
call choice_base01_yes (or jump if your game is based around jumps)
call choice_base01_no

label choice_base01_yes:
all the stuff for yes in here.

There will also be less indentations this way.

Cheers
This is something i actually struggle with.
I am not sure if a player should know. But it does make sense as it will highlight what you get.
I will take that to heart.

Thank you so much
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
Well, it depend if the answer is the condition or not.

Python:
label whatever:
    # The answer is the condition
    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friend":
            $ love = False
            mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."
            [...]

        "Tomorrow is good for you ?":
            $ love = True
            mc "Of course I want to. I'm free tomorrow, and you ?"
            [...]

    [...]

label nextDayMorning:

    [...]
    mc "Hi [girlName], how are you doing ?"
    girl "Fine, and you ?"

    # The answer is not the condition
    if love is True:
        girl "You haven't forgot about our date, right ?"
        menu:
            "Invite her to watch a movie.":
                mc "Of course not, there's this movie everyone talk about, we can watch it ?"
                [...]
                jump movie
            "Invite her to share a coffee.":
                mc "Of course not. Have you heard about this coffee shop that just opened ?"
                [...]
                jump coffeeshop

    # Implicit /else/
    mc "Yeah, me too. What are you doing ?"
    girl "I'm going to see a movie with my best friend."
    mc "Oh well, good movie."
    girl "Thanks."
    jump nextDayNoon
This seems interesting as well.

I think i want the player to be invested in what will happen.
Though the game will focus on the relationship, there will be another path, let's call it the lewd path available.
But i am very interested in portraying the difficulty in a relationship with emotions and everything. So the choices should reflect that. At the same time if the player made some choices before, they should matter and play a role in the outcome that is presented to him now.
I realize that my knowledge is tiny but i am not giving up. So i will study this further.
Thank you so much for sharing. :)
 

The Rogue Trader

Active Member
Sep 12, 2021
510
746
In my (very) humble opinion, that's definitely a good mechanics and I encourage you to experiment with it.

If you are worried about the players losing agency over the story because of their previous choices, there is, of course, the good old trick of giving thema way to know how they're going.
Like a menu (the cell phone is a popular device to break the fourth wall this way) where the player can check his progression "Anne: 10 love; Bea 5 love; Cindy 0 love".

Choices based on conditions are tricky for the reason you mention: you must keep track of all the points you're giving away so that you know what's a reasonable score in that stat at that point in the game. In my experience it can get a mess very quickly.
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
In my (very) humble opinion, that's definitely a good mechanics and I encourage you to experiment with it.

If you are worried about the players losing agency over the story because of their previous choices, there is, of course, the good old trick of giving thema way to know how they're going.
Like a menu (the cell phone is a popular device to break the fourth wall this way) where the player can check his progression "Anne: 10 love; Bea 5 love; Cindy 0 love".

Choices based on conditions are tricky for the reason you mention: you must keep track of all the points you're giving away so that you know what's a reasonable score in that stat at that point in the game. In my experience it can get a mess very quickly.
Yes, this is the problem, isn't it.

I want to get the player emotionally invested. After all it's a sad story and the player should feel for the protagonist. Even the player decides to go the naughty route.

So i troubled myself with the question. Do you need to show the player any score? Why do i need to do that?

But i know there are a lot of people that like to know where the journey goes and checking a score is something people can hold onto. Though even if you know the score you don't know what will happen if you reach certain points.

Yes, the phone thingy. I seen it in a couple of games. It's alright i think. I always had problems to actually open the phone and then look.
What i want to avoid is that it is painted over the screen. The screen should be clean and the story should be paramount.

I do like consequences. Because every action you do, should have one. You can't have naughty if you did not anything to be naughty. Or being in love, without working hard to being loved.

At the moment it's very basic but i hope i can overcome my tiny knowledge problem by studying more. In the beginning i thought, oh wow... all these syntax's, ey scary.
It looks now less scary but there are so many things i just don't know. Though this should be getting easier over time.

Another mechanic i found great was advancing by completing tasks. I think there aren't many games that use it. But if implemented well, it works quite well indeed. You feel you accomplished something and get a candy after.

Anyhow, i will explore the phone thingy.
Thank you so much
 

The Rogue Trader

Active Member
Sep 12, 2021
510
746
I want to get the player emotionally invested. After all it's a sad story and the player should feel for the protagonist. Even the player decides to go the naughty route.

So i troubled myself with the question. Do you need to show the player any score? Why do i need to do that?

But i know there are a lot of people that like to know where the journey goes and checking a score is something people can hold onto. Though even if you know the score you don't know what will happen if you reach certain points.
Well, I'll be honest here: generally speaking, I'm not sure the players that want to control the scores are the same kind of players that feel emotionally invested in the story.

Anyway, I think I understand you: you want the player to make choices because he feels that's the right way to act (I call it "roleplaying"), not because he knows he will get a +1 here or there, isn't it?
But that's very difficult: one of the problems is that what the player thinks is the right way to act could be different from what you think.
The clusmy nerdy girl is bullied at school. You set up that the MC can advance on her route by punching the bully so that he'll leave her alone.
Then I play the game and, being nonviolent, refuse to trash the asshole, even if it's "just pixels". So my fav girl is locked behind a choice I don't want to make. That's a sure recipe for a very pissed player.
So you implement a points system: to have the sexy scene with the nerdy girl I need to collect 10 relationship points. Decking the bully only gets 1 point (or 2 or 3) and now I can work my way to her... heart... without renouncing my creed.
Problems:
- you now have to write (and render) the scene where the MC buys her chocolates, the scene where they study together for the hardest test, the scene where they play the new videogame, the scene they look together for a rare book and other 5-6 scenes until you run out of time, energies and ideas.
- players will cry that your game is grindy.

It's a hard trade.

Yes, the phone thingy. I seen it in a couple of games. It's alright i think. I always had problems to actually open the phone and then look.
What i want to avoid is that it is painted over the screen. The screen should be clean and the story should be paramount.
Well, you can make it accessible only in some locations.
In my old pet project (now permanently on hold) the player could check the scores by looking at a cheesy horoscope site with the MC's laptop, that was only in his room (originally I didn't want to give him a smartphone).
A more meaningful example is Photo Hunt, a AAA game where the phone is "painted over the screen" but only at home, where you can advance to the next day.

If you think that giving hard numbers feels ugly (or is giving away too much), you can put some other scale like "bad, good, excellent" or *, **, *** etc.

I do like consequences. Because every action you do, should have one. You can't have naughty if you did not anything to be naughty. Or being in love, without working hard to being loved.
That's definitely the right mindset to make memorable games.
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
Well, I'll be honest here: generally speaking, I'm not sure the players that want to control the scores are the same kind of players that feel emotionally invested in the story.

Anyway, I think I understand you: you want the player to make choices because he feels that's the right way to act (I call it "roleplaying"), not because he knows he will get a +1 here or there, isn't it?
But that's very difficult: one of the problems is that what the player thinks is the right way to act could be different from what you think.
The clusmy nerdy girl is bullied at school. You set up that the MC can advance on her route by punching the bully so that he'll leave her alone.
Then I play the game and, being nonviolent, refuse to trash the asshole, even if it's "just pixels". So my fav girl is locked behind a choice I don't want to make. That's a sure recipe for a very pissed player.
So you implement a points system: to have the sexy scene with the nerdy girl I need to collect 10 relationship points. Decking the bully only gets 1 point (or 2 or 3) and now I can work my way to her... heart... without renouncing my creed.
Problems:
- you now have to write (and render) the scene where the MC buys her chocolates, the scene where they study together for the hardest test, the scene where they play the new videogame, the scene they look together for a rare book and other 5-6 scenes until you run out of time, energies and ideas.
- players will cry that your game is grindy.

It's a hard trade.
I see the problem you are getting at.
Tricky.
What i would see as fair, the player would blame the dev for a shitty game.

Now i could offer two choice. a) violent and b) non-violent or c) do nothing.
That way, the player does have a choice he can chose if he isn't a violent person. Some people just try any choice just to see what happens and rewind with history.

I mean in the end that is what choices are. In life you take a choice. You can't go back and fix it. What's done is done.
In games you can make it so, that you can fix it. But in some circumstances you shouldn't be able to.
Otherwise the story would be strange.

I have to think about it. But i think instead of a and b, the 3 way choice seems fairer.

The more i think about it, more questions arise.
But the basic is set. The suggestion from Nicke seem actually great. I think i seen it in some rpg's.
That way, the player can make up his mind right there.

I am not sure if i really want to put some scoring board in the game. Not that i am lazy but i think the purpose of the game should be about the choices you make. (though i might)



Well, you can make it accessible only in some locations.
In my old pet project (now permanently on hold) the player could check the scores by looking at a cheesy horoscope site with the MC's laptop, that was only in his room (originally I didn't want to give him a smartphone).
A more meaningful example is Photo Hunt, a AAA game where the phone is "painted over the screen" but only at home, where you can advance to the next day.

If you think that giving hard numbers feels ugly (or is giving away too much), you can put some other scale like "bad, good, excellent" or *, **, *** etc.


That's definitely the right mindset to make memorable games.

I think i got an idea. Why no use a horoscope as scoring card. This would be great. Without directly telling you, this what you got, you get rated by "there is love in your cards". Very opaque. I think i like that.
I have to look into that. It's pretty early stage so there is room to make things. That is actually the one thing i fear. Releasing a game and realizing later that you wanted to add this and that.

Thanks for the input. So much to think about. :)
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,189
3,053
The more i think about it, more questions arise.
But the basic is set. The suggestion from Nicke seem actually great. I think i seen it in some rpg's.
That way, the player can make up his mind right there.
I'll throw another thought your way then. Remember that's all they are, thoughts and opinions. You decide what you think is best for your game and then, ultimately, your players decide if you've made good choices or not :)

When you do choices with requirements, as you have an example of above (ending the menu choice with "if variable > 65:" for example). Rather than hiding options you can't chose, grey them out. That way players know there were options they couldn't pick, and if you also display the requirement, they'll know why.

To me it looks very odd in a game when you get a menu but only have one choice. Plus I like to know what I'm missing out on and why.
 
  • Like
Reactions: coffeeaddicted

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,578
2,210
One way of balancing the need for subtlety against being obvious is to leave the choice up to the player. This is after all what a number of mod writers do to existing games.

Python:
default cheat_mode = False
default love = False

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends {color='#00ffcc'}{i}(Friends){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_no

        "Let's stay friends" if cheat_mode == False:
            jump act1_date_invite_no

        "Tomorrow is good for you ? {color='#00ffcc'}{i}(Lovers){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_yes

        "Tomorrow is good for you ?" if cheat_mode == False:
            jump act1_date_invite_yes


label act1_date_invite_no:

    $ love = False
    mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

    jump act1_date_invite_continue


label act1_date_invite_yes:

    $ love = True
    mc "Of course I want to. I'm free tomorrow, and you ?"

    jump act1_date_invite_continue


label act1_date_invite_continue:

    # game continues...

Of course, the "cheat" variable could be controlled in the preferences menu instead. Or any other way you'd prefer.

I've used jump to reduce the amount of duplicated code.

An alternative could be something like:

Python:
default cheat_mode = False
default love = False

default hint_1 = ""
default hint_2 = ""
default hint_3 = ""
default hint_4 = ""
default hint_5 = ""

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    if cheat_mode:
        $ hint_1 = "{color='#00ffcc'}{i}(Friends){/i}{/color}"
        $ hint_2 = "{color='#00ffcc'}{i}(Lovers){/i}{/color}"
    else:
        $ hint_1 = ""
        $ hint_2 = ""

    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends [hint_1]":
            $ love = False
            mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

        "Tomorrow is good for you ? [hint_2]":
            $ love = True
            mc "Of course I want to. I'm free tomorrow, and you ?"

    # game continues...

Or some variation on these two themes.
I'm sure there's probably some improved way of dealing with this. Maybe a function to automatically add the color and italics or using custom tags to control the display of those hints (I'm thinking "Let's stay friends {hint}Friends{/hint}":) - where the {hint} tag controls whether the text within it is shown or not and how it is formatted). But that level of complexity is probably only worth investigating if it's a solution that appeals to you.
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
I'll throw another thought your way then. Remember that's all they are, thoughts and opinions. You decide what you think is best for your game and then, ultimately, your players decide if you've made good choices or not :)

When you do choices with requirements, as you have an example of above (ending the menu choice with "if variable > 65:" for example). Rather than hiding options you can't chose, grey them out. That way players know there were options they couldn't pick, and if you also display the requirement, they'll know why.

To me it looks very odd in a game when you get a menu but only have one choice. Plus I like to know what I'm missing out on and why.
Another great idea. Seriously.
The more i think about it, the more i think i should play with open cards with the player.

At the moment i am actually overwhelmed. This is a lot to think about it.
I really hope i can realize all that into an actual game.

A lot of games that i have played where clearly lewd in nature. They do had only one choice and indeed you ask yourself. Is this it?
No other option? Why is this there?
So your point is very valid and i think i will do it like that. It seems fair to the player.
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
One way of balancing the need for subtlety against being obvious is to leave the choice up to the player. This is after all what a number of mod writers do to existing games.

Python:
default cheat_mode = False
default love = False

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends {color='#00ffcc'}{i}(Friends){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_no

        "Let's stay friends" if cheat_mode == False:
            jump act1_date_invite_no

        "Tomorrow is good for you ? {color='#00ffcc'}{i}(Lovers){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_yes

        "Tomorrow is good for you ?" if cheat_mode == False:
            jump act1_date_invite_yes


label act1_date_invite_no:

    $ love = False
    mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

    jump act1_date_invite_continue


label act1_date_invite_yes:

    $ love = True
    mc "Of course I want to. I'm free tomorrow, and you ?"

    jump act1_date_invite_continue


label act1_date_invite_continue:

    # game continues...

Of course, the "cheat" variable could be controlled in the preferences menu instead. Or any other way you'd prefer.

I've used jump to reduce the amount of duplicated code.

An alternative could be something like:

Python:
default cheat_mode = False
default love = False

default hint_1 = ""
default hint_2 = ""
default hint_3 = ""
default hint_4 = ""
default hint_5 = ""

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    if cheat_mode:
        $ hint_1 = "{color='#00ffcc'}{i}(Friends){/i}{/color}"
        $ hint_2 = "{color='#00ffcc'}{i}(Lovers){/i}{/color}"
    else:
        $ hint_1 = ""
        $ hint_2 = ""

    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends [hint_1]":
            $ love = False
            mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

        "Tomorrow is good for you ? [hint_2]":
            $ love = True
            mc "Of course I want to. I'm free tomorrow, and you ?"

    # game continues...

Or some variation on these two themes.
I'm sure there's probably some improved way of dealing with this. Maybe a function to automatically add the color and italics or using custom tags to control the display of those hints (I'm thinking "Let's stay friends {hint}Friends{/hint}":) - where the {hint} tag controls whether the text within it is shown or not and how it is formatted). But that level of complexity is probably only worth investigating if it's a solution that appeals to you.
I never thought about that.
Making my own cheat code for my own game.
This is very interesting.

So in a sense i would inject this to every choice throughout the game to make it work.
Or outsource it to a separate cheat.rpy file which is probably better.

I started to have code files for each scene to not have one large file.
It makes it more simple.

So i will really think about this as this seems useful. Though in my mind i always thought why would someone want to cheat but then i remember that i cheated in games myself. dough.
In the end it seems a good idea to offer it to people that like to explore the game in a different way. Some want to go a specific route without getting into the game.

Thank you for sharing. I think i will have a lot of work on my hands. :)
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
I'll throw another thought your way then. Remember that's all they are, thoughts and opinions. You decide what you think is best for your game and then, ultimately, your players decide if you've made good choices or not :)

When you do choices with requirements, as you have an example of above (ending the menu choice with "if variable > 65:" for example). Rather than hiding options you can't chose, grey them out. That way players know there were options they couldn't pick, and if you also display the requirement, they'll know why.

To me it looks very odd in a game when you get a menu but only have one choice. Plus I like to know what I'm missing out on and why.
I have to investigate that grey out thing.
This is definitely a good idea. Thanks.

Here is how it will appear with + - shown.

You don't have permission to view the spoiler content. Log in or register now.
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
One way of balancing the need for subtlety against being obvious is to leave the choice up to the player. This is after all what a number of mod writers do to existing games.

Python:
default cheat_mode = False
default love = False

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends {color='#00ffcc'}{i}(Friends){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_no

        "Let's stay friends" if cheat_mode == False:
            jump act1_date_invite_no

        "Tomorrow is good for you ? {color='#00ffcc'}{i}(Lovers){/i}{/color}" if cheat_mode == True:
            jump act1_date_invite_yes

        "Tomorrow is good for you ?" if cheat_mode == False:
            jump act1_date_invite_yes


label act1_date_invite_no:

    $ love = False
    mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

    jump act1_date_invite_continue


label act1_date_invite_yes:

    $ love = True
    mc "Of course I want to. I'm free tomorrow, and you ?"

    jump act1_date_invite_continue


label act1_date_invite_continue:

    # game continues...

Of course, the "cheat" variable could be controlled in the preferences menu instead. Or any other way you'd prefer.

I've used jump to reduce the amount of duplicated code.

An alternative could be something like:

Python:
default cheat_mode = False
default love = False

default hint_1 = ""
default hint_2 = ""
default hint_3 = ""
default hint_4 = ""
default hint_5 = ""

define mc = Character("Bob")

label start:

    scene black with fade

    menu:
        "Enable Cheats {color='#00ffcc'}{i}(Hints will be shown when making choices){/i}{/color}"):
            $ cheat_mode = True

        "Disable Cheats":
            $ cheat_mode = False


    if cheat_mode:
        $ hint_1 = "{color='#00ffcc'}{i}(Friends){/i}{/color}"
        $ hint_2 = "{color='#00ffcc'}{i}(Lovers){/i}{/color}"
    else:
        $ hint_1 = ""
        $ hint_2 = ""

    menu:
        "Do you want to go to a date with me ?"

        "Let's stay friends [hint_1]":
            $ love = False
            mc "I like you, really. You're funny and amazing, but for me you're more like a sister than anything else."

        "Tomorrow is good for you ? [hint_2]":
            $ love = True
            mc "Of course I want to. I'm free tomorrow, and you ?"

    # game continues...

Or some variation on these two themes.
I'm sure there's probably some improved way of dealing with this. Maybe a function to automatically add the color and italics or using custom tags to control the display of those hints (I'm thinking "Let's stay friends {hint}Friends{/hint}":) - where the {hint} tag controls whether the text within it is shown or not and how it is formatted). But that level of complexity is probably only worth investigating if it's a solution that appeals to you.

This works pretty well.

Thanks for this tip.
I build it in and it looks pretty neat.

Here are some samples

p.s. don't mind the misspells :)

You don't have permission to view the spoiler content. Log in or register now.
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,432
Oh boy.

Somewhere i made a mistake i think as it seems that variable doesn't story any value.
Anytime i want to display how much you got, it stays at "1".

Essentially, i have this code run two times. There are the same so i show one.

Code:
script.rpy

default love = 0

someotherscript.rpy

label choice_intro:
    "Am i staying with my husband?"

menu:

    "I will. I still love him.\n\nlove +1 [hint_1]":
        $ love = +1
        jump choice_intro01

    "I have no love anymore.\n\nlove -1 [hint_2]":
        $ love = -1
        jump choice_intro01

label choice_intro01:

    if love is +1:

            scene
            show erica_explaining07_agree
            with dissolve

            e "I truly love my husband. How could i leave him?\n\nlove +1 [hint_1]"
            n "(you have now {color=#00ffcc}[love]{/color} love point(s)"
            jump finish_intro

    else:

            scene
            show erica_explaining07_deny
            with dissolve

            e "I.. i really don't know. This is all so hard on me.\n\nlove -1 [hint_2]"
            n "(you have now {color=#00ffcc}[love]{/love} love point(s))"
            jump finish_intro


label finish_intro:

    stop music fadeout 2.0
    $ renpy.pause (2.0)

    play music "audio/Eyeliner.mp3" fadein 2.0

#next question

label choice_intro1:
    "Am i pretty?"

menu:

    "You are pretty.\n\nlove +1 [hint_1]":
        $ love = +1
        jump choice_intro2

    "You don't really look pretty.\n\nlove -1 [hint_2]":
        $ love = -1
        jump choice_intro2

label choice_intro2:

    if love is +1:

            e "Thank you so much. You are such a charmer.\n\nlove +1 [hint_1]"
            n "(you have now {color=#00ffcc}[love]{/color} love point(s)"
            jump letsgo

    else:

            e "Aeh... thanks?\n\nlove -1 [hint_2]"
            n "(you have now {color=#00ffcc}[love]{/love} love point(s))"
            jump letsgo
everything else seems to work.
Question, answer, display of value, hint. It just doesn't seem to store the value from the previous answer. It should been 2 instead of 1.
I am sorry, but i think i may not see the obvious.
I just don't know why it doesn't store the value from the previous answer.
I start the game, play through the sequences, answer the questions, game shows me the value (1) and that is that.
Though if i understand it correctly, if i say in the code $ something = +1 it should add +1 to the value. So if the value already has 1 it should be 2 now. Or did i misunderstand that?
I also checked the dev console and the value stays at 1. :eek:

Btw. is it possible to have not shown negative values and instead just a simple 0 (zero)?
 
Last edited: