A downloadable project for Windows

Download NowName your own price

Moral Battle 

Context: During the Battle it can be very difficult to program an event that allows the allied troops or the allied group to evaluate the chances of victory or defeat. Imagine that a group of enemies is outnumbered, or has suffered a lot of damage during a battle. In this condition, it would be very interesting if the enemy troop could have a parameter to evaluate its advantage or disadvantage in relation to the allied group.

Description: This script creates a battle attribute called Morale. This attribute is a percentage number that represents the wear and tear of the enemy troop or group of allies. The more destroyed the enemy troop or group of allies is, the lower their morale value will be. A good example of how to use this attribute would be to make enemies flee from battle if the enemy troop's morale is very low.



A3.jpg


Script configuration: In the plugin settings you MUST customize the variables that will receive the morale of the enemy troop (A1) and the group of allies (A2). You also need to specify whether you want the Morale value to be displayed during battle (B1). Finally, you can customize the messages that inform you of morale values during battle.

A1.jpg


Plugin Commands: The script also has two very specific plugin commands. Both allow passing to a specified variable the value of a mathematical calculation made based on the difference between the morale of the enemy troop and the allied group.

  • Morale Diff (Troop - Party): stores in a variable the difference between the morale of the enemy Troop and the group of allies.
  • Morale Diff (Party - Troop): passes the result of the difference between the morale of the group of allies and the morale of the enemy troop to a variable.


A2.jpg


Exemplo de uso: Um exemplo bem prático de uso desse script é fazer com que a tropa inimiga fuja caso perceba que sua chance de vitória é muito baixa.


A4.jpg


1 - The first step is to use the plugin command to calculate the difference between the morale of the enemy troop and the allied group.

2 - Later it is checked whether the difference in morale is greater than or equal to 200. If so, the enemy troop escapes the battle.

A5.jpg



Download

Download NowName your own price

Click download now to get access to the following files:

POGMZ_BattleMoral.js 5 kB

Leave a comment

Log in with itch.io to leave a comment.