- Joined
- Jul 25, 2013
- Messages
- 124
- Reaction score
- 18
- First Language
- English
- Primarily Uses
I apologize in advance if this topic was previously covered; I couldn't find the answer during searches over the last 3 days. I am running a system similar to D&D for calculations and damage, etcetera, including randomizing the base value of damage from the attack based upon the weapon's attack value, modifying it by either the character's atk or agi (depeding if it falls under melee or ranged weapon), and reducing it by the target's def value (as a percentage). I can't remember how to call the attacker's equipped weapon. My formula is as follows:
(a.weapon[atk]+rand[1...a.weapon[atk]])*(1-(b.def/20))
What is supposed to happen is the basic attack "rolls" a number based upon the weapon's attack value (example: 6) and then adds that base value, resulting in a number between 7 and 12 in my example. The "roll" is then multiplied by the target's defense (as a %), i.e. for every point of defense, they reduce physical attack damage by 5%. Armor values are automatically added to the character's base defense, so I can have a "natural armor" value of 0 for most characters (thus they rely on armor). How should I fix my formula to call the weapon's vase attack value as part of my formula, and to use it to randomize a value?
I plan to add the following between the attack and defense sides (next to the *):
; a.weapontype[simple melee | martial melee | exotic melee]?; v[n]*(1+((a.atk-a.weaponatk)*a.atk/10)); v[n]*(1+((a.atk-a.weaponatk)*a.agi/10));
This, when proper weapon attack power is called and weapon type is called (yes, those are my three melee categories), should take the variable I will need to assign the base damage to, and multiply is by the appropriate modifier (attack or agility) before reducing the damage.
I was thinking of trying a common event workaround, but I believe the damage formula is calculated before any "features" are caused by the skill.
Help is appreciated.
I also have an issue with the damage "roll" for the monster skills I'm putting in, but the intent is the same for the monster "base attack" skills. Example:
(rand[2...8]+4)*(1-(b.body[def]/20))
Thanks, in advance (sorry for the long post).
(a.weapon[atk]+rand[1...a.weapon[atk]])*(1-(b.def/20))
What is supposed to happen is the basic attack "rolls" a number based upon the weapon's attack value (example: 6) and then adds that base value, resulting in a number between 7 and 12 in my example. The "roll" is then multiplied by the target's defense (as a %), i.e. for every point of defense, they reduce physical attack damage by 5%. Armor values are automatically added to the character's base defense, so I can have a "natural armor" value of 0 for most characters (thus they rely on armor). How should I fix my formula to call the weapon's vase attack value as part of my formula, and to use it to randomize a value?
I plan to add the following between the attack and defense sides (next to the *):
; a.weapontype[simple melee | martial melee | exotic melee]?; v[n]*(1+((a.atk-a.weaponatk)*a.atk/10)); v[n]*(1+((a.atk-a.weaponatk)*a.agi/10));
This, when proper weapon attack power is called and weapon type is called (yes, those are my three melee categories), should take the variable I will need to assign the base damage to, and multiply is by the appropriate modifier (attack or agility) before reducing the damage.
I was thinking of trying a common event workaround, but I believe the damage formula is calculated before any "features" are caused by the skill.
Help is appreciated.
I also have an issue with the damage "roll" for the monster skills I'm putting in, but the intent is the same for the monster "base attack" skills. Example:
(rand[2...8]+4)*(1-(b.body[def]/20))
Thanks, in advance (sorry for the long post).
