- Joined
- Jun 8, 2013
- Messages
- 161
- Reaction score
- 127
- First Language
- Spanish English
- Primarily Uses
- RMMV
Hello forum friends!
I've been trying to make so that having a 120 fire element rate is not a 20% damage reduction against fire, but instead a flat -20 fire damage.
Between lines 1670 and 1690 in the objects.js file I found this:
Game_Action.prototype.makeDamageValue = function(target, critical) {
var item = this.item();
var baseValue = this.evalDamageFormula(target);
var value = baseValue * this.calcElementRate(target);
if (this.isPhysical()) {
value *= target.pdr;
}
if (this.isMagical()) {
value *= target.mdr;
}
if (baseValue < 0) {
value *= target.rec;
}
if (critical) {
value = this.applyCritical(value);
}
value = this.applyVariance(value, item.damage.variance);
value = this.applyGuard(value, target);
value = Math.round(value);
return value;
};
and thought that if I changed var value = baseValue * this.calcElementRate(target); to var value = baseValue -this.calcElementRate(target); the game would treat that "percentage number" as flat, but I'm sure I must be confused and this is not the line where that is handled. Does anyone know how to do this?
Thank you in advance!
I've been trying to make so that having a 120 fire element rate is not a 20% damage reduction against fire, but instead a flat -20 fire damage.
Between lines 1670 and 1690 in the objects.js file I found this:
Game_Action.prototype.makeDamageValue = function(target, critical) {
var item = this.item();
var baseValue = this.evalDamageFormula(target);
var value = baseValue * this.calcElementRate(target);
if (this.isPhysical()) {
value *= target.pdr;
}
if (this.isMagical()) {
value *= target.mdr;
}
if (baseValue < 0) {
value *= target.rec;
}
if (critical) {
value = this.applyCritical(value);
}
value = this.applyVariance(value, item.damage.variance);
value = this.applyGuard(value, target);
value = Math.round(value);
return value;
};
and thought that if I changed var value = baseValue * this.calcElementRate(target); to var value = baseValue -this.calcElementRate(target); the game would treat that "percentage number" as flat, but I'm sure I must be confused and this is not the line where that is handled. Does anyone know how to do this?
Thank you in advance!


