Unknow Posted April 26, 2024 Posted April 26, 2024 Is there a way to change the emulator's overall damage? Any variables used in calculating overall damage? Quote
0 aleph075 Posted April 28, 2024 Posted April 28, 2024 i'am trying lowering the defense rate.... /** * RE DEF Reduction * Damage = Attack * (4000+eDEF)/(4000+eDEF*10) - sDEF * Pierce defence gains 1 atk per def/2 */ if( def1 == -400 ) /* -400 creates a division by 0 and subsequently crashes */ def1 = -399; ATK_ADD2(wd->damage, wd->damage2, is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0, is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0 ); if( !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ) wd->damage = wd->damage * (4000+def1) / (4000+10*def1) - vit_def; <---- /Here/----- if( is_attack_left_handed(src, skill_id) && !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ) wd->damage2 = wd->damage2 * (4000+def1) / (4000+10*def1) - vit_def; if the formula of damage increase the constants, it should increase your damage received. Where said 4000+def1, if you put 5000 (both numerator and denominator). But i am not sure already. I will test and told u. If u do, tell me Quote
0 Playtester Posted April 29, 2024 Posted April 29, 2024 On 4/27/2024 at 12:21 AM, Unknow said: Is there a way to change the emulator's overall damage? Any variables used in calculating overall damage? On a simular request I saw someone suggested to use mapflags and then do % damage adjustments like for GVG/WoE. But I'm not too familiar with that. I'd probably just change the source code to reduce the damage at some point. Probably in battle.cpp "battle_calc_attack" after the type-specific calls but before any no damage checks. Quote
0 Unknow Posted April 29, 2024 Author Posted April 29, 2024 (edited) On 4/27/2024 at 10:30 PM, aleph075 said: i'am trying lowering the defense rate.... /** * RE DEF Reduction * Damage = Attack * (4000+eDEF)/(4000+eDEF*10) - sDEF * Pierce defence gains 1 atk per def/2 */ if( def1 == -400 ) /* -400 creates a division by 0 and subsequently crashes */ def1 = -399; ATK_ADD2(wd->damage, wd->damage2, is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0, is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0 ); if( !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ) wd->damage = wd->damage * (4000+def1) / (4000+10*def1) - vit_def; <---- /Here/----- if( is_attack_left_handed(src, skill_id) && !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ) wd->damage2 = wd->damage2 * (4000+def1) / (4000+10*def1) - vit_def; if the formula of damage increase the constants, it should increase your damage received. Where said 4000+def1, if you put 5000 (both numerator and denominator). But i am not sure already. I will test and told u. If u do, tell me but how do you think about dealing with items that ignore defense? 10 hours ago, Playtester said: I'd probably just change the source code to reduce the damage at some point. Probably in battle.cpp "battle_calc_attack" after the type-specific calls but before any no damage checks. I think of something along those lines but before this approach, I made the post to find out if there was any variable Edited April 29, 2024 by Unknow Quote
Question
Unknow
Is there a way to change the emulator's overall damage? Any variables used in calculating overall damage?
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.