aliens

Author Topic: [Solved] shotgun-like weapon without ufo extender accuracy option ?  (Read 6555 times)

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
In my mod I'm using plain vanilla accuracy, that is the distance of the target doesn't matter, so I have "ufo extender accuracy" turned off.
But I'd like for a specific weapon (stun net) to behave like a shotgun, meaning that I want greater spread of the pellets in correlation to the distance of the target.
The dropoff in accuracy would be fixed for all types of shots.
For damage, there is a way to do exactly that:

    powerRangeReduction: 0.0 #how much power a bullet loses per tile, used by Psi-Amp damage too.
    powerRangeThreshold: 0.0

I'd need the very same but for accuracy.
So the question is:
Using the existing accuracy/dropoff options, is there a way to achieve that specific behavior, while keeping the whole "ufo extender accuracy" option turned off?
I never really looked into them since I always planned to use vanilla accuracy.
Thanks

edit: maybe I just need to use aimRange and dropoff ?

edit2:
I'm not finding any clear documentation on these:
    shotgunChoke:
    shotgunBehavior:
    shotgunSpread:
anyone knows?


« Last Edit: February 11, 2023, 05:42:10 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #1 on: August 25, 2018, 02:03:59 pm »
You can have extender accuracy turned on and redefine ranges and/or dropoff for all other weapons, so they behave as if it was turned off.

As for other shotgun attributes, here: https://openxcom.org/forum/index.php/topic,4834.0.html

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #2 on: August 25, 2018, 02:24:25 pm »
As for other shotgun attributes, here: https://openxcom.org/forum/index.php/topic,4834.0.html
Aaaah I even opened that topic, but I thought it was about the code and its merging.

You can have extender accuracy turned on and redefine ranges and/or dropoff for all other weapons, so they behave as if it was turned off.
Yeah... hmmm, I'm reading the ruleset reference:

Code: [Select]
aimRange Maximum effective range with this weapon before which range-based dropoff occurs.                         200
snapRange Maximum effective range with snap shot before which range-based dropoff occurs. (ufoextender accuracy only) 15
autoRange Maximum effective range with auto shot before which range-based dropoff occurs. (ufoextender accuracy only) 7
minRange Range-based dropoff will work in reverse for ranges below this.                                         0
dropoff The value by which the accuracy lowers for each tile after (or before) the thresholds above.

aimRange doesn't specify it is for aimed shot, but it seems to be a generic thing. Also it doesn't say "(ufoextender accuracy only)" like snapRange and autoRange.
Same dropoff doesn't say "(ufoextender accuracy only)".

Can this be clarified a little?
(I guess this should be asked to Warboy)

Also, can I use the value -1 to the entries above, to define "infinite range", or should I use 999 or 255 ?

P.S.
I thought I posted this in the "Help" section, maybe the topic should be move there idk.




« Last Edit: August 25, 2018, 02:26:30 pm by robin »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #3 on: August 25, 2018, 02:37:19 pm »
Code: [Select]
aimRange Maximum effective range with this weapon before which range-based dropoff occurs.                         200
snapRange Maximum effective range with snap shot before which range-based dropoff occurs. (ufoextender accuracy only) 15
autoRange Maximum effective range with auto shot before which range-based dropoff occurs. (ufoextender accuracy only) 7
minRange Range-based dropoff will work in reverse for ranges below this.                                         0
dropoff The value by which the accuracy lowers for each tile after (or before) the thresholds above.

Can this be clarified a little?
(I guess this should be asked to Warboy)

All 5 attributes are vanilla.

Without extender option, only aimRange and dropoff are used... for all shot types.
With extender option, aimRange is used for aimed shot, snapRange for snap shot and autoRange for autoshot.


Also, can I use the value -1 to the entries above, to define "infinite range", or should I use 999 or 255 ?

No, use a big number, e.g. 200.

P.S.
I thought I posted this in the "Help" section, maybe the topic should be move there idk.

I moved it to OXCE+ subforum because the title clearly indicated it was a question about OXCE+.

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #4 on: August 25, 2018, 02:48:48 pm »
Without extender option, only aimRange and dropoff are used... for all shot types.
This is what I hoped. Perfect!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #5 on: August 25, 2018, 02:59:18 pm »
This is what I hoped. Perfect!

Not quite perfect... you won't get the cursor accuracy display... so the player will have no idea that the accuracy is dropping.

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Re: [OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #6 on: August 25, 2018, 03:40:32 pm »
Not quite perfect... you won't get the cursor accuracy display... so the player will have no idea that the accuracy is dropping.
That's right...

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
I played briefly with having extender accuracy off for a mod, but I decided to just make all the ranges 200 for every weapon so that I can see accuracy on the cursor.  It also leaves me the option to give range fall-offs if necessary for specific weapons.

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
just make all the ranges 200 for every weapon
Can I just add
Code: [Select]
    dropoff: 0to obtain the same affect?
Or has it to be the whole
Code: [Select]
    aimRange: 200
    snapRange: 200
    autoRange: 200
    dropoff: 0
strictly?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Huh, I never thought about just using 0 drop-off.  It'll keep the accuracy constant, but the cursor will change from green to yellow past the default ranges.

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Huh, I never thought about just using 0 drop-off.  It'll keep the accuracy constant, but the cursor will change from green to yellow past the default ranges.
Well, not much of a choice then.

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Re: [?][OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #11 on: August 25, 2018, 09:33:58 pm »
Why the accuracy suddenly drops to half (see attached image)?
In theory it should lower by 1% each tile (38-37-36-35-34-33%), which it does until it abruptly dips (38-37-36-17-17-33%).

Could it be because the target unit voxel (height 10)? Although if that were the case, the first column should influence the value too, yet the tile after it displays 36%.

*cut*
« Last Edit: August 25, 2018, 09:45:43 pm by robin »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [?][OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #12 on: August 25, 2018, 09:38:06 pm »
do you have noLOS penalty modded in? can't think of anything else...

Offline robin

  • Commander
  • *****
  • Posts: 1222
  • ULTIMATE ROOKIE
    • View Profile
Re: [?][OXCE+] shotgun-like weapon without ufo extender accuracy option ?
« Reply #13 on: August 25, 2018, 09:45:03 pm »
do you have noLOS penalty modded in? can't think of anything else...
Oh you are right...
Goddamn I'm dumb.

edit: there is still the no-LOS cursor.. A bit ugly... I'm open to ideas how to improve it.
« Last Edit: August 26, 2018, 06:05:39 pm by robin »