Reply to Kelari

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
User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Reply to Kelari

#1 Post by PyTom »

quote="Kelari"]
First of all, how do I make it so my stats box is always showing? It always seems to disappear on me.
[/quote]

I assume you have code to draw the stats box? In that case, you want to put that code into a python function, and put a reference to that function into config.overlay_functions.

Can I make someone say something random? Like:
"It's too bad I'm sick, I really wanted to go to the (Park, Mall, Arcade, etc...)
Yes. Use renpy.random.choice and string interpolation. For example:

Code: Select all

$ mood = renpy.random.choice([ 'happy', 'ashamed', 'honored' ])
gygax "I'm %(mood)s to meet you."
And how do I get a random event? Say I wanted Sue to pop up occasionally when I head to the park, and then a random of several different dialogues.
I've uploaded a new version of event_dispatcher.rpy to:

http://bishoujo.us/svn/dse/trunk/event_dispatcher.rpy

It lets you use event.random(0.25) to give an event that will only happen a quarter of the time. Please note that random and solo can conspire to give weird results.

If you have 2 random-solo events with a probability of 0.25, then the first in order has the 0.25 probabilty, but the second has only a a .1875 chance of going off. (0.75 * 0.25)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Kelari
Newbie
Posts: 17
Joined: Sun Aug 21, 2005 1:32 pm
Contact:

@.@

#2 Post by Kelari »

Wow, thanks so much PyTom for going to all that trouble for me!~

*Hands you a cookie*

For everything you've done :P :D
"Life in writing - it's always loquacious."

Kelari
Newbie
Posts: 17
Joined: Sun Aug 21, 2005 1:32 pm
Contact:

@.@

#3 Post by Kelari »

Wow, thanks so much PyTom for going to all that trouble for me!~

*Hands you a cookie*

For everything you've done :P :D
"Life in writing - it's always loquacious."

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#4 Post by PyTom »

Does this mean I get two cookies?

Random note to anyone who's listening... I'll be returning to NY tomorrow, so if you have Ren'Py support questions, ask soon or I may not be able to answer until I get my computer back up.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Kelari
Newbie
Posts: 17
Joined: Sun Aug 21, 2005 1:32 pm
Contact:

#5 Post by Kelari »

Sure hehe.

Didn't think I had double posted, sorry about that. Either way, two cookies for you :P!
"Life in writing - it's always loquacious."

Post Reply

Who is online

Users browsing this forum: Imperf3kt