Jump to content
  • 0

General Damage from emulator


Unknow

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  3
  • Reputation:   0
  • Joined:  03/26/24
  • Last Seen:  

Is there a way to change the emulator's overall damage? Any variables used in calculating overall damage?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.79
  • Content Count:  47
  • Reputation:   0
  • Joined:  04/10/24
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  814
  • Reputation:   235
  • Joined:  01/30/13
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  3
  • Reputation:   0
  • Joined:  03/26/24
  • Last Seen:  

Posted (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 by Unknow
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...