Ren'Py change the relationship or nickname

youaresoyummy

Newbie
Game Developer
Feb 18, 2019
77
51
Hi i'm new in Ren'py and i want to change the relationship between the characters or give them nicknames. And i don't know the term or topic i have to looking for.
Or could some one tell me how i change the relationship.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,607
2,256
It really depends on how familiar you are with programming in general. RenPy is just python (mostly) and python is just the next evolution of a dozen other programming languages after maybe BASIC, PASCAL or C (and everything that came in between). My point being that if you know SOME programming, RenPy isn't a huge leap.

Easy solution #1:

Edit the script files directly with your favorite text editor. Do things like Change all "Sharon" to "Shaz".
It's not always that straight forward, as some games will have filename for images, etc that include the name you are aiming to replace... but a good text editor will have options to only replace words where the case matches ("Sharon" with a capital "S" being different from "sharon" with a lowercase "s") and some include an option for "whole words only", where the replacement only happens where it's part of a normal sentence and not something like ch1_thurs_met_sharon.jpg. Editors with both these options switched on are by far the safest option.

The default editor that comes with the RenPy developer's kit is "Atom". If you install RenPy and then click the options page within the launcher to select "Atom" as the editor, it will install a version of Atom that is preconfigured with all the things set up for RenPy editing. Sadly, newer version of Atom don't work well with RenPy, which is why it's best to install it from the developer kit's launcher and not from Atom's website.
Download here:

Advantages: Low learning curve, only basic skills needed.
Disadvantages: You'll need to learn to use tools like UnRen to unpack the game so you can edit the scripts in some cases. There's a risk you change something by accident and break the game. The next time the game is released, you'll need to do it all again.


Techie solution #2:

Learn to use a text replacement script file using RenPy code. It's the same sort of thing people use to replace words like "Landlady" with "Mom" and "roommate" with "sister". No reason you can't change "Sharon" to "Dipshit" the same way.

I wrote some advice a while ago for something similar, based on anne O'nymous' original script. Perhaps read that and see if you can follow it.
https://f95zone.to/threads/renaming-the-characters.95716/post-6769832

It basically replaces a list of single words or phrases with an alternative list of words and phrases. Where things won't really work when replacing single words, where also a "replace the whole line" list too, those that has to be an EXCEPT match to work as intended. It's makes things easier by only affecting text which appears on screen as part of the game dialogue. So in some ways, it's a lot less invasive than editing the whole script.

Advantages: Better long term solution. There's a good chance that any search/replace script you write now will work when the next release comes out too, with minimal changes or additions. Minimal chance you'll break the game doing it this way.
Disadvantages: Steeper learning curve. You'll still need to learn how to use UnRen.


Doing it the hard way #3:

Same as option #1, but without using a mass "search and replace all". Search for the words (names) you want to replace, and replace each one... one by one. It'll be a lot more time consuming - but reduces significantly the chances of accidently changing the name of an image or screen name or variable in such as way that the game breaks.

This might be the best choice if you aren't changing the name of a character everywhere, but only in some places. i.e. You still call her Sharon or Sister most of the time, but sometimes call her Goofball sometimes too. A reminder, that when words replace people's names... they still need to be capitalized. It's "Hello, Sister." instead of "Hello, Sharon.", but still "She's my sister." using lowercase when it's not used as a name replacement.

Advantages: Low learning curve, only basic skills needed. You'll only break the game if you aren't careful.
Disadvantages: Being that careful will be soul destroyingly slow. Next release of the game = do it all again.


If you can follow it, option #2 should be your first choice, as option #1 risks breaking the game if you aren't careful and option #3 is mind numbingly tedious.

Anyway, check out that other thread too mentioned in my option #2. There's a lot more discussion of various possibilities in there too.
 
Last edited: