m_from_space wrote: ↑Thu Apr 18, 2024 3:07 pm
I still don't get what you mean by "patch". This word usually refers to some program update.
Not necessarily, some people call "translation patch" or "translation mod" for renpy games. You just create a file with the extension .rpy and write the code in it.
For example:
patch.rpy
Code: Select all
init python:
def replace_text(t):
t = t.replace("The original dialogue line of the game's character", "Translated dialogue line of the game's character")
t = t.replace("second dialogue line of the game's character", "Translated second dialogue line of the game's character")
t = t.replace("third dialogue line of the game's character", "Translated third dialogue line of the game's character")
#and so on
return t
config.say_menu_text_filter = replace_text
drop the patch/mod file into the game folder. And during the game, that line will be translated.
I want to try a different form of patch/mod, translate eng strings
Code: Select all
translate eng strings:
old "The original dialogue line of the game's character"
new "Translated dialogue line of the game's character"
old "second line of the game's character"
new "Translated second dialogue line of the game's character"
old "third line of the game's character"
new "Translated third dialogue line of the game's character"
#and so on
but I don't like that this uses two patch/mod lines to change one line of dialogue. And if there are, let's say, 2000 lines of dialogue in the game, then in this patch/mod, there will be 4000 lines.
I want to know if it's possible to make this patch/mod work something like this:
Code: Select all
translate eng strings:
#It's just an example, to give you an idea of what I want, don't look for accuracy in it
old "The original dialogue line of the game's character" new "Translated line of the game's character"
old "second dialogue line of the game's character" new "Translated second line of the game's character"
old "third dialogue line of the game's character" new "Translated third line of the game's character"
#and so on