-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcombat-mechanics.html
176 lines (175 loc) · 17 KB
/
combat-mechanics.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!--
title: Combat Mechanics
description: nerd level detail on blowing stuff up
published: 1
date: 2022-05-30T15:02:50.551Z
tags:
editor: ckeditor
dateCreated: 2022-04-29T22:25:28.822Z
-->
<h1>Combat Mechanics</h1>
<h5>How the Titillating Lasers Tickle</h5>
<p>Nearly always, when a question is ask about how combat in SMR works, the correct answer is “it depends”. Player level factors in to everything. Port and planet levels are also big modifiers. How many connecting sectors there are might decide the fate of your ship. There's a maneuverability rating factor that changes depending how damaged your ship is. Random numbers are often weighted to reduce the chance of streaks. There is a very lot going on behind the scenes.</p>
<p> </p>
<h2>Hardpoint Weapons</h2>
<p>Hardpoint weapons deal reliable, customizable damage that scales very well with level. The more of them you can get, the more damage you can do. In the hand of a knowledgeable player, nothing is more deadly.</p>
<p> </p>
<h3>Firing Weapons at Ships</h3>
<p>Attacker Level Accuracy Modifier = alvlMod = ( attLvl<sup>2</sup> / 60 ) + ( level / 2 ) + 2</p>
<p>Defender Level Accuracy Modifier = dlvlMod = [ ( defLvl<sup>2</sup> / 60 ) + ( level / 2 ) + 2 ] / 2</p>
<p>Ship MR Rating Modifier = mrMod = attMR - defMR</p>
<p>Modified Accuracy = weaponAccuracy x [ 1 + (alvlMod - dlvlMod { + mrMod if negative } ) ] </p>
<p>A couple notes on this:</p>
<ul>
<li>MR can only reduce weapon accuracy. Low single digit numbers penalties are common. Low double digits will happen under more extreme circumstances.</li>
<li>The attacking level accuracy modifier provides a bonus to all players attacking all targets. It starts at 2.5% at level 1 and increases to 68.7% at level 50.</li>
<li>Defensive level accuracy mod also provides half its bonus to a defending ship. That means defenders reduce the attackers accuracy between 1.25% and 34.4% depending on defender level.</li>
</ul>
<p> </p>
<h4>Weighted Random</h4>
<p>The purpose of the weighted random algorithm is to make the result of shots more quickly reflect their true accuracy. This limits successive hits or misses that occur naturally when random events are generated. It is best to keep in mind that, while this part of the game may drastically chance your chance to hit, it is doing so to seek the modified accuracy as described above.</p>
<p>The mechanics of this algorithm, while a bit counter intuitive, are quite simple. For each player, for each type of weapon, a weighted random variable is stored. Each shot, not guaranteed to hit or miss, adjusts the weighted random variable. In effect, each miss will increase a chance to hit on the following shot. And each hit will decrease the chance to hit on the following shot. It looks like this:</p>
<p>On a hit: weight = weight + [ (100 - modifiedAccuracy) x 0.50 ]</p>
<p>On a miss: weight = weight + [ ( -1 x modifiedAccuracy / 100) x 0.50 ]</p>
<p>Effective Firing Accuracy = modifiedAccuracy - weight</p>
<p>This adjustment is applied to all hardpoint fire except for when the modified accuracy is 0 or 100. Those guaranteed situations bypass the weighting code completely and do not adjust the variable.</p>
<p> </p>
<h3>Firing Weapons at Forces, Ports, or Planets</h3>
<p>The Attacker Level Accuracy Modifier and weighted random code affect fire at environmental targets.</p>
<p>Beyond that, ports, planets, and forces each have a different defensive modifier:</p>
<ul>
<li>Ports reduce accuracy by two points per port level. That's 2% at level 1 and 18% at level 9.</li>
<li>Planets reduce accuracy by 0.286% per level. A level 45 planet costs us 12.9%.</li>
<li>Forces have no defensive modifiers.</li>
</ul>
<p>All of these modifiers are multiplicative. In other words, the adjustments they make are proportionate to the accuracy of the weapon being fired. The final result is a players modifier less whichever defensive bonus applies to the situation.</p>
<p> </p>
<h2>Combat Drones</h2>
<p>Combat drones are a much more chaotic weapon system compared to hardpoints. Their performance is quite inconsistent; planets and ports behave one way, ships behave different ways depending on what they're shooting at, and there is often large variation in damage output. These things are downright fearsome when launched from an environmental target and mildly disappointing when launched from a ship.</p>
<p>Combat drones tend to disappoint, from a player perspective, for a few reasons: </p>
<ul>
<li>They always fire last. This is unfortunate for two reasons: drones deal rollover damage, which is more valuable up front. And it is easier to find hardpoint weapons that deal armor damage. This is literally the least optimal place they could launch.</li>
<li>Their maneuverability cost is high. Each 5 drones costs 1 point of maneuverability rating. This leads to drone heavy ships, particularly Ik'Thorne, having terrible MR which leads to penalties while firing.</li>
<li>Drones die. Losing part, or most, of your guns half way through a battle is not good for your future. This is another reason Ik'Thorne ships perform so poorly in player vs player combat.</li>
</ul>
<p>That being said, combat drones deal a substantial amount of damage.</p>
<p> </p>
<h3>Firing Drones at Forces, Ports, or Planets</h3>
<p>The algorithm that determines how many drones are launched is most simple when firing at environmental targets. Player level has no effect. There are no defensive modifiers. That simplicity makes it a good place to start. The equation looks like this:</p>
<p>Drones Launched = random(6 to 57)</p>
<p>The number of drones launched when attacking the environment is a percentage of the total alive on your ship. This is effectively a random number generated between 6% and 57%. On average, 31.5% of drones launch. They always hit. They always deal 2 damage. Given these facts, combat drones can be modeled as dealing 63 DPS per 100 drones alive at the time of firing. The variation is quite extreme, but eventually the law of large numbers will bring the average to 31.5%.</p>
<p>Now, a bit about where that 6-57% came from. A ship firing drones has, before modifiers, a 3% base accuracy. A random number is generated between 3 and 54. That random number is added to the base accuracy which gives us a minimum possible of 6 and a max possible of 57. Environmental targets have no offensive or defensive modifiers concerning combat drones. We press attack, we get somewhere between 6 and 57 percent launched, we deal between 12 and 114 damage per hundred drones. It's simple, boring damage.</p>
<p> </p>
<h3>Firing Drones at Ships</h3>
<p>Players versus player combat is where drones get a little complicated. That 6 to 57% random is still the same. But now we have modifiers based on attacker level, defender level, and ship maneuverability rating. They look like this:</p>
<p>Attacker Modifier = attMod = random(half player level to player level)</p>
<p>Level Modifier = lvlMod = (Attacker Level - Defender Level) / 3</p>
<p>Ship MR Rating Modifier = mrMod = attMR - defMR</p>
<p>And these modifiers affect the launch % as follows:</p>
<p>PvP Drones Launched = { [ (random(6 to 57) + attMod + lvlMod) / 1.5 ] + (MRmod if number is negative) } ( x 0.66 if drone scrambler is equipped on defender)</p>
<p>Some notes on this:</p>
<ul>
<li>MRmod can only reduce drones launched. This penalty is particularly painful for the ITMS which loses 3-6% of its drone launches even when firing on other capital ships.</li>
<li>While this equation can generate negative numbers, the minimum launched is 0.</li>
<li>Expect launches to average 25-35% in common, low level combat between similar ships.</li>
<li>The DCS modifier is lower in PvP. Ik'Thorne ships would do well to leave Nijarin vessels alone.</li>
</ul>
<p> </p>
<h2>Taking Damage from Forces, Ports, or Planets</h2>
<p>Environmental weapons are generally simple but every circumstance has slightly different rules. For that reason, this section looks like a big list of caveats.</p>
<p> </p>
<h3>In General</h3>
<p>Maneuverability rating is not factored in to planet, port, or dropped force fire. This may be because none of those environmental things have MR and the existing algorithms are designed around a MR delta.</p>
<p>Drones launched from ports and planets are simple and dangerous. They fire everything they have, they always hit, and they do 1 damage each. The only modifier possible is a drone scrambler which brings the damage down to 75% of normal.</p>
<p> </p>
<h3>Planet and Port Turrets</h3>
<p>Structural planetary turret receive half of the planet level as an additive accuracy bonus.</p>
<p>Protoplanet hardpoints do not receive planet level based bonuses. They only improve accuracy through radar station structures which provide an additive bonus.</p>
<p>Port turrets fire at a flat 90% before defensive modifiers.</p>
<p>Defensive level bonuses are applied when receiving damage from stationary turrets. Accuracy is reduced by the entire level accuracy modifier; not just half like in PvP combat. This brings turret accuracy all the way down to 31.3% of normal at level 50.</p>
<p> </p>
<h3>Forces</h3>
<p>Scout drones have a base launch rate of 100%, minus a random(1 to 7) squared, minus 1 point per player level. Any scout that launches will kamikazi a ship for 20 damage.</p>
<p>Dropped combat drones launch a random(6 to 57) percent of whatever is in sector. Each that is launched hits for 2 damage. There are no modifiers factored in beyond that.</p>
<p>Mines are a little bit complex:</p>
<ul>
<li>% of Mines Hit = random(1 to 7)<sup>2</sup> + forceSizeMod - lvlMod - sectorMod</li>
<li>ForceSizeMod is the number of total hostile forces in sector divided by 25.</li>
<li>lvlMod is simply the player level. Each level is good for a 1 point reduction in mines hit. Level 50 is good for 50%.</li>
<li>sectorMod is 1/C<sup>0.6</sup> where C is the number of connections to the sector where mines are hit. Warps count as one connection.</li>
</ul>
<p>Mines are usually mild damage. However, the force size mod is painful in a sector where there's several hundred mines. And dead end sectors really bring the damage up. Plus, once in a while, the squared random will provide a baseline 49% of mines hitting. Best to always treat mines with a bit of caution.</p>
<p> </p>
<h2>Ship vs Ship Example</h2>
<p>Let us have an imaginary ITMS piloted by a level 20 trader. They're duking it out with a level 15 Devastator. The mothership fires first.</p>
<p>Hardpoints fire first, of course. The SMR code receives a call for one Planetary Pulse Laser to fire. Several things now happen in approximately this order:</p>
<ul>
<li>The MS player level accuracy modifier is computed. This is ( 20<sup>2</sup>/60 + 20/2 + 2 ) / 100 which comes to 0.197.</li>
<li>The dev player level accuracy modifier is computed. This one is ( 15<sup>2</sup>/60 + 15/2 + 2 ) / 200 which comes to 0.079. The amount is halved here because the dev is defending.</li>
<li>Level modifiers are applied to the PPL accuracy. That's 35% x (1 + 0.197 - 0.079) which comes to 39.1%.</li>
<li>Maneuverability ratings are then computed. In the interest of space, the MS has a MR of 553.8 and the dev is 610.6. That's a difference of 56.8 in favor of the dev. The MS will receive a penalty of [ 35% x ( mrDiff / 15 ) ] which comes to 3.8%. That brings the modified accuracy to 35.3%.</li>
<li>This is the first time this player has fired a PPL this game so there is no weighted random to factor in. The final firing accuracy will be 35.3%.</li>
<li>The game generated a number between 1 and 100. Anything at or below 35.3% will be scored as a hit. The MS is unlucky and rolls a 62 on this D100.</li>
<li><i>MS fires their Planetary Pulse Laser and misses.</i></li>
<li>This miss triggers a change in the weighted random variable. It changes by ( -0.352 x 50 ), or -17.6, which will be added to the next weapon roll. That changes the 1 to 100 in to -16.6 to 82.4 meaning the next PPL shot has a 52.8% chance to hit.</li>
</ul>
<p>That's the only hardpoint. Drones are checked for. We have a lot of drones. They're called to fire and this happens:</p>
<ul>
<li>A random number is generated between 6 and 57. Just for fun, we rolls a 57.</li>
<li>An attacker level modifier is generated. This is a random number between 10 and 20. For some more fun, we roll a 20.</li>
<li>A contested level modifier is generated from the difference between trader levels. This will be ( 20-15 ) / 3 which comes to 1.67</li>
<li>The modified drone accuracy will be sum of the random numbers and modifiers we have computed. 57 + 20 + 1.67 makes 78.67%.</li>
<li>Maneuverability rating makes a final adjusted here as well. That same MR difference brings the same 3.8% penalty to the MR. 74.87% of the MS drones will actually launch, rounded up to the nearest whole drone which is 300 drones.</li>
<li><i>MS launches 300 combat drones at Dev destroying 300 shields and 300 plates of armor.</i></li>
</ul>
<p>The MS is now out of weapons to shoot and the dev returns fire. A Thevian Shield Disperser in hardpoint 1 fires:</p>
<ul>
<li>Player level accuracy modifiers come to { 1 + [ 0.158 - ( 0.197 / 2 ) ] } = 1.056</li>
<li>Modified accuracy is 46% x 1.056 = 48.7%</li>
<li>Damage to the dev has increased its MR to 629.6. Further still in favor of the dev.</li>
<li>This is the first TSD shot of the game for this player. Weight variable is 0.</li>
<li>Random(1 to 100) gives us a 22. <i>Dev fires TSD at MS destroying 175 shields.</i></li>
<li>This hit adjusts the weight variable. (100 - 0.487 ) x 0.5 brings the new value to +26.65.</li>
</ul>
<p>Hardpoint 2 also fires a TSD:</p>
<ul>
<li>Modified accuracy is still 48.7%.</li>
<li>MR of the MS has changed to 560.8 due to shield damage, but is still not affecting dev accuracy.</li>
<li>Random(1 to 100) gives us a 12. This is adjusted to 38.65 due to the weight variable. This is still below the hit threshold of 48.7. <i>Dev fires TSD at MS destroying 175 shields.</i></li>
<li>And the weight value is adjusted +26.65 again. It is now +53.3.</li>
</ul>
<p>Hardpoint 3 fires another TSD:</p>
<ul>
<li>Modified accuracy is still 48.7%.</li>
<li>MR of the MS is up to 567.8. Still too low to bother the dev.</li>
<li>Random(1 to 100), just to prove a point, spits out a 1. This is adjusted to 54.3, above the 48.7 threshold for a hit. Once the weight is above the modified accuracy, the next shot has to miss. With the weighted random, we can only get so lucky.</li>
<li><i>Dev fires TSD at MS and misses.</i></li>
</ul>
<p>The miss adjusted the weight variable by ( 48.7 x -0.5 ) = -24.35. The next TSD shot will be adjusted by 28.95.</p>
<p>Hardpoint 4 fires a Photon Torpedo:</p>
<ul>
<li>Mod. Acc. is 41% x 1.056 = 43.4%</li>
<li>MR has no effect here.</li>
<li>Just for fun, we carry in a weight of -70 from previous combat. Random(1 to 100) gives us a 100. It's adjusted down to 30, which is well within our hit threshold of 43.4. Once the weight is below ( 100 - modified accuracy ), the next shot has to hit. We can only get so unlucky with this mechanism.</li>
<li><i>Dev fires PT at MS which is deflected by their shields.</i></li>
<li>The hit, regardless of being deflected, causes the weight to adjust by ( 43.4% x 0.5 ) = 21.7. New value for next shot is -48.3.</li>
</ul>
<p>Hardpoint 5 fires at Torpedo Launcher:</p>
<ul>
<li>Mod. Acc is 37% x 1.056 = 39.2% and MR isn't touching it.</li>
<li>Starting weight value of 30. Random(1 to 100) generates a value of 10. Adjusted to 40. Just barely a miss. And the weight adjusts -19.6 to 10.4.</li>
<li><i>Dev fires TL at MS and misses.</i></li>
</ul>
<p>Hardpoint 6 fires an Anti-Ship Missile (Guided):</p>
<ul>
<li>Mod. Acc is 104.54%. MR still has not changed.</li>
<li>The accuracy is over 100%. The shot has to hit and the weight code is never invoked.</li>
<li><i>Dev fires ASMG at Dev which is deflected by their shields.</i></li>
</ul>
<p>Hardpoint 7 launches a Nuke:</p>
<ul>
<li>Mod. Acc. 35% * 1.0595 = 37.1%. MR is still against the MS, as usual.</li>
<li>No prior weight coming in. Dev rolls well and hits. Weight adjusts +31.45. The next shot will have a very poor chance to hit.</li>
<li><i>Dev fires Nuke and MS which is deflected by their shields.</i></li>
</ul>
<p>And the dev is out of weapons to shoot. The shot results come back to the combat screen. The traders glance at them while bashing the F key. </p>