Thursday, June 14, 2018

Alternative RPG Maker Damage Formula

Small Stats Formula
With these formulas, if Atk and Def are equal, the damage is half the attackers attack value. They suit games with small number stats because damage scales and remain low and predictable. The highest damage an attacker can do will be equal to its Attack stat and the lowest damage will be 1.

Formula:
DAMAGE = a.ATK^2/(a.ATK+b.DEF)

Attackers Atk = 10
Defenders Def = 10
10^2/(10+10)
100/20
5

Formula rewritten for RPG Maker (because RPG maker can't do exponents?)
DAMAGE = a.ATK * (a.ATK / (a.ATK+b.DEF) ) or Damage = X * (X/(X+Y))

Attackers Atk = 10
Defenders Def = 10
10 * (10 /(10+10))
10 * (10/20)
10 * ( .5)
5

Examples 
Attackers attack = a
defenders defense = b
damage = d

d = a * (a/(a+b))

1. Attack and Defense are equal
a = 10     b = 10
d=10(10/(10+10))
d=5

2. Attack is twice defense
a = 20    b = 10
d=20(20/(20+10))
d=13

3. Attack is thrice defense
a = 30    b = 10
d=30(30/(30+10))
d=22.5

4. Attack is definitely higher than defense
a = 43    b = 8
d=43(43/(43+8))
d=36

5. Attack is half of defense
a = 5    b = 10
d=5(5/(5+10))
d=1.25

If you haven't noticed, the above formula is based on the idea that if you are equally matched with your enemy, you will dish out damage that is equal to 50% of your attack stat and no matter how much you outclass your enemy, you will do no greater damage than an amount equal to 100% of your attack stat without a critical. You may also notice that your damage asymptotes. By adding a x2, you can change that 50% when you're equally matched to 100%. This brings us to...

SPELLS WITH BASE POWER THAT STILL SCALES

If you add a variable as a multiplier to the beginning of the formula, you can increase the damage you do. This variable could represent the strength of the attack or spell or power or etc. Think of spell levels in Final Fantasy for instance.

d=x*a*(a/(a+b))
X can represent the level of the attack or spell. Example:
Weak = 0.5
Basic = 1
Medium = 1.2
Strong = 1.5
Very Strong = 2

If X = 2, your damage would be equal to your attack stat (if a.atk = b.def). I prefer to make 2 the basic value of an attack or spell. This way, every point of ATK and every point of DEF has more value, making upgrades from equipment and levels more valuable. If 2 is your normal damage, 3 would net 1.5x damage and 4 would net you 2x damage.


FORMULA 2
Found this one here:
https://www.rpgmakercentral.com/topic/27581-how-to-make-damage-calculation-and-leveling-more-like-final-fantasy/
it's: (a.atk / 2)(a.atk / 2) - (b.def / 3)(b.def / 3)
As the OP puts it, damage scales greatly, see below. I think he's very pleased with it, however it makes Defense a less valuable stat compared to attack.
a.atk=10, 25 damage dealt
a.atk=16, 64 damage dealt
a.atk=20, 100 damage dealt
a.atk=30, 225 damage dealt
a.atk=50, 625 damage dealt
a.atk=70, 1225 damage dealt
a.atk=100, 2500 damage dealt
a.atk=150, 5625 damage dealt
a.atk=200, 9999 damage dealt 

if defense is /3 then ^2, this is how much less the base damage will be.
(b.Def / 3)(b.Def / 3)
def    damage
10    11
11    13
12    16
13    18.5
14    21
15    25
16    28
17    32
18    36
19    40
20    44
25    69
30    100
35    136
40    177
45    225
50    277
55    336
60    400
70    544
80    711
90    900
99    1089

125  1736
150  2500 
175  3402
199  4400
255 7225
300 10,000!

In my opinion, this method of having scaling damage is cool, but it means that 1 point to attack is more valuable than 1 point of defense, which is weird to me. Maybe I'm thinking about it too much? If you back track to an earlier point in the game, you'll be one-shoting everything with obscene numbers and the players might start to think too much too.

Let's say you're going for a damage cap of 9,999. Dividing attack by 3 instead of 2 will net you a base damage of 4400 if your attack power is at 200. If your damage doubles when you crit, you'll be approaching 9900 base damage. Factoring in things like elemental weaknesses and resistances and you're pretty much set.

Just for curiosity, let's look at numbers if you divide stat x by 4.
(b.def/ 4)(b.def / 4)
atk   damage    
10    6.25
11    7.5
12    9
13    10.5
14    12
15    14
16    16
17    18
18    20
19    22.5
20    25
25    39
30    56
35    76.5

40    100
45    126.5
50    156
55    189
60    225
70    306
80    400
90    506
99   612

125  976
150 1406
175  1914
199  2475
255  4064
300 5625

I might give a try, but my characters stats will be pretty low so that I can keep make damage around 999. In several Final Fantasy games, 5, 6, and 9 for example, your stats were low. The highest Strength state in FF5 was in the 40s. The formulas scaled because the game had a modifier that was the characters level. You can't assign a level to enemies in RPG maker with scripting, however, which is unfortunate.

Let's see what it would look like to compare high attack to low defense.
70 attack vs 20 def is 519 base damage. 80 attack vs 30 defense is 655 base damage.
Atk VS Def = base damage
70        20         519
70        40         444
70        50         388
70        60         319
80        30         655
100      50         922
100      80         711
100      90         605
100     100        486
80         99         99
70         99        0 or 1
80         110      45
90         110      0 or 1
120       150     194
125       150     330
130       150     471
150       150     1094
Based on this information, if the attack and defense are equal, there will be a damage and you will probably be giving enemies a fuck ton of HP. If your attack is too low, you will probably be no match for the enemy. If your attack is much greater than enemy defense, you'll be doing a lot of damage and it makes the numbers look kind of same-y I guess.

If I was developing a game using this number system, I would have to make a spreadsheet and keep I think I would have to micromanage the distribution of points and fine tune to game a little to much.


How to change critical damage.
Here are the steps:

1 - Open up your game folder

2 - Go to "js"

3 - Open up "rpg_objects" (I personally just used word pad)

4 - Find this line:

Game_Action.prototype.applyCritical = function(damage) {

    return damage * 3;



Change the "3" to whatever critical damage multiplier you want.

Saturday, June 9, 2018

You are playing as yourself in D&D

What if the IRL you were in any movie, game, comic, etc? The spirit of this idea is that the real life you has been magically transplanted into a setting where magic and dragons are real, such as a D&D setting. You are very likely an ordinary person with a +1 to intelligence at best because you're a nerd. Think about a movie where an ordinary person goes into a fantasy world or the future or something, like Tron or Narnia, but without being lame, or a Doctor Who companion. You could also be the you of that setting. Because of this, the danger and the difficulty are greater than if you were built like an adventurer.

Rules: Take these revisions to the commoner stats (MM345). If you feel these don't suit the IRL you, justify it. Keep in mind, D&D characters are very above average people. D&D assumes 10 is an average ability score and 20 reflects the best a human can be, living or dead. A 15 therefore reflects being 1 and a half times better than average, or half way between what is ordinary for a human and the pinnacle for a human.

Race: What's your IRL race again? Human? Oh, yeah. Don't apply any racial bonuses.
Hit Dice: 1d8 is the hit die recommended for custom creatures that are Medium size in the DMG. 1d6 if you're 4 feet or shorter.
Speed: 30 feet. 25 feet if you're 4 feet or shorter.
Ability Scores: 4x 10s and 2x 11s or 5x 10s and 1x 12. Don't overthink this. If you really are that strong or that smart or etc., consider taking a 12 or a 13 at most.
Saving Throws: Pick any 1 ability that you think suits you.
Languages: Common. You don't know any standard in-game languages. Variant Rule: One other IRL language you know is mysteriously replaced by one standard in-game language.
Skills: Any 3 skills you think suits you.
Proficiency Bonus: +2 at level one, and progress as normal.
Background: Ignore this category.
Alignment: Do you generally obey the law regardless of whether or not you agree and try to be a good person? You might be a mischievous asshole or an indifferent git, but you likely don't function as a malicious person. Good people can do evil things in extreme situations and lawful people can do unlawful things in extreme situations, but let's face it, the worst you get up to is pirating anime and movies. You're lawful good. Deal with it, Clark Kent. You can change your alignment after level 1.
Tools: Any tools or instruments you are actually proficient in.
Game Sets: If you are actually proficient in games besides Skyrim and Monopoly.
Starting Equipment: 1 outfit you own and any objects you ordinarily carry around, plus 1 other item you own that you might have in a common situation for you.
Weapon and Armor Proficiencies: You are proficient in unarmed attacks, clubs, and other simple or martial weapons or armor if you have had formal training.

After Level 1: You can multiclass into any one class you like even if you don't meet the multiclass requirements once. If you want to multiclass again, you must meet the requirements.

Example:
BILL
Human, Lawful good

Hit Points: 8
AC: 10
Speed: 30 ft

Proficiency Bonus +2

       Score    Mod    Save
STR     10   
DEX     10   
CON     10   
INT     11   
WIS     11              +2
CHA     10   

SKILLS
Insight       +2
Investigation +2
Perception    +2

TOOLS: Painters Supplies
LANGUAGES: Common
WEAPONS: Clubs
ARMOR: none

INVENTORY:
Common clothes, phone, pen, wallet, shoes, rubber band