Hello; my name is Kino.
I've only been here for a short time, but I'm trying to get into plugin development.
I have a bit of a background in programming, but I'd like to get some ideas from the community on the script I wrote, and how I can improve it, or make it more extensible.
The goal of the script was to add a new parameter to the status window, and make it accessible in the game editor.
I'm sure there are plugins that accomplish this goal already, but I wanted to start somewhere.
I think I achieved both goals, but I was curious to see if there was a way to refactor some lines of the plugin if possible.
Script Link: https://github.com/KinoAR/RPG-Maker-Scripts/blob/master/ExtraParameters.js
You can click on raw to get just the source code.
This piece (line 46 - 52 ) accomplishes the second goal of accessing the value from the editor.
//Set a game variable to be the actor parameter -- Command: setGameVariable Argument1: variable ID Arguement2: actor index if(command === 'setGameVariable') { var actorId = Number(args[0]); var variableId = Number(args[1]); var actor = $gameActors.actor(actorId); $gameVariables.setValue(variableId, actor.statDictionary[statName]); }Just want to include a thank you for anyone who takes a look at the code, and a thank you to those who have helped me point me in the right direction with the previous iterations.
I've only been here for a short time, but I'm trying to get into plugin development.
I have a bit of a background in programming, but I'd like to get some ideas from the community on the script I wrote, and how I can improve it, or make it more extensible.
The goal of the script was to add a new parameter to the status window, and make it accessible in the game editor.
I'm sure there are plugins that accomplish this goal already, but I wanted to start somewhere.
I think I achieved both goals, but I was curious to see if there was a way to refactor some lines of the plugin if possible.
Script Link: https://github.com/KinoAR/RPG-Maker-Scripts/blob/master/ExtraParameters.js
You can click on raw to get just the source code.
This piece (line 46 - 52 ) accomplishes the second goal of accessing the value from the editor.
//Set a game variable to be the actor parameter -- Command: setGameVariable Argument1: variable ID Arguement2: actor index if(command === 'setGameVariable') { var actorId = Number(args[0]); var variableId = Number(args[1]); var actor = $gameActors.actor(actorId); $gameVariables.setValue(variableId, actor.statDictionary[statName]); }Just want to include a thank you for anyone who takes a look at the code, and a thank you to those who have helped me point me in the right direction with the previous iterations.