From 75e32aacbea5b6e3bfc2acaf9bf4a713f53b643b Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 4 Nov 2025 19:53:47 +0800 Subject: [PATCH] Update gameplay-scripts.md with new content Updated lastUpdated date and added section on Custom Values. --- .../playstate-scripts/gameplay-scripts.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/wiki/modding/scripting/playstate-scripts/gameplay-scripts.md b/wiki/modding/scripting/playstate-scripts/gameplay-scripts.md index 777e74d2..3b9150aa 100644 --- a/wiki/modding/scripting/playstate-scripts/gameplay-scripts.md +++ b/wiki/modding/scripting/playstate-scripts/gameplay-scripts.md @@ -1,7 +1,7 @@ --- author: Frakits desc: This page explains how to use Gameplay Scripts in your mod! -lastUpdated: 2025-05-02T18:08:41.000Z +lastUpdated: 2025-11-04T11:51:29.396Z title: Gameplay Scripts --- # Gameplay Scripts @@ -61,3 +61,17 @@ if (curCameraTarget == 1) // Equivalent to mustHitSection == true You can also add **Difficulty Based scripts** by placing them in a subfolder named after the difficulty inside the song’s scripts folder.
For example the scripts inside `songs/dadbattle/scripts/erect/` will only get loaded if the current difficulty is `erect`. + +### Custom Values +Custom values are well... *custom values*. They are used to store **extra values** that your song may use. + +To access these values, you must access `SONG.meta.customValues`. This returns the values of the `customValues` entry inside `meta.json` of the current song. *(if it exists. if not, returns null)* + +To use them, you can access the key using dot-based access. Here's an example: +```haxe +var args = SONG.meta.customValues; // Let's say it returns {seed: "seed"} +var value = args.seed; // returns the value of the "seed" key, which is seed. +trace(value); +``` +*`customValues` is a `Dynamic` object, so please be careful in accessing values inside it.* +