Calling other rpy files

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
nextgen
Newbie
Posts: 6
Joined: Sat Jan 13, 2018 7:28 pm
Projects: Forgotten Legacy
Organization: Gemini Productions
Contact:

Calling other rpy files

#1 Post by nextgen »

Friends i want to have stats for the npc's and want to keep the code out of the scripts.rpy. My question is probably very newbie as i am a newbie but if i add my code to a file called character_stats.rpy how would i call that file from the scripts.rpy to keep track of each players stats ? Also i want to offer a single display for each players stats as well.

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

Re: Calling other rpy files

#2 Post by Imperf3kt »

All files are treated as one large file when Ren'Py initialises, so just reference it like any other stat's in script.rpy
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

nextgen
Newbie
Posts: 6
Joined: Sat Jan 13, 2018 7:28 pm
Projects: Forgotten Legacy
Organization: Gemini Productions
Contact:

Re: Calling other rpy files

#3 Post by nextgen »

Thank you for the reply friend, i am from the web developing and design mindset and everything has t called. This information helps so much and i thank you.

Post Reply

Who is online

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