[Questions] Help me, please.

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.
Post Reply
Message
Author
Vexzox
Newbie
Posts: 7
Joined: Tue May 26, 2020 2:06 pm
Contact:

[Questions] Help me, please.

#1 Post by Vexzox »

Hi! i've been currently busy working on a dating visual on Ren'Py but i seem to be running into these problems. I have two questions :D My English isn't that great but please, do bear with me.

1. I have some menu choices when the player picks out the wrong one the game crashes intentionally. But the problem is i don't want the player to re-do the entire game when the game shuts down by itself, i was wondering how do you make the game re-open on that same spot of the scene when the game crashed? I use the code
$ renpy.quit()
but that just makes the game shut down and start from the beginning, i don't want that.

2. How do you make specific textboxes for each character? I already looked up the solution in the forums but i have a hard time understanding, a sample code would be nice :D

Thank you for reading!

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: [Questions] Help me, please.

#2 Post by namastaii »

I'd have the game save before you close the game on them if you want them to pick up where they left off (well, you'd place this before the wrong decision is made - not after) https://www.renpy.org/doc/html/save_loa ... renpy.save

For the textbox question, add a window_background to the character definition
https://www.renpy.org/doc/html/dialogue ... er-objects

Code: Select all

define e = Character("Eileen", image="eileen", window_background="yourtextbox.png")

Vexzox
Newbie
Posts: 7
Joined: Tue May 26, 2020 2:06 pm
Contact:

Re: [Questions] Help me, please.

#3 Post by Vexzox »

namastaii wrote: Tue May 26, 2020 4:27 pm I'd have the game save before you close the game on them if you want them to pick up where they left off (well, you'd place this before the wrong decision is made - not after) https://www.renpy.org/doc/html/save_loa ... renpy.save

For the textbox question, add a window_background to the character definition
https://www.renpy.org/doc/html/dialogue ... er-objects

Code: Select all

define e = Character("Eileen", image="eileen", window_background="yourtextbox.png")
Thank you for the custom textbox help!

But i still don't understand how to code the renpy.save thing, could someone please do a sample code when the player gets crashed out of the game intentionally and then gets automatically back to the same spot in the game like "Sorry, i didn't mean to crash you out of the game."? Sorry I'm noob on Ren'py so :(

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: [Questions] Help me, please.

#4 Post by Per K Grok »

Vexzox wrote: Tue May 26, 2020 2:31 pm ---

1. I have some menu choices when the player picks out the wrong one the game crashes intentionally. But the problem is i don't want the player to re-do the entire game when the game shuts down by itself, i was wondering how do you make the game re-open on that same spot of the scene when the game crashed? I use the code
$ renpy.quit()
but that just makes the game shut down and start from the beginning, i don't want that.

---
I don't think it is good idea to make the game 'crash' or appear to 'crash'.

I would rather make a screen with a message type; "That was a bad mistake. Game over." and have two buttons, one that says "Try again", that moves the player back to the point before the bad decision and one that says "Quit" that does exit the game.

I think this is a much better way to treat the player.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: [Questions] Help me, please.

#5 Post by Imperf3kt »

DDLC does this at one point and the effect is pretty good because the player is caught off guard when it happens, yet it's part of the narrative, so it's not necessarily abusing the player.

No example (on a mobile device, writing code is painfully hard) but you'd want to force save the game just before the game is supposed to "crash" and use the special label "before_main_menu" to either check if the save file exists or check for a variable you set before saving which would then load that save file.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]