# Guides:Ranged vs. Melee Weapon Efficiency

### From The Urban Dead Wiki

In deciding on the most effective weapons strategy for my two human characters, I did a calculation of the relative efficiencies of melee and ranged weapons, taking into account ap spent searching for ammunition, loading weapons, and attacking. I present these calculations here for anyone who is interested.

Note: as part of wiki-fying this guide, it would be useful to remove secondary (percolated) numbers wherever a general explanation would suffice. Computed efficiency values depend upon constantly-changing experimental data.

**Update: on Feb 8, 2006, efficiency calculations were updated to account for Dec 1, 2005 search odds shown on the Search Odds frontpage.**

## Contents

## Firearms Efficiency

In the following discussion I assume that people using firearms use both pistols and shotguns in conjunction, effectively making them one weapon. In practice, it is not possible to separate the efficiencies of the two weapons, since efficiency relies on searches which yield ammunition for both weapons. I also assume that the individual considering use of firearms has both basic firearms training and advanced training in both pistol and shotgun. Based on the numbers, it is better for individuals without all these skills to use a fireaxe.

### Definition of Efficiency

The efficiency E of any weapon can be defined as the amount of damage D (in hit points) inflicted divided by the number of turns required to inflict that damage. This makes logical sense, as the goal of any attack is to cause as much damage with as little expenditure of AP as possible. Thus mathematically efficiency can be defined as: E=D/T

### Calculating Damage

For combined use of firearms, damage is equal to 5 times the number of hits with the pistol (H_{p}) plus 10 times the number of hits with the shotgun (H_{s}). Thus D=(5H_{p}+10H_{s}).

The number of hits with the pistol is .65 times the number of pistol rounds (N_{p}) that you have: H_{p}=.65N_{p}.

The number of hits with the shotgun is .65 times the number of shotgun shells (N_{s}) that you have: H_{s}=.65N_{s}.

How many shells and bullets do you get from searching? Each search can yield a 6-shot Pistol Clip (with probability A_{p}), a partially loaded Pistol (with probability G_{p} and with an average of L_{p} shots loaded), a 1-shot Shell (probability A_{s}), and a partially loaded Shotgun (with probability G_{s} and with an average of L_{s} shells loaded).

After Q rounds spent searching, the total number of pistol rounds and shotgun rounds is given by (on average):

N_{p} = 6QA_{p}+(L_{p})QG_{p}

N_{s} = QA_{s}+(L_{s})QG_{s}

In the absence of accurate data, it is reasonable to assume that a partially loaded pistol is found with each number of shots (from 0 to 6) equally likely. The average of {0,1,2,3,4,5,6} is 3.0, thus we will use L_{p} = 3.0.

In the absence of accurate data, it is reasonable to assume that a partially loaded shotgun is found with each number of shells (from 0 to 2) equally likely. The average of {0,1,2} is 1.0, thus we will use L_{p} = 1.0.

Hence,

N_{p} = Q (6A_{p}+3G_{p})

N_{s} = Q (A_{s}+G_{s})

Substituting these values into the formula, we get D=5[.65Q(6A_{p}+3G_{p})] + 10[.65Q(A_{s}+G_{s})]

This simplifies to:

D=(19.5QA_{p}+9.75QG_{p}+6.5QA_{s}+6.5QG_{s})

or

D=3.25Q(6A_{p}+3G_{p}+2A_{s}+2G_{s}).

### Calculating AP Required

The number of turns required to inflict this damage is equal to the number of turns spent shooting pistol rounds (N_{p}) plus one turn loading each pistol clip (QA_{p}), plus the number of turns spent shooting shotgun rounds (N_{s}) plus 1 turn loading each found shell (QA_{s}), plus the total number of turns spent searching for the ammo (Q). Thus:

T=N_{p}+QA_{p}+N_{s}+QA_{s}+Q

Substituting Q(6A_{p}+3G_{p}) for N_{p} and Q(A_{s}+G_{s}) for N_{s}, we get T = Q(6A_{p}+3G_{p}+A_{p}+1A_{s}+1G_{s}+A_{s}+1).

This simplifies to:

T=Q(7A_{p}+3G_{p}+2A_{s}+1G_{s}+1).

### Final Formula

Thus the final formula for efficiency of ranged weapons is:

