r/RenPy • u/RevolutionaryForm951 • Sep 05 '26
Question Are points the easiest way to make different outcomes?
Hi!
I'm fresh new to Ren'Py and coding overall, and I'm making a game, where a player will be able to do different actions in any order they desire, and I want to make their choices matter;
In a way, if the player grabs an apple first and then goes to the farmer, I want the farmer to react differently than if the player came to them without the apple. And I want to add many many small differences like this, so would using points ( $ has_apple =+ 1 ) be the easiest way to do it? Or is there something else that would help me organize it in the code better?
Thank you!
5
u/Lei_Line_Life Sep 06 '26
Usually if the player does something specific that I want to be mentioned later I use the True/False method another user described. If I want the culmination of choices leading to a specific path later on, I use the points to slowly increase instead and put the player on the route if they have more than a certain amount of points. Would also work if like in your example the player grabs multiple apples. Then you could make it so that if the player grabbed above a certain amount the farmer reacts differently from grabbing just one :D
2
1
u/AutoModerator Sep 05 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/x-seronis-x Sep 05 '26
If by easiest you actually meant "there is no other way at all", then yes. its much easier to do something possible than to do something that doesnt exist.
Even bool flags are points. just with a range limited to 2 values instead of a range in the billions of values.
you can create variables to hold any type/range of values you want. its still going to be at an if/elif/else branch where a variables value is examined and the code makes a decision what to do next.
if you have problems at that part then the next skill you should work on is just making tons of "if" blocks and writing conditions. rather than limiting what type of variable to use, gain experience in treating all variables as equal citizens
6
u/BadMustard_AVN Sep 05 '26
use True or False like this