aliens

Author Topic: [Solved] Inventory restriction (items only in certain slots)  (Read 2425 times)

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
[Solved] Inventory restriction (items only in certain slots)
« 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.
« Last Edit: February 12, 2023, 09:04:11 am by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #1 on: February 10, 2020, 09:47:38 am »
yes

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #2 on: February 10, 2020, 09:54:57 am »
thanks, where can I find the documentation ?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #4 on: February 10, 2020, 10:52:27 am »
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.
« Last Edit: February 10, 2020, 10:57:00 am by betatester »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #5 on: February 10, 2020, 11:24:49 am »
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.

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #6 on: February 10, 2020, 06:15:27 pm »
please can you give an example of supportedInventorySections possible values and a list example ?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #7 on: February 10, 2020, 06:33:13 pm »
from PirateZ:

Code: [Select]
  - 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

Offline betatester

  • Colonel
  • ****
  • Posts: 171
    • View Profile
Re: [Question/Suggestion] Inventory restriction
« Reply #8 on: February 11, 2020, 01:36:57 am »
thanks.
I have made a WIP thread.