aliens

Author Topic: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet  (Read 10246 times)

Offline John___Doe

  • Sergeant
  • **
  • Posts: 31
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #45 on: September 26, 2024, 10:39:44 pm »
(well actually incendiary type damage in general always feels way weaker than the raw numbers imply). 

That's because most use the default fire damage, and the power of the weapon is actually a factor of its aoe. There are exceptions like Willie Pete grenades (white phosphorus) which do initial damage based on their power like most weapons.

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #46 on: September 26, 2024, 11:21:06 pm »
That's because most use the default fire damage, and the power of the weapon is actually a factor of its aoe. There are exceptions like Willie Pete grenades (white phosphorus) which do initial damage based on their power like most weapons.
Riiiight... no wonder then. Tip #80 only says stuff about targets on fire (which I always assumed was like a status effect added as a hit on top of the power, not the whole damage!).

Updated my version and discovered bounty hunting now needs rank 2 (!).

I'm not sure how to feel about that actually, it would feel odd to me not being able to start getting tokens in Februrary... and seems like it's really clogging your ability to get early infamy, no wonder one of the guys on discord was having trouble with it, that's quite a difficulty increase.

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #47 on: September 27, 2024, 01:57:36 am »
Apparently I was bored, so I analysed shotgun choke data rather than playing the game this evening, go figure. ::)

Here's a dump of my findings, will update the spreadsheet eventually:


Edit: This was all incorrect as it was based on out-of-date documentation so it's deleted.
« Last Edit: September 28, 2024, 10:12:52 pm by eharper256 »

Offline Iazo

  • Colonel
  • ****
  • Posts: 294
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #48 on: September 27, 2024, 09:36:19 am »
A mistake. You want high choke but low spread.

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #49 on: September 27, 2024, 09:45:38 am »
A mistake. You want high choke but low spread.
Not according to the programming notes literally in the documentation:
Quote
#shotgunSpread:  Defined on an ammunition type as a number between 0 and 100 with a default value of 100.  With shotgunBehavior: true, this is approximatley the percent of pellets after the first #that will hit the same tile/target as the first at the maximum accurate range.
#shotgunChoke:  Defined on a weapon type as a number between 0 and 100 (or higher) with a default value of 100.  Used only for shotgunBehavior: true, acts as a percent modifier to the 'accuracy' of #the pellets from shotgunSpread - 100 means only the shotgunSpread value defines the spread pattern, 0 gives maximum possible spread regardless of the shotgunSpread value.
Higher spread means more pellets hit same target, choke is merely a % modifier to that initial value.

Admittedly, it does sound counterintuitive, but the numbers also match. The Domestic has a 70 (x0.7) choke, the Police has 110 (x1.1), for example. This is then based on the shells having 15-45 base spread in most cases. (with the shells in that previous example we end up with 25 * 0.7 = 18% chance for each pellet to hit on the Domestic, or 25 * 1.1 = 27.5% on the Police).

A low spread, say 15, plus high choke, say 130, in the documents, just means that the atrocious base spread of the shell is mildly mitigated from 15% to 19.5%.
« Last Edit: September 27, 2024, 09:56:58 am by eharper256 »

Offline zombieguy223

  • Captain
  • ***
  • Posts: 58
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #50 on: September 27, 2024, 10:12:18 am »
Not according to the programming notes literally in the documentation:Higher spread means more pellets hit same target, choke is merely a % modifier to that initial value.

Admittedly, it does sound counterintuitive, but the numbers also match. The Domestic has a 70 (x0.7) choke, the Police has 110 (x1.1), for example. This is then based on the shells having 15-45 base spread in most cases. (with the shells in that previous example we end up with 25 * 0.7 = 18% chance for each pellet to hit on the Domestic, or 25 * 1.1 = 27.5% on the Police).

