• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community Discovery Development Discovery Mod General Discussion Discovery Mod Balance
1 2 3 4 5 … 55 Next »
Balance Proposal: Universal Weapon Power Equation

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

Balance Proposal: Universal Weapon Power Equation
Offline Goddess Astra
10-12-2024, 07:31 PM, (This post was last modified: 10-12-2024, 07:42 PM by Goddess Astra.)
#1
Member
Posts: 708
Threads: 113
Joined: Apr 2010

Introduction

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:

[Image: 502qCJW.png]

This equation is derived from the physical equation for work, used for calculating energy in real world applications:

[Image: WXyNPI4.png]

where [Image: 6juHEHH.png] is energy in joules, [Image: GlMUMZ9.png] is vector force in newtons, and [Image: xD5xlGl.png] is vector displacement in seconds. This is further broken down as shown:

[Image: egBCVmR.png]

where [Image: US5Zftt.png] is mass in kilograms, and [Image: l1TIlau.png] 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

[Image: eXfPTjY.png] 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:

[Image: bJen0dZ.png]

[Image: z51ZNsN.png] 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 [Image: BQXE5o9.png], [Image: NdqmyBg.png], and [Image: sIKJvcJ.png], 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:

[Image: yzhPBtq.png]

The 3 from averaging the values is included in the variables in the denominator of the equation, as explained below.

[Image: wML424w.png] 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:

[Image: BMUQQGQ.png]

where [Image: KeLTi63.png] is velocity in meters per second. Since [Image: cjWFNh2.png] is just [Image: xD5xlGl.png], we can simplify:

[Image: sL2LtvJ.png]

Then, we cancel :

[Image: 7x9MFMX.png]

This proves that simple velocity is applicable for the equation deriving weapon energy from projectile speed.

[Image: zNm7HGp.png] 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 [Image: ySN2v0g.png] 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 [Image: qOhxRgN.png] for projectile lifetime in seconds, and then multiply [Image: qOhxRgN.png] by [Image: wML424w.png]. Since we’re now multiplying [Image: xD5xlGl.png] by [Image: lrv61KK.png], [Image: xD5xlGl.png] cancels out and leaves us with meters, and thus projectile range.

Finally, we have [Image: f0SN2ag.png], which is the cosine of the angle of projectile dispersion. Usually, this is 1, because [Image: eMQGSHw.png], 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 [Image: GlMUMZ9.png] and [Image: xD5xlGl.png], as shown:

[Image: n3OOJAg.png]

The cosine of [Image: f0SN2ag.png] provides us with a value between 0 and 1, equal to the [Image: 4hr68An.png] coordinate of any point on a unit circle, therefore falling off exponentially as [Image: flIlxS6.png] approaches 0, and [Image: BuW3piU.png] approaches 90 degrees.

The denominator of the weapon energy equation is very simple, and consists only of two variables:

[Image: 823MQQo.png]

The first variable, [Image: Ocwi6l2.png], is a coefficient for calibrating the equation, and is equal to [Image: HYQ15Hv.png]. 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 [Image: Ocwi6l2.png] as follows, using values from the Vengeance Mk IV fighter gun:

[Image: yATwYk4.png]

We multiply both sides by [Image: Ocwi6l2.png]:

[Image: eSfeKCJ.png]

Then, we divide both sides by 89:

[Image: iwEhUjX.png]

And then we simplify:

[Image: y1yMLfx.png]

For simplicity in the working equation, [Image: Ocwi6l2.png] is truncated to [Image: HYQ15Hv.png], which gives us the following value for the Vengeance Mk IV:

[Image: 9jt6HM9.png]

This rounds up to 89, which is good enough for working with. However, in calculations we will truncate instead of rounding.

The final variable, [Image: nQyBWM5.png], 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:

Code:
    private float GetPowerUsage(float hullDamage, float energyDamage, float velocity, float lifetime, float dispersion_angle, float efficiencyFactor)
        {
            double powerUsage = 0;
            double shieldDamage = hullDamage * 0.5;
            shieldDamage += energyDamage;
            double range = velocity * lifetime;

            double dispersion = Math.cos(dispersion_angle * 3.14159265 / 180);

            powerUsage = Math.Trunc(((hullDamage + shieldDamage + energyDamage) * velocity * range * dispersion)/(800000 * efficiencyFactor));

            return (float) powerUsage;
        }

Why do we need this?

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. [Image: wML424w.png] can be replaced with the missile’s acceleration, and [Image: zNm7HGp.png] can be replaced with [Image: qOhxRgN.png]. 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)

[Image: VuqlNAR.gif]

Freelancer Reimagined: Complete Music Overhaul
Reply  


Messages In This Thread
Balance Proposal: Universal Weapon Power Equation - by Goddess Astra - 10-12-2024, 07:31 PM
RE: Balance Proposal: Universal Weapon Power Equation - by jammi - 10-12-2024, 07:42 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Goddess Astra - 10-12-2024, 07:43 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Haste - 10-12-2024, 08:01 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Goddess Astra - 10-12-2024, 08:53 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Haste - 10-12-2024, 08:58 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Goddess Astra - 10-12-2024, 09:04 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Sloths - 10-12-2024, 11:57 PM
RE: Balance Proposal: Universal Weapon Power Equation - by Tenshi Kuonji - 10-13-2024, 12:47 AM
RE: Balance Proposal: Universal Weapon Power Equation - by Oggdo Bogdo - 10-13-2024, 09:33 AM

  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2026 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode