Ren'Py How to know a game's label's unique id?

  • To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Xaverion

New Member
Aug 30, 2022
10
11
I'm a newbie at Ren'Py with basically zero knowledge on it. But I'm trying to do a simple mod that changes certain words/dialogue to something else for a certain game.

I'm trying to use Translate for specific labels but I don't know how to find out the unique ID for the dialogues in the label. The random letters and numbers after the label.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,188
14,917
I'm trying to use Translate for specific labels but I don't know how to find out the unique ID for the dialogues in the label. The random letters and numbers after the label.
It's a partial Hash of the dialog line. But anyway, that is not how you change a text in the fly.

There's dozens of threads about this here. In short, what you need is to use or , depending which one is the most appropriated.

Python:
define substitutionTable = { "original line 1": "new line 1",
                             [...]
                             "original line x": "new line x",
                             [...]
                             "original line n": "new line n" }

init python:

    def myTextReplacer( txt ):
        return substitutionTable.get( txt, txt )

    config.replace_text = myTextReplacer
 
  • Like
Reactions: osanaiko