E=D/T=3.25Q(6A_{p}+3G_{p}+2A_{s}+2G_{s})/Q(7A_{p}+3G_{p}+2A_{s}+G_{s}+1)

Simplifying, overall effectiveness is independent of Q, the number of searches:

**E = 3.25(6A _{p}+3G_{p}+2A_{s}+2G_{s})/(7A_{p}+3G_{p}+2A_{s}+G_{s}+1)**

#### Including flare gun damage:

When you search Police Departments, you'll occasionally find flare guns which can be used for shooting as well as signaling. It's not very difficult to incorporate them into our calculations. For flare guns: N_{f} = QG_{f}, where G_{f} is the probability of finding a flare gun on each search.

Flare guns cause 15 HP of damage with a 15% hit probability. Since 15 * .15 = 2.25, D is increased by 2.25QG_{f}.

You don't have to load them but it does take a turn to shoot, so T is increased by QG_{f}.

Our new efficiency formula is given by

**E = (19.5A _{p}+9.75G_{p}+6.5A_{s}+6.5G_{s}+2.25G_{f}) / (7A_{p}+3G_{p}+2A_{s}+G_{s}+G_{f}+1)**.

Note: Even if you use Flare Guns only for scouting and signaling, you should probably use this enhanced efficiency rating, to account for the fact that your Police Department searches "in pursuit of" a Flare Gun are not wasted.

However, if you drop flare guns (or consider them worthless), then you should reduce your Police Department efficiency by almost exactly **0.01 damage per AP** (from 1.23 to 1.22 as of Dec 05 statistics).

### Dependency on Search Location

As you can see from the formula, the efficiency of these weapons is highly dependent on the the search locations used and on accurate figures for the find percentages for pistol clips (A_{p}), partially loaded pistols (G_{p}), shotgun shells (A_{s}), partially loaded shotguns (G_{s}), and flare guns (A_{f}).

The most accurate values I could find for these variables are located at the wiki and are probably not based on a statistically valid sample. These values show that the efficiency of one's firearms usage will depend on where one searches and (if searching in a gun shop) whether one has bargain hunting:

Police Station Data (using 3283 searches) | |||
---|---|---|---|

Item | Variable | % Search | Theoret. |

Clip | A_{p} |
7.19% | .0720 |

Shell | A_{s} |
6.03% | .0600 |

Pistol | G_{p} |
1.68% | .0170 |

Shotgun | G_{s} |
1.52% | .0170 |

Flare Gun | G_{f} |
1.68% | .0170 |

Bargain Hunting Gun Store (1860 searches) | |||
---|---|---|---|

Item | Variable | % Search | Theoret. |

Clip | A_{p} |
10.97% | .1090 |

Shell | A_{s} |
10.86% | .1090 |

Pistol | G_{p} |
5.81% | .0577 |

Shotgun | G_{s} |
5.75% | .0577 |

Flare Gun | G_{f} |
0.00% | .0000 |

No Bargain Hunt Gun Store (853 searches) | |||
---|---|---|---|

Item | Variable | % Search | Theoret. |

Clip | A_{p} |
7.39% | .0733 |

Shell | A_{s} |
7.39% | .0733 |

Pistol | G_{p} |
4.22% | .0385 |

Shotgun | G_{s} |
3.99% | .0385 |

Flare Gun | G_{f} |
0.00% | .0000 |

Plugging these figures (the actual search values rather than the speculated theoretical estimates) into the formula above, we get:

*[Efficiency using Dec 1, 2005 Search Statistics]*

**Overall Efficiency of Firearms Usage**

Police Dept | Mall w/o Bargain | Mall with Bargain | |
---|---|---|---|

Efficiency | 1.227 | 1.415 | 1.707 |

vs FlakJacket | 0.98 | 1.13 | 1.37 |

Efficiency measures hit points of damage inflicted (and XP gained) per action point spent. For comparison, the **Fireaxe has an efficiency of 1.200** (for a skilled wielder).

### Caveats

Several additional factors can affect the efficiency calculations.

#### Flak Jackets

If the characters you're shooting at are wearing flak jackets, they will only receive 80% of the damage from your firearms. In order to calculate the effects of this, first estimate **J**, the fraction of your victims who are wearing flak jackets. Then your new efficiency E' is:

