In a conversation with some folks over
here, I got the idea to splice in some feedback into the OOZ combat code to get a better idea of what's happening out there.
This thread will present some raw data gathered from that feedback, and hopefully some of you smart people could pipe in and help analyze that data with logic that's possibly ever-so-slightly, but more likely rather-drastically, less flawed than mine.
I'm hoping that we could thereby better understand how OOZ combat works and, if we're so inclined, play around with that code a bit. A mod with some tweaks that I've been playing around with should make its way somewhere in here as well, if I ever get around to uploading it. (Typing is time-consuming, and staring at the screen makes my head hurt. Or maybe it's the numbers.)
All tables written in code flags to keep the spacing and hopefully make it sort of readable.
_____
Psst! For those who aren't interested in all this ruminating on how OOZ combat might work, scroll all the way to the bottom of this post. The mod link's over there.
_____
DATA GATHERING:
This code:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="//do_if[@value='this.ship.distanceto.{$target} lt ($FiringRange + $target.size/2.0)']">
<!--<do_if value="this.ship.macro.ismacro.{macro.units_size_xl_red_destroyer_macro}">-->
<!--<do_if value="this.ship.macro.ismacro.{macro.units_size_xl_red_destroyer_macro} or $target.macro.ismacro.{macro.units_size_xl_red_destroyer_macro}">-->
<!--<do_if value="(this.ship.owner == faction.leddaindustrial) or ($target.owner == faction.leddaindustrial)">-->
<do_if value="(this.ship.owner == faction.player) or ($target.owner == faction.player)">
<create_list name="$quadrant" exact="6" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{1}" front="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{2}" back="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{3}" left="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{4}" right="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{5}" up="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{6}" down="true" />
<do_if value="$quadrant.{1} and $quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'C'" />
</do_if>
<do_elseif value="$quadrant.{1}" >
<set_value name="$UniQuadrant" exact="'F'" />
</do_elseif>
<do_elseif value="$quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'B'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="'-'" />
</do_else>
<do_if value="$quadrant.{3} and $quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{3}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'L'" />
</do_elseif>
<do_elseif value="$quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'R'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<do_if value="$quadrant.{5} and $quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{5}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'U'" />
</do_elseif>
<do_elseif value="$quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'D'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<show_notification caption="'=== Capital Ship OOZ ==='" details="'%1 fighting %2 OOZ \n at Quadrant: %7 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5 \n has %6 combat drones'.[this.ship.knownname, $target.knownname, this.ship.distanceto.{$target}, $result, $FiringRange, this.ship.units.{unitcategory.defence}.count, $UniQuadrant]" queued="true" priority="9" sound="notification_generic"/>
<write_to_logbook category="general" text="'%1 fighting %2 OOZ \n at Quadrant: %7 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5 \n has %6 combat drones'.[this.ship.knownname, $target.knownname, this.ship.distanceto.{$target}, $result, $FiringRange, this.ship.units.{unitcategory.defence}.count, $UniQuadrant]"/>
<remove_value name="$quadrant" />
<remove_value name="$UniQuadrant" />
</do_if>
</add>
</diff>
in aiscripts\fight.attack.object.capital.xml
(The commented out do_if conditions are used to filter specific situations that I want to check for.)
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="//do_if[@value='this.ship.distanceto.{$target} lt $MaxGainDistance']">
<do_if value="(this.ship.owner == faction.player) or ($target.owner == faction.player)">
<create_list name="$quadrant" exact="6" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{1}" front="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{2}" back="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{3}" left="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{4}" right="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{5}" up="true" />
<is_in_quadrant object="this.ship" target="$target" result="$quadrant.{6}" down="true" />
<do_if value="$quadrant.{1} and $quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'C'" />
</do_if>
<do_elseif value="$quadrant.{1}" >
<set_value name="$UniQuadrant" exact="'F'" />
</do_elseif>
<do_elseif value="$quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'B'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="'-'" />
</do_else>
<do_if value="$quadrant.{3} and $quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{3}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'L'" />
</do_elseif>
<do_elseif value="$quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'R'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<do_if value="$quadrant.{5} and $quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{5}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'U'" />
</do_elseif>
<do_elseif value="$quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'D'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<show_notification caption="'=== Fighter OOZ ==='" details="'%1 fighting %2 OOZ \n at Quadrant: %6 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5'.[this.ship.knownname, $target.knownname, this.ship.distanceto.{$target}, $result, $MaxGainDistance, $UniQuadrant]" queued="true" priority="9" sound="notification_generic"/>
<write_to_logbook category="general" text="'%1 fighting %2 OOZ \n at Quadrant: %6 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5'.[this.ship.knownname, $target.knownname, this.ship.distanceto.{$target}, $result, $MaxGainDistance, $UniQuadrant]"/>
<remove_value name="$quadrant" />
<remove_value name="$UniQuadrant" />
</do_if>
</add>
</diff>
in aiscripts\fight.attack.object.fighter.xml
And:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="//do_if[@value='$target != player.primaryship']">
<do_if value="(this.station.owner == faction.player) or ($target.owner == faction.player)">
<create_list name="$quadrant" exact="6" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{1}" front="true" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{2}" back="true" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{3}" left="true" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{4}" right="true" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{5}" up="true" />
<is_in_quadrant object="this.station" target="$target" result="$quadrant.{6}" down="true" />
<do_if value="$quadrant.{1} and $quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'C'" />
</do_if>
<do_elseif value="$quadrant.{1}" >
<set_value name="$UniQuadrant" exact="'F'" />
</do_elseif>
<do_elseif value="$quadrant.{2}" >
<set_value name="$UniQuadrant" exact="'B'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="'-'" />
</do_else>
<do_if value="$quadrant.{3} and $quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{3}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'L'" />
</do_elseif>
<do_elseif value="$quadrant.{4}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'R'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<do_if value="$quadrant.{5} and $quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'C'" />
</do_if>
<do_elseif value="$quadrant.{5}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'U'" />
</do_elseif>
<do_elseif value="$quadrant.{6}" >
<set_value name="$UniQuadrant" exact="$UniQuadrant + 'D'" />
</do_elseif>
<do_else>
<set_value name="$UniQuadrant" exact="$UniQuadrant + '-'" />
</do_else>
<show_notification caption="'=== Station OOZ ==='" details="'%1 fighting %2 OOZ \n at Quadrant: %7 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5 \n has %6 combat drones'.[this.station.knownname, $target.knownname, this.station.distanceto.{$target}, $result, $stationfirerange, this.station.units.{unitcategory.defence}.count, $UniQuadrant]" queued="true" priority="9" sound="notification_generic"/>
<write_to_logbook category="general" text="'%1 fighting %2 OOZ \n at Quadrant: %7 \n at Range: %3 \n Attack Strength: %4 \n Firing Range: %5 \n has %6 combat drones'.[this.station.knownname, $target.knownname, this.station.distanceto.{$target}, $result, $stationfirerange, this.station.units.{unitcategory.defence}.count, $UniQuadrant]"/>
<remove_value name="$quadrant" />
<remove_value name="$UniQuadrant" />
</do_if>
</add>
</diff>
in aiscripts\fight.attack.object.station.xml
(edit: corrected for X:R 3.50 Beta 1, and added UniTrader's Quadrant tracker. Thanks, UniTrader!)
(Most of you probably prefer using the debug commands, probably because it's easier to control when the text is generated and the generated text is easily accessible after game exit, but I prefer to use the PDA + logbook commands because I can easily see them on-screen in-game, and they're saved into the save file for retrieval after exiting the game. Plus I find PDA output cool.)
_____
RAW DATA:
=== X:R v3.50 Beta 1 Data Dump follows: ===
Data was generated with the code posted above; and for these preliminary tests, all mods were uninstalled except for the data gathering stuff.
Fighter stuff first:
Code: Select all
Engaged at: Attack Strength Max Range
HV Riot Squad Drostan Foltor 6120 6842.637 8000
HV Riot Squad Drostan Foltor 5915 6842.637 8000
HV Riot Squad Drostan Foltor 5743 6842.637 8000
HV Riot Squad Drostan Foltor 5569 6842.637 8000
HV Riot Squad Drostan Foltor 3982 6842.637 8000
HV Riot Squad Drostan Foltor 3835 6842.637 8000
SS Riot Squad Drostan N 3065.5 8272.162 8000
SS Riot Squad Drostan N 2919.5 8272.162 8000
SS Riot Squad Drostan Dwalin 5108 10507.467 8000
HV Riot Squad Drostan Gigurum 4528 20405.836 8000
HV Riot Squad Drostan Gigurum 4397 20405.836 8000
HV Riot Squad Drostan Gigurum 4263 20405.836 8000
HV Riot Squad Drostan Gigurum 4119 20405.836 8000
HV Riot Squad Drostan Gigurum 3971 20405.836 8000
SS Riot Squad Drostan N 1786.75 8272.162 8000
SS Riot Squad Drostan N 2018 8272.162 8000
SS Riot Squad Drostan N 2245.5 8272.162 8000
SS Riot Squad Drostan N 2473.5 8272.162 8000
SS Riot Squad Drostan M 5157 9327.236 8000
SS Riot Squad Drostan station 5163 35374.023 8000
HV Riot Squad Cennelath 2912 4252.456 3000
HV Riot Squad Cennelath 2783.5 4252.456 3000
HV Riot Squad Cennelath 2680.5 4252.456 3000
HV Riot Squad Cennelath 2617 4252.456 3000
HV Riot Squad Cennelath 2593.5 4252.456 3000
HV Riot Squad Cennelath 2607 2127.069 3000
HV Riot Squad Cennelath 2352 2127.069 3000
HV Riot Squad Cennelath 2203 2127.069 3000
HV Riot Squad Cennelath 1995.75 2127.069 3000
HV Riot Squad Cennelath 1751.75 2127.069 3000
HV Riot Squad Cennelath 1529.25 2127.069 3000
HV Riot Squad Cennelath 1331.25 2127.069 3000
HV Riot Squad Maelchon 4605 6000 5000
HV Riot Squad Maelchon 3824.5 3488.813 5000
HV Riot Squad Maelchon 3731 3488.813 5000
HV Riot Squad Maelchon 3653 3488.813 5000
HV Riot Squad Domelch 1918.25 5600 2380
XEN Fighter Squadron M 2920.5 1943.472 5000
XEN Fighter Squadron M 2751.5 1943.472 5000
XEN Fighter Squadron M 2614.5 1943.472 5000
XEN Fighter Squadron N 3528.5 1943.472 5000
XEN Fighter Squadron N 2902 1943.472 5000
XEN Fighter Squadron N 3101.5 1943.472 5000
Looks like good news. The variance that we're seeing in attack strength looks like range is now taken into account, and, I'm hoping, not all missiles are fired every tick anymore. Note that while the Drostan is still capable of withering fire (20405.836), it only does so below a certain range. (Still have to check to see if the range of the rest of the Drostan's armament has been changed.)
-- Xenon_Slayer later said that range is not taken into account. The variance is due to speed of shooter vs speed of target, target size, and missiles having a chance to miss. Wasn't able to record what those Xenon fighters were shooting at, but would guess that they're shooting at targets of the same ship type. Possibly the same ship.
Trimmed out some of the Xenon M and N data since there is no variance regardless of range.
And it looks like I saw what I had hoped to find in the Drostan data, and spoke too soon. While there is variance in the Drostan's attack strength, there does not appear to be any connection between attack strength and range. Looking into the raw data again, I did notice that there does appear to be a connection between the Drostan's attack strength and what it's shooting at.
Scrolling further down, found this:
SS Riot Squad Drostan fighting PMC Plutarch Exchange OOZ
at Range: 5163
Attack Strength: 35374.023
Firing Range: 8000
which is the incident with the highest Drostan attack strength so far. Since attack strength also only varies with regard to those fighters that have missiles, I'll hazard a guess here, and say that the effect that missiles have on attack strength has been changed to take
missile speed relative to target speed into effect. However, it looks like all of a fighter's weapons are still brought to bear regardless of range between ship and target, and effective weapon range.
-- Later found that it's more likely due to there being a chance for missiles to miss. All primary weapons and missiles (except those from missile turrets) are fired over the entire range defined in the code as $FiringRange, $stationfirerange, or $MaxGainDistance (depending on whether the attacker is a capital ship, a station, or a fighter) but each missile has a chance to miss.
........
Preliminary Capital Ship Analysis:
Code: Select all
Engaged at: Attack Strength Max Range Drones
PMC Warden Carrier Light Sul 2804 96829.813 6909.5 75
PMC Warden Carrier Light Sul 5754 96817.219 6909.5 75
AG Fulmekron Domelch 8982 31162.961 9408 14
AG Fulmekron Drostan 8968 44407.477 9408 14
- LOOK HERE! SOMETHING HITTING A DROSTAN! -
AG Fulmekron Maelchon 9388 41983.109 9408 20
AG Fulmekron Titurel 10352 60284.863 9408 20
AG Fulmekron Titurel 10206 60284.863 9408 20
AG Fulmekron Titurel 10354 100650.984 9408 14
HOA Balor SS Titurel 7107 6098.286 6384.75 0
HOA Balor PMC Taranis 7001 8236 6384.75 0
HOA Balor PMC Taranis 5173 10672 6384.75 0
HOA Balor PMC Taranis 3268.5 8236 6384.75 0
HOA Balor PMC Taranis 2750 10063 6384.75 0
HOA Balor PMC Taranis 2308.5 9454 6384.75 0
XEN Branch 9 Destroyer I 8652 2090.668 10902 0
XEN Branch 9 Destroyer K 6486 5279.658 7465 0
XEN Branch 9 Destroyer K 6192 5279.658 7465 0
XEN Branch 9 Destroyer K 6030 5279.658 7465 0
XEN Branch 9 Destroyer K 5646 5279.658 7465 0
XEN Branch 9 Destroyer K 5330 5279.658 7465 0
XEN Branch 9 Destroyer K 5545 3551.47 7465 0
XEN Branch 9 Destroyer K 5190 3551.47 7465 0
XEN Branch 9 Destroyer K 5056 5279.658 7465 0
XEN Branch 9 Destroyer K 4043.5 3551.47 7465 0
XEN Branch 9 Destroyer K 4772 5279.658 7465 0
XEN Branch 9 Destroyer K 3103 3551.47 7465 0
TU Water Freighter Albatross 5422 4796.852 7889 0
TU Water Freighter Albatross 4683 4796.852 7889 0
CAR Marauder Phoenix v Manorina 5654 18503.947 6433.5 0
CAR Marauder Phoenix 5375 18503.947 6433.5 0
CAR Marauder Phoenix 5021 18503.947 6433.5 0
CAR Marauder Phoenix v Albatross6486 19363.717 6433.5 0
CAR Marauder Phoenix 7791 19363.717 6433.5 0
CAR Marauder Phoenix 6078 19363.717 6433.5 0
FP High-Tech Freighter Lyranea 8060 3002.743 7997 0
FP High-Tech Freighter Lyranea 7812 3002.743 7997 0
FP High-Tech Freighter Lyranea 7645 3002.743 7997 0
- further data cut. no variance -
SE Energy Freighter Lyramekron 8968 30594.174 10086 0
SE Energy Freighter Lyramekron 8912 30594.174 10086 0
SE Energy Freighter Lyramekron 8958 30594.174 10086 0
- further data cut. no variance -
NL Pharma Freighter Sanahar 7271 4265.486 6358.625 0
NL Pharma Freighter Sanahar 7190 4265.486 6358.625 0
NL Pharma Freighter Sanahar 7117 4265.486 6358.625 0
- further data cut. no variance -
SE Energy Freighter Lyramekron 8694 30594.174 10086 0
SE Energy Freighter Lyramekron 8732 30594.174 10086 0
HOA Energy Freighter Rahanas 1542.75 840 7165.5 0
SS Marauder Titurel Gigurum 4929 16709.24 7401 0
SS Marauder Titurel 5214 16709.24 7401 0
HV Marauder Titurel Lyranea 8262 7192 7401 0
HV Marauder Titurel Hymir 6147 7495.198 7401 0
SS Marauder Titurel 5354 16709.24 7401 0
HV Marauder Titurel 6176 7495.198 7401 0
HV Marauder Titurel 7995 7192 7401 0
SS Marauder Titurel 5560 16709.24 7401 0
HV Marauder Titurel Foltor 7120 3158.228 7401 0
HV Marauder Titurel 7075 3158.228 7401 0
HV Marauder Titurel 7805 7192 7401 0
HV Marauder Titurel Gigurum 6799 16645.426 7401 0
HV Marauder Titurel 6183 7495.198 7401 0
HV Marauder Titurel 7600 7192 7401 0
SS Marauder Titurel Artio 7138 1856.653 7401 0
First thing I noticed: the light Suls. It does look like combat drones pull their weight OOZ now.
Also interesting are the Fulmekron and Titurel numbers which appear to confirm that attack strength depends on what they're trying to shoot. Seems to shoot my missile theory down, though because, as far as I know, Titurels don't have missiles, do they? I got 6 different attack strength levels for the Titurel, and the Titurel is armed with, if I remember correctly, 6 banks of HIT/MA turrets with 3-4 turrets per bank, and 2 Plasma/MA turrets. Something else in play here.
-- Later found that turrets fire depending on the target's position relative to a ship's orientation. So a turret bank on the left side of a capital ship or a station cannot fire on a target on the right side of the ship/station. Other than that, it looks like same rules as primary weapons apply: all turrets fire over the range defined for that category (capship, station, or fighter), and some math is applied depending on target size, relative ship speed, chance to evade, and likely some other factors which each reflect in the damage that is applied on the target.
One odd thing, though. I got several attack strength = 0 lines which I deleted from my table because I thought that the attack strength calculation might have glitched in those lines. When I looked closer, however, I found that attack strength = 0 occurs every single time a Titurel tries to fire at a station. This was from a fresh game start, so the Titurels couldn't have been damaged. Possible
red flag here. (UPDATE:
red flag fixed in X:R v3.50 Beta 2
-- From later testing, it looks like turrets can't fire on stations OOZ as of X:R 3.50 Beta 1. It's a beta, so that's ok.
Plugged in some Balor data. Attack strength vs Titurel as opposed to vs Taranis is as I would expect, but there being 4 different attack strength values vs Taranis again indicate something other than just missile speed coming into play. Also, firing range being equal to ship size + 5500m is really crippling the Balor, in my opinion.
The mod's not as irrelevant as I thought after all, although it might be better with the Drostan gimping stuff taken out since the Drostan looks better balanced now.
_____
X:R 3.50b1 data testing attack strength changing depending on target position relative to ship orientation, and following a battle between a Marauding Sucellus and some PMC assets including a station and a Taranis
here.
........
X:R 3.50b1 data from a running battle following a Xenon Branch 9 Destroyer K on a rampage
here.
........
X:R 3.20 data from a battle between a station and a squadron of pirate fighters a couple of posts down,
here.
........
Data from X:R v3.20 can be found
here.