XML/txt implementation and usage in Ren'py

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
Raviel
Newbie
Posts: 6
Joined: Tue Apr 12, 2016 4:40 am
Contact:

XML/txt implementation and usage in Ren'py

#1 Post by Raviel » Tue Apr 12, 2016 5:03 am

Hi, I'm trying to implement text through outside files such as .txt or .xml. However I can't find any helpful documentation except how to open and close the file.
For example, I'd like to dampen the usage of hard coded lines in Ren'py and instead use a .txt file. So I'd like to open the file tell it to present the line (mom "How was your day?") which could be the 5th line or something like that.

I might be dumb and just can't find the right documentation but that's why I'm here I guess, hehe.

I appreciate any help I can get!

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: XML/txt implementation and usage in Ren'py

#2 Post by xela » Tue Apr 12, 2016 6:01 am

Google python and xml for the xml module. How to open files is in renpy docs.
Like what we're doing? Support us at:
Image

Raviel
Newbie
Posts: 6
Joined: Tue Apr 12, 2016 4:40 am
Contact:

Re: XML/txt implementation and usage in Ren'py

#3 Post by Raviel » Fri Apr 15, 2016 5:07 am

Thanks, I got it working now!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Hojoo