aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - onionradish

Pages: [1]
1
XPiratez / Re: XPirateZ Squad Analyzer (Help Wanted)
« on: April 19, 2016, 11:15:37 pm »
I've got accuracy calculations working now, but need to clean up the code and need to combine "weapons" which are responsible for accuracy based on the gal's stats plus type of action (snap, auto, aimed, etc.) with the "ammo" for the weapon (may be multiple types) which are responsible for raw potential damage so they can be presented/evaluated together. This is easy for melee which has no ammo, but ranged weapons get complicated.  :o

From using the rough output for my own very early game (April, year one, 28 hands), I see the need for lots of optional filters for the output. The list of potential weapons+ammo gets ridiculous quickly as research/capture reveals more potential weapons and the number of hands increases.

What kinds of "filter" criteria would be useful? Basically, for which gals would you want to see a report on possible/best weapons? Options can be customizable and combined -- I just need to add the capability before the tool is shared for use. For example:

  • only showing non-injured gals
  • only showing gals from base X or assigned to craft Y
  • only showing gals NOT assigned to a craft
  • only showing gals of rank X
  • only showing gals with no weapons equipped
  • only showing weapons that are "in stock" at a base or on a craft
  • only showing weapons with available ammo (or ammo > X)
  • only showing weapons that match the "best skill" of the gal (firing, melee, etc.)
  • only showing  weapons that are equippable within the weight limits after backpack/armor/etc. are considered
  • showing all "known" weapons (known by research but must be captured/manufactured)
  • optional "hide/show" options for particular weapons or types (and which ones)
  • etc.

Let me know what you'd want to see and when/how you might use analysis output. I'm finding that I most want to use the analysis for newbies (always), and only periodically for experienced gals depending on how their stats have changed or what research/capture has unlocked.

I'm also seeing potential value in accounting for "available weight" based on the armor equipped. Even if a hammer does more damage, if I can't wield it with my equipped basic armor plus beer and bandages, I don't want to see it.

Finally, for a tool like this, are you able or willing to run a Python script or would you want/need something else? I can compile it to an EXE, but that only works for Windows and might seem suspicious since it's not obvious what it does.

Calculations based on # hits versus an armored targed (given gal accuracy, TU, enemy armor, etc.) to show actual "received" damage (not just what was "delivered" based on weapon, ammo, gal, action) are entirely do-able, but will come later.

2
XPiratez / Re: XPirateZ Squad Analyzer (Help Wanted)
« on: April 15, 2016, 08:19:46 pm »
The potential damage for a gal/weapon combination can vary quite a bit because of the complexity of the stat modifiers, and it's not always obvious from reviewing the bootypedia which weapon might be "better" for a particular gal. The example above shows that simplifying to "Rapier is always better than Cutlass" isn't necessarily true. That non-obviousness caused my interest in looking into this.

My first goal is to develop a "squad damage calculator" that takes each gal's stats into account to report the possible damage she could deal with an "available" weapon towards an enemy's health/armor/stun. Damage calculations assume a hit, but include supplementary stats on likelihood of her having a successful hit, excluding battle-specific conditions (kneeling, range, enemy armor, etc.).

An "available" weapon is one that is in posession, can be purchased through the black market, or has been discovered through research (potentially manufacturable). Weapon availability obviously changes as the game progresses. That means that even if the BFG is the ultimate weapon, if it's not available, it won't be calculated or shown. Gals can only equip what's available.

From the output of the calculator, a player can choose what they think is the "best" PRIMARY weapon for a gal. The "best" weapon will vary over time based on changes in each gal's stats and what weapons are available.  Secondary weapons (the backup melee weapon for a gal skilled in Firing, etc.) can also be selected from the list, based on whatever makes sense to the player, considering weight limits, etc.

This calculator can also report which gals deliver more damage from a given weapon, so if you have a limited number of Axes (or BFGs), you can give them to the gals who can use them best first.  Melee weapons vary the most; many of the guns deal the same potential damage, with accuracy as the only differentiator.

The initial "squad damage calculator" is intended to expose all the stats for the player to choose from. Because of the variety of weapons available (which increases as the game progresses) and the range of gal stats (new recruits as well as experienced ones), some additional info is needed for the player in role of "COMMANDER" to make those choices. One of the potential negatives to exposing those stats is that it can lead to min-maxing (spoiling the fun of decision-making).

Once the stat calculator is complete, a secondary idea is to develop a "recommendation engine" that will take each gal's stats and weapon stats into account to suggest a shortlist of available weapons suitable for that gal. That's where size, ammo capacity, accuracy, TU, weight and other considerations come into play, and where items would get filtered out.