A low spread, say 15, plus high choke, say 130, in the documents, just means that the atrocious base spread of the shell is mildly mitigated from 15% to 19.5%.
I'll preface by saying that I don't fully understand how shotgun spread actually works, or whether higher or lower spread results in more pellets hitting the target.

I think that lower spread results in more pellets hitting based mostly off of the XPedia entry for .6g Buckshot (https://xpedia.netlify.app/##STR_BUCKSHOT_HV) suggesting it has a tighter grouping (20 shotgunSpread) compared to the standard .8g buckshot (35 shotgunSpread). There's some discussion in other threads on this forum about it, but I still couldn't fully understand how it works.

Other discussion here:
https://openxcom.org/forum/index.php?topic=6541.msg102313
and here (I think this is from when the code used in OXCE was being written):
https://openxcom.org/forum/index.php/topic,4834.0.html

And I believe this is the section of code in OXCE that handles the spread calculations:
https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Battlescape/ProjectileFlyBState.cpp#L783
« Last Edit: September 27, 2024, 10:17:49 am by zombieguy223 »

Offline Iazo

  • Colonel
  • ****
  • Posts: 294
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #51 on: September 27, 2024, 12:45:50 pm »
Ok, I asked the developers because this is really getting in the weeds. So far it seems that the documentation might be wrong because it does not seem to describe what the code does.

That said, the code pretty strongly makes an argument that how you calculate it is wrong. It is not simply choke*spread, it is choke*(1-spread)
« Last Edit: September 27, 2024, 12:48:41 pm by Iazo »

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #52 on: September 27, 2024, 09:36:00 pm »
Thanks for finding the relevant code snippet, I didn't have that available of course, so:
Quote
secondaryImpact = proj->calculateTrajectory(std::max(0.0, (1.0 - spread / 100.0) * choke / 100.0));

I plugged this into Excel to do the calcs, and double checked with Windows Calculator on Scientific so we can correctly honour the brackets:
If it's high Spread and High choke (lets say 50 and 120), it will be: ((1.0 - 50/100) * 120/100)= 0.6
if it's high spread and low choke (lets say 50 and 70), it will be ((1.0-50/100) * 70/100) = 0.35
if it's low spread and high choke (lets say 15 and 120), it will be ((1.0-15/100) * 120/100) = 1.02
If it's low spread and low choke (lets say 15 and 70), it will ((1.0-15/100) * 70/100) = 0.595

std::max is usually a function to pick the largest/maximum of two values in C++. CalculateTrajectory is using voxels to trace paths as we might expect. Earlier in the code, CalculateTrajectory is used to create the origin point of the shot using the units accuracy. std::max here is always going to return the calculated figure since it's greater than zero, but since we're referring to the old CalcTraj for the origin point, I'm guessing this is showing the maximum possible deviance between 0 (i.e. hitting the same place as before) and X (what is generated here).

This is assuming a fair bit and I'm quite an amateur coder so I could be horribly wrong.
  • Which means that higher final decimal is bad. Oddly enough, yes, that means the documentation is wrong, because going by these formulae, the best option is High Spread, Low Choke (lol). Although the fact that there is a comment of "// identical with vanilla formula when spread 100" implies that 100 spread is... well if not good then at least identical to the standard shot.
  • Alternatively, if I'm wrong in that assumption and 1 is the desired target rather than 0 (i.e. the closer to 1, the less trajectory deviance), then yes, Low spread is overwhelmingly the most important factor (to the point where Choke's effect is diminished in comparison). That does have it's problems too, since really low spread and high choke ends up values over 1.
  • Alternatively Alternatively, if the original notes about these number affect rough % chance to hit to same place is correct and this is just a % chance to hit the same tile then yes, you're spot on, though this is also odd since this code looks like it's tracing trajectories and doesn't say anything about percentages.
Or you know, I could have just spent an hour wasting my time lol. Let me know if the devs get back to you! (and if the notes in documentation are wrong, shoot them for me as well since bad comments are the devil and any dev should know that)  :P

Edit: Number 3 is correct! Thanks to the devs for confirming
« Last Edit: September 28, 2024, 10:11:33 pm by eharper256 »

Offline Delian

  • Commander
  • *****
  • Posts: 505
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #53 on: September 27, 2024, 11:23:33 pm »
Which means that higher final decimal is bad

Higher decimal is good. 1 = 100% accuracy.

calculateTrajectory(accuracy)

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #54 on: September 28, 2024, 12:47:06 am »
Hence me giving three possible conclusions, since I don't know which is right?  ::)

I really feel like everyone's out to get me here or prove me wrong here for some reason. I don't give a monkey's about being right. I'm just trying to make sure I get accurate info for an accurate guide. I enjoy taking murky waters and turning them into a blue lagoon via guides. :D
« Last Edit: September 28, 2024, 12:51:24 am by eharper256 »

Offline Iazo

  • Colonel
  • ****
  • Posts: 294
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #55 on: September 28, 2024, 12:50:18 am »
Well, from being a bruteforce barbarian and shooting many, many shotguns, I can tell you with some certainty that high choke and low spread makes the shotgun shots all go roughly the same way. The reverse ends up with you basically just spraying randomly in front.

You can test this using the sawed off shotgun, the DB shotgun, .6g and .8g.

A sawedoff with .8g will pretty much just shoot EVERYWHERE. A DB with .6g will clump the shots and they'll go pretty far all in one direction.

Otherwise, you'll just have to trust the 'a guy told me' source. Or not.
« Last Edit: September 28, 2024, 12:51:54 am by Iazo »

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #56 on: September 28, 2024, 04:23:42 pm »
Otherwise, you'll just have to trust the 'a guy told me' source. Or not.
Yep, I'm defo inclined to believe you, and your option is certainly intuitive. It's just that's it's super weird to find all these notes everywhere implying it's the opposite. :o

In any case, I've also done an extra addition tab ready for the weapon chart, including the choke values with that weapon formulae from the code (above) included and assumed as gospel. Not released as of yet, I want to add more stuff before I throw it out just on that. (I mean, it's relatively unimportant in the grand scale of things).

Something absolutely goes out of whack past the maximum range for shotties, though. Not sure if something was changed for the newest patch; but I really swear Smart Shotgun has turned absolutely dire at longer ranges where it used to be very good.
« Last Edit: September 28, 2024, 04:25:29 pm by eharper256 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #57 on: September 28, 2024, 09:33:07 pm »
Ok, I asked the developers because this is really getting in the weeds. So far it seems that the documentation might be wrong because it does not seem to describe what the code does.

Documentation updated: https://openxcom.org/forum/index.php?topic=4834.0

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #58 on: September 28, 2024, 10:09:22 pm »
Documentation updated: https://openxcom.org/forum/index.php?topic=4834.0
Thankyou very much!  :D

Good to know it ~IS~ supposed to be less spread that's better. :)

Offline eharper256

  • Captain
  • ***
  • Posts: 52
  • Purveyor of Medicinal Snake-Oils since 1885
    • View Profile
Re: XPiratez Information Compilation, Starter Guide & Weapon Spreadsheet
« Reply #59 on: September 29, 2024, 09:38:21 pm »
BIG main guide update, now with quite a bit of expansion to what each Primary Captain and Codex does in much greater detail.

As a result, the captains section now use 3 pages total, and each Codex gets it's own page.

There's also images for each Captain, Codex, and Route, mostly from the game files. Because everyone loves pretty pictures.

Yes, the images for the codexes are tomes from Age of Wonders 4; I tried to pick ones closest to the in-game description of the ascended codexes. And also, yes, I don't use the direct image for the captain class in question because actually I wanted the document to be SFW for people. I picked ones that fit that captain's theme or were from a related topic.

I'll do the updated weapons spreadsheet soon (TM).