Author Topic: Realistic accuracy without brutal AI?  (Read 3780 times)

Offline Delian

  • Commander
  • *****
  • Posts: 707
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #15 on: March 15, 2025, 08:02:46 pm »
100%+ accuracy in mods like XCF sometimes affects damage so it's crucial to keep.

It does not. Accuracy formula and damage formula of a weapon are independent of each other. You must've misunderstood something.

Technically, OXC has a hidden RNG built into firing trajectory generator, which is why it's possible to miss 100% accuracy shots. You could say that all shots are already 95% chance-to-hit shots. That's why there was nothing wrong with a 95% cap, assuming Realistic Accuracy bypasses the original trajectory RNG.

Offline jnarical

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #16 on: March 18, 2025, 01:26:00 am »
One of the selling points of this feature is "if you can see it you can shoot it"
Done. Will be added in next release.
Also, changed wording for RA options, to make them shorter / clearer.

Offline Stormtrooper

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #17 on: March 18, 2025, 10:06:48 pm »
OMG yes I'm so happy thank you so much you're awesome this feature is awesome everything is awesome.

Offline jnarical

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #18 on: March 21, 2025, 01:23:11 am »
Horizontal vs vertical spread - another suggestion of mine is to have the latter lowered compared to the former
Done, now fire cone is elliptical, I added to horizontal spread a little (x1.2) and reduced vertical (x0.65)
I'll do my best to test it better tomorrow. Next release should be in a couple of days, and if I won't be too lazy and slow - I'll expose all RA-related variables to yaml file, so modders could edit them. And tuning them will be up to you  :)

100%+ shots...  but 95% cap is something I guess
Done. I moved RA config to ruleset, you can either edit it directly (openxcom/standart/xcom1/realisticAccuracy.rul) or create small mod.

Upd:
Revamped spread calculation, made the whole set of parameters and algorithm itself much more clear for understanding and editing. Now testing it.
« Last Edit: March 24, 2025, 01:56:58 am by jnarical »

Offline Stormtrooper

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #19 on: March 31, 2025, 11:55:09 pm »
How come I noticed new BOXCE version only today when checking mod.io?... Anyway, I'm more than happy with what I'm seeing, I configured spread to my liking, put 95% accuracy cap, turned on "if you can see it you can shoot it" thing and the resulting battles are so much fun. Also upped cover efficiency from default 70% all the way to 100%, now even my elite, transformed soldiers have to take aimed shots again to hit well-covered enemies. Thank you for all your effort with this!

Offline jnarical

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #20 on: April 01, 2025, 01:59:16 am »
Ok, here's the issue I'm trying to investigate and fix. I make a shot from above to the alien. The distance is bigger than 20 tiles so I don't have Line of Sight. I couldn't target this alien in normal game (without scouting it first), but I have debug mode on so I (as player) can see it and everything else.

The thing is, my soldier has good accuracy and rolls a hit most of the time. The shot is fired and hit a tile under the alien. Over and over again. I see two issues here:
  • I expect the shot to target center of the tile, and hit the alien on it's way there - but I've got really wierd numbers - target voxel is (10,6,2) inside the tile, and I never saw this kind of shift for target points!
  • When I shoot over and over again - shots hit the tile, but nothing changes. In logs I have the type of impact point - OBJECT, so I thought that I hit the wheat but it's laserproof for some reason.

I've just found out that wheat under alien destroyed prior to saving the game. But the question about OBJECT at target point - remains. Wierd target shift is added in canTargetTile() which I never touched, so the mystery is gone. And seems there are no bugs involved (except the "object" part but it could be just my misunderstanding)

So, the next bug (which is huge by my standarts): when you try to force-shoot with CTRL through some unit - shots spread in very unnatural way.
« Last Edit: April 01, 2025, 02:05:55 am by jnarical »

Offline jnarical

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: Realistic accuracy without brutal AI?
« Reply #21 on: April 24, 2025, 10:31:29 pm »
So, the next bug (which is huge by my standarts): when you try to force-shoot with CTRL through some unit - shots spread in very unnatural way.
Forgot to say that was fixed long ago!