SOLVED:
(same was asked on the off forum, but with no answer so far)
I 'd like to add random text to the message of a skill.
I know where to add text for all skills used (in Window_BattleLog.prototype.displayAction), but can't figure out how to link current skill or target to a string.
E.g., “(User Name) hits" + Target.name + " in the chest"/ "the left leg"/ "the right arm"/ etc.
1) Could you please advise how to define the skill currently used in a battle?
2) How to find out the name of the target of this skill?
[doublepost=1485897173,1485289120][/doublepost]Answer to 1 (for someone's convenience)
BattleManager._subject.currentAction()._item._itemId
The above returns the number of skill. Then find it in the $dataSkills, something like:
$dataSkills[BattleManager._subject.currentAction()._item._itemId].name
Answer to 2
BattleManager._subject.currentAction().makeTargets().clone()[0]._actorId
/////////////// OR//////////////
BattleManager._subject.currentAction().makeTargets().clone()[0]._enemyId
One of those returns ID of actor or enemy. Then a simple check whether the first Id or second Id exist.
(same was asked on the off forum,
I 'd like to add random text to the message of a skill.
I know where to add text for all skills used (in Window_BattleLog.prototype.displayAction), but can't figure out how to link current skill or target to a string.
E.g., “(User Name) hits" + Target.name + " in the chest"/ "the left leg"/ "the right arm"/ etc.
1) Could you please advise how to define the skill currently used in a battle?
2) How to find out the name of the target of this skill?
[doublepost=1485897173,1485289120][/doublepost]Answer to 1 (for someone's convenience)
BattleManager._subject.currentAction()._item._itemId
The above returns the number of skill. Then find it in the $dataSkills, something like:
$dataSkills[BattleManager._subject.currentAction()._item._itemId].name
Answer to 2
BattleManager._subject.currentAction().makeTargets().clone()[0]._actorId
/////////////// OR//////////////
BattleManager._subject.currentAction().makeTargets().clone()[0]._enemyId
One of those returns ID of actor or enemy. Then a simple check whether the first Id or second Id exist.
Last edited: