Tutorials:Name Change Scripts: Difference between revisions

From LANCommander
No edit summary
No edit summary
Line 10: Line 10:
When executing a name change script, the new name is passed in as the first argument and may be accessed using <code>$args[0]</code>. The old name (not available when executed post-install) is passed as the second argument and may be accessed using <code>$args[1]</code>.
When executing a name change script, the new name is passed in as the first argument and may be accessed using <code>$args[0]</code>. The old name (not available when executed post-install) is passed as the second argument and may be accessed using <code>$args[1]</code>.


For a list of documented install scripts, see [[:Category:Games With Name Change Scripts]].
For a list of documented name change scripts, see [[:Category:Games With Name Change Scripts]].

Revision as of 22:44, 1 August 2023

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].

For a list of documented name change scripts, see Category:Games With Name Change Scripts.