I'm trying to create a pre-fitted image text box that changes based on what choices the player makes in the game. For example, let's say that the game involves the character making a series of choices surrounding if they will or will not serve The Ice God. If you have 1 ice_points there may be a few snowflakes stuck to and around the text box, but if you have 10 ice_points then it's covered in ice and snow and has created an icy boarder around the entire game window.
This wouldn't just be for one character, this would be for all narration and dialogue.
How would I go about doing this?
Text Box Change Based on Choices
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.
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.
Re: Text Box Change Based on Choices
I would make a class of buttons and a bunch of "if's" depending on the score that you are using to determine this, every button that i wanted to behave like this would inherit from that class. Now... don't ask me how to code that in renpy because i have no idea, renpy guides are pretty bad.
- AnnieTiamat
- Regular
- Posts: 53
- Joined: Tue Dec 01, 2015 3:24 pm
- Location: Seattle
- Contact:
Re: Text Box Change Based on Choices
You likely have a couple different options here, and you can mix and match for what seems best - here's a bunch of examples from people cooler than me!
ONE: swap out the background for choices with another image.
http://lemmasoft.renai.us/forums/viewto ... =51&t=9812
TWO: drop in images showing your level of "connection."
viewtopic.php?f=8&t=26705
THREE: build a custom setup within choice menus, so you can swap out the basic look of the options.
viewtopic.php?f=8&t=44780
Zherot is spot on - you're likely going to need a global variable that you declare like
then every time you're like "hey yeah, ice god, you rule" you get $ var_icegod += 1 or whatever.
This would require a basic check for how close you are in every dialogue, so effectively, all your dialogues will be 3x longer in script, although only one option will ever appear.
OR you could choose to run an IF script before you even get that menu choice so you don't have to code that 3 times, but personally I think having them in close juxtaposition is wise (and also easier for copy-paste)
Hope that helps - let me know if you need some code examples!
ONE: swap out the background for choices with another image.
http://lemmasoft.renai.us/forums/viewto ... =51&t=9812
TWO: drop in images showing your level of "connection."
viewtopic.php?f=8&t=26705
THREE: build a custom setup within choice menus, so you can swap out the basic look of the options.
viewtopic.php?f=8&t=44780
Zherot is spot on - you're likely going to need a global variable that you declare like
Code: Select all
init -1:
$ var_icegod = 0
This would require a basic check for how close you are in every dialogue, so effectively, all your dialogues will be 3x longer in script, although only one option will ever appear.
OR you could choose to run an IF script before you even get that menu choice so you don't have to code that 3 times, but personally I think having them in close juxtaposition is wise (and also easier for copy-paste)
Hope that helps - let me know if you need some code examples!
Who is online
Users browsing this forum: Google [Bot]