**Thankfully this request doesn't require familiarity or purchase of VS Party System, just a little knowledge of javascript.
Problem: I need to lock 2 party members so the player cannot remove/switch them in the party formation window.
Visu provides a plugin command that lets you lock ONLY by Actor id.
But, I need to lock by which position in the party order they are (1st, 2nd, etc)
Any actor at all could be there, so ONLY locking by Actor cannot work!
Plugin command:
As a solution, I've seen some talented users like Another Fen and rpgLord69 create custom script calls just from looking at a 'outlines of the command in the header' from the Plugin file.
So I just need to make a small script call that does the same thing as a plugin command, except that it allows the use of a variable rather than a static number, basically.
The command outline of a plugin file is not obfuscated, unlike the rest of it that contains the actual code.
vHere is the required part of the Outline of the command header of VisuMZ_2_PartySystem
A year ago I was helped with something very similar to this once before at this post:
forums.rpgmakerweb.com
So, using that information/solution provided as a template I tried creating my own scriptcall, and experimented with using it, along with several other variations...
But it always shows a 'Script Call Error' in the log, so clearly I haven't created it correctly. 😢
I feel like I'm half-way there, so does anyone see what's wrong with my cobbled-together custom scriptcode?
idk how I'm managing to mess this up, the only 2 arguments within the command are:
Actors:arraynum (which is like a list of numbers because it wants one or multple ActorIDs)
and
Lock:eval (which has a boolean, which is just true or false)
-Thank you for reading!
Problem: I need to lock 2 party members so the player cannot remove/switch them in the party formation window.
Visu provides a plugin command that lets you lock ONLY by Actor id.
But, I need to lock by which position in the party order they are (1st, 2nd, etc)
Any actor at all could be there, so ONLY locking by Actor cannot work!
Plugin command:
As a solution, I've seen some talented users like Another Fen and rpgLord69 create custom script calls just from looking at a 'outlines of the command in the header' from the Plugin file.
So I just need to make a small script call that does the same thing as a plugin command, except that it allows the use of a variable rather than a static number, basically.
The command outline of a plugin file is not obfuscated, unlike the rest of it that contains the actual code.
vHere is the required part of the Outline of the command header of VisuMZ_2_PartySystem
A year ago I was helped with something very similar to this once before at this post:
MZ - How to add a variable into a javascript plugin command dropdown box?
I made a skill that will 'analyze' an enemy's weakness, but the way it works, it has a 1 turn delay before the weakness is revealed. So it just creates a state on the enemy that will last for 1 turn, then on expiring, it will call a common event that runs the 'Reveal Enemy Weakness' plugin...
forums.rpgmakerweb.com
JavaScript:
//Another Fen's Code from that post
//
let name = "VisuMZ_1_BattleCore";
let command = "ActSeq_Mechanics_AnalyzeWeakness";
let targets = JSON.stringify( [`enemy index ${$gameVariables.value(299)}`] );
let reveal = "1";
PluginManager.callCommand(this, name, command, {
"Targets:arraystr" : targets,
"Reveal:eval" : reveal
});
So, using that information/solution provided as a template I tried creating my own scriptcall, and experimented with using it, along with several other variations...
But it always shows a 'Script Call Error' in the log, so clearly I haven't created it correctly. 😢
I feel like I'm half-way there, so does anyone see what's wrong with my cobbled-together custom scriptcode?
JavaScript:
let name = "VisuMZ_2_PartySystem";
let command = "LockPartyMembers";
let targets = JSON.stringify( [`${$gameVariables.value(1)}`] );
PluginManager.callCommand(this, name, command, {
"Actors:arraynum" : targets,
"Lock:boolean" : true
});
idk how I'm managing to mess this up, the only 2 arguments within the command are:
Actors:arraynum (which is like a list of numbers because it wants one or multple ActorIDs)
and
Lock:eval (which has a boolean, which is just true or false)
-Thank you for reading!