I think there is some fun to player choice and assignment of a "favorite" weapon even if it isn't the best statistically. A recommendation engine would have to take the available weapons, gals, and other factors into account to suggest a shortlist of weapons for a gal, while still offering some choice. It's a potential "next step" after the stat calculator is done and may or may not be necessary or wanted. The choice of "best" weapon goes beyond stats into opinion and philosophy, so we'll see what shakes out once we have some stats to consider.


3
XPiratez / Re: XPirateZ Squad Analyzer (Help Wanted)
« on: April 14, 2016, 04:42:44 pm »
IMO, the important part is that in the end, each gal has a "favorite" weapon that you can equip her with, and it's not a complete misuse of her skills.

Weapon speed must be taken into account. Since you're comparing 2 attacks of one weapon versus 4 attacks of another (for example), target armor must be taken into account : it's substracted 2 times in the first case, and 4 times in the second case. An arbitrary armor value must be chosen. Or if you like overkill, do one calculation for a mostly harmless opponent, one for a moderately armored, one for a heavy, and average the three.

For effective damage, I generally multiply all these things together :
1) %chance of hitting
2) %chance of doing ANY damage on hitting
3) average damage of the attacks which overcome armor
4) a factor depending on the practical number of attacks in a round

For melee attacks speed, 4 could be counted by assuming the girl spends 1/2 of her TUs getting to the target, and the rest attacking. Count the attacks she can make, keeping the decimals.


I agree with the idea of getting to a "favorite" weapon and the practical number of attacks taking movement into account for melee.

If I'm understanding you on target armor, you're saying that the actual potential damage would need to be calculated after each hit, since most weapons do damage to armor so more damage from subsequent hits would get through the weakening armor? Also, why keep decimals on attack counts, in that fractional TU can't be used to attack in a turn? I'm interested in your ideas.


At a minimum, I'll probably tackle fleshing out the Weapons Table by hand at least for Melee weapons.  I think your sheets are strongest, so thats a great format.

I've some other Bootypedia projects first (Auxilliaries and Armor updates) so if someone can come up with a ruleset parser to grab weapon data before I get to it, that would be awesome. :)

I'm parsing the ruleset for all the weapon data so could give you that data in CSV if you want it for a spreadsheet. Tell me what you need. Also, thanks for the details on calculations, especially the polynomial one.


