Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

FYI, I solved this with the help of a friend by adding the following in the getActorCommandHelp(commandData) function:

case 'singleSkill': {
const action = BattleManager.inputtingAction();
const actor = action && action.subject();
const acWindow = SceneManager._scene._actorCommandWindow
const object = actor && $dataSkills[acWindow._list[acWindow._index].ext];
const help = object.description;
if (typeof help === 'string') return help;
} break;
(2 edits)

You’re using VisuMZ_1_BattleCore to set up the menu, right?
Due to its obfuscation and lack of public API, I don’t support its custom features directly.

That said, you can load your code as separate plugin after mine, to make it easier to update my code:

'use strict';

// Untested, but very likely to work.
const oldGetActorCommandHelp = TS_Battle_Command_Descriptions.getActorCommandHelp;
TS_Battle_Command_Descriptions.getActorCommandHelp = function (commandData) {
  if (commandData && commandData.symbol === 'singleSkill') {
    const object = $dataSkills[commandData.ext];
    const help = object && object.description;
    if (typeof help === 'string') return help;
  }
  return oldGetActorCommandHelp.apply(this, arguments);
};

You don’t need to look up the _list entry because commandData should be exactly that object already. It’s also a good idea to avoid accessing the window through SceneManager._scene, as another plugin may reuse Window_ActorCommand in a different scene or under a different property name.

Thank you for your patronage and for sharing your issue and solution!

Thanks! Just for my benefit because I'm still a novice with JavaScript... why are the parts :

const action = BattleManager.inputtingAction();
const actor = action && action.subject();

...omitted in the patch in your last post? Asking because I genuinely don't understand what these do but just included them to be on the "safe" side. 

(3 edits)

The 'attack' and 'guard' skills can differ depending on the actor. That’s why I didn’t just use 1 and 2 there for their ID.

It’s only an extension point in the engine for plugins though, so you can’t change this in the editor by default. There’s a WeaponSkill.js plugin floating around that makes use of this, for example. (I’d link the original page but I’m not sure where it is from.)