Not logged in | Log in | Register
Pirates of the Burning Sea logo
 
 

A Treatise on Tuning (Part Two)

Share |
Posted by Taelorn  |  10/07/2007  |  Devlog  |  Discuss

If you haven’t already read part one, you can find it here.

Ship Tuning

Ship tuning is all about the details and numbers. We define ships in text INI files. Each INI file is a long series of values, amounting to nearly 500 lines in length for the biggest ships (many of those are blank lines). There is also a 100-line base file that’s included in all ships. A good chunk of the values are set once and left alone for a long time, and many of them are used for the ship art. Once those are stripped out, there are about 150 values (not lines) used in tuning ships. Obviously, we cannot show players every single one of those values in the UI.

Acceleration

Setting the values on ships is often more complex than the output that players see in game. For example, players see the speed and best wind angle for ships. Those two stats are the key values out of the 24 values that are used to set a ship’s speed. On top of that, there are numerous values to determine how fast a ship turns, how fast it accelerates and decelerates, how much speed it loses when it turns, how quickly it accelerates into a turn and how well it turns at different speeds. All of those values come together to determine how the ship handles in combat, and I use the data to make simple charts. Here’s a chart that compares the acceleration over 30 seconds for the Cerberus, Stralsund, Defiant, Capricieux, Lexington, Mediator, Invincible and Oliphant.

acceleration_chart.jpg

This chart shows how long it takes each ship to gain speed when sailing at a steady course on their best point. Any maneuvering extends the curve and provides a greater advantage to ships that accelerate faster. In combat, there’s a constant pull between acceleration, turning and deceleration.

This chart is derived from a series of data tables. These tables are way too incremental for any general use, but they provide the gateway to any sort of information I want to derive. Here’s an example of one of those data tables, derived from an arbitrary set of speed and acceleration values:

acceleration_data.jpg

This table shows the time (in tenth of a second increments), the absolute speed the ship attains, and the percentage of its maximum speed. I used charts and tables like these extensively when I first ported our ships to an acceleration-based system.

Ship Guns

In general, these rules apply to the guns in Pirates:

  • Lighter guns reload faster
  • Lighter guns do more damage over time
  • Heavier guns hit harder
  • Heavier guns have longer range
  • Heavier guns are more accurate
  • Guns deal maximum damage at close range, and damage decreases until it hits half damage at max range

There are others important factors to consider. While lighter guns theoretically do more damage over time, they hit for smaller damage per shot. The bigger the ship, the more damage reduction it has on its armor. Here’s a sample of the stats for a few lighter guns:

cannons.jpg

From that spreadsheet snip, you can see that a 4lb gun does 24 max damage and reloads in 15 seconds. In comparison, a 32lb gun does 52 max damage and reloads in 72 seconds. Before any other factors are considered, the 4lb gun can do nearly twice as much damage over time in optimal circumstances. Now, let’s say your target is a Valiant Third Rate. The Valiant has a damage reduction rating of 6 on its broadside armor. DR is an absolute reduction, which means it has the same impact no matter how hard you get hit. Thus, the 4lb gun will do 18 damage max (25% reduction) and 6 damage min (50% reduction, 25% of max damage). On the other hand, the 32lb gun will do 46 damage max (11.5% reduction) and 20 damage min (30% reduction, 43.5% of max damage). Heavy guns are better for punching through targets that have high armor. The sheer volley damage of a heavy broadside means you’re going to severely damage the target and possibly destroy multiple guns. Also, their superior range and accuracy means they can threaten ships before they close into range. This would be different if the Valiant’s armor was damaged or the 4lb gun was targeting the bow or the stern. Damage reduction constantly declines as armor takes damage, and there’s less damage reduction on the ship’s bow and stern. This means the light guns on small ships are better at taking down wounded and exposed targets.

Now it’s time for another derived table. This is a simple chart that lists the DPS of different gun weights at different ranges. All of these values are calculated based on the data in the gun table shown above.

dps.jpg

