Skip to content

Adding rainbow usernames to players (v1.7)

Daniel Andrusiewicz edited this page Oct 2, 2024 · 1 revision

Written by @miyavmeow

Adding rainbow usernames to players

  1. Open your mod and get your UserID (you can do this by clicking on yourself in a lobby and selecting "Copy User ID").

  2. Find the SHA-256 hash of your UserID:

    1. Open https://www.sordum.org/hashgenerator/ in your browser.
    2. Change hash algorithm to "SHA-256"
    3. Paste your user id and generate hash

    image png

  3. Open Assets/Scripts/PhotonExtensions.cs

  4. Add a new entry to the SPECIAL_PLAYERS dictionary. For example:

    private static readonly Dictionary<string, string> SPECIAL_PLAYERS = new() {
        ["cf03abdb..."] = "ipodtouch0218",
        ["your SHA-256 hashed UserId here"] = "your in-game username here", // new line added here!
    };

IMPORTANT NOTE: Your UserID in the Unity editor is probably different than your actual UserId in the final built version, so I'd recommend getting your id through an already-built version of your mod.