Author Topic: [bug?] Changing the last armor's subtype does not work with mouse R-click  (Read 340 times)

Offline psavola

  • Commander
  • *****
  • Posts: 843
    • View Profile
Some mods have armor 'subtypes', e.g. XCF Armored Vest or AV+Shield. This seems to result in slightly different behavior in the engine, because a single piece of armor is used in multiple different variants.

When selecting armors, you can apply the last selected armor with mouse right-click. However, this only works if there are some armors available. R-click does not work if there are no "spare" armors available and the engine would need to change the armor subtype. You can change this manually in the attached screen.

It could be argued that this is a design limitation. But I suppose it would be cool if R-click worked also when you want to change the last armor from one subtype to another.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9116
    • View Profile
Re: [bug?] Changing the last armor's subtype does not work with mouse R-click
« Reply #1 on: November 24, 2024, 09:24:18 am »
When selecting armors, you can apply the last selected armor with mouse right-click. However, this only works if there are some armors available.

Obviously.

R-click does not work if there are no "spare" armors available and the engine would need to change the armor subtype. You can change this manually in the attached screen.

If there is no spare armor, there is no spare for all of the subtypes.
As your screenshot shows.

It could be argued that this is a design limitation.

It's not a limitation, it's a feature.

But I suppose it would be cool if R-click worked also when you want to change the last armor from one subtype to another.

R-click is designed to be a GUI-less quick action.
I don't see how it could be used to change what is "last selected armor" without giving you a GUI.
Nor do I see any point in changing a well-defined functionality into some unintuitive monstrosity.

Offline psavola

  • Commander
  • *****
  • Posts: 843
    • View Profile
Re: [bug?] Changing the last armor's subtype does not work with mouse R-click
« Reply #2 on: November 24, 2024, 09:49:55 am »
R-click is designed to be a GUI-less quick action.
I don't see how it could be used to change what is "last selected armor" without giving you a GUI.
Nor do I see any point in changing a well-defined functionality into some unintuitive monstrosity.

I think I'm unable to communicate properly because there obviously seems to be a way to change the armor without GUI (if you ignore design limitations or features) and I don't see how this would be unintuitive (because it would be exactly the same behavior as before, except that it works in this particular corner case, so it would be only an extension of R-click to this corner case).

In the GUI, you can change Armored Vest to Armored Vest/Shield or vice versa even if there is zero left if the soldier is already wearing either of those.

R-click already knows whether it should put AV or AV/Shield on the soldier, because switching AV/Shield to AV or vice versa already works if there are spares but not if there aren't spares. This would extend the R-click functionality to switch the armor subtype to the one requested by R-click and instead of taking the armor from the base inventory, it would take it from the R-clicked soldier already wearing that armor (essentially switching the armor subtype to the requested one).


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9116
    • View Profile
Re: [bug?] Changing the last armor's subtype does not work with mouse R-click
« Reply #3 on: November 24, 2024, 10:40:13 am »
Currently R-click intuitively changes the armor to exactly one armor type as it should (the last selected one).

1/ If it should change the armor to something else, how would it know to which one and when? Let's say you have 10 variants of the same armor (grey, red, blue, green, yellow, black, white, etc.)... how should it know which variant to pick?

2/ And more importantly, why should it even try to do something else? The player expects and wants to change the armor to the one he selected, not to some other random armor. If the player wants to use a different armor, he uses L-click, instead of letting the game blindly guess what he might or might not want to do.


If I misunderstand something, give me a concrete example, in excruciating detail, step by step, without omitting anything.

Offline psavola

  • Commander
  • *****
  • Posts: 843
    • View Profile
Re: [bug?] Changing the last armor's subtype does not work with mouse R-click
« Reply #4 on: November 24, 2024, 11:24:50 am »
Yes, we are miscommunicating. You don't need to change the armor to something completely different but rather the same previous one already known by R-click.

To demonstrate current behavior for example in XCF:

1) have two armored vests in the inventory; have two soldiers with no armor at all.
2) select armored vest/shield for soldier 1 manually (thus the game learns that the next R-click should be armored vest/shield)
3) at this point there is 1 armored vest in the inventory
4) right click soldier 2, and its armor is changed to armored vest/shield.

Alternatively:

1) have three armored vests in the inventory; have two soldiers already wearing armored vest (no shield)
2) select armored vest/shield for soldier 1 manually (thus the game learns that the next R-click should be armored vest/shield)
3) at this point there are 2 armored vests in the inventory
4) right click soldier 2, and its armor is changed to armored vest/shield.

This is the current behavior. You can change from unarmored to armored vest by R-click (first example) and you can change "armored vest" to "armored vest/shield" with R-click if there is at least one spare (second example).

Now, this is the behavior I'd prefer to have when there is no spare armored vest in the inventory.

1) two soldiers have armored vest/shield on them, zero armored vests in the inventory.
2) select armored vest (no shield) manually for soldier 1 (thus the game learns that the next R-click should be armored vest with no shield), like in the screenshot above.
3) at this point there are no spare armored vests in the inventory, but soldier 2 has "armored vest/shield".
4) right-click soldier 2, trying to change armored vest/shield to armored vest.
5) step 4/ does not work, because R-click depends on spare armored vest being in the inventory, it cannot change the armored vest subtype to the one engine learned in 2) and requested in 4).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9116
    • View Profile
Re: [bug?] Changing the last armor's subtype does not work with mouse R-click
« Reply #5 on: November 24, 2024, 11:58:19 am »
Understood.