First off I don't know where to post this so please move if this is the wrong place.
I cannot seem to figure out why I can't get a damage output from enemies attacking my players. Their damage is nulled out no matter how high their stats are.
Here is the code section where my stats are set up:
Here is my default attack formula:
(a.xstat.dmg * a.xstat.hit) - ((b.def * 4) + (b.xstat.vit * 4))
Now I set the enemies stats individually through enemy notetags, but no matter what I set it to, the damage returned when an enemy attacks my characters is returned as 0. My players do damage normally and it calculates the enemy's defense as normal too. Here is a notetag box of one of my enemies, who also has 13 ATK and 9 DEF
I cannot figure out what is going on here. I can max everything out and the damage is still 0.
I cannot seem to figure out why I can't get a damage output from enemies attacking my players. Their damage is nulled out no matter how high their stats are.
Here is the code section where my stats are set up:
Code:
#Default xstat formulas for ACTORS
DEFAULT_LEVEL_FORMULA = {
:str => '23 + ((level * 70) / 128)',
:vit => '24 + ((level * 48) / 128)',
:spi => '20 + ((level * 57) / 128)',
:int => '20 + ((level * 57) / 128)',
:hit => 'param(6)/16',
:mhi => '((xstat.spi / 16) + (xstat.int / 16)) - 1',
:dmg => '((param(2)*4) + (xstat.str * 4))',
}
#Default xstat formulas for ENEMIES
DEFAULT_FOR_ENEMIES = {
:str => '1',
:vit => '1',
:spi => '1',
:int => '1',
:hit => '1',
:mhi => '1',
:dmg => '((param(2)) * 4 + (xstat.str * 4))',
}
Here is my default attack formula:
(a.xstat.dmg * a.xstat.hit) - ((b.def * 4) + (b.xstat.vit * 4))
Now I set the enemies stats individually through enemy notetags, but no matter what I set it to, the damage returned when an enemy attacks my characters is returned as 0. My players do damage normally and it calculates the enemy's defense as normal too. Here is a notetag box of one of my enemies, who also has 13 ATK and 9 DEF
Code:
<xstat>
:str => '7',
:vit => '3',
:spi => '2',
:int => '3',
:hit => '1',
:dmg => '(param(2)) + (xstat.str * 4)',
</xstat_end>
<teach point: 1>
I cannot figure out what is going on here. I can max everything out and the damage is still 0.