About a Patch or file that will replace words in the main script.rpy

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
staffofmagic
Newbie
Posts: 11
Joined: Fri Sep 20, 2019 3:07 pm
Contact:

About a Patch or file that will replace words in the main script.rpy

#1 Post by staffofmagic »

HI, I'm gong to be creating a Visual Novel but before I do I wanted to get some information about Patches if possible. The easiest way possible as I am a complete Noob at Renpy, just started using it a few weeks ago, so dont know much. I know a bit of HTML and CSS but not Python.

So I wanted to know if anyone can explain to me a simple way to create a patch file that when placed into the game folder would overwrite the dialog in the main script.rpy file, as that is where the main dialog will be.

For example lets say I wanted to change one of the characters in the games name to something different or maybe their relationship, but I want to do it in a way that still keeps the emotions going in script.

I was thinking that I could write to separate game files, but that would be double the work, so I would like to avoid that if possible.

any help is greatly appreciated. thanks so much

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#2 Post by isobellesophia »

Yes, you can seperate files like script.rpy and screens.rpy, just like how they work each other.

Actually seperating files can be a good way to do, since you were lazy at scrolling too mucu of your file, you can make one like.. datelove.rpy, and that is where your relationships codes will be putted there, just to make sure that you can create as much as you wanted.
I am a friendly user, please respect and have a good day.


Image

Image


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: About a Patch or file that will replace words in the main script.rpy

#3 Post by namastaii »

So what do you mean? Updates after the game is already published? Or are you talking about something like you want to change a character's name or something but not have it affect anything else in the script (wasn't sure what you meant by emotions going)

Well if it's the latter, you can ctrl + F in your editor (like atom) and find the character's current name and then on the second line type the changed name and you clicked "replace all" and it will overwrite all of them in the page. Takes two seconds.

staffofmagic
Newbie
Posts: 11
Joined: Fri Sep 20, 2019 3:07 pm
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#4 Post by staffofmagic »

Yea basically I'm looking for something that will update the game after it is published, because that would be the point of a patch, so that I can change something that needs fixing or updating. Also would be very useful if I made a spelling mistake in the game many times and I need to fix a word or something, so I initiate the patch and bingo.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#5 Post by hell_oh_world »

staffofmagic wrote: Sat Sep 21, 2019 2:38 am Yea basically I'm looking for something that will update the game after it is published, because that would be the point of a patch, so that I can change something that needs fixing or updating. Also would be very useful if I made a spelling mistake in the game many times and I need to fix a word or something, so I initiate the patch and bingo.
I think you're trying to make some sort of in**st patch or whatsoever, that's is based on my experience in playing rated 18 VNs. The best practice is to make the dialog dynamic as possible by using variables then amend it in the init block. I don't know if this seems relevant or what, but these might work, as I've seen this a lot in the scripts of the VNs that I played.

Code: Select all

default name = "brother"
label start:
	"Hello [name]!"
	
init:
	$ name = "sister" ## Once the game has started, the brother word will be replaced by sister. So dialogues will be different.
P.S. I haven't tested this, more of observations from other devs.

staffofmagic
Newbie
Posts: 11
Joined: Fri Sep 20, 2019 3:07 pm
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#6 Post by staffofmagic »

Ahh you got me. :) I just didnt want to say it outloud unless it was not acceptable on here. :P But yes you are correct. and thanks for the info. much appreciated. I'll test out your idea.

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: About a Patch or file that will replace words in the main script.rpy

#7 Post by namastaii »

Well whatever platform you have it on, you can update it just by updating the files. You can change variables quickly like hell_oh_world stated or if you're just adding to the game in general, you can upload your game through a server that supports updates and it'll simply update what you've added when you paste it in or git it in etc
for instance, if you're releasing on itch.io, you can manage your game through Butler and it'll detect changes in your game and sees them as an update.
viewtopic.php?f=51&t=45448 - tutorial on making a content patch (I found this which might be exactly what you're looking for)
https://www.renpy.org/doc/html/updater.html - Ren'Py web updater (if you were interested in looking at it)

staffofmagic
Newbie
Posts: 11
Joined: Fri Sep 20, 2019 3:07 pm
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#8 Post by staffofmagic »

thanks so much for the info. It is very much appreciated!!! I am very Green to all of this so it is very great to have help. Many thanks

Gopi
Newbie
Posts: 7
Joined: Thu May 14, 2020 10:56 pm
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#9 Post by Gopi »

Hello everyone I'm new to Ren'Py coding, I created patch which works good in windows version but when I converted into android version the patch doesn't recognise and going into default mode , can anyone help me

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: About a Patch or file that will replace words in the main script.rpy

#10 Post by gas »

Gopi wrote: Wed May 20, 2020 3:16 am Hello everyone I'm new to Ren'Py coding, I created patch which works good in windows version but when I converted into android version the patch doesn't recognise and going into default mode , can anyone help me
It would be of more help if you create a new post about, with more details.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

Post Reply

Who is online

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