Rewriting this because I made some progress:
Hello, I am hoping to set some of the skill type names in my game to be a direct reference to the weapon equipped. Something like having the skill type name be = user.equips()[0].name
I have set the skill type names to be \V[112], and I currently have the variable updated in my battle system every time a new turn takes place, so this works for combat. However I have not worked near as much with the menu scene, so I am unsure where to place the code to run whenever an actor's skill list window is selected.
This is what I have for the combat side of things, which runs once per turn start.
Window_MenuActor in rpg_windows.js seems to be the right place to put the script, however this.actor returns "this.actor is not a function"
Feels like I am almost there but still missing something.
Hello, I am hoping to set some of the skill type names in my game to be a direct reference to the weapon equipped. Something like having the skill type name be = user.equips()[0].name
I have set the skill type names to be \V[112], and I currently have the variable updated in my battle system every time a new turn takes place, so this works for combat. However I have not worked near as much with the menu scene, so I am unsure where to place the code to run whenever an actor's skill list window is selected.
This is what I have for the combat side of things, which runs once per turn start.
JavaScript:
var activeFighterID = BattleManagerTBS.activeEntity()._battler._actorId;
var value = activeFighterID;
$gameVariables.setValue(15, value);
if ($gameActors.actor($gameVariables.value(15)).equips()[0]) {
$gameVariables.setValue(112, $gameActors.actor($gameVariables.value(15)).equips()[0].name);
Window_MenuActor in rpg_windows.js seems to be the right place to put the script, however this.actor returns "this.actor is not a function"
Feels like I am almost there but still missing something.
JavaScript:
function Window_MenuActor() {
$gameVariables.setValue(112, this.actor().equips()[0].name);
this.initialize.apply(this, arguments);
}