Right now I'm making a game and I'd like there to be choices within the textbox:
Here's an example to illustrate this:
I've tried to do this using 2 ways of which none of them have fully worked.
1: Hyperlinks
The issue I had with hyperlinks is that once you've saved AFTER a choice (or 2 sets of hyperlinks).
If you were to go load the game where you previously saved, it would take you back to the hyperlinks.
EXAMPLE:
At point A there's a series of options.
If you were to save at point B and then LATER reload the game (that was saved at point B),
instead of taking you to point B (where you saved) it would take you to point A instead.
Even at point D which is after another set of choices (that being point C) it will still take you
back to point A.
If you were to go to the Tutorial where Eileen is explaining about text tags, if you were to save AFTER clicking the hyperlink (in the definition screen), if you were to reload the game it would take you back to the hyperlink.
I was wondering if there was anyway that when saving it wouldn't take you back to the hyperlink and you could just save regularly?
If that's just how hyperlinks work and there's not a clear way to fix it hopefully there could be a solution to the second problem.
2: Modifying choice screen with new code
In this forum viewtopic.php?t=23345 people discussed putting choices in the textbox(the same problem I have)!
Unfortunately after a solution was given in this thread I added the code, carried out all the instruction but WHEN SAVING this error appears:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00gamemenu.rpy", line 173, in script
$ ui.interact()
File "renpy/common/00gamemenu.rpy", line 173, in <module>
$ ui.interact()
File "renpy/common/00action_file.rpy", line 357, in __call__
renpy.save(fn, extra_info=save_name)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
I was hoping that anyone may have any solutions to this "choices in textbox" problem that also doesn't cause any issues in terms of SAVING the game
^^;
Choices in textbox, tried hyperlinks, elmiwisa code but there's issues with saving
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: Choices in textbox, tried hyperlinks, elmiwisa code but there's issues with saving
Change the APPEARANCE of the menu using the same window as the dialogue.
Is only a graphical thing...
If you want to keep both kind of menus, standard and dialogue.like, use a variable to show them differently. I can't post a code right now, but again is just a matter of arranging stuff, not change the standard menu.
Is only a graphical thing...
If you want to keep both kind of menus, standard and dialogue.like, use a variable to show them differently. I can't post a code right now, but again is just a matter of arranging stuff, not change the standard menu.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
10 ? "RENPY"
20 GOTO 10
RUN
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: Choices in textbox, tried hyperlinks, elmiwisa code but there's issues with saving
EDIT: Add this line:
You can try using the text tag {a} with jump:
I've tried this code and saving/loading seems to work OK:The normal {a} jump is creating a new context. See the doc:
Code: Select all
define config.hyperlink_protocol = "jump"
You can try using the text tag {a} with jump:
Code: Select all
"What was it like?\n{a=jump:comical}> Tell a comical retelling{/a}\n{a=jump:another}Tell it like it was and choose another subject{/a}"
Code: Select all
label start:
"Hey, I'm saying in start:\n> {a=jump:opt1}Option 1{/a}\n> {a=jump:opt2}Option2{/a}"
jump start
label opt1:
"Some text to say in opt1"
jump opt1_menu
label opt1_menu:
"Time to decide in OPT1:\n> {a=jump:opt3}Option 3{/a}\n> {a=jump:opt3}Option4{/a}"
jump opt1_menu
label opt2:
"Some text to say in opt2"
jump opt2_menu
label opt2_menu:
"Time to decide in OPT2:\n> {a=jump:opt5}Option 5{/a}\n> {a=jump:opt6}Option6{/a}"
jump opt2_menu
label opt3:
"Some text to say in opt3"
"THE END"
return
label opt4:
"Some text to say in opt4"
"THE END"
return
label opt5:
"Some text to say in opt5"
"THE END"
return
label opt6:
"Some text to say in opt6"
"THE END"
return
If there is no protocol section in the argument, config.hyperlink_protocol is prepended to it. If config.hyperlink_protocol has been set to "jump", {a=label} and {a=jump:label} become equivalent. Creators can define new protocols using config.hyperlink_handlers.
define config.hyperlink_protocol = "call_in_new_context"
The protocol that is used for hyperlinks that do not have a protocol assigned to them. See the a text tag for a description as to what the possible protocols mean.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
- Aracade
- Regular
- Posts: 34
- Joined: Thu Mar 30, 2017 11:04 am
- Completed: A Monster's Insight, LUNACY, Gulam
- Github: arkicade
- itch: arkicade
- Contact:
Re: Choices in textbox, tried hyperlinks, elmiwisa code but there's issues with saving
Thank you so much Xavimat! Saving and loading has been a-okay!I've tried this code and saving/loading seems to work OK:
The normal {a} jump is creating a new context. See the doc:
If there is no protocol section in the argument, config.hyperlink_protocol is prepended to it. If config.hyperlink_protocol has been set to "jump", {a=label} and {a=jump:label} become equivalent. Creators can define new protocols using config.hyperlink_handlers.
define config.hyperlink_protocol = "call_in_new_context"
The protocol that is used for hyperlinks that do not have a protocol assigned to them. See the a text tag for a description as to what the possible protocols mean.
And I don't see any problems with your code so far...
I also saw in the other thread the link to the new and updated text tags page which I will have a good read over. :)
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]