Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

New Stats

Hi to all esteemed scripters i hope one i willing to complete this script for me
I would  like a script that rewrite the stats for a character:

Strength:
This determines the physical attack power of a unit
and how much damage he/she can do while equipped with a physical weapon
(swords, axes, etc.)
Magic:
This determines the magical attack power of a unit and
how much damage he/she can do while equipped with a magical tome (Wind,
Fire, Thunder, etc.)
Skill:
Skill determines the accuracy of a weapon and it also
determines the critical hit rate of a unit. The higher the Skill, the
better the chance a unit will hit the enemy.
Speed
Speed is incredibly important. First, it determines the
avoidability of a unit, meaning how well he/she will be able to dodge
attacks. Second, it determines if a unit will be able to perform what
is known as a double-attack in one round. If a unit's Speed is 4+
points higher than the enemy's, he/she will strike twice in one round
Luck
This stat determines the hit rate, the dodge rate, the
rate a unit can critical, and how much an enemy's critical rate will be
lowered by.
Defense
Defense determines how well a unit can protect
him/herself from a unit's Strength. The higher the Defense the less
damage a unit using a physical weapon will do. If a unit's Defense is
higher than his/her enemy's Strength and weapon Strength, then he/she will
take no damage. However, Defense in no way is able to protect one from
Magic attacks.
Resistance
Resistance protects from magic attacks and not physical weapon attacks. If
Resistance is higher enough than an enemy's magic power and weapon Strength, no damage dealt to the character.

Weapon strength
This is the power of a weapon. This in conjunction with
Strength and Magic determines how much damage a character will do. The
combined numbers must be higher than the enemy's Defense or Resistance
to do any damage.

Hitting the target is based on a RNG that changes based on certain stats. If the hit chance is 100, that means that any number the RNG generates between 1 and 100 will be considered a hit. Likewise, a hit chance of 0 means that any number between 1 and 100 will be classified as a miss.
Hit%= SKILL + Weapon Hit Rating - Enemy's Luck

Also, there is a chance with certain weapons and character of getting a critical hit. Also based on a 100 RNG, this only occurs if the attack is a hit. It takes the value of your LUCK + weapon's critical rating  After the calculations, it gives the chance as a sort of percent. This is where the second RNG comes in. If your attack is deemed to be a hit, it then does it again with this one, and if the number chosen is within the percent, then it triples the damage that would be inflicted. This means that if an attack normally does 12 damage, it now becomes 36.

Damage is different too. You would need to alter the calculation of the damage system to be that where it takes the character's offense and subtract it from the enemy defense, and take the difference as damage. If the number is negative, it will automatically be turned to 0.
Damage= Weapon strength +[STRENGTH] or [MAGIC] - Enemy's [DEFENCE] or [Resistance]

Number of times the enemy or you attack in a battle is determined by speed. If your speed is a certain amount higher than the enemy, you get a second attack if you survive the enemy counter. If you wield a "Brave" type weapon, you get a double attack in one round. If your speed is high enough with a brave weapon, you get a total of 4 attacks per battle.
Multiple attacks= If SPEED is 2x greater than Enemy's SPEED
if you need more info ask and i'll try to make things more clear
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top