# Difference between revisions of "Talk:Weapons"

(→Disambiguation page?: Avoid disambig for heavy traffic; hatnotes and updating main page are a good idea though) |
(→The "Why should I care about the maximum damage" section here is wrong) |
||

(10 intermediate revisions by 4 users not shown) | |||

Line 45: | Line 45: | ||

:*'''Changing the main page link''': I think I can go one better here, by changing the main page to have links to both this page ''and'' the list (ie. '[[Weapons]] <nowiki>[</nowiki>[[:Category:Weapons|List]]<nowiki>]</nowiki>') - that way it should be immediately obvious that there are multiple pages, and which is which. The same should presumably be done for armour. | :*'''Changing the main page link''': I think I can go one better here, by changing the main page to have links to both this page ''and'' the list (ie. '[[Weapons]] <nowiki>[</nowiki>[[:Category:Weapons|List]]<nowiki>]</nowiki>') - that way it should be immediately obvious that there are multiple pages, and which is which. The same should presumably be done for armour. | ||

:--[[User:Chat|Chat]] 17:32, 25 August 2009 (UTC) | :--[[User:Chat|Chat]] 17:32, 25 August 2009 (UTC) | ||

+ | |||

+ | ==Weapons and Strength== | ||

+ | |||

+ | I would love to know how to calculate what strength I need to stop getting the message "You would need to be a little stronger to wield <weapon> at maximum damage." Is there a formula? I recently upped my str by 2 points but still get the same message. Thanks! | ||

+ | |||

+ | :Well, the new combat hints were added after the mudlib was published, so there's nothing ''specifically'' related to them. However, there is the weapon weight formula in the mudlib used for calculating attack modifiers, which is probably where that message hooks into. | ||

+ | |||

+ | :The formula's quite complex; essentially it works as follows for a given weapon you are attacking with: | ||

+ | |||

+ | :*Calculate the total weight of any thing(s) held in the hand(s) you're ''not'' holding that weapon in. Note that the raw units of weight on the MUD are ninths of a pound, so you'll need to multiply the weight in pounds by 9 (so a weapon weighing 2 4/9 lb weighs '22', for example). | ||

+ | :**Anything that is a shield only counts as 1/5 of its normal weight for the purposes of this calculation. | ||

+ | :*Modify this by your tactics response as follows: | ||

+ | :**If 'parry', leave as is. | ||

+ | :**If 'dodge' ''and'' the weight is less than your dexterity, then divide the weight by two (otherwise leave as is). | ||

+ | :**If 'both' then multiply the weight by 1.5 | ||

+ | :*Halve the result, and add it to the weight of the weapon you're attacking with (again, remember to multiply weight in pounds by 9 first). | ||

