Changing a word in the game after release with patching

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
darthvader1
Newbie
Posts: 2
Joined: Sat Nov 03, 2018 7:36 pm
Contact:

Changing a word in the game after release with patching

#1 Post by darthvader1 » Sat Nov 03, 2018 7:49 pm

Hello, is it possible change a word with patch on a released game. For example we have;
define e = Character("Emma")
label start:
scene xxx
e"Hello world."

And we release the game like this.
My question is can I patch it for Emma to say the word 'Goodbye' instead of everytime she says 'Hello' ?
What should I use when coding to make this feature available?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Changing a word in the game after release with patching

#2 Post by PyTom » Sun Nov 04, 2018 2:48 pm

Unless there's some reason to do it, why not just change the script? As long as you have the .rpyc files from the release version when you do so, Ren'Py should be able to figure out the change.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

darthvader1
Newbie
Posts: 2
Joined: Sat Nov 03, 2018 7:36 pm
Contact:

Re: Changing a word in the game after release with patching

#3 Post by darthvader1 » Sun Nov 04, 2018 4:55 pm

PyTom wrote:
Sun Nov 04, 2018 2:48 pm
Unless there's some reason to do it, why not just change the script? As long as you have the .rpyc files from the release version when you do so, Ren'Py should be able to figure out the change.
I need the patch for profanity words. For example in my game a character says "tarnation." I want to change the word "tarnation" into a curse word.
For the script solution you offered, it maybe my last resort but i don't want to give away the script to players as a patch, instead it would be better if there can be a patch applied for just a few words.

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

Re: Changing a word in the game after release with patching

#4 Post by Imperf3kt » Sun Nov 04, 2018 6:56 pm

For the addition of profanity, which I assume will be presented as an option in preferences, you only need to make the changes and send people the updated game (or use Ren'Py's updater)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

rames44
Veteran
Posts: 232
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Changing a word in the game after release with patching

#5 Post by rames44 » Mon Nov 05, 2018 1:17 pm

If you have control of the game source, then one way to do this would be to move “tarnation” (and any other word you want to replace) into “define”d variables and interpolate them into the text. You could then ship a patch file that uses an “init N python” (where N is a number large enough to force this to run after your “define”s) to redefine the values to your swear word.

rames44
Veteran
Posts: 232
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Changing a word in the game after release with patching

#6 Post by rames44 » Mon Nov 05, 2018 1:22 pm

You might also approach this with config.say_menu_text_filter if you can’t take the previous approach.

Post Reply

Who is online

Users browsing this forum: Google [Bot], span4ev