aliens

Author Topic: Weapon Balance Tool  (Read 8470 times)

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Weapon Balance Tool
« on: May 17, 2020, 03:22:26 pm »
I´ve created a simulator for the OXCE weapon accuracy behaviour.
It can draw nice graphs of hit ratio / distance (always 0 -50), as well as dmg/turn over distance.


Repository:
https://github.com/t3chn0l0g1c/oxceShooter

No need to build from source, there´s a pre-packed .jar in there.

It has no gui mode too, so you can just generate the input files and let it run over all weapons and compare yourself.
Needs java installed (openjdk 13 or higher )


Feedback, bug reports and feature requests welcome.

Big thanks to all the modders and engine guys helping me with their time and knowledge, especially Meridian. :)
« Last Edit: June 11, 2020, 08:55:59 pm by TheCurse »

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: Weapon Balance Tool
« Reply #1 on: May 17, 2020, 04:37:49 pm »
Very nice... maybe CQB would be worthwhile? Or, more ambitiously, AI could use these numbers to calculate optimum firing distance? And consideration of cover? And AI consideration of cover?  :P

3 weapons seems a little small if you're trying to get a feel for all the weapons in the mod.

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: Weapon Balance Tool
« Reply #2 on: May 17, 2020, 05:21:58 pm »
nope, CQC would be a completely different calculator.
Optimum firing distance is easy, its closest possible (>minrange).
Cover is not calculated, i´d need to have an actual map for that.
AI does not need this, pretty sure...

3 Weapons is what i can put on the graph without cluttering it up (thats 9 curves) and running out of colors... ;)
Feel free to use noGui mode and visualize the results yourself, for all weapons you can find...

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Weapon Balance Tool
« Reply #3 on: May 17, 2020, 05:24:56 pm »
There's already an option for AI to use this kind of information to determine firing mode. And this is not the thread to keep pushing your considerations of cover.

Looks like a useful tool, I used similar calculations when designing weapons a while ago but never wrote dedicated functions for it. Part of balance considerations should probably involve the target too - armor, resistances, and armor damage makes big differences for where weapons are effective.

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: Weapon Balance Tool
« Reply #4 on: May 17, 2020, 06:31:20 pm »
yes, i agree.
but tbh it was already horrible writing up that UI, and with armor i´d be a lot more input...

if you (or anyone else) really wants that included i can do it too.

currently there´s not even buckshot or area dmg in there.

if i do that too i might have nightmares about drowning in input fields or so... ;)

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: Weapon Balance Tool
« Reply #5 on: May 17, 2020, 07:00:56 pm »
Well armor/resistance decides damage independent of the accuracy curve, and is not too hard to calculate yourself before plugging it in.

I think maybe I'll use noGUI and some code to make an excel chart for best XCOMFiles weapons at each range.
« Last Edit: May 17, 2020, 07:05:09 pm by Bobit »

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Weapon Balance Tool
« Reply #6 on: May 19, 2020, 12:57:49 am »
Would it be possible to allow this to load weapon data from a .rul file? As in, if you enter the string name of the weapon it finds it in the file?


I have no experience with java, so no idea if this is feasible.

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: Weapon Balance Tool
« Reply #7 on: May 19, 2020, 10:18:30 am »
its possible at least.
though i´d have to write a parser for the rul files.
not looked into that yet...

Offline Ranakastrasz

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: Weapon Balance Tool
« Reply #8 on: December 02, 2021, 12:54:54 am »
How do I use accBonus and damageBonus, for, say, a sniper rifle in The Xcom Files with 0.01*acc*acc?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Weapon Balance Tool
« Reply #9 on: December 03, 2021, 11:33:22 am »
How do I use accBonus and damageBonus, for, say, a sniper rifle in The Xcom Files with 0.01*acc*acc?
It doesn't appear to have a field for accuracyMultiplier or damageMultiplier.

In the ruleset, it is parsed as:
Code: [Select]
items:
  - type: STR_SNIPER_RIFLE
    accuracyMultiplier:
      firing: [0.0, 0.01]
This means that net accuracy is: (0.0*firing) + (0.01*firing²)
You can calculate the weapon's accuracy based on the soldier and input the values manually.
« Last Edit: December 03, 2021, 11:34:53 am by The Reaver of Darkness »

Offline Ranakastrasz

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: Weapon Balance Tool
« Reply #10 on: December 03, 2021, 08:33:14 pm »
Manual it is then. oh well.

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: Weapon Balance Tool
« Reply #11 on: December 07, 2021, 06:46:07 am »
you can enter that in the GUI.
e.g. for 0.01 acc², input to the acc field "0.01²"