How to edit/change text dialogue in a game

kidousenshi

Newbie
Feb 13, 2021
20
7
HI all,

I wanted to learn how to adjust the text or to add different dialogue. The creators uploaded 2 versions, one that is a mod and the other that is the original from their site.
I originally thought with the mod version I'd be able to go in and fine the text and open it, when I did and made the changes the game launches with an error.
Would anyone be able to help me out and figure out how I can customize the text/dialogue? Sorry, I'm new to this and not extremely text savvy. Thanks!


(Here is the link to the 2 versions of the game that the creators uploaded to check for yourself)
 

clowns234

Engaged Member
Game Developer
May 2, 2021
3,090
4,845
While it gets a bit trickier if there are translations involved, you should be able to go into any rpy file and modify the dialog, as long as the changes are done within the quotation marks. Changing the fonts is a bit trickier, but typically you would want to do that in the character set up:
As an example:
$ charX= Character("Bill", what_font = "FontsFree-Net-arial-bold.ttf", what_size = 40, what_color="#BE9CBC", color="C988CF", image = "charX")
image side charX = 'charX.jpg'
 
  • Like
Reactions: The Rogue Trader

kidousenshi

Newbie
Feb 13, 2021
20
7
While it gets a bit trickier if there are translations involved, you should be able to go into any rpy file and modify the dialog, as long as the changes are done within the quotation marks. Changing the fonts is a bit trickier, but typically you would want to do that in the character set up:
As an example:
$ charX= Character("Bill", what_font = "FontsFree-Net-arial-bold.ttf", what_size = 40, what_color="#BE9CBC", color="C988CF", image = "charX")
image side charX = 'charX.jpg'
Thanks for such a quick response! So I'll look for the rpy files and keep things within the quotes and see what happens this time around. Font, I'm not too concerned about right now, but thank you! I'm going to check this out in a little bit and I'll report back if there is an issue again!
 

kidousenshi

Newbie
Feb 13, 2021
20
7
I'll give a look, but what error do you receive?
What files did you edit?
Thanks for the reply! I don't remember off hand. Something along the line with the scrip I believe, not positive though. I'm going to check out the info from what Clowns234 wrote in a little bit and I'll get back to you with any info/errors that appear!
 

kidousenshi

Newbie
Feb 13, 2021
20
7
I'll give a look, but what error do you receive?
What files did you edit?

While it gets a bit trickier if there are translations involved, you should be able to go into any rpy file and modify the dialog, as long as the changes are done within the quotation marks. Changing the fonts is a bit trickier, but typically you would want to do that in the character set up:
As an example:
$ charX= Character("Bill", what_font = "FontsFree-Net-arial-bold.ttf", what_size = 40, what_color="#BE9CBC", color="C988CF", image = "charX")
image side charX = 'charX.jpg'
Damn. I'm getting the same error as before. I know I said I'm new to this but I did follow the instructions you provided.Maybe the text I edit is in a different file. This is the file I'm using, the ryp one, but maybe I'm not editing the right file. Maybe there is a main file or something where I can easily edit the diouloge all in one script and not all over the place. No idea, it's all new to me.
I took a screen shot of the error as the game boots up and also the files (rpy), that I was editing.
 
Last edited:

clowns234

Engaged Member
Game Developer
May 2, 2021
3,090
4,845
Damn. I'm getting the same error as before. I know I said I'm new to this but I did follow the instructions you provided.Maybe the text I edit is in a different file. This is the file I'm using, the ryp one, but maybe I'm not editing the right file. Maybe there is a main file or something where I can easily edit. No idea, it's all new to me.
I took a screen shot of the error as the game boots up and also the files (rpy), that I was editing.
Can you link the rpy file you are trying to modify along with the error file?
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,130
3,194
1666891325481.png

open that file and go to in 186 and see if there is a " missing at the end of that line that's what renpy error is telling you
 

kidousenshi

Newbie
Feb 13, 2021
20
7
Can you link the rpy file you are trying to modify along with the error file?
It was my own ignorance. I still had to manually add in " even though I did not disturb the entire text, just a few words. So that works now. Finally, did it!
If I go through any more difficulties I'll be sure to post again. I'm sure I will, lol.
Thank you so much for the help!
View attachment 2128275

open that file and go to in 186 and see if there is a " missing at the end of that line that's what renpy error is telling you
Got it! Appreciate the info!
 
  • Like
Reactions: clowns234

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
[...] you should be able to go into any rpy file and modify the dialog, [...]
No no no, please no... Ren'Py have a lots of callback functions that let you change the text in real time, like the config.say_menu_text_filter by example. Why still promoting hard code changes ?


Changing the fonts is a bit trickier, but typically you would want to do that in the character set up:
As an example:
$ charX= Character("Bill", what_font = "FontsFree-Net-arial-bold.ttf", what_size = 40, what_color="#BE9CBC", color="C988CF", image = "charX")
What would cause problems if at one time he want to revert the change.
Using the define statement, in a rpy file that will be proceeded after the game ones, is way better, fully transparent and totally reversible.
 

