FROM clauses

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
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

FROM clauses

#1 Post by Obscura »

Hello folks--

I have a few questions about 'from' clauses.

Let's say I added 'from clauses' to the last distribution of my game. For the next update, do I manually add them to new call statements? If so, where can I find more information about how they work? I don't quite understand the numbering system.

Or does Renpy manually add/update the existing 'from' clauses with each distribution?

Thanks in advance for any and all assistance!
Coming Out On Top - An Adult Gay Dating Sim
website

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:

Re: FROM clauses

#2 Post by PyTom »

Adding from clauses should have changed your game's files.

You should be able to use those files. Ren'Py will add from clauses to any new call, while leaving the existing ones alone. If you deleted a call statement, you should add a label with its from clause.

Basically, the code:

call foo from _call_foo_1

is equivalent to:

call foo
label _call_foo_1:
pass

And is used so the call can more easily find the place it is supposed to return to. When generating from clauses, Ren'Py will pick names that are unique - you shouldn't have to think about it much.
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

User avatar
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

Re: FROM clauses

#3 Post by Obscura »

Great! Thanks for the explanation!
Coming Out On Top - An Adult Gay Dating Sim
website

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]