HOW CAN I CHANGE THE NORMAL ATTACK VARIANCE?

Posts

Pages: 1
Hey guys. I have a simple (i hope so^^) question. I am using the XP-Maker and i want to know how i can change the variance from normal attacks. I think the variance is normally 15 or 20%, but i need 0%.

Thank you for your help, greets from germany. :)
Open the script editor. Click on Game_Battler 3 and line 68 to 71 should say:
if self.damage.abs > 0

amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end

Just delete it.
Marrend
Guardian of the Description Thread
21806
In VX, I think the calculation for variance is figured within a method in the Game_Battler class. For XP, I would try looking there first, but I'm thinking it can be found within a methods of the Scene_Battle class as well.

*edit: Or see what Crystalgate's advice gets you. However, I would comment the lines out rather than outright deleting them.
How can i comment lines out? I forget to say that i am using the tankentai bs, but i have found it there too and it works perfectly. thank you so much guys. :D

I also found these lines in the Tankentai Sideview#2 Script (Lines 2030+)


#--------------------------------------------------------------------------
def set_attack_damage_value(attacker)
case DAMAGE_ALGORITHM_TYPE
when 0
atk = [attacker.atk - (self.pdef / 2), 0].max
str = [20 + attacker.str, 0].max
when 1
atk = [attacker.atk - ((attacker.atk * self.pdef) / 1000), 0].max
str = [20 + attacker.str, 0].max
when 2
atk = 20
str = [(attacker.str * 4) - (self.dex * 2) , 0].max
when 3
atk = [(10 + attacker.atk) - (self.pdef / 2), 0].max
str = [(20 + attacker.str) - (self.dex / 2), 0].max
end
self.damage = atk * str / 20
self.damage = 1 if self.damage == 0 and (rand(100) > 40)
self.damage *= elements_correct(attacker.element_set)
self.damage /= 100
end
#--------------------------------------------------------------------------

I have chosen the first damage algorithm in this Script. Is it possible to change it so that i have these formula?
Attack - physical Defense = Damage

The Reason is i am working on a Trading Card Game and i give you a example how i mean it.

Card#1 (with 50 ATK) attacks Card#2 (with 20 p.Def) and it deals 30 Damage to Card#2.
Marrend
Guardian of the Description Thread
21806
Comment lines are delineated by having the "#" character before them. At least that's how it works in VX.

If I'm reading that code right, it seems to me that to achieve a straight-up Att - PDef = Damage thing, you might want to alter the line that says "self.damage = atk * str / 20" to read "self.damage = att". Or perhaps "self.damage = att * str"? I'm not quite sure on this, as one can see.
Wow. I have changed it as you sad to "self.damage = atk" and now it works perfectly.
I have tried a test battle with my hero (229 atk/25 def) and a enemy (76 atk/119 def) and every time my hero deals 110 (229-119) damage and the enemy 51 (76-25). I am so happy now. I have tried it for a few days alone but it didn't worked (i am not a pro on scripting and these things^^). I think i bring you two up in the credits for your help. =)
Pages: 1