In this case, using Ivana as an example, you see that, of the weapons I entered, a rapier is the most reliable choice (because melee is good and strength not great), with cutlass a close second that could do more damage if you are lucky and get few misses (as shown by the cutlass' max damage being higher). Shooting wise, due to poor shooting accuracy, it's better to try to set her up for many rifle snap shots than anything else (and the sniper rifle is obviously a very poor choice).

One of the things that can be a surprise is how much each gal's stats can affect damage, especially for melee. And then how much accuracy can flip the table for potential damage.

Wardog  - Best Skill: Melee  [30]  (Left Hand: Cutlass [7], Right Hand: Fuso Knives [4])
--------------------
bravery: 20, firing: 51, health: 72, melee: 101, psiSkill: 0, psiStrength: 29, reactions: 73, stamina: 97, strength: 30, throwing: 56, tu: 76

* Cutlass               [  7]: 35  + 32.2 -> CUTTING     health: 67.2  armor: 6.7    stun: 16.8   
* Rapier              * [  6]: 20  + 40.4 -> CUTTING     health: 60.4  armor: 6.0    stun: 15.1   

max attacks per TU, (energy cost)
    --> max attacks * (weapon accuracy * melee/100) ==> hits * damage
cutlass     76 / 10 = 7, (7 * 6 = 42) -->  7 * (0.9 * 1.01)  ==> 6 * 67.2 = 403.2 avg dmg/turn
rapier      76 / 9 = 8, (8 * 7 = 56) -->  8 * (1.0 * 1.01)   ==> 8 * 60.4 = 483.2 avg dmg/turn


Freefall  - Best Skill: Firing  [63]  (Left Hand: Ax [12], Right Hand: Assault Rifle [8])
--------------------
bravery: 20, firing: 62, health: 74, melee: 39, psiSkill: 0, psiStrength: 33, reactions: 51, stamina: 75, strength: 63, throwing: 46, tu: 77

* Cutlass               [  7]: 35  + 33.0 -> CUTTING     health: 68.0  armor: 6.8    stun: 17.0   
* Rapier              * [  6]: 20  + 15.6 -> CUTTING     health: 35.6  armor: 3.6    stun: 8.9   

max attacks per TU, (energy cost)
    --> max attacks * (weapon accuracy * melee/100) ==> hits * damage
cutlass     77 / 10 = 7, (7 * 6 = 42) -->  7 * (0.9 * 0.39)  ==> 2 * 68.0 = 136 avg dmg/turn
rapier      77 / 9 = 8, (8 * 7 = 56) -->  8 * (1.0 * 0.39)   ==> 3 * 35.6 = 106.8 avg dmg/turn



The star to the right of the rapier means that the rapier isn't purchaseable from the black market. It has to be either captured from a battle or researched and then manufactured. At the early parts of the game, it may not be available to equip.

4
XPiratez / Re: XPirateZ Squad Analyzer (Help Wanted)
« on: April 14, 2016, 12:54:31 am »
Great to see some discussion and ideas!

I've done some continued work on my script while playing and have finally figured out the source code damage calculations for weapons.

Currently, what I'm doing is stand-alone and uses Python to parse and process a save game file for gal/base/ship info against the core X-PirateZ data. I don't know whether or not similar capabilities could be integrated into existing capabilities of XcomUtil to show results in game or not. My thinking is that first we figure out the kinds of analysis we want, and then how to perform and present it. It would not be difficult to spit out a nice interactive HTML report for example, so anyone with design/aesthetic ideas should also chime in. CSV or other formats are also easy.

For each gal equipped with each available++ weapon, I can now calculate the average/baseline* potential damage directed towards an enemy's health, armor, stun, and other stats.

    * Potential damage ranges depend on the weapon's rules and/or the user's choice of UFO/TFTD damage method at the options level and are actually calculated in battle by RNG as a percentage of the baseline (0-2x, 0.5x-1.5x, etc.). Currently, I'm only calculating the baseline/average damage. I may later implement ranges so weapons with higher damage variability are distinct from those with more consistent damage.

    ++ Available weapons are considered a weapon that is is "seen" in bootypedia, is "in stock" at a base/craft, can be bought from black market, or manufactured. It's possible to sub-divide what's "available" as part of recommendation (for example, weapons you can't buy on the black market and have to manufacture could score differently).

My current script is not calculating accuracy or range, but I am investigating how that might work for recommendations. Accuracy/range and similar stats would obviously factor in to a "recommendation" on weapon. As an example, using an early game/gal save, the "Officer's Pistol" offers slightly less damage than the Flintlock, but the "OP" has higher accuracy and higher number of rounds loaded for similar TU and weight, etc. regardless of the gal's firing skill, which may make it a better overall choice.

I'm ignoring all real-time-battle-dependent effects (crouching, injury, morale, etc.). I'm not considering potential enemy type, armor or resistance. My thought for now is that those considerations are up to the player to decide or deal with as they occur. The "potential" seems like all that's possible to optimize, given that a particular target may or may not be armored, may or may not be resistant to a particular type of damage, etc.

From using the info while playing, I'm seeing that the need to evaluate the "best" weapon isn't all that frequent. Mostly it's helpful for figuring out what new recruits are good with and periodically checking after battles, research or other milestone to see whether something has changed.

The more ideas or formulas on how to calculate best/recommended weapon, the better -- please send them because they're easy to add to the script for discussion of the results!

5
XPiratez / Re: XPirateZ Squad Analyzer (Help Wanted)
« on: April 07, 2016, 08:11:09 pm »
You're right about the challenge in evaluating equipment options!

It's tough when you're starting out (like me) because you don't yet have experience with the new gear in use. I can see it getting even tougher as the game progresses and there are even more options to consider from captured gear and the black market -- plus a growing crew of gals.

I started some number-crunching earlier this week to help me decide starting gear. I'm using a rough, exploratory script in Python to read directly from the X-Piratez files and my save games. Reading from the files gives access to all the weapon damage stats and rules -- which can be pretty complex -- access to all the gal stats, and all equipment in bases, ships and equipped or carried by each gal.

Here's one example of rough results from that script using the "Ivana" gal stats from ivandogovich's spreadsheet for comparison:

Code: [Select]
--------------------
Saved game version: Extended 2.9+
Available weapons sorted by highest total damage
Weapon name: base_dmg + bonus_dmg + alter_dmg = total_dmg
Weights in square brackets

IVANA  [34]  (left: Smoke Grenade [-], right: Cutlass [7])
--------------------
bravery: 10, firing: 53, melee: 87, reactions: 65, strength: 34, throwing: 36
--------------------
Hammer: 60 + 43.1 + 0.0 = 103.1 [24]
Ax: 50 + 32.5 + 0 = 82.5 [12]
Cannonball: 80 + 0 + 0 = 80 [3]
Cutlass: 35 + 31.0 + 0.0 = 66.0 [7]
Ball Bat: 25 + 10.2 + 26.4 = 61.6 [7]
Launcher Grenade/HE: 60 + 0 + 0 = 60 [3]
Black Powder Bomb: 60 + 0 + 0 = 60 [4]
Rapier: 20 + 34.8 + 0 = 54.8 [6]
Short Sword: 25 + 29.5 + 0.0 = 54.5 [5]
Billhook: 40 + 13.2 + 0.0 = 53.2 [8]
Fistycuffs: 0 + 37.8 + 13.23 = 51.03 [3]
Harpoon Stun Bolts: 50 + 0 + 0 = 50 [3]
Flintlock Gas-Balls: 30 + 0 + 18.0 = 48.0 [2]
Boarding Gun Ammo: 46 + 0 + 0 = 46 [8]
Machete: 20 + 24.2 + 0.0 = 44.2 [3]
Dagger: 20 + 24.2 + 0 = 44.2 [3]
Handcannon Rounds: 44 + 0 + 0 = 44 [2]
Pipe: 15 + 20.4 + 0.0 = 35.4 [5]
Chainsaw: 35 + 0 + 0 = 35 [9]
Fuso Knives: 0 + 32.4 + 0.0 = 32.4 [4]
Assault Rifle Clip: 30 + 0 + 0 = 30 [3]
Flintlock Balls: 29 + 0 + 0 = 29 [2]
Banana Clip: 28 + 0 + 0 = 28 [3]
Blunderbuss Shells: 24 + 0 + 0 = 24 [3]
Handle: 10 + 10.8 + 3.12 = 23.92 [4]
Rope: 5 + 12.2 + 3.44 = 20.64 [4]
.8g Buckshot: 20 + 0 + 0 = 20 [2]
Molotov Cocktail: 20 + 0 + 0 = 20 [3]
Hunting Bow: 0 + 18.0 + 0.0 = 18.0 [6]
--------------------

Or a comparison of who is best at using a particular weapon (example melee and thrown):

Code: [Select]
Cutlass
Jazz: 74.2, Cable: 70.8, Jinx: 68.4, Shadow: 67.6, IVANA: 66.0, Bonzai: 65.8, Freefall: 63.8, Stalker: 61.0, Wardog: 60.6, Specter: 59.8, Pixie: 59.8, Zealot: 58.2, Sideswipe: 58.0, Saint: 57.6, Nova: 54.0, Renegade: 51.2, Luna: 48.2

Fuso Knives
Stalker: 53.1, Saint: 52.2, Renegade: 50.4, Wardog: 50.4, Cable: 49.5, Jazz: 46.8, Freefall: 41.4, Sideswipe: 41.4, Zealot: 41.4, Nova: 39.6, Jinx: 39.6, Pixie: 35.1, Shadow: 33.3, IVANA: 32.4, Luna: 29.7, Bonzai: 29.7, Specter: 28.8


From working with the stats, and poking through source code, here's what I see so far:
  • Given how frequently X-Piratez is evolving, the number of items, gals, stats and how complex the calculations can be, I think we'll need a tool or script to do the work so it can be run against the latest game data and save files, with results from that tool dumped to a spreadsheet, HTML, TXT or whatever makes sense.
  • Limiting the analysis to just available (or otherwise researched/unlocked) equipment is helpful because it prevents spoilers and doesn't clutter the output results with stuff you don't have or can't use. That's easily done, as is limiting analysis to just what's equipped or being carried.
  • Accuracy may need to be accounted for -- which is another level of complexity due to the different types of shot. Without it, even though there is variation in the ranking of weapon damage for each gal, the impact of each gal's skills may affect the determination of her "best" weapon.
  • Weapons with ammo have some extra complexity because the stats from both gun and ammo need to be considered together. It looks like ammo has the damage stats, and the gun has accuracy stats; I'm not sure if they interact more than that; right now I'm only evaluating the ammo.
  • Some sort of DPS-like ratios that take damage, accuracy, TU/energy cost into account seems plausible, but some quick calculations by hand seem "off," like snap shots doing nearly double the "potential damage ratio" as an aimed shot using a simple DMG * ACC / TU forumla. I'd be interested to see any calculations or formulas that could be tried or make more sense.
  • The current damage calculation I'm doing only accounts for direct damage to "health" (or tries to) but there are other stats that can be damaged (stun, armor, etc.), and that probably needs to be considered as well. I will probably rework my calculation to return damage for each stat instead of just health.

I've tried to parse the logic for the accuracy and damage calculations from the source code, but haven't got it completely figured out. There are some weapon stats that are sort of obscure, and I'm not completely sure I understand how all of them interact with a gal's skill stats. I'd welcome any details, info, or discussion on how accuracy and damage (of all types) is calculated -- especially for some of the unusual weapons.  ;)

EDIT: In many ways, I'd even prefer result output that's more a general recommendation for a gal, essentially taking the statstrings just one level further, not even showing the numbers: "Ivana is probably best with a melee weapon and would do well with MELEE_A or MELEE_B. As a secondary or alternative, consider GUN_A, GUN_B or THROWING_A." Some of the fun is in making the choices that suit your playstyle and experimenting with how it works in combat; for me, the main goal would just be to narrow the range of choices from dozens to a few.

Pages: [1]