Tutorials:Name Change Scripts

From LANCommander
Revision as of 05:48, 31 July 2023 by DoctorDalek (talk | contribs) (Created page with "== Overview == Name change scripts are executed on the client's machine whenever they change their name from the Playnite extension or directly after the install script has executed. These scripts are dedicated solely to renaming a player's in-game name to ensure a consistency in multiplayer games. Handling a name change primarily depends on how the game handles player saves. Game engines that store player names in plain text (e.g. Source,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

Name change scripts are executed on the client's machine whenever they change their name from the Playnite extension or directly after the install script has executed. These scripts are dedicated solely to renaming a player's in-game name to ensure a consistency in multiplayer games.

Handling a name change primarily depends on how the game handles player saves. Game engines that store player names in plain text (e.g. Source, id Tech X, Unreal, etc.) are easily replaceable by using regular expressions (regex). Older games may have save files that need a binary patch. Others may just use a registry key.

Arguments

When executing a name change script, the new name is passed in as the first argument and may be accessed using $args[0]. The old name (not available when executed post-install) is passed as the second argument and may be accessed using $args[1].