clowns234

Engaged Member
Game Developer
May 2, 2021
3,090
4,845
No no no, please no... Ren'Py have a lots of callback functions that let you change the text in real time, like the config.say_menu_text_filter by example. Why still promoting hard code changes ?




What would cause problems if at one time he want to revert the change.
Using the define statement, in a rpy file that will be proceeded after the game ones, is way better, fully transparent and totally reversible.
Perhaps you missed the part where he said he was new to this? :)
 
  • Like
Reactions: kidousenshi

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
Perhaps you missed the part where he said he was new to this? :)
Could it be the reason why I linked a post that explain in detail how to use the said configuration variable ? No, unbelievable, I can't be this smart...
 

clowns234

Engaged Member
Game Developer
May 2, 2021
3,090
4,845
Could it be the reason why I linked a post that explain in detail how to use the said configuration variable ? No, unbelievable, I can't be this smart...
I did read your post and I found it quite interesting and informative - so thanks for that.
However:
If all he wants to do is change some dialog for his own personal use, then it seems a bit overkill. Additional coding is required, is it not? As I understand it, he is not creating a game himself.
 

The Rogue Trader

Active Member
Sep 12, 2021
510
756
Could it be the reason why I linked a post that explain in detail how to use the said configuration variable ? No, unbelievable, I can't be this smart...
I'm afraid you could be underestimating how baffling can be a detailed explanation of how a code function works for someone that doesn't have any base in coding.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
However:
If all he wants to do is change some dialog for his own personal use, then it seems a bit overkill. Additional coding is required, is it not?
It's required yes, but with the amount of works in progress games available, what are the odd that he want to change a finished game ? Therefore, it's a question of balance between the overkill of a small personal mod, and the amount of time needed to make the changes each time a new update is released.
I know I'm partial here, codding since the 80's, and working on the field since now more or less 25 years, I got the habit to goes for a code solution a bit too often. But I do believe that for something like this it stay the easiest solution. Not necessarily at short term, but he started by saying that he want to learn how to to this, what imply that, somewhere in his head, there's the idea that if it works, he can possibly do it with some other games. And then, having an easy, copy pastable way to do it would be a benefit.


I'm afraid you could be underestimating how baffling can be a detailed explanation of how a code function works for someone that doesn't have any base in coding.
Or perhaps is it you who underestimate my capacity to explain something technical.
Of course, it can be hard to understand, especially due to the usual "it's magical" bias that come with codding. But it's been four years, and thousands posts, that I'm doing this here, without counting my previous virtual lives.
So, of course that I know that it can be baffling. Reason why, both when I do it and when I link to a post, I always try my best to adjust to the reader level of knowledge. So far, I don't think I ever leaved someone with an effective doubt regarding what I said, and how to "solve it's problem", this even if I have to explain the same thing many times in different ways.
 

clowns234

Engaged Member
Game Developer
May 2, 2021
3,090
4,845
It's required yes, but with the amount of works in progress games available, what are the odd that he want to change a finished game ? Therefore, it's a question of balance between the overkill of a small personal mod, and the amount of time needed to make the changes each time a new update is released.
I know I'm partial here, codding since the 80's, and working on the field since now more or less 25 years, I got the habit to goes for a code solution a bit too often. But I do believe that for something like this it stay the easiest solution. Not necessarily at short term, but he started by saying that he want to learn how to to this, what imply that, somewhere in his head, there's the idea that if it works, he can possibly do it with some other games. And then, having an easy, copy pastable way to do it would be a benefit.
I also have been coding since the 80's so hello to a fellow old person. I wrote my first program in BASIC on an old TRS80. in 1980 :)
I have only gotten into renpy and python in the last year - along with Daz and photoshop.
I got into renpy because one of the games I was playing crashed and I thought it would be fun to fix it. From there, I started changing dialog - because I could. Now, I'm working on my own game, which I am having a lot of fun with.
BTW, after the initial update, for various reason, my renpy code doesn't contain any of the dialog. Thought you might appreciate that as a coder.
 
  • Like
Reactions: kidousenshi

kidousenshi

Newbie
Feb 13, 2021
20
7
Ok, just got home, but I see it's already solved.
Happy modding, kidousenshi !

pronoobtip: always use a text editor that supports Renpy's syntax highlighting: that way it'll colour the code tags and the dialogue. So, if you're missing a " you'll notice immediately.
https://f95zone.to/threads/easiest-program-to-edit-script-files-in-renpy.33508/
Oh wow, this is great! Thanks the the link, I got it saved. Yeah, it's all new to me but I appreciate all the bits of info. It's all new to take in but I'm having a blast learning and look forward to taking some time and creating something of my own. Glad to be apart of the community!
Perhaps you missed the part where he said he was new to this? :)
Yes, definitely new to all this but very excited to get in the world of it all. I have to start somewhere and I really am glad for all the info you and others have provided me. You'll be seeing me around on here for sure. Thanks for the jump start on everything! You've been a huge help!
 
  • Like
Reactions: The Rogue Trader