OpenXcom Forum

Modding => Help => Topic started by: Keth01 on April 20, 2018, 01:41:20 pm

Title: Linking Items to Armor
Post by: Keth01 on April 20, 2018, 01:41:20 pm

I noticed a mention on the Piratez board of some items being 'glued' to certain armours? How does that work syntax-wise? (Apologies of this is a dumb question but google wasn't helpful).
Title: Re: Linking Items to Armor
Post by: bulletdesigner on April 20, 2018, 02:07:28 pm
the code is this but it requires extender

armors:
    builtInWeapons:
      - AUX_GLUED
items:
  - type: AUX_GLUED
Title: Re: Linking Items to Armor
Post by: Keth01 on April 20, 2018, 04:17:34 pm

No problem, I'm doing my stuff in OXCE+ now :)

Does the item take up an inventory slot if you apply this?
Title: Re: Linking Items to Armor
Post by: ohartenstein23 on April 20, 2018, 05:33:16 pm
Yes, though you can specify which inventory slot it prefers by putting "defaultInventorySlot: STR_SOME_INVENTORY_SLOT" on the item.  I'm also experimenting with adding a weapon by the "specialWeapon" parameter on a unit's armor, in which case it wouldn't take an inventory slot and would be accessed by either clicking on an empty hand or a special button in the upper-right corner of the screen.
Title: Re: Linking Items to Armor
Post by: Keth01 on April 21, 2018, 04:04:19 am

Nice :)

Since i'm thinking of either a 'dedicated hand' on power armour that is the armour's signature weapon rather than a gauntlet or a belt/backpack shield generator item, taking up inventory isn't an issue :)
Title: Re: Linking Items to Armor
Post by: ohartenstein23 on April 21, 2018, 04:19:34 am
My code to allow weapons to be used that aren't directly in a unit's hands is working pretty well - if Meridian likes it, then the power gauntlet as a melee weapon could be configured to not use up a hand slot at all.
Title: Re: Linking Items to Armor
Post by: Keth01 on April 21, 2018, 07:35:23 am

Sweet. Probably make the 40k modding community happy with that one too.