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.
<snip>
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.
Great comments, analysis, and feedback! Any help developing a tool to harvest the data from rulesets would be great! I really like your idea for the "Recommended Weapons" as a nice final, simple product without all the number crunching. I'm not really sure how to get there from here. (Aside from building a complete utility program as a stand alone (X-Piratez Squad Util) and that is way beyond any programming ability I would have). If we came up with a way to do so, it would still be good to have the more in depth information available for the number crunchers.
Let me get back to discussing some of your specific questions.
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.
Some of the formula's are straight forward as you have noticed. (Accuracy + (Melee*.5)), etc. Others are exploiting a format that Yankes developed to add a ton more flexibility. I'll see if I can parse it correctly, but at least you could follow up with Yankes if I can't explain it right.
From Yankes' OXCE Readme:
damageBonus: #used by ammo.
#each bonus can be writen as: `s: x`, `s: [x]`, `s: [x, y]` or `s: [x, y, z]`.
#where each value represents coefficient of polynomial `x * s + y * s^2 + z * s^3`.
As an example the Fuso knives use this as part of the accuracy modifier:
accuracyMultiplier:
firing: 0.0
throwing: [0.0, 0.025]
I parsed this as :
(0 * Throwing) + (.025*(Throwing^2)
Overall, I think these open up the ability to change the curve of effectiveness as stats improve, but I'm not exactly sure.
Now, onto your question that you sent via message: (and thanks, BTW!!)
Any thoughts on the kinds of info you'd want to see?
I think the average weapon analysis should include some of the following.
1. Total damage should indicate the Average Damage per swing. (With 0-200% as the range, I've just left it as 100%).
2. There should be some consideration for likelihood of hitting. 20% chance to hit, vs 80% chance to hit is a big difference.
3. Possible Damage Per Turn: (if you can expend all of your TUs for attacks, multiply your # of attacks (TUs/AttackCost) times the Average Damage per Attack. This may make faster weapons more viable than slower, heavier hitting, ones (i.e. Machete vs Hammer on an unarmored target)
4. Should the Possible Damage Per Turn be multiplied by the likelihood? (i.e. * 80% hitchance, etc)?
Somethings along these lines would be nice for the number crunchers.
Am I making any sense? (I'm not sure) XD