Looking at the zero range values, you can see the gradual decline in DPS that I mentioned. That decline levels out around 24lb guns, where the increased reload has a declining impact. Mid-range DPS doesn’t decline nearly as fast due to the increasing range and accuracy of the guns. Long range DPS actually increases until it levels out around a 12lb gun. So, the weight of your guns impacts the role you want to play in combat, and therefore the decisions you make. It’s common for PvPers to memorize the gun loadouts on most ships so that they can engage at a favorable range. We don’t actually use all of these guns in game, so you’re not going to see Ships of the Line with 64lb guns. But who knows – maybe someday you’ll see a GM floating around in a yacht that sports a few 64lb guns.

Consumables

I’m going to take a brief break from ships to talk about consumables. Most consumables are limited-use items that help repair your ship in combat, such as a hull patch or a replacement sail. Several months ago, I had a PvP duel last over 90 minutes. The battle was fun and intense, but it’s way too much to expect out of a match. I knew consumables were a problem, but that fight made me bump up the priority of the consumable tuning task. It wasn’t a very long task, and it lead to this simple spreadsheet:

consumables.jpg

I started off by creating a simple calculator and using that to determine the level of existing consumables. I wanted to set up an array for how much each stat is worth so that I could move forward on tuning the consumables. Once that was completed, the next step was making an absolute reduction in the repair values on consumables. We put that into beta for awhile so I could see how it worked before making the next step – breaking consumable repairs into a mixture of absolute and relative values. One of the most common complaints about consumables is that they could repair a ship to full. You could completely demast a Mediator Cutter, then the player would use a mast brace and be back up to 100% masts. So, I set relative values on the consumables to prevent this from occurring. Only using relative repairs would nerf small ships, so it was necessary to keep an absolute repair value on the consumables. The absolute part is valuable to the small ship, while the relative part is valuable to a big ship.

From the percentages in the Hull Patch table, you can see approximately how much of a ship’s armor can be repaired in combat. I used a few sample ships – a Mediator Mastercraft Cutter, a Defiant Frigate, a Mordaunt Forth Rate and two versions of an Invincible First Rate. I set this up for all the consumables, and I used another small calculator to determine what level a consumable should be if it repairs more than one area of a ship.

Ship Data

Back to the ships. I keep most of the information about ships in one big spreadsheet. There’s more information for individual ships in the INI files, because I don’t feel it is necessary to keep track of some of the more overlapping and minor stats. The spreadsheet looks like this:

mechanical.jpg

Every row represents a ship. There are dozens of data fields and formulas along that row.

Each stat has a formula that is used to calculate a point value. These formulas level out the different stats and determine how much of an impact the stats have on a ship’s level. Additionally, there are formualas to calculate different derived statistics. For the value formulas, there’s also a variable weight that’s passed into the formula.

The values for some stats are combined. For example, speed + cargo haul are connected to represent how much cargo a ship can haul given a certain time and distance. A ship’s maximum and average range are weighted against various DPS and volley damage values. A single ship extends from column A to column FB, although a few fields are duplicated (I show level a few different ways for comparison).

Adjusting formulas is painful, but adjusting weights could be insanely time-intensive. So I set up simple tools to facilitate playing with the formulas. Most of these fall into a weight table, where I assign a variable value to key stats depending on the type of ship. Those variables are plugged into the formulas used to adjust the point calculations for the ship’s level calculation. For the formulas themselves, I rip the values out of them. That allows me to play with one and copy it en masse, then pull the values from another location. Here’s a small clip from a weight table:

weight_tables.jpg

If you look at the values in that table, they don’t really make much sense. That’s because you can’t see the comments (the red triangles). Those comments explain why values are set a particular way. For example, SailBest is cheap for merchants because speed is weighted in a unique way on merchants. Warships don’t pay a much higher flat rate for speed than scouts, but they pay a greater cost relative to ship size.

In addition to all the sheets that are used to create, evaluate and adjust ships, it’s also important to have summary data. In this example, I show an old table that tells me how many points of different stats are required to raise a ship’s level. This is a sort of general overview.

points_level.jpg

Behind the scenes, ship combat is a huge web of interconnecting numbers and simple calculations. It’s something else entirely when it reaches the game

430.png


Posted by Taelorn  |  10/07/2007  |  Devlog  |  Discuss