aliens

Author Topic: Selecting which weapon is active for reaction fire  (Read 5033 times)

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Selecting which weapon is active for reaction fire
« on: November 18, 2021, 11:16:24 am »
I've just noticed it now that it is always the primary weapon which is visible on my dudes. But in the original UFO and TFtD, if you clicked on the item in the off hand, that item became the visible one - and the one which was used for subsequent reaction fire. Was it a conscious decision to change this for OpenXcom?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #1 on: November 18, 2021, 04:14:41 pm »
change what?

you said several different things... I don't know what you want me to check

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #2 on: November 18, 2021, 05:16:34 pm »
Ok, let's say an agent holds a rifle in one hand and a stun rod in the other The graphical representation in the battlescape in OpenXcom will always be the rifle - or maybe it's always the item in the right hand? Anyway, in the original, the graphical representation in the battlescape will always be the item you clicked last. Not the inventory screen, but the isometric view where the action takes place. So if I don't want my dude to reaction fire with his rifle (because friendly fire isn't so friendly), I could L-click on the stun rod (and then R-click to deselect), and then he would be shown as wielding the stun rod instead. This is not the case in OpenXcom. No matter which weapon I click or use, it will not change the visuals. And I also kind of doubt it will affect which weapon is used for reaction fire. This is what's different from the original.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #3 on: November 18, 2021, 05:25:59 pm »
For me, it works exactly like that in OpenXcom too.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #4 on: November 18, 2021, 05:29:40 pm »
Here's a video proof.

Load the save
Heavy plasma is shown and used for reactions
Load again
Click on laser rifle
Laser rifle is shown and used for reactions

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #5 on: November 18, 2021, 05:57:13 pm »
What the...! I tested with three different versions - an older one with OpenXcom, and two (presumably different) versions of OpenXcom Extended. I noticed it first playing TWoTS, then tested in X-Com Files, then vanilla TFtD with the same result. I'll have to re-test this.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #6 on: November 18, 2021, 05:58:50 pm »
So if I don't want my dude to reaction fire with his rifle (because friendly fire isn't so friendly), I could L-click on the stun rod (and then R-click to deselect), and then he would be shown as wielding the stun rod instead. This is not the case in OpenXcom.

And this is not the case in the original either.
Soldiers will react if they can even with a weapon that was not selected.

Videoproof that it works same in the original attached:
- only 1 guy has any weapons
- I select first the rifle and then select the stun rod... which becomes shown on the sprite
- but during the alien turn the soldier is able to switch to rifle and shoot (as intended both in OG and in OpenXcom)

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #7 on: November 18, 2021, 07:04:31 pm »
Ok, I'm back home.
These are the versions I have:

OpenXcom 1.0 (older than I realised)
OpenXcom Extended 7.0
OpenXcom Extended 7.019

Anyway, it seems to be the case only for certain item combos. I tested TWoTS, for example, and with a dart autogun and a dart rifle there was no change. With an X-rifle and a thermal tazer, however, the visuals did change. So I don't know what the deal is, really.

« Last Edit: November 18, 2021, 07:14:55 pm by Kissaki »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #8 on: November 18, 2021, 07:29:56 pm »
Ok, I'm back home.
These are the versions I have:

OpenXcom 1.0 (older than I realised)
OpenXcom Extended 7.0
OpenXcom Extended 7.019

The ones I actually tested before were OpenXcom 1.0, both with XCom-Files and vanilla, as well as OpenXcom 7.019 with TWoTS. None of these worked the way you demonstrated in the video, and they still don't. I didn't test the 7.0 version before, frankly because it's been taking forever to load these days - an issue I have now inexplicably solved by switching between mods. The results of further testing:

7.0: yay for vanilla and XCom-files
7.019: yay for vanilla, nay for TWoTS.
1.0: nope.

So it seems to be a TWoTS/ancient version issue.

It's irritating when people don't do enough research before they post. It's even more irritating when that person is me.

I don't have OpenXcom 1.0 (it's 7 years old!)

I tested both OpenXcom Extended 7.0 and OpenXcom Extended 7.0.19... and they both work fine.
There hasn't been any change in that part of the code for years.

Please don't make me upload more video proofs.

If you want to continue this (very likely pointless) discussion, please provide some evidence.
« Last Edit: November 18, 2021, 07:32:11 pm by Meridian »

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #9 on: November 18, 2021, 08:03:02 pm »
I don't have OpenXcom 1.0 (it's 7 years old!)

I tested both OpenXcom Extended 7.0 and OpenXcom Extended 7.0.19... and they both work fine.
There hasn't been any change in that part of the code for years.

Please don't make me upload more video proofs.

If you want to continue this (very likely pointless) discussion, please provide some evidence.
I edited my post with new info before you replied.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #10 on: November 18, 2021, 08:40:26 pm »
I edited my post with new info before you replied.

What version of TWoTS are you playing? I can't find a weapon called Dart Rifle in v2.50

Offline Kissaki

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #11 on: November 18, 2021, 09:23:04 pm »
By "dart rifle" I meant "jet harpoon", I apologise.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #12 on: November 18, 2021, 09:31:51 pm »
By "dart rifle" I meant "jet harpoon", I apologise.

With Jet Harpoon and Dart Autogun it also works correctly.
The weapons just have very similar handobs, so it's hard to see the difference.

--

Maybe you used some pistols?
If yes, then that's a change in OpenXcom.
OpenXcom supports drawing dual-wielded pistols (two 1-handed weapons)... the original game could not do that, it showed one or the other.
However when holding both a 1-handed weapon and a 2-handed weapon, the 2-handed weapon wins (=is always drawn) in OpenXcom.

Btw. the reactions are unaffected by this drawing mechanism, i.e. the last selected weapon will be used for reactions (if possible), even if not drawn on the unit sprite. (If not possible, the other weapon will be used (if possible), same as in the original).

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #13 on: November 18, 2021, 10:43:55 pm »
I've just noticed it now that it is always the primary weapon which is visible on my dudes. But in the original UFO and TFtD, if you clicked on the item in the off hand, that item became the visible one - and the one which was used for subsequent reaction fire. Was it a conscious decision to change this for OpenXcom?
Yes, it's a feature. You can see it indicated by the yellow square in the upper right corner of the weapon slot. As I understand it, by default the unit will preferentially reaction fire with whichever weapon has the lower time unit cost for snap shot; however the yellow square indicates a setting for that unit to prefer the indicated weapon regardless of time unit considerations.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Selecting which weapon is active for reaction fire
« Reply #14 on: November 18, 2021, 11:10:32 pm »
As I understand it, by default the unit will preferentially reaction fire with whichever weapon has the lower time unit cost for snap shot;

No, it won't, already my first video proved that.

Please let's not guess in this thread, it's confusing enough already.

To repeat:
1. the reaction preferences work the same way as in the original... no change in OpenXcom
2. the main/active weapon drawing works differently (a new feature in OpenXcom), if a 1-handed weapon is involved... but it doesn't have any impact on point 1.

3. the "yellow square" indicator you mentioned isn't even in OpenXcom, it's only in OpenXcom Extended, and as far as I can say, he didn't ask about it
« Last Edit: November 18, 2021, 11:19:58 pm by Meridian »