Author Topic: [Answered] Placing multiple fixed weapons/items in an inventory slot?  (Read 1782 times)

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Not sure if I am to post this here or in the help subforum, please move accordingly if this doesn't belong here.

Is it possible to place two or more fixed weapons/items in an inventory slot (with them occupying different defaultInvSlotX/Ys)?

I am currently trying to block leftmost and rightmost backpack slots leaving only the middle one accessible (to represent built-in equipment blocking the left and right sides), but OXCE always defaults the second backpack item to the hand of the unit.
« Last Edit: February 12, 2023, 12:02:46 pm by Meridian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Placing multiple fixed weapons/items in an inventory slot?
« Reply #1 on: November 20, 2021, 04:16:14 am »
This may be what you are looking for:
https://openxcom.org/forum/index.php/topic,4187.msg118725.html#msg118725

Is it possible to personalize the inv layout for a specific armor?
For the belt I thought about defining the "full big belt" (2*4) as default, and then "black out" the two bottom-left slots for all the other armors; problem would be that I don't know how to place the "null item" on the specific slots I want to forbid (the backpack null item fills the entire space so no precise placing is involved).
(Nothing really vital though, I'm still ok with just the disabled backpack).


You can now put the "null item" on a specific position within an inventory slot.

Code: [Select]
Code: [Select]

items:
  - type: STR_NULL_ITEM
    defaultInventorySlot: STR_BELT
    defaultInvSlotX: 3
    defaultInvSlotY: 1
« Last Edit: November 20, 2021, 04:19:56 am by The Martian »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: Placing multiple fixed weapons/items in an inventory slot?
« Reply #2 on: November 20, 2021, 11:55:10 am »

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: Placing multiple fixed weapons/items in an inventory slot?
« Reply #3 on: November 20, 2021, 10:22:57 pm »
I tried something similar when adding the ammo bay to the Sentinel/Missile in 40k/ROSIGMA (reduce backpack to 2x2 from 3x3 by adding one 3x1 and a 1x2 NULL object).

It didn't work out perfectly as in the first item worked fine, the second didn't. I don't remember the details but I ended up accepting that after getting rid of one 1x3 row that I couldn't get rid of the remaining 2x1 column. It still has the black borders so the grey grid isn't displayed.

But in your case you can just create a 2x3 NULL object leaving the right most column existing which effectively creates the same result.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: Placing multiple fixed weapons/items in an inventory slot?
« Reply #4 on: November 20, 2021, 10:29:54 pm »
Is it possible to place two or more fixed weapons/items in an inventory slot (with them occupying different defaultInvSlotX/Ys)?

no

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: Placing multiple fixed weapons/items in an inventory slot?
« Reply #5 on: November 20, 2021, 10:33:18 pm »