**E' = E * (1 - 0.2 * J)**

If all of your targets are wearing flak jackets, then your overall efficiency is reduced by **20%**. Flak jackets do not reduce the damage of fire-axe and other melee attacks.

#### Overkill

Calculating damage per AP becomes invalid when you are attacking a target with less HP than your attack. For example, assuming you have equivalent pistol skills and ammunition, using a shotgun on a target with 4 HP is somewhat silly; although the additional damage will net you additional XP, dead is dead.

In these situations, we can suppose a new statistic, a **killing** efficiency statistic. This is the average number of kills per AP spent, and can be derived by dividing average DPA by the damage.

For a maxed-out character, a target with 3 AP can be most easily terminated with a Fire Axe, which has a killing efficiency in that situation of .4000. A pistol only has .2538. Thus, unless you absolutely need that extra 25% chance at that moment, finishing off low-HP zombies with your axe is a better choice.

## Skill Progression

If you've decided to pursue firearms, what's the best order to get the required skills? Here's a table of the efficiencies for each set of skills. (Note that some skills are implied, for example if you see just 'Pistol Training' it includes 'Basic Training' since you need one to get the other.)

*Note: These values are out-of-date and do not account for finding partially loaded weapons. However, the overall rank order is probably correct.*

# skills | Skills | Efficiency |
---|---|---|

0 | None (default for most classes) | .087 |

1 | Basic Firearms Training (default for cop, private) | .524 |

Shopping (default for consumer) | .091 | |

2 | Pistol Training | .853 |

Shotgun Training | .619 | |

Basic, Shopping | .548 | |

Bargain Hunting | .110 | |

3 | Advanced Pistol Training | .985 |

Pistol, Shotgun | .948 | |

Pistol, Shopping | .894 | |

Basic, Bargain | .662 | |

Shotgun, Shopping | .659 | |

Advanced Shotgun Training | .656 | |

4 | Adv. pistol, Shotgun | 1.079 |

Pistol, Bargain | 1.073 | |

Adv. pistol, Shopping | 1.033 | |

Pistol, Shotgun, Shopping | 1.005 | |

Pistol, Adv. shotgun | .985 | |

Shotgun, Bargain | .801 | |

Adv. shotgun, Shopping | .704 | |

5 | Adv. pistol, Bargain | 1.238 |

Pistol, Shotgun, Bargain | 1.213 | |

Adv. pistol, Shotgun, Shopping | 1.144 | |

Adv. pistol, Adv. shotgun | 1.117 | |

Pistol, Adv. shotgun, Shopping | 1.049 | |

Adv. shotgun, Bargain | .857 | |

6 | Adv. pistol, Shotgun, Bargain | 1.378 |

Pistol, Adv. shotgun, Bargain | 1.269 | |

Adv. pistol, Adv. shotgun, Shopping | 1.188 | |

7 | Adv. pistol, Adv. shotgun, Bargain | 1.434 |

The colors reflect the most efficient way to acquire new skills. Most classes should follow the blue and then the green, but consumers start with Shopping so they should follow the yellow and then the green.

Here's the sequence for most classes:

- Basic Firearms Training (cops and privates already have this)
- Pistol Training
- Advanced Pistol Training
- Shopping
- Bargain Hunting
- Shotgun Training
- Advanced Shotgun Training

And here's the sequence for consumers:

- Shopping (consumers start with this)
- Basic Firearms Training
- Pistol Training
- Bargain Hunting
- Advanced Pistol Training
- Shotgun Training
- Advanced Shotgun Training

### Interpretation?

Lets looks at this another way, using the same figures given above. Lets say you spend 100 AP searching in a mall gun store with the bargain hunting skill. According to the numbers used on this page, you will find, on average, 10 clips, 10 shells, 5 pistols, and 5 shotguns. (I actually rounded these numbers down when they should be rounded up, so my figures here will be a bit pesimistic, but it makes for easier math.) Those pistols will contain an average total of 15 shots, and the shotguns an average total of 5.

You can shoot all this weaponry using 10 AP to load the pistols 10 times, 75 AP to shoot the pistols 75 times, 10 AP to load the shotguns 10 times, and 15 AP to shoot the shotguns 15 times.

So, having spent a total of 210 AP, you find and use 15 shotgun shots and 75 pistol shots. On average, vs a target without a flak jacket, with maxed out skills, that does a total of 342 points of damage (75*.65*5 = 244 + 15*.65*10 = 98). That's an "Effciency" of 342 Damage / 210 AP = **1.63**, which is comparable to the figure given above with slightly pessimistic rounding against a target without a flak jacket. For targets with a flak jacket, multiply the figure by 0.8 to get ~1.30.

## Melee Weapon Efficiency

The efficiency of attacks not requiring ammunition is much easier to calculate. For such attacks it is merely equal to damage times hit %. For Fire Axe with advanced axe training, for example: E = .40 * 3 = 1.2.

Thus the efficiency of all attacks can be listed in a table as follows, with the best attack of each type in red:

*Note: These values are out-of-date and do not account for finding partially loaded weapons. In particular, a fully developed human has an attack rating of 1.707 (Dec 1, 2005), which is higher than the attack rating of a fully developed zombie (whose values await Tangling Grasp data). --18:14, 8 Feb 2006 (GMT)Its also questionabgle if they ever WERE accurate, given the 'Interpretation" analysis above results in very different numbers than the "combined firearms" values on this table. Swiers 19:24, 14 April 2008 (BST)*

# skills | Skills | Type | Weapon | Efficiency |

3 | Death Grip, Rend Flesh | Zombie | Claws | 1.500 |

7 | Adv. pistol, Adv. shotgun, Bargain | Ranged | Combined | 1.434 (?) |

6 | Adv. pistol, Shotgun, Bargain | Ranged | Combined | 1.378 (?) |

5 | Adv. pistol, Bargain Hunting | Ranged | Combined | 1.238 (?) |

2 | Axe Proficiency | Melee | Fire axe | 1.200 |

2 | Neck Lurch | Zombie | Bite | 1.200 |

4 | Adv. pistol, Shotgun | Ranged | Combined | 1.079 (?) |

2 | Death Grip | Zombie | Claws | 1.000 |

3 | Advanced Pistol Training | Ranged | Combined | .985 (?) |

2 | Pistol Training | Ranged | Combined | .853 (?) |

1 | Vigour Mortis | Zombie | Bite | .800 |

1 | Hand to Hand Combat | Melee | Fire axe | .750 |

1 | Vigour Mortis | Zombie | Claws | .600 |

1 | Basic Training | Ranged | Combined | .524 |

0 | Zombie | Claws | .500 | |

0 | Zombie | Bite | .400 | |

0 | Melee | Fire axe | .300 | |

0 | Melee | Fists | .100 | |

0 | Ranged | Combined | .087 (?) |

For a survivor, notice that while the **Fire Axe** seems only moderately effective (1.20 damage per AP), its probably the best choice for survivors in many cases. With all of the firearm skills and shopping skills, firearms become more efficient than fireaxes, yielding about 2.14 damage per AP. However, when the opponent is wearing a flak jacket, this advantage is attenuated to about 1.67 damage per AP, as shown above. And while guns are very good when you have maximized all gun and searching skills (and have easy access to profitable locations to search), a survivor without Bargain Hunting, with limited firearms training, or in an area without good search locations is almost certainly better off staying with an axe, especially when combating flak-jacketed opponents.

It also costs much more XP to become fully proficient in firearms: XP invested in Fire Axe skills does you more good than XP invested in firearms and searching skills. So for low level characters, the axe seems the clear winner. Then again, efficiency isn't everything; a character using guns will do less damge over all, but will do it in concentrated spurts, and thus more often kill the targets they attack. This results in extra XPs, and may be more useful for clearing out buildings and so on. Choose your weapons wisely!

## Zombies More Efficient than Survivors?

The above figures might seem to support the argument that zombies are (or can be) more efficient at dishing out damage than survivors. While this is true in the limited case where the two are standing toe-to-toe, its not true in the larger sense of the game setting. Zombies generally have to spend many more AP seeking out and getting into combat with survivors than survivors do seeking out and getting into combat with zombies. This is largely because because of the simple fact that the locations of zombies are fairly obvious to survivors, and easy to reach, while the locations of survivors are not obvious to zombies, and even if know are not easily entered due to barricades.