Author Topic: [DONE] [Suggestion] Accuracy reduction for indirect fire  (Read 8779 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #15 on: March 04, 2017, 01:17:00 pm »
Good idea in complex, but dont mess two things:
 - target is out of sight range,
 - target is obscured,
because snipers with optic must avoid first case.

Offline robin

  • Commander
  • *****
  • Posts: 1211
  • ULTIMATE ROOKIE
    • View Profile
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #16 on: March 04, 2017, 02:04:48 pm »
because snipers with optic must avoid first case.
This is not a "out of range" penalty, but a "out of sight" (as in: I can't see the target) penalty.
Optional mechanics for ranges (and range-dependent penalties) are already implemented and usable. And AFAIK you can already make the sight range of a unit longer.
So the issue you mention is already covered, you just need to make the agents sight longer and "cripple" the non-scoped weapons using range limits.

(Of course one could want to make weapons that avoid this penalty, like some psi-guided rifle or something... Doesn't OXCE+ already offer alternative visions, like psi-vision/night vision? Whatever vision, if a unit can see the targeted-tile it won't incur in the penalty.
That's at least how I see it).
« Last Edit: March 04, 2017, 02:15:09 pm by robin »

Offline RSSwizard

  • Commander
  • *****
  • Posts: 752
    • View Profile
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #17 on: March 16, 2017, 02:44:20 pm »
Flat or percentage? Weapon-specific or global?

How about opposite approach... giving bonus when aiming at a visible unit?
That would eliminate problems mentioned above.

That is probably the ideal solution to this right there. Just give a bonus for being able to see the target. It could be adjustable but im thinking a +50% bonus flat is realistic if its a hardcoded option.

I mean in d20 system its a 50% miss chance to shoot at something you cant see and thats flat. Giving you 1.5x accuracy for a direct shot might sound generous but it should drive the point home about firing blind.

That way modders can change the stats and either list the bonus or just mention in parenthesis (Direct Fire gets a bonus).

In X-Piratez I frequently abuse this tactic with the hunting bow and flaming arrows. Particularly in maps like Scientific Experiments where that structure gets in the way but its generally only 1 floor high and it removes all the trees where it sits. Its only moderate range to fire over it and aside from shooting at my spotter they cant do anything about it.

The argument for an adjustable (in)direct fire bonus gets into smart missiles like blaster launchers which have an accuracy arc every time they move to another waypoint. In vanilla if you shoot a Blaster through a narrow space (between characters) and you dont put a couple waypoints between that zone it might accidentally hit something because it doesnt go exactly where you tell it to.

This way you can turn the accuracy down really low for something like that simulating the shooter having to improvise course corrections in real time as they TV-guide the missile like a maverick/redeemer into territory they weren't able to see when they fired it. Thus if they're able to see the waypoint they're moving the missile to it gets the bonus.

In that case the accuracy could be very low but the direct fire bonus could be +100% or something else high.

Likewise when aliens shoots blasters/DPL at you they hit you if they can see you, but when they're shooting around corners to hit the accuracy will be much lower and they may just miss and send the missile off the map.

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #18 on: May 09, 2017, 01:29:33 am »
New idea to make this workable:
Don't change accuracy, but change the targeted tile (to avoid messing with the accuracy number). For a shot without vision, randomly select a tile from a group of tiles in the cursor vicinity. Then shoot this tile with normal accuracy.
For close range (~10 tiles), the tiles to choose from are the targeted tile and the tiles left and right from it. With evenly distributed pick chance that gives you a 66% miss chance by aiming at the wrong tile. Number of tiles to choose from should grow with distance to target. For example, all tiles in a circle around the cursor with circle diameter increasing with distance. Less chance to land a lucky hit on something that is far away.
Tiles that you have no line of fire to should be discarded, as well as tiles that you can see. I would like to only discard tiles without line of fire if the obstacle is visible to the shooter, but that might be too complicated to code.
The scenario I'm thinking of here is shooting down a corridor filled with smoke. You know where the walls are, so you don't aim at wall tiles.

I think this is the best representation of "shooting something that you can't see". You shoot in the general direction of your target and aim at a random spot, which has nothing to do with the shooters accuracy. Area weapons are useful without becoming dangerous (no chance to shoot the tile on front of you if the shooter is skilled).

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11448
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #19 on: May 09, 2017, 04:06:47 pm »
I like it, it is robust and organic.
It will also highlight the imperfections in the aiming mechanics, but that is another matter.

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: [Suggestion] Accuracy reduction for indirect fire
« Reply #20 on: May 09, 2017, 07:17:58 pm »
I put some more thought into it. The most simple mechanic to implement would be to always just randomly select between three tiles. The tile you placed the cursor at and the tiles left and right of that. Line of fire check on neighboring tiles is probably not needed. This gives you 66% miss chance which is punishing enough to be felt by the player. The downside is that area of effect weapons would not be affected much. Hitting the tile next to the target is still good enough.
If we want to nerf area damage as well, we need to allow for selecting tiles that are further away. The most basic implementation would be to just increase the amount of tiles to five (two tiles left and right of target) if the target is further than x tiles away. A more elaborate approach would be tiles in a circle around the cursor. If tiles further away from curser can be selected, a line of fire check will be need to avoid weirdness.

Question: how do we handle camo?
Example: An enemy with high camo value (PirateZ Stargod) is standing next to one of your soldiers. Another soldier is a bit further away and can't see the enemy because of camo. That soldier tries to shoot the camoed enemy.
Do we apply standard no line of sight rule? Then we need to exclude the tile next to the enemy that your soldier is standing on from the random tile selection (if the soldier that is firing can see his buddy). Same for any visible obstacles, where the enemy clearly can not be standing.
Or do we disable miss chance on any camo unit once it is spotted on the basis that once you know where to look and can see the tile, you can see through the camo?

Basically, we need to make sure that you can't shoot a buddy that you can see because of random tile selection.
Not critical but nice to have would be to exclude tiles where the enemy can't be from the tile selection. Like tiles that you know to be obstacles or walls. Could also be tiles that you can see, but with camo that is not a clear "no enemy there" indicator.
« Last Edit: May 09, 2017, 07:19:38 pm by Eddie »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8615
    • View Profile
Re: [DONE] [Suggestion] Accuracy reduction for indirect fire
« Reply #21 on: July 17, 2018, 03:18:04 pm »
This has been implemented in the meantime, more info here: https://openxcom.org/forum/index.php/topic,5679.msg88552.html#msg88552