Thank you! This has been really handy for me!
What's a script call to check if the party has a weapon in their inventory? I can find calls on the list to give them weapons and items, but not simply to check for possession.
$gameParty.addActor(n);
$gameParty.removeActor(n);
Am I able to use a variable rather than straight actorID where n is for these commands? How would I format that?
I would try:
$gameParty.addActor($gameVariables.value(19));
That example uses variable 19 to hold the value of the actor id. You can use any variable that you want, of course.
edit: Things like that are one of the main advantages of using scripts instead of sticking to the editor commands, in my opinion.
Just wanted to say a quick (huge) thanks for this great list and the thread. I'm a rmmv newbie but developing software for decades, and just had my first "hello world" script running in an event. Wow! That opens up a lot of possibilities!
This list is wonderful and helped me along real well. I managed to fix all the errors I had going from VX to MV in this script. Although this list doesn't mention _targetActorId, _classId or currentExp(), it does have the learn all, or forget all skills script which I had no clue how to fix.
x = $gameParty._targetActorId
c = $gameActors.actor(x)._classId
if (c !== 3) {
$gameVariables.setValue(1, $gameActors.actor(x).currentExp())
$dataSkills.forEach(function(skill){ if(skill) $gameActors.actor(x).forgetSkill(skill.id);});
$gameActors.actor(x).changeClass(3, false)
$gameActors.actor(x).learnSkill(9)
$gameActors.actor(x).gainExp($gameVariables.value(1))
}
Thanks a ton! Now I can change everyone's class with items or spells, reset their skills and put them back at the same exp they were, learning all the skills of new class upto their obtained level before hand, and won't keep giving them xp once they changed class since it doesn't reset xp again once class changed. Now just need to make it more dynamic so all the different items and spells change different classes, without copy pasting this script for every class.. this scripting sure saves alot of hassle creating conditions in MV itself, _targetActorId is a time saver.
For some reason x.currentLevelExp did work but returned 0, while $gameActors.actor(x).currentLevelExp returned the function, function () { return this.expForLevel(this._level); }
Same with currentExp.. without the () it returns the function code I guess..
Interesting to see how the function is written.
Would there happen to be any script calls to change the mouse arrow cursor? [I mean the entire mouse cursor, not just in windows or battle, but the mouse moving on the map]
You rock Ossra, thank you!
Hi!, thank you for making this list. Im pretty new in this, but I'm trying to make the best I can.
Actually, I have one question about the battle log script. I'm trying to do An alternativo fighting mechanic where the most important thing has to do with chance of narration. I have done a lot of things with skills, common skills, etc. So I saw thst script and tried to add some battlelog text as mentioned, but when I try the command it says "Cannot read property 'addText' of undefined.
I am missing something? I am going to put the exact script that im using so you can see something wrong
var text = "Ana olvidó leer con la luz encendida..."
SceneManager._scene._logWindow.addText(text)
SceneManager._scene._logWindow.clear();
I know this is an old thread, but is there a way to detect what an actor's MP is at using this and/or any plugins?