How can you add the option to change a player's character name when hundreds of dialogues have already been written?

I want to add option to change protagonist's name in my game, before that, it was just a name in the text. I ask because I got really scared when I decided to just replace my protagonist's constant name with \n<\C[23]\N[1]\C> in all dialogues on one map(redacted map file in data folder). And then I opened editor and literally saw a clean map that I edited. I had a backup, so it's fine, but still, do I have to literally change all dialogues in the editor, or there is a stable way to manually redact game text files to change in-game dialogues?
you'll need a multifile text editor. there are several, I usually use textpad.

make a backup of the json files of the project first.

in that editor, you'll have to open all json files at the same time.
then make a search for the name (first step) and go to the result list to see if there is any false positive.
if everything found is what you expect, do a replace of the name over all files.

if done correctly it should be finished without errors in a few minutes.
but if there were false positives that should not have been changed, you'll have to restore from a backup.
It's definitely possible to edit the map data and change the name that shows up from something set to \N[1] or what have you. I think it actually needs to be written as "\\N[1]" in the script, with that extra slash, but otherwise it should work the same as changing it in the editor.
you'll need a multifile text editor. there are several, I usually use textpad.

make a backup of the json files of the project first.

in that editor, you'll have to open all json files at the same time.
then make a search for the name (first step) and go to the result list to see if there is any false positive.
if everything found is what you expect, do a replace of the name over all files.

if done correctly it should be finished without errors in a few minutes.
but if there were false positives that should not have been changed, you'll have to restore from a backup.
Thank you for the advice, I downloaded textpad and followed your steps, but a after I replaced all the character names, the game files was no longer readable. It's probably because I didn't fully understand what you meant by seeking false positives. Can you please explain it a bit more?

1652386597493.png


I don't really see anithing like that in the menu. Should I manually search for these false positives? What do they look like?
you'll need a multifile text editor. there are several, I usually use textpad.

make a backup of the json files of the project first.

in that editor, you'll have to open all json files at the same time.
then make a search for the name (first step) and go to the result list to see if there is any false positive.
if everything found is what you expect, do a replace of the name over all files.

if done correctly it should be finished without errors in a few minutes.
but if there were false positives that should not have been changed, you'll have to restore from a backup.
By the way, I think I found the problem. I just have to add one additional slash, so \n<\\C[23]\\N[1]\\C> worked for me. I guess it just works that way, so thank you, I replaced all names and there are no problems at all.
What you had is one of the problems that is due to different programs handling escape codes in different ways.

I didn't fully understand what you meant by seeking false positives. Can you please explain it a bit more?
What I meant by this is something different, which appearently didn't happen in your case as it is dependent of context.

let's assume you have a text and for stylistic reasons you want to replace every "one" you have written as a word with the number "1". Sounds easy and harmless to do, yes?
Until you make an unchecked replace and end up with several texts "st1" because you also wrote "stone" in some places.
In that case, "stone" would have been one of the false positives - a result found by searches because it is technically the same letter combination, but means something else that should not be replaced.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-you-add-the-option-to-change-a-players-character-name-when-hundreds-of-dialogues-have-already-been-written.147533/