MZ How to Specify Variables in VisuStella MZ – Battle Core Plugin Commands

I have a question about VisuStella MZ – Battle Core.


Regarding the plugin command:



◆Plugin Command: VisuMZ_1_BattleCore, DB: Dragonbones Time Scale
:      :Targets = ["user"]
:      :Time Scale = 1.0


I would like to specify Time Scale using a variable, but when I put a variable directly (e.g. $gameVariables.value(id)) into the Time Scale field, it does not work.


Is there a way to make this value variable-based, or is it possible to create a simple patch plugin to enable this?


For example, in the Art_BCTargetExtension plugin, targets can be specified using variables.
In the same way, I would like to be able to specify the Time Scale in DB > Dragonbones Time Scale via a variable.


If anyone can help with this, I would greatly appreciate it.
Try it like this:

let name = "VisuMZ_1_BattleCore";
let command = "ActSeq_DB_DragonbonesTimeScale";
let targets = JSON.stringify([`user`]);
let timeScale = $gameVariables.value(X);

PluginManager.callCommand(this, name, command, {
"Targets:arraystr" : targets,
"TimeScale:num" : timeScale
});
I would like to specify Time Scale using a variable, but when I put a variable directly (e.g. $gameVariables.value(id)) into the Time Scale field, it does not work
To explain why your code is not executed:

Imagine you are riding by train, and a random town's mayor decided to call a station "everyone get off the train." You can now imagine what happens: The conductor will say through the speakers: "Next station, everyone get off the train." You now transformed a single name into an executable command, and while this was simply a metaphorical plotline, it works similarly in the world of programming as well. There's a difference between executable code and code that only looks like it but is treated as a single name or text.
Try it like this:

let name = "VisuMZ_1_BattleCore";
let command = "ActSeq_DB_DragonbonesTimeScale";
let targets = JSON.stringify([`user`]);
let timeScale = $gameVariables.value(X);

PluginManager.callCommand(this, name, command, {
"Targets:arraystr" : targets,
"TimeScale:num" : timeScale
});
That’s amazing! by running that script before the actor’s motion, I was able to control the motion speed using a variable value. Thank you very much!
Imagine you are riding by train, and a random town's mayor decided to call a station "everyone get off the train." You can now imagine what happens: The conductor will say through the speakers: "Next station, everyone get off the train." You now transformed a single name into an executable command, and while this was simply a metaphorical plotline, it works similarly in the world of programming as well. There's a difference between executable code and code that only looks like it but is treated as a single name or text.
Your metaphor was also very easy to understand. now I understand why directly entering $gameVariables.value(id) into the Time Scale doesn’t work.Thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-specify-variables-in-visustella-mz-battle-core-plugin-commands.181573/