aliens

Author Topic: [Suggestion]more types to define items for Skills  (Read 522 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1742
  • The Gate is open.
    • View Profile
[Suggestion]more types to define items for Skills
« on: October 23, 2024, 02:39:06 pm »
I has a problem: if a unit uses the skill related to melee weapons, there is no way to check only items in hands. So "improved bashing superduper swing" can be not with the sword in hand, but with a knife in pbackpack. Only way is to define each item, available for this skill. But it can be a full list of all melee weapons.

So i propose to add "compatibleWeaponTypes" similar to "compatibleWeapons", to define "Melee" or whatever needed.

Thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #1 on: October 23, 2024, 05:09:29 pm »
I has a problem: if a unit uses the skill related to melee weapons, there is no way to check only items in hands.

The documentation says there is an attribute just for that... does it not work?

`checkHandsOnly: true`

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Soldier_Skillls

So i propose to add "compatibleWeaponTypes" similar to "compatibleWeapons", to define "Melee" or whatever needed.

Isn't this also already available? Or does it not work?

`battleType: 3`

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Soldier_Skillls

Offline Nord

  • Commander
  • *****
  • Posts: 1742
  • The Gate is open.
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #2 on: October 23, 2024, 06:24:01 pm »
When "battleType" used, "checkHandsOnly"  does not apply.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #3 on: October 23, 2024, 06:29:32 pm »
ok, I will check

Offline Dadimus_Maximus

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #4 on: October 24, 2024, 05:36:17 am »
ok, I will check
Happy 9000th post!  8)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #5 on: October 25, 2024, 05:44:48 pm »
When "battleType" used, "checkHandsOnly"  does not apply.

Yup, it's not checked.

There's even a note in the source code that it is not checked: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Battlescape/SkillMenuState.cpp#L309

@memmaker: is this intentional/desired or can I change it?

Offline memmaker

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: [Suggestion]more types to define items for Skills
« Reply #6 on: October 27, 2024, 07:16:04 am »
I only remember this vaguely, but I am pretty sure you'd want to be able to query more precisely. So I'd say you can just change it.