So I'm not using the engine's default CHIT system. I'm using a custom check in my attack formula function I've created and when the check passes, the damage returned will be based off a different formula for the critical hit. All I want to know, in addition to returning the damage, how could I return the Critical Hit message to signify a critical hit was successful. Also for reference, how could I do the same for a Miss and an Evasion if I want to do more than the base game calculations.
[JS] Force Critical Hit Message
Learning JavascriptI've moved this thread to Learning Javascript. Thank you.
The messages as defined in the database are properties of the
If you're sticking this all in the damage formula box (eurgh) then remember to keep your formula result on the last "line" of code (lines are split by semi-colons).
With this method it's possible the log won't clear when you expect. If you need to clear it manually, try this:
Here's some of the other values you asked about~
TextManager, e.g. TextManager.criticalToActor. You can manually add text to the log window during battle with a script call, e.g.
JavaScript:
SceneManager._scene._logWindow.push("Hello world!");
SceneManager._scene._logWindow.push(TextManager.criticalToEnemy);
With this method it's possible the log won't clear when you expect. If you need to clear it manually, try this:
JavaScript:
SceneManager._scene._logWindow.clear();
Here's some of the other values you asked about~
- For "missed":
- Target is actor:
TextManager.actorNoHit - Target is enemy:
TextManager.enemyNoHit
- Target is actor:
- For "evaded":
- Physical:
TextManager.evasion - Magical:
TextManager.magicEvasion
- Physical:
TextManager properties in rpg_managers.js, around line 1717; the battle log stuff can be found under Window_BattleLog in rpg_windows.js. 🙂Thank you. That is a huge help
Original thread: https://forums.rpgmakerweb.com/threads/js-force-critical-hit-message.117474/