Lately, I’ve been experimenting with balancing battleships on a separate installation of Discovery. In my experimentation, I have derived an equation grounded in real-world physical principles to calculate the energy that a weapon should use. This equation is equally applicable between fighters and capital ships, provides a consistent and intuitive framework for players where adjusting one parameter of a weapon changes the others, and simplifies balance work by almost entirely eliminating the need for external multipliers or “fudged” numbers.
The equation for weapon energy is as follows:
This equation is derived from the physical equation for work, used for calculating energy in real world applications:
where is energy in joules, is vector force in newtons, and is vector displacement in seconds. This is further broken down as shown:
where is mass in kilograms, and is vector acceleration in meters per second, per second—otherwise more simply known as meters per square second.
This broken-down equation is subsequently used to derive the equation that will be used in Freelancer.
Explanation and Math
is the power necessary to fire a weapon once regardless of refire rate, in Freelancer’s energy units. One could define these energy units in physical terms as damage-Watt seconds, substituting damage for kilograms. This is the output of the equation, which gives us the workable value used to determine how expensive a weapon should be to shoot in the game.
The top half of the equation is the working part of the equation, which will do most of the important math for us. We can see the components here of the equation for work, detailed as follows:
is equivalent to kilograms in the equation for work. When calculating force, kilograms can be considered to be how “big” the force is, and so it translates naturally that damage, as the number being delivered to a target, stands in for kilograms. Damage here is broken down into , , and , representing hull, shield, and energy damage respectively.
In the current balance formula in practice for fighter weapons on the server, only the highest damage is used. However, using only the highest value isn’t physically accurate and inflates the energy cost of pulse weapons, as a projectile dealing 100 hull damage, 50 shield damage, and 0 energy damage will, on average, deal less than 100 damage. Therefore, it’s more accurate for gameplay to take the average of all damage when calculating energy use, as shown:
The 3 from averaging the values is included in the variables in the denominator of the equation, as explained below.
is projectile speed. This is equivalent to the vector acceleration in the work equation. Since Freelancer doesn’t model acceleration for gun projectiles, acceleration is calculated here using the projectile velocity as acceleration over 1 second, as shown here:
where is velocity in meters per second. Since is just , we can simplify:
Then, we cancel :
This proves that simple velocity is applicable for the equation deriving weapon energy from projectile speed.
is projectile range, in meters. Current fighter balance doesn’t use range in its calculation, but from a physical perspective, joules (and therefore energy) cannot be calculated without a vector displacement in which force is applied, as shown in earlier. Therefore, we include projectile range, so that we’re calculating energy and not force, since force isn’t useful for Freelancer.
In the work equation, displacement is defined in seconds. Here, it’s useful to define range in meters, for better readability in balance. Therefore, we can define displacement as for projectile lifetime in seconds, and then multiply by . Since we’re now multiplying by , cancels out and leaves us with meters, and thus projectile range.
Finally, we have , which is the cosine of the angle of projectile dispersion. Usually, this is 1, because , which means that it’s irrelevant to the calculation. However, when there is dispersion, we modify the work equation slightly, to factor for the difference of vectors between and , as shown:
The cosine of provides us with a value between 0 and 1, equal to the coordinate of any point on a unit circle, therefore falling off exponentially as approaches 0, and approaches 90 degrees.
The denominator of the weapon energy equation is very simple, and consists only of two variables:
The first variable, , is a coefficient for calibrating the equation, and is equal to . If this number is changed, all results from the equation will be inaccurate. This coefficient also accounts for the 3 that’s necessary to obtain the average of weapon damage.
This number was chosen by solving for as follows, using values from the Vengeance Mk IV fighter gun:
We multiply both sides by :
Then, we divide both sides by 89:
And then we simplify:
For simplicity in the working equation, is truncated to , which gives us the following value for the Vengeance Mk IV:
This rounds up to 89, which is good enough for working with. However, in calculations we will truncate instead of rounding.
The final variable, , is an artificial efficiency coefficient, and the only "fudge" number in the equation. This should almost always be equal to 1, and exists only for edge cases, such as calculating efficiency for flak weapons and other weapons that have utility beyond the flat damage they deal. This number should never be increased beyond 1, and should only be adjusted if a weapon’s primary effect is something other than causing damage. If a weapon is used purely for dealing damage, this number should not be changed, to maintain physical consistency and not confuse players.
Use of this equation is easy to automate with a script, which uses the following code:
Because when calculating power consumption, there is no better equation than a real world physical equation. No other formula will behave in the correct and expected way, and introducing arbitrary numbers only increases the likelihood of power imbalances and unsatisfying weapons. I have already found that this formula produces very satisfying results with all battleship weapons currently in the game, which I have tested and confirmed through extensive gameplay that I have streamed in the Technocracy of Auxo Discord server.
Conclusion
This equation provides consistent results for both fighter weapons and capital ship weapons, without any need for outside adjustments. It provides values that resemble current balance numbers in many cases, and in cases where it does not, it brings weapons into line with intuitive and predictable energy costs. This allows for players to understand the tradeoffs being made with any given weapon, even if they do not understand the underlying math, and prevents frustration from any weapon having values that don’t meet player expectations. This also allows for ships to be balanced around their power cores very easily, as ship power will always provide a quantifiable cap to damage per second.
This equation can also be applied to missiles, with some small adjustments. can be replaced with the missile’s acceleration, and can be replaced with . This results in smaller numbers than the gun energy equation, which is ideal given that missiles have a cap on how much total damage they can deal, in the form of ammunition limits. This allows missiles to be a more power-efficient weapon, with the trade-off that they will eventually run out of ammunition, and can be evaded, spoofed, or intercepted.
(edit: I will add examples of the differences later, when I have had sleep)
Posts: 3,348
Threads: 103
Joined: May 2012
Staff roles: Balance Dev
I admit to have only skimmed this for the time being, but if I'm correct in reading this then it looks like you are claiming we could balance fighter weapons without accounting for:
Alpha damage, or the ability to use quick flicks to immediately do large amounts of damage at very close range where accuracy is far higher than medium and long range.
Burst damage, which has a similar impact in fighter PvP in particular, where it allows players to capitalize on opportune moments where maximum target surface area is available for them to hit (say while turning), or again when the target is at close range.
At a glance it also looks like exponential relationships are not treated accordingly. For example, again in fighter PvP but certainly also in every other class, just at different scales with different weights, velocity is a highly exponential factor. Players are happy when they achieve 5-10% hitrate with a 600 m/s gun -- especially a high-refire, low alpha one, which we have established we apparently don't care about -- while hitrates approach nearly 100% at a velocity like 1200. Meaning linear power usage increase for this is an objectively incorrect approach.
Other things that I don't see any handling for are burstfire mechanics, where a gun can temporarily do large amounts of burst damage yet its damage over time is fairly tame, which is good for capitalizing on opportunities but places restrictions on the player. I also don't see how hybrids are handled. It seems like they would be incredibly heavily punished for their ability to do alright against both shields and hull, acting as if they are simultaneously hitting both at the same time. This is not how the game works. In reality you're only ever shooting shields or hull on a target, and while guns that do both add to the player's burst generally (which we've gone over above), by allowing the user to dedicate more of their weapon slots to hull damage by rocking some hybrids, it is definitely not a big enough advantage to warrant your extreme approach towards nerfing their efficiency.
There are likely myriad other issues. Given your attitude on display here I might even be tempted to actually run the game's guns through these numbers just to have a good laugh, but I don't really know if that is worth my time. The current formula started out simple and was gradually adjusted and, yes, made more complex as we learned more about how gun statistics should really be weighed. Unfortunately I don't see any quick way for you to prove that your approach is correct. Perhaps staring at some of the resulting numbers and realizing how wildly off they are might do it.
Oh. I just realized we're also weighing range as an equal stat to velocity. That might be the spiciest take I've read on gun balance in a while. It sounds funny to me that a 10 m/s gun crawling towards a target 60,000 meters away would have the same power usage for the same damage as a 600 m/s gun with 1000 range, which might just actually hit something.
I plugged in these numbers with a 1.0 efficiency factor which appears to give results that are at least from the same universe as the current formula.
To see how good this formula is, we will compare two similar guns, the Daito (6.67, 750 m/s) and the Drake Type A (also 6.67, 750 m/s).
The Drake Type A deals 114.4 hull damage and 85.8 shield damage per shot for 121 energy per shot.
The Daito deals 162 hull damage and 81 shield damage per shot for 119 energy per shot.
Obviously the Daito in terms of raw performance is the better gun. Thanks to this Great And Objective, Superior Formula™, it now also uses less energy to do much more damage! Of course, the 3 damage less that it does to shields is so very crippling that it warrants a 43.9% increase in efficiency.
Your formula is bad.
Now, for the record, I like seeing someone else tinker with this and I am not in any way shape or form claiming that my approach is the perfect, flawless one. I think we'd have a more productive conversation, however, if we dropped the attitude. The reality is that the current formula was tweaked and tuned over about a decade. It started out simple, and over time I learned that certain stats mattered more or less than I thought, or in some cases less -- like hybrid guns, where up until very recently I did in fact just add up both hull and energy damage and used that value in the rest of the equation. That turned out to be wrong, however, which is why we now have the more complex, less elegant-looking solution.
There's one last little thing that's being overlooked here, too, which is that powerplant values are pretty much completely arbitrary. Igiss or someone set up some initial values a very long time ago, and since then they have been reshuffled and adjusted however people -- usually me -- saw fit. I have recently played around with the idea of halving every large ship powerplant and also halving all power usage of their guns to make energy damage a little bit more consistent and balanced. I don't really see how this completely arbitrary approach to powerplant capacity and recharge can ever result in some sort of God-given perfect formula that can be used for every gun from the smallest to the largest ships. That implies that powercore values have to be set up perfectly to begin with across classes. They are not, and I doubt they ever will be.
Quote:but if I'm correct in reading this then it looks like you are claiming we could balance fighter weapons without accounting for:
Alpha damage, or the ability to use quick flicks to immediately do large amounts of damage at very close range where accuracy is far higher than medium and long range.
Burst damage, which has a similar impact in fighter PvP in particular, where it allows players to capitalize on opportune moments where maximum target surface area is available for them to hit (say while turning), or again when the target is at close range.
This is what I'm saying, yes.
Quote:At a glance it also looks like exponential relationships are not treated accordingly. For example, again in fighter PvP but certainly also in every other class, just at different scales with different weights, velocity is a highly exponential factor. ... Meaning linear power usage increase for this is an objectively incorrect approach.
This is true if you don't factor range. However, when you include range in the equation as well, then an inverse exponential curve emerges:
This is the graph for my equation where x = projectile velocity and y = projectile range, and energy cost is static. As you can see, in order to have higher projectile velocity for the same energy, you need exponentially less range, and vice versa. Equation is here, with numbers pulled from the DULZIAN codename and ran through my equation:
Quote:Players are happy when they achieve 5-10% hitrate with a 600 m/s gun -- especially a high-refire, low alpha one, which we have established we apparently don't care about -- while hitrates approach nearly 100% at a velocity like 1200.
If players are happy using a high-refire low-alpha gun, then they're happy with that. I'm not sure how this is relevant to calculating power consumption.
Quote:Other things that I don't see any handling for are burstfire mechanics, where a gun can temporarily do large amounts of burst damage yet its damage over time is fairly tame, which is good for capitalizing on opportunities but places restrictions on the player.
This equation only calculates damage for each energy bolt, because an energy bolt with the same characteristics should always cost the same amount of energy. DPS should not change the cost per energy bolt. Therefore, burst-fire is not relevant to the equation, as the difference between firing three shots in 1 second or 3 shots in 0.5 seconds with a 0.5 second cooldown is literally inconsequential to energy calculations. Burst cooldown is another factor of balance that's separate from energy consumption.
Quote:I also don't see how hybrids are handled. It seems like they would be incredibly heavily punished for their ability to do alright against both shields and hull, acting as if they are simultaneously hitting both at the same time. This is not how the game works. In reality you're only ever shooting shields or hull on a target, and while guns that do both add to the player's burst generally (which we've gone over above), by allowing the user to dedicate more of their weapon slots to hull damage by rocking some hybrids, it is definitely not a big enough advantage to warrant your extreme approach towards nerfing their efficiency.
ASMD railguns currently cost 1221 energy to fire. Running the numbers through my equation, they cost 1147 energy to fire.
Quote:There are likely myriad other issues. Given your attitude on display here I might even be tempted to actually run the game's guns through these numbers just to have a good laugh, but I don't really know if that is worth my time.
Please don't mock me for making a reasoned balance proposal that differs from your philosophy.
Quote:Oh. I just realized we're also weighing range as an equal stat to velocity. That might be the spiciest take I've read on gun balance in a while. It sounds funny to me that a 10 m/s gun crawling towards a target 60,000 meters away would have the same power usage for the same damage as a 600 m/s gun with 1000 range, which might just actually hit something.
Range is an equal stat because the relationship between velocity and range is exponential, as you can see above. Increasing both velocity and range increases the energy cost exponentially, which is important for cap balance. Also, no one would ever make a gun that's 10 m/s and 60,000 meters in range, even if the equation supports it. The fact that the equation supports it is proof that it's functional.
Edit, since you also edited:
Quote:The Drake Type A deals 114.4 hull damage and 85.8 shield damage per shot for 121 energy per shot.
The Daito deals 162 hull damage and 81 shield damage per shot for 119 energy per shot.
Obviously the Daito in terms of raw performance is the better gun. Thanks to this Great And Objective, Superior Formula™, it now also uses less energy to do much more damage! Of course, the 3 damage less that it does to shields is so very crippling that it warrants a 43.9% increase in efficiency.
You got the math wrong for the Drake Type A.
At least get your numbers right if you're going to say my formula's bad.
Posts: 3,348
Threads: 103
Joined: May 2012
Staff roles: Balance Dev
I ran your formula and presented the results in the form of the Daito and Drake Type A. I picked these because the Drake Type A happened to be the gun I randomly arrived at when I opened FLStat to have a look.
Do you believe the efficiencies calculated by your equation, presented in my post above, to be objectively correct and balanced?
@Goddess Astra Never heard Haste ... never heard users and only make his power up as Lead Dev for mess with possible ideas or changes on behalf of himself ... (and his friendlies)
While i agree your formula could be "Bad" as what he said, those probably could not be fully true (as it appears he has a even worse formula creator to balance weapons seen in these recent patches, and i accuse him for being Discovery Killer)
Maybe could fit into an interesting addition for some guns, maybe to improve it or to make it realiable for game to be used again (We have like 5 photon zoner guns and never seen those in action actually) ... or balance heavier kind of weapons ...
So... Why not?
But him saying "People is happy when 600m/s have a hit ratio of 5-10%..." ... well, that is actually stupid, people is angry, but he don't wanna to admit it, unless is fighting in the opponent side, that is why people is happy, but playing on the gunner side shooting at your enemy is were things go really really wrong ...
But what to say? ... it is better stay "away" of such things, as they will only open the eyes when community die entirely or due low population make it server down...eventually one will take over the ashes and heard the community or at least read their expectations and maybe some ideas can be bringed up again for the server ...
Still again, liked your idea, but still belive could not be the best implementation but that doesn't mean your idea is wrong, it is kinda really good, but could use some, testing and modification to slightly better fit the thing, and remember, just because a game, not always should be moving with IRL World Physics ... but we can take the Vanilla FL as an idea where they bring some guns not always following such formula or just making it in a way different ... but Haste ... Haste seems to belive "Bigger, Costlier and Heavier" ... when isn't always true
Hello, I am not on the development team and I have no say in the current equation nor do I believe that efficiency should be the great equalizer between all guns, but I am a snub PvPer and I have a background in mathematical optimization. I think this is a good effort, but I want to explain some of the reasons why this model as it is, shouldn't be applied to snub PvP. I think your calculations are sound, but there must be some consideration for the context to make the model better. Particularly the context of snub duels.
The reason why range should not be of equal weight (or a weight at all) to gun velocity in snub PvP is because the effective range of a gun against other snubs in both 1v1 and group fights is currently almost entirely dependent on the gun velocity, and this effective range is already lower than the current range values. If a projectile requires too much time to connect with a target, the probability of scoring a hit falls off because there is more time to react to it. You're weighting a value that has an impact of close to 0 equally with a value that is crucial to snub balance. In a cap fight, this is less true because the larger size of cap hitboxes increases the probability that a projectile at long range will hit. In a snub fight, the probability of a hit at maximum range is very close to 0 and therefore is negligible. In other words, you would be over-penalizing players for choosing slightly longer ranged guns on their snub, which provide them almost no value. This leads either to a re-working of range values to make the numbers suitable, or with these longer ranged weapons being discarded entirely, neither of which I presume is what you want. I also don't really think this is your fault because snub range values aren't very consistent in vanilla because of flavor, and they are mostly an afterthought in discovery.
If you want the model to have range as a weight, I would suggest thinking about range in terms of what the range value is able to accomplish. For example, there is no functional difference between a snub gun with 560 range and 480 range and there should be no difference in calculation for energy. However if you put the range at 800 metres for example, you might be able to start boxing caps, and that would start to add significant value to the gun.
A small point, but you solved for the calibration coefficient using a Vengeance MK IV as your base case. There is no reason for you to believe this is a good choice if you consider that the model that you are lifting numbers from might already be flawed, which in turn leads to balancing every gun on a flawed case. I think you might find a lot of snub players are NOT happy with this in-game value of 89.
Additionally, hull and shield damage values are not independent, so you can simply rewrite D_h + D_s as simply 1.5* D_h. I want to note that in vanilla, ship shield and hull values were almost equal, just that shields essentially reduced incoming damage from non-pulses by half. In discovery, at least for snubs, ship hull values are retained but both hull and thus shield damage numbers are scaled down by 2.5 and ship shield values down by 2.5, so it might not be accurate to think of all damage as having equal weight.
A more important point: by ignoring DPS, you essentially guarantee that some guns will perform strictly better than others. Two guns that only differ with refire rate have the same efficiency and energy cost per shot. Then there is no reason for players to pick the gun that has a lower refire, because the gun with the higher DPS will outperform the lower DPS one in a duel where ship powercore is much less of a factor, but both guns will have equal performance in a group fight. This situation actually does exist in the game with the Nomad Laser Type II and the Lesser Nomad Laser Type I, albeit they are at different classes. You will however notice that apart from the rarely flown Labraid and Nomad LF the other Nomad ships don't have a problem mounting full class 3s. What currently stops players from doing this is the difference in efficiency values. If not, they would always choose the higher DPS Nomad Laser Type II. There are probably much better examples than this, but I just want to illustrate why accounting for this would make the model better at giving players more choices to play with.
DPS isn't even the full picture. Because duels are entirely about recurring short passes between the ships, there is limited time to fire, and a lot of time during which players are not facing each other and thus won't fire. This means that it's very likely that powercores will never even fully drain, and players have room to play around the mechanic of lower powercores if needed. The damage per hit in combination with DPS is thus what makes lower refires very strong in duels. For simplicity, let's say every duel only has passes that last 1 second. Let's take an example from the game with the EXCALIBUR and the THUNDERWAVE that both have the same DPS, speed and range. Which weapon actually performs better in terms of damage in this situation? It's the 2.00. Because the first shot of the pass isn't on cooldown, you actually get 3 shots from the EXCALIBUR and 9.33 shots from the THUNDERWAVE. That's 1800 damage from the EXCALIBUR and 1344 from the THUNDERWAVE in that 1 second pass. With your current model, you get an efficiency of 1.64 with both guns. However, one outperforms the other by 33% more damage in duels. You can thus see that the model gives an unfair advantage to weapons that have lower refires. Since efficiency doesn't matter with duels, why does this matter? Because with the same level of accuracy with both guns in group fights, the EXCALIBUR breaks even because of equivalent efficiencies. Which means you again have a clear winner that does one branch of snub PvP better and the other branch equally well.
Personally, the problem with the in-game equation is over-weighting of a lot of things by allowing all kinds of junk weapons into the game that range from fundamentally unfun to interact with and use, to being outright utterly useless, and accommodating these outliers has really skewed the efficiency of more standard and vanilla-style guns to being extremely unfun to play with. Arguably, the solution is to actually look at what is viable in the game and recalculate the efficiencies based on what the guns are actually capable of, since they either utterly fail or are unreasonably effective at certain tasks. A more general model like this that relies entirely on realism doesn't account at all for player decisions and interactions in practical situations. Realistically, if a weapons designer was to design weapons based on your model, they would simply apply optimization techniques to find the optimal range and speed to ensure their guns have the highest expected efficiencies (range should be high enough to do its job and not more, speeds should not be too low that they have low probabilities of hitting, and not too high to yield diminishing returns). However, we have the ranges and speeds in advance and we are designing the efficiency after the fact to suit these combinations. This means that there will be a lot of guns that are going to be suboptimal, and that you would end up with a range/speed combination that is a clear winner.
tl;dr Ranges aren't as important as the model claims it to be for snubs. Not all guns with the same range and speed are equal, nor should they be treated equally. Refires, DPS and alpha damage are important but not factored in. The model prescribes a clear winner based on the context of snub PvP. I am however, interested and hopeful for any change that is better than what we currently have. There are many snub players who are extremely discontent with the in-game efficiency values.