OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: betatester on February 10, 2020, 09:39:14 am
-
Is it possible to restrict an inventory slot to a specific kind of item ?
Some examples a scabbard for melee weapon, a Mexican-style (or Chewbacca depending of your inspiration) munition belt, an under-armor layer (better than placing it in backpack) and surely many more.
-
yes
-
thanks, where can I find the documentation ?
-
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom) (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom))
-
Thanks.
As far as I understand the documentation the place where an item can be put is defined with the item and by default all are authorized.
there's no attribute in inventory that define what can be put in it.
So if you want to create a scabbard you have to forbids all items except melee weapons to be put in it. that's a huge work (or a regex work)
I think a 'category allowed' attribute in inventory can be handy, default all.
Maybe restrict the display of an inventory slot to specific training, commendation, transformation. For example Martial Arts training for scabbard.
-
So if you want to create a scabbard you have to forbids all items except melee weapons to be put in it. that's a huge work (or a regex work)
Not all, just the ones small enough to fit there.
'category allowed' on inv slots does not exist atm.
-
please can you give an example of supportedInventorySections possible values and a list example ?
-
from PirateZ:
- type: STR_TORCH
categories: [STR_BAT_CAT_ONE_HANDED, STR_BAT_CAT_INTELLIGENCE]
requiresBuy:
- STR_JACKSTOWN_SCOUTING
size: 0.1
costBuy: 75
costSell: 50
bigSprite: 738
floorSprite: 284
handSprite: 1400
weight: 4
fuseType: -3
fuseTriggerEvents:
defaultBehavior: true
throwTrigger: true
throwExplode: true
specialChance: 50
costThrow:
energy: 8
time: 40
battleType: 10
power: 15
invWidth: 1
invHeight: 3
supportedInventorySections:
- STR_RIGHT_HAND
- STR_LEFT_HAND
listOrder: 14420
-
thanks.
I have made a WIP thread.