+ | :*Divide the result by (1 + the number of limbs you're holding the weapon in). | ||

+ | :*Subtract your strength stat. | ||

+ | :*If the result is positive, you get a penalty (and presumably that message). | ||

+ | |||

+ | :So, some examples from following the above: | ||

+ | :*You're holding two 1 lb daggers, one in each hand, and your response is dodge. You only need 5 strength. | ||

+ | :*You're attacking with a katana (3 3/9 lb), with nothing in the other hand. You need 15 strength. | ||

+ | :*You're attacking with a katana (3 3/9 lb) and parrying with a wakizashi (2 2/9 lb): | ||

+ | :**With your tactics response set to 'parry', you need 20 strength. | ||

+ | :**With your tactics response set to 'dodge' (I guess that wakizashi's kind of useless then...), and if your dex is 21+, you need 17 strength. | ||

+ | :**With your tactics response set to 'both', you need 23 strength. | ||

+ | :*You're attacking with a wooden club (2 6/9 lb) and blocking (response=parry) with a 10lb shield. You need 17 strength. | ||

+ | |||

+ | :Note that: | ||

+ | :*Usual caveat about this being from the mudlib, which is 5+ years out of date. Things may have changed... | ||

+ | :*This obviously doesn't apply if you're fighting unarmed; there's a different formula for that. | ||

+ | :*There's also a different formula for how strength factors into your defence. | ||

+ | :*All the arithmetic is in terms of integers, so all manner of fun rounding will be occurring when you divide things. | ||

+ | :*The code comments seem to imply there's a bug in the tactics response bit (it's supposed to check whether you're actually parrying with the off-hand, but doesn't), which may well have been fixed. | ||

+ | :*From my own experience and the examples above, something has been changed - I attack with a katana and parry with a wakizashi; I only (!) have 18 strength, yet I don't get that message. | ||

+ | |||

+ | :All in all, I'd take the general gist of the formula rather than its exact numbers. I suspect you can reduce or avoid the penalty by: | ||

+ | :*Increasing your strength (obviously). | ||

+ | :*Attacking with lighter weapons. | ||

+ | :*Holding your attacking weapon in both hands. | ||

+ | :*Holding no or lighter items in your off-hand. Note, however, that changing the weight of the weapon you're attacking with will in almost all circumstances make more of a difference than changing the weight of a weapon in your off-hand. | ||

+ | :--[[User:Chat|Chat]] 21:12, 2 January 2010 (UTC) | ||

+ | |||

+ | ==Fire damage== | ||

+ | I've had triple layers of excellent rate armour absorb some small amount of torch damage) (by Baldarov) | ||

+ | |||

+ | Wouldn't it make sense that the amount absorbed is from the blunt damage from the mace though? Could deal a bit of blunt damage that can be absorbed and the fire damage part that can't. --[[User:Frazyl|Frazyl]] 20:12, 1 July 2011 (UTC) | ||

+ | |||

+ | ==The "Why should I care about the maximum damage" section here is wrong== | ||

+ | The example doesn't take into account how armour actually works in the game. | ||

+ | |||

+ | From the "Effect of strength of attack" section in [[Armour]]: | ||

+ | |||

+ | The degree of damage absorbed by armour decreases with stronger attacks (as they are more able to penetrate the armour), down to a minimum level of half the AC. | ||

+ | |||

+ | The specific formula is: | ||

+ | |||

+ | {{Prebox|Damage absorbed by armour (HP) {{=}} min(damage, max(AC / 2, AC - damage/10))}} | ||

+ | |||

+ | Where AC is the total AC of all pieces of armour in the location being hit. | ||

+ | |||

+ | Therefore: | ||

+ | *While damage is less than AC / 1.1, all damage is absorbed. | ||

+ | *While damage is less than AC * 5, AC - damage / 10 is absorbed. | ||

+ | *Past that, AC / 2 is absorbed. | ||

+ | |||

+ | And therefore, if we were to redo the calculations for the example given, the damage difference comes out way smaller (707 to 650). We can also contrive other examples where the consistent weapon comes out overall better than the varied weapon. | ||

+ | |||

+ | This is of course just for this example, and there are others where the results would change (if both had a minimum damage that was higher than 5x the AC, it would look a lot more like the original data). However this example is fairly representative of PK combat vs an armoured opponent so it seems significant that this example is off. | ||

+ | |||

+ | New example (don't know how to upload a table so just the summary). If I multiply all the damage in the table by a factor of 3.33 (gives a nice round 500 for the consistent damage weapon), and assume AC is 100 and use the correct armour calcs, then total damage through for the consistent weapon is 4500, and total damage for the varied one is 4409. | ||

+ | |||

+ | [[User:Pokey]] | ||

+ | |||

+ | Added a blurb at the bottom of the section with the correct damage. Feel free to make these corrections yourself in the future. [[User: Jiang]] |

## Latest revision as of 16:38, 18 January 2020

The modification of damage formula for enchantments looks inconsistent with the the information in the distribution lib. Can the person who posted the formula cite their source?

- Indeed.

- obj/weapon.c, lines 176-177:
tmp = val + (val * query_enchant()) / (query_max_enchant() + query_enchant());

- Subtract out the base damage:
extra_dmg = base * query_enchant() / (query_max_enchant() + query_enchant())

- Divide top and bottom by max_enchant gives:
extra_dmg = base * fraction_enchant / (1 + fraction_enchant)

- Then multiple top and bottom by 100 to use a percentage:
extra_dmg = base * (%enchant / (100 + %enchant)

- Which is what is in the article. --Chat 14:14, 9 August 2009 (UTC)

It's close. And probably close enough for _most_ integer math since the decimal bits get dropped off. But it's not right. Why not just leave it at the real formula so that it's right all the time?

- The formula is as presented because:
- Percentage enchantment is a much more relevant figure to players than absolute enchantment and max enchantment - the enchantment level you see when looking at an object (as a magic user) is directly related to the percentage enchantment. In order to get the absolute current and max enchantment levels, you need to use a thaumometer and the post office balance (and know the relevant conversions from the mudlib).
- Presenting the data this way also highlights that the damage increment is (to all intents and purposes) independent of the weapon's maximum enchantment level, and thus, of the weapon's weight. See the text that follows the formula in the article.
- The error introduced by conversion from discrete to continuous calculation here is at most 1hp of damage, and I call that sufficiently small as to be disregarded.

- PS: Please sign and indent your talk edits:
- You can sign edits by entering '~~~~' at the end of them.
- You can indent by placing colons in front of your lines - one colon gives one level of indentation, two colons two levels, etc.

- --Chat 17:36, 11 August 2009 (UTC)

- ... Wow. I'm sorry you see it that way. You're really bad at math. But I thought I'd see what the general opinion :was before I put the correct formula on the page. it looks like you're more interested in ... I don't know... What :are you interested in? I have no idea. I'll not edit the page then. Feel free to blank out after reading. You :definitely don't need anyone new's help in not maintaining this wiki thing. 70.16.25.125 21:57, 11 August 2009 (UTC)

*Seriously?*The math is fine; all the steps check out. A percentage is just another way of*expressing*a fraction--a way that is, as Chat notes, more intuitive and appropriate in this case. It's just a different notation for the same thing. --Ilde 01:47, 12 August 2009 (UTC)

## Contents

## Disambiguation page?

Given that many people will be visiting a page entitled "Weapons" hoping to find a weapon database, I propose that we make the weapon lists easier to find. I see a couple ways to do this...

1. A disambiguation page, with two links: One to this (very good, by the way) article on weapon mechanics, and another to the weapon database.

2. A permanent link to Category:Weapons at the top of THIS page. I added one as a temporary solution, but of course we can change it later.

3. We could make the "Weapons" link on the main page go to Category:Weapons, and place the following header on THAT page: "This is a list of weapons currently and historically available in game. For detail on the mechanics and nature of weapons, click here."

Any thoughts?

-TherionAndAlts 10:15, 25 August 2009 (UTC)

- I'm not sure it's true that everyone going to 'weapons' is necessarily looking for a list of them - I for one was expecting a page on weapon concepts, for example. However, I can certainly see that people could come here looking for a list, so some means of differentiating the two is clearly desirable.
- Regarding the solutions you have proposed:
**Disambiguation page**: Disambigiation pages are fine for less common pages, but on the whole I suggest we should avoid using them for heavy traffic pages - they'll just slow people down frequently as they're browsing, creating a rather frustrating experience.**Cross-links**: These I think are a better alternative if the pages are frequently visited, or one of the disambiguations is clearly more visited than the other. Note that we have the {{**seealso**}} template that can be used for this purpose.**Changing the main page link**: I think I can go one better here, by changing the main page to have links to both this page*and*the list (ie. 'Weapons [List]') - that way it should be immediately obvious that there are multiple pages, and which is which. The same should presumably be done for armour.

- --Chat 17:32, 25 August 2009 (UTC)

## Weapons and Strength

I would love to know how to calculate what strength I need to stop getting the message "You would need to be a little stronger to wield <weapon> at maximum damage." Is there a formula? I recently upped my str by 2 points but still get the same message. Thanks!

- Well, the new combat hints were added after the mudlib was published, so there's nothing
*specifically*related to them. However, there is the weapon weight formula in the mudlib used for calculating attack modifiers, which is probably where that message hooks into.

- The formula's quite complex; essentially it works as follows for a given weapon you are attacking with:

- Calculate the total weight of any thing(s) held in the hand(s) you're
*not*holding that weapon in. Note that the raw units of weight on the MUD are ninths of a pound, so you'll need to multiply the weight in pounds by 9 (so a weapon weighing 2 4/9 lb weighs '22', for example).- Anything that is a shield only counts as 1/5 of its normal weight for the purposes of this calculation.

- Modify this by your tactics response as follows:
- If 'parry', leave as is.
- If 'dodge'
*and*the weight is less than your dexterity, then divide the weight by two (otherwise leave as is). - If 'both' then multiply the weight by 1.5

- Halve the result, and add it to the weight of the weapon you're attacking with (again, remember to multiply weight in pounds by 9 first).
- Divide the result by (1 + the number of limbs you're holding the weapon in).
- Subtract your strength stat.
- If the result is positive, you get a penalty (and presumably that message).

- Calculate the total weight of any thing(s) held in the hand(s) you're

- So, some examples from following the above:
- You're holding two 1 lb daggers, one in each hand, and your response is dodge. You only need 5 strength.
- You're attacking with a katana (3 3/9 lb), with nothing in the other hand. You need 15 strength.
- You're attacking with a katana (3 3/9 lb) and parrying with a wakizashi (2 2/9 lb):
- With your tactics response set to 'parry', you need 20 strength.
- With your tactics response set to 'dodge' (I guess that wakizashi's kind of useless then...), and if your dex is 21+, you need 17 strength.
- With your tactics response set to 'both', you need 23 strength.

- You're attacking with a wooden club (2 6/9 lb) and blocking (response=parry) with a 10lb shield. You need 17 strength.

- Note that:
- Usual caveat about this being from the mudlib, which is 5+ years out of date. Things may have changed...
- This obviously doesn't apply if you're fighting unarmed; there's a different formula for that.
- There's also a different formula for how strength factors into your defence.
- All the arithmetic is in terms of integers, so all manner of fun rounding will be occurring when you divide things.
- The code comments seem to imply there's a bug in the tactics response bit (it's supposed to check whether you're actually parrying with the off-hand, but doesn't), which may well have been fixed.
- From my own experience and the examples above, something has been changed - I attack with a katana and parry with a wakizashi; I only (!) have 18 strength, yet I don't get that message.

- All in all, I'd take the general gist of the formula rather than its exact numbers. I suspect you can reduce or avoid the penalty by:
- Increasing your strength (obviously).
- Attacking with lighter weapons.
- Holding your attacking weapon in both hands.
- Holding no or lighter items in your off-hand. Note, however, that changing the weight of the weapon you're attacking with will in almost all circumstances make more of a difference than changing the weight of a weapon in your off-hand.

- --Chat 21:12, 2 January 2010 (UTC)

## Fire damage

I've had triple layers of excellent rate armour absorb some small amount of torch damage) (by Baldarov)

Wouldn't it make sense that the amount absorbed is from the blunt damage from the mace though? Could deal a bit of blunt damage that can be absorbed and the fire damage part that can't. --Frazyl 20:12, 1 July 2011 (UTC)

## The "Why should I care about the maximum damage" section here is wrong

The example doesn't take into account how armour actually works in the game.

From the "Effect of strength of attack" section in Armour:

The degree of damage absorbed by armour decreases with stronger attacks (as they are more able to penetrate the armour), down to a minimum level of half the AC.

The specific formula is:

Damage absorbed by armour (HP) = min(damage, max(AC / 2, AC - damage/10))

Where AC is the total AC of all pieces of armour in the location being hit.

Therefore:

- While damage is less than AC / 1.1, all damage is absorbed.
- While damage is less than AC * 5, AC - damage / 10 is absorbed.
- Past that, AC / 2 is absorbed.

And therefore, if we were to redo the calculations for the example given, the damage difference comes out way smaller (707 to 650). We can also contrive other examples where the consistent weapon comes out overall better than the varied weapon.

This is of course just for this example, and there are others where the results would change (if both had a minimum damage that was higher than 5x the AC, it would look a lot more like the original data). However this example is fairly representative of PK combat vs an armoured opponent so it seems significant that this example is off.

New example (don't know how to upload a table so just the summary). If I multiply all the damage in the table by a factor of 3.33 (gives a nice round 500 for the consistent damage weapon), and assume AC is 100 and use the correct armour calcs, then total damage through for the consistent weapon is 4500, and total damage for the varied one is 4409.

Added a blurb at the bottom of the section with the correct damage. Feel free to make these corrections yourself in the future. User: Jiang