OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: clownagent on February 26, 2017, 07:57:54 pm

Title: [DONE] [Suggestion] Accuracy reduction for indirect fire
Post by: clownagent on February 26, 2017, 07:57:54 pm
I think it would be good to have an (optional) accuracy reduction if you try to hit an unseen enemy, for example through smoke or by arcing weapons.

A common exploit is to put your troops into smoke where they are save, move a scouting rookie out and snipe all encountered enemies from the smoke cover.  The AI can of course not use this simple trick which makes some missions very unbalanced.

I think it would be more balanced if the units sitting in smoke and cannot see anything would suffer from an accuracy reduction for targeting units they cannot see by themselves.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Solarius Scorch on February 26, 2017, 08:11:21 pm
The simplest solution would be targeting the tile right behind the unit though.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: ohartenstein23 on February 26, 2017, 08:23:51 pm
To implement it directly in the engine would be a little difficult in terms of how to do it without making it possible to get around it as Solarius mentioned. One already-available method for this in OXCE is to write a script to have smoke damage cause an accuracy debuff that lasts for a half-turn.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: robin on February 26, 2017, 08:40:37 pm
The simplest solution would be targeting the tile right behind the unit though.
i guess this penalty should apply on the tile: you target an unseen tile, you get the penalty whether that tile hosts a unit or not.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: clownagent on February 26, 2017, 09:00:33 pm
To implement it directly in the engine would be a little difficult in terms of how to do it without making it possible to get around it as Solarius mentioned. One already-available method for this in OXCE is to write a script to have smoke damage cause an accuracy debuff that lasts for a half-turn.

There should also be the penalty if the unit is just behind the smoke. So the penalty should just depend on the line of sight not if it is standing in smoke.


i guess this penalty should apply on the tile: you target an unseen tile, you get the penalty whether that tile hosts a unit or not.

exactly.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Meridian on February 27, 2017, 12:45:30 am
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.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: clownagent on February 27, 2017, 09:51:39 am
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.

A weapon specific flat "LOS-modifier" would be most flexible.

If only bonus instead of penalty is implemented, the information shown in the ufopedia would maybe be misleading?
For example you give a weapon 50% accuracy and  a +30% LOS-modifier it would be in most cases a 80% weapon, but the ufopedia would show 50%.

Therefore I would prefer if the "LOS-modifier" could be positive or negative.
 

Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Meridian on February 27, 2017, 10:59:17 am
It can be negative too.

The difference to original is that it applies when aiming at a visible enemy... instead of when aiming at anything else than a visible enemy.

As for confusing, I agree, in all cases it would be confusing.
Both Ufopedia and Battlescape action menu would show wrong numbers, regardless of solution chosen... unless someone comes with something completely new.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: clownagent on February 27, 2017, 09:12:00 pm
It can be negative too.

The difference to original is that it applies when aiming at a visible enemy... instead of when aiming at anything else than a visible enemy.

As for confusing, I agree, in all cases it would be confusing.
Both Ufopedia and Battlescape action menu would show wrong numbers, regardless of solution chosen... unless someone comes with something completely new.

Not sure if I understand correctly:
1st suggestion: Always use normal accuracy, except for all tiles/enemies NOT seen by the unit. This means the LOS modifier would probably be not used very often, because for most shots you have a line of sight.
2nd suggestion: Always use normal accuracy, except for all tiles/enemies seen by the unit. This means a LOS modifier would be applied for many shots.

If these are the two suggestions I would prefer the 1st one, because I think the LOS-modifier should not be applied too often to avoid confusion.

As information for the player an icon could be shown above the target cursor if the LOS-modifier is applied. For example a stylized crossed out eye icon.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: BTAxis on February 27, 2017, 10:46:16 pm
Perhaps such an icon could also be displayed on the targeting reticule graphic when aiming at a tile that is subject to a penalty, to communicate said penalty to the player.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: mumble on March 02, 2017, 01:06:49 am
Couldn't there be an aim reduction per squares of smoke shot through??? This would be a pretty simple means, wouldn't it?

Or is this impossible to do?

To be honest, this solution would also make the game dynamic a bit more interesting...
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: 7Saturn on March 02, 2017, 12:17:11 pm
On additional thing to consider: Further gain in accuracy for units within LOS would need a rebalancing of existing weapons, because most of the time you are withing LOS, at least when entering UFOs. One would experience an increase of accuracy, where formerly none was existent. I under stand it, that it is not meant to be changed for situations like these, but the opposite, only when there's no LOS.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: robin on March 03, 2017, 12:12:44 am
I think the accuracy displayed in the firing menu should be the real one, in normal conditions (target visible). The bonus for visible targets sounds confusing.
About the penalty I was thinking the inverse (or so) of the bonus you get by crouching, so that if you crouch you "even out" and you get the normal standing accuracy. Haven't given it much thought though, maybe it needs to be harsher to be meaningful.
I'm still not convinced; but for countering the "scout and snipe" tactic, I overwhelmingly prefer this solution than riddling the soldiers arsenal with wacky range limits.

p.s. I guess an icon on the target reticle (or something else, dunno) would be needed, since the accuracy in the menu doesn't change and the player needs somehow to know that he is targeting outside the sight range of his dude.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: 7Saturn on March 03, 2017, 09:11:09 am
That displaying of different accuracies requires the text box with the accuracy knowing, where you are going to point at in advance, or being open during the entire target choice process.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: robin on March 04, 2017, 11:24:49 am
just in case this goes further.
quite crude though, i'm not that good at making icons.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Nord 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.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: robin 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).
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: RSSwizard 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.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Eddie 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).
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Solarius Scorch 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.
Title: Re: [Suggestion] Accuracy reduction for indirect fire
Post by: Eddie 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.
Title: Re: [DONE] [Suggestion] Accuracy reduction for indirect fire
Post by: Meridian 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