From Discworld MUD Wiki
Revision as of 09:24, 8 August 2022 by Shio (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page states that strength directly affects how much damage you do with melee weapons, which suggests it increases damage independently of bonuses. However, Weapons says nothing about the strength stat in damage calculations. Can someone shed light on how exactly the strength stat increases melee damage? - Helia, 31 October 2011

Yikes, nearly ten years on and this is still the case. I too am curious what role strength plays in damage - I’ve heard conflicting reports from experienced players, and there’s no official documentation that I can find either way. - Pteri, 30 April 2021

I reviewed the mudlib code from 2006, and I think I’ve identified what it’s alluding to. In /std/living/combat.c there’s this key piece when determining which attack is used (before it’s been determined that the attack actually hit at all):

 // Calculate their attack percentage.
 // For the moment I've just given a simple strength bonus so that stronger
 // players hit slightly harder.
 perc = 75 + (att->attacker)->query_str() + (att->attacker)->query_dex();
 // The heavier the weapon the harder it is to hit hard with it.
 if(weapon != att->attacker)
   perc -= weapon->query_weight() / 2;
 if(perc < 25)
   perc = 25;
 attacks = weapon->weapon_attacks(perc, att->defender);

`weapon_attacks` (in /std/weapon_logic.c) then simply filters the list of possible attacks based on the given ‘perc’. So in essence strength does play some role, by basically increasing the range of possible attacks that can be performed with a given weapon, where we generally assume the ‘harder’ attacks (higher required ‘perc’) deal more damage. So this is essentially a gating factor - if your dex+str is too low, you simply won’t be able to perform some of the attacks a given weapon is capable of.

And if the weapon’s “best” attacks aren’t really that different from its average, the benefit of this may be insignificant regardless.

It’s important (for rearrange purposes) to understand that dex is just as good in this regard.

Boosting ‘perc’ above 100 accomplishes nothing, so with e.g. a crystal-bladed dagger at 2lbs you merely need dex+str to be 26 to ensure all possible attacks are available to you. Of course, there are strength-sensitive factors that then determine if you can actually hit with any given attack, such as the impact of burden, but nothing the Combat page doesn’t already mention and certainly nothing I’d call very significant (e.g. the penalty for being simply in a dark room is way bigger than any plausible 26 vs 8 strength contribution via burden etc, impact on the relevant melee skill bonus notwithstanding).

Of course, this is all blindly assuming the code in use today is effectively the same as this 2006 archive. — Pteri, 30 April 2021

Assuming the codebase is similar, to answer some of the questions above; Strength plays a role in the modifiers for success of attack (the more is always better), it also hinges on the choice of attack (code listed above), furthermore it changes the damage of the attack (This is evident in the calc_attack function that is used in the weapon_attacks function mentioned above).

Also given how attacks are chosen, and how the weapons are configured on their chance and dice roll damage. You may in fact be increasing your damage by lowering your 'perc' instead of raising it, as the lower chance may have a significantly higher dice roll that counteracts the damage increase of a higher 'perc'. At the end of the day, it's too difficult to know unless you know the weapon breakdown.

  set_name( "chain" );
  set_short( "iron chain" );
  add_adjective( "iron" );
  set_main_plural( "iron chains" );
  set_long( "This is a heavy iron chain with thick links, about two "+
           "feet long in all.\n" );
  set_value( 100 );
  set_weight( 90 );
  set_wield_func( "check_wrapped", file_name( this_object() ) );
  new_weapon( 45000 );
  set_damage_chance( 6 );
  add_attack( "whip", 75, ({ 20, 2, 25 }), "blunt", "blunt" );
  add_attack( "sharp", 5, ({ 20, 4, 20 }), "sharp", "sharp" );

As an extreme example. The "add_attacks" show the chance, base, die, face values. If the lower chance attack has significantly higher damage than the other(s), then you can see my point (which is not the case here with the iron chain). - Shio, 9 August 2022