Recently I agreed to help out a gaming community running a Morbus server so that I would have a good reason to work on some of the features I never got a chance to implement. It had been a long time since I last worked on Morbus and this server had many extra weapons which I had never seen before and it was a clear to see that many of the weapons were unbalanced. Something that I had always wanted to do was the come up with a mathematical way of balancing weapons in Morbus using a combination of their stats.
The first thing I had to do was take a look at the ultimate question, What makes a weapon balanced? In Morbus we are talking about guns, so what makes a gun balanced? If everyone was a perfect shot then the gun with the highest damage and RPM (rounds per minute) would always win, lucky for us though people aren't perfect at aiming.
This means that the recoil and bullet spread of the gun will have an effect on how much damage someone can actually inflict with that gun. Beyond that we also have to look at how many bullets are in the guns magazine, if they run out of bullets they have to reload which means they aren't doing any more damage.
The ultimate answer to that question is, it depends. Which means I have to take a closer look at each variable and determining their effect.
How much damage does this gun do? Plain and simple. If the gun does high damage per bullet then it takes less bullets to kill. This stat is relevant since it plays an important role on how much damage can be inflicted with this gun.
In certain cases some guns fire multiple "bullets" per shot, for example shotguns (except you no longer call it bullets.) At first I attempted balancing shotguns the same way I balance traditional guns (that fire bullets) however I discovered that this introduces too many unknown variables.
How many bullets does the gun fire per minute? This is probably the most interesting stat and we will discuss it in greater length later.
This is one of the two stats that actually affect how easily it is to aim and shoot a target. Interestingly enough recoil does not always matter depending on what you are doing. If the gun fires incredibly slowly and has a high amount of recoil then you have plenty of time to compensate for the recoil before firing another shot. On the flip side, if the gun fires very quickly with a large amount of recoil then recoil plays a much greater role. As a result the true affect of recoil is very closely dependent on the RPM of a gun.
This is a very simple stat that dictates the accuracy of the gun. Based on the range of the gun the cone plays a lesser or greater affect on whether the user will actually hit their target. In my calculations I didn't take in account the range of the target from the user but it would be interesting to get more data and seeing how that might effect the score.
The size of the magazine that a gun has can play a different role based on the other stats of the weapon as well as it's purpose. Reloading in the heat of battle can often mean death so having enough bullets to finish the job can be very important.
This stat actually has zero effect on the damage that the user can do to their target but is still included since it plays an important role in Morbus itself. The heavier weapons a player carries the slower they move. Mobility is very important since it can mean the difference between being trapped and outrunning the enemy. Another factor is that missions are time-sensitive so taking too long may mean failing the mission and taking damage.
The goal with the weapons in Morbus was to allow different play styles to flourish by having no single "best gun" and instead give each gun a unique purpose. If you were the kind of player who liked to be mobile and avoid fights then choosing just a pistol or a light SMG was perfect for you. If you were the kind of player who liked holding their own and having lots of firepower then choose a rifle and SMG.
In the early days of Morbus there were really just 4 weapons, eventually this grew however to 16. Believe it or not the gaming community I mentioned earlier added another 13 guns onto that which meant a total of 29 guns! (Those aren't discussed in this article)
Now we're going to take a look a few of these weapons and what purpose they were supposed to play. Some of the stats on these guns have been changed by the gaming community but only slightly so they are still very close.
Notes:
The orange highlighted weapons are the original four guns.
The Scar-M8 is the shotgun weapon which I set attempted to balance with the rest of the guns by removing it's recoil and cone since those stats affect it's usage very differently.
The type of weapon (0,1,2,3) indicate their "class" and the "slot" they take. (0=Pistol, 1=SMG, 2=Rifle, 3=Heavy) You can only carry one weapon per slot, the exception is Rifle and Heavy weapons use the same slot.
This was the first SMG weapon in Morbus, it was intended to be fast and inaccurate with a large magazine. This was your go-to weapon if you wanted something that could put out a lot of bullets really quickly without weighing you down.
Morbus was supposed to be sci-fi and a few decades into the future so I did my best to avoid putting modern day guns in the mod but some guns referenced them. (KA-47 <-> AK-47) The KA-47 was intended to be the heavy hitting rifle, if you wanted high damage and knew how to aim it then this gun was for you. The recoil and spread take some getting used to be in skilled hands it would be devastating.
The Mars was supposed to be the opposite of the KA-47 in almost every way. It was slower, more accurate, and with less recoil. This gun was intended for precision and attacking from greater ranges then the KA-47 could reliably hit.
Between the KA-47 and the Mars the M-20 was the compromise. It was faster than the Mars but less accurate it was the middle of the line gun that was intended for encounters at any range. An added bonus was a slightly larger magazine size however.
The four highlighted guns were the original weapons in Morbus which I will make the assumption are fairly well balanced. This means they can be used as a starting point to adjust the weights of each stat on the final score until they have roughly the same score. From there we move onto the other weapons.
One of the first decisions I made however was whether the type of weapon should effect the total score and if so by how much? It made sense to me that Rifles would be strongest followed by SMG's and then Pistols. The difference would be subtle however by only a 10-15% difference so that there wouldn't be too great of a disparity. (Heavy weapons are not included in this since they are meant to be very rare and therefore incredibly powerful.)
At first I came up with a simple equation for calculating the total score of a weapon.
Let C# be an arbitrary constant.
Total Score = (DMG * SHOTS * RPM) - (C1 * RECOIL) - (C2 * CONE)
+ (C3 * CLIP) - (C4 * WEIGHT)
The C# constants are there to adjust the weight of the stat on the total score. You may notice that stats like CONE are in the range of 0.01-0.05 therefore they must be brought up to the same scale as RPM which is in the range of 300-900. (4 powers of 10)
This equation produced scores in the thousands thanks to RPM being such a large number so I multiplied RPM by 0.1 (or divided it by 10) so that it was much closer to values of the other stats (DMG, CLIP, WEIGHT). This resulted in an equation like:
Total Score = (DMG * SHOTS * (RPM * 0.1)) - (C1 * RECOIL) - (C2 * CONE)
+ (C3 * CLIP) - (C4 * WEIGHT)
A few things occurred to me after this, right now i'm only looking at damage on a per-minute level and ignoring the alpha strike potential of a gun. Alpha strike is a term I learned from playing EVE: Online, it is simply the amount of damage done in one shot. Guns like sniper rifles have very high alpha strike potential but poor DPS or DPM since they have a long delay before their next shot. Sniper rifles however are a valid choice in many games however due to their alpha strike potential and therefore I need to account for this somehow.
After adding in alpha strike into the equation I also decided that I should add variables for changing the weight of Damage per minute. I've also renamed the C# variables so that they are more apparent.
Total Score = (DMG * SHOTS * C_ALPHA)
+ (DMG * SHOTS * (RPM * 0.1) * C_DPM)
- (C_RECOIL * RECOIL) - (C_CONE * CONE)
+ (C_CLIP * CLIP) - (C_WEIGHT * WEIGHT)
The equation is getting a bit long now so let's split it up:
ALPHA_SCORE = DMG * SHOTS * C_ALPHA
DPM_SCORE = DMG * SHOTS * (RPM * 0.1) * C_DPM
RECOIL_SCORE = RECOIL * C_RECOIL
CONE_SCORE = CONE * C_CONE
CLIP_SCORE = CLIP * C_CLIP
WEIGHT_SCORE = WEIGHT * C_WEIGHT
SCORE =
ALPHA_SCORE + DPM_SCORE + CLIP_SCORE
- RECOIL_SCORE - CONE_SCORE - WEIGHT_SCORE
Now we still have a few things that we never took into account but we aren't going to since this is still our first revision:
As we've said before, the effect of recoil changes based on the RPM. We don't have enough data yet to map this however.
The damage output of a gun per minute also changes based on the size of the magazine and the RPM, the smaller your magazine the more you have to reload which means less shooting.
The hardest part was deciding the weights for each stat and now i'll explain the number I arrived at and the reasoning behind it:
In the end I decided that DPM should be scaled by 0.3x. Life-or-death fights usually last anywhere between 10-25 seconds so I should really only take a look at how much damage can be inflicted in ~18 seconds. This also puts the DPM score of all weapons in a nice range between 200-300.
In the end I didn't scale alpha strike and left it at 1.0x since none of the guns in Morbus actually rely upon alpha strike except for the shotgun (which I decided won't work with this scale.) In the end the actual effect on the total score is very minute and barely noticeable since across all types of guns the damage only ranges between 14-19.
Recoil needed to be brought up by two powers of ten to make a difference since the stat itself ranged 0.2-0.5. In the end I chose to scale recoil by 2.0x which meant 200.0x (raised 2 powers). Recoil I felt plays quite a bit role so I felt it deserved such a large scalar (2.0x) and as I was balancing the first 4 weapons it was the perfect number to put it at. This resulted with the Recoil score ranging between 60-100.
Like recoil the cone stat was very small so it had to be brought up by a few powers of 10 to make a difference (3 actually.) In the end however I realized that the cone of a gun players a much smaller role on the total score of the gun compared to the other stats which resulted in its 1.75x scale. (1750 after being raised by 3 powers.) This resulted with the cone score ranging between 35-70. (With a few outliers)
In the end I gave the clip size of weapons a 2.0x scale, to be honest this number was fairly arbitrary since like alpha-strike, most guns have a very similar clip/magazine size. This resulted in clip score ranging 40-80.
Just like clip size the weight of guns didn't range very much. Rifles for example had a weight range between 21-24, and SMG's between 12-16. As a result weight was given a very slight scale of 1.1x.
In the end I balanced all Rifles to have scores between 181-183, SMG's between 161-163, and pistols between 146-148. These numbers are actually fairly arbitrary but are based upon the scores of the original 4 weapons after I came up with the scaling values for each stat. Amazingly enough however is that many of the guns had scores very close to what I desired them to have even before touching their stats.
In the end these were my results.
This is actually the ultimate question, and to be honest with you, I don't even know yet. The changes to these guns are going to be uploaded to a public Morbus server and i'll start to gather data and refine the equation. I'm expecting to get lots of data relating to the weights of each stat and determining if they have as big of an effect as I assume they do or if I under-estimated other stats.
So now it's time to test it.