So, I have reworked gix's proposal, because it was not backwards-compatible.
All in all, I am not happy with my solution either, it feels quite unnecessary and I don't see much improvement over the existing approach (which is a misuse of another feature I admit, but that was also not my idea).
To summarize the advantages:
- you can must define for each armor, which slots it contains
- the unwanted slots will actually disappear... not just be covered by black foreground
- the descriptions (and TU cost) of unwanted slots will disappear too
- you will be able to move slots easily just on selected armors, give them different description and different TU costs
But there are also disadvantages:
- additional slots are still defined globally... so if you add any new ones, they will by default go to all armors (backwards-compatibility)
- thus you will need to change the ruleset for ALL your armors, and enumerate the slots that belong to each armor...
- ... which is basically the same amount of modding work and same amount of extra ruleset as today (for defining those black blank slot covers)
- you can't change ground slot
- you can't change hand slots (this could theoretically be added, but it is a serious pain in the ass)
- you can remove belt and backpack... but you will need to name some other slots, which will fulfill the role of belt and backpack, for example for autoequip algorithm and for AI (could be any slot except ground, even hands)
- if you decide to use STR_BELT_1 and STR_BELT_2 for two different armors... they will also be saved differently in the inventory templates... so sharing equipment layout between different armors will also be a PITA...
- ... therefore, there will be a possibility to define a "matching ID" for all inventory slots... so you can define that STR_BELT_1 and STR_BELT_2 should both be saved as STR_BELT_COMMON and then loaded back by reverse search... which is also dangerous if you define two different slots in the same armor to save under same ID (e.g. if you say that "right leg" and "belt" should both save as "xyz")
OK, enough complaining, here's how it could look like:
invs:
- id: STR_MY_CUSTOM_BELT_ONLY_FOR_POWER_ARMOR # a new inv. slot
x: 192
y: 104
slots:
- [0, 0]
- [1, 0]
costs:
STR_BACK_PACK: 16
STR_GROUND: 6
<snip>
Since you added a global slot, now we need to redefine ALL armors (this can be a hundred for bigger mods), so that they know they should not use this new slot.
You can omit STR_GROUND, STR_RIGHT_HAND and STR_LEFT_HAND, because the game adds ground and hands automatically if they are missing.
Backpack and belt (e.g. STR_BACK_PACK and STR_BELT) would also be added automatically... we get to that later.
armors:
- type: STR_NONE_UC
inventorySlots: [ STR_LEFT_SHOULDER, STR_RIGHT_SHOULDER, STR_LEFT_LEG, STR_RIGHT_LEG ]
- type: STR_PERSONAL_ARMOR_UC
inventorySlots: [ STR_LEFT_SHOULDER, STR_RIGHT_SHOULDER, STR_LEFT_LEG, STR_RIGHT_LEG ]
- type: STR_POWER_SUIT_UC
inventorySlots: [ STR_LEFT_SHOULDER, STR_RIGHT_SHOULDER, STR_LEFT_LEG, STR_RIGHT_LEG, STR_MY_CUSTOM_BELT_ONLY_FOR_POWER_ARMOR ]
- type: STR_FLYING_SUIT_UC
inventorySlots: [ STR_LEFT_SHOULDER, STR_RIGHT_SHOULDER, STR_LEFT_LEG, STR_RIGHT_LEG ]
You also need to specify, which slots are belt and backpack... if they are different than vanilla slots.
So in this case, you would need to define belt slot for power armor:
armors:
- type: STR_POWER_SUIT_UC
inventorySlots: [ STR_LEFT_SHOULDER, STR_RIGHT_SHOULDER, STR_LEFT_LEG, STR_RIGHT_LEG ]
slotBelt: STR_MY_CUSTOM_BELT_ONLY_FOR_POWER_ARMOR
# slotBackpack: STR_BACK_PACK # no need to define this if it's not changed
Both "slotBelt" and "slotBackpack" would be added automatically to "inventorySlots", besides the ground and hand slots.
Lastly, so that we can use equipment templates between different armors, we need to define that STR_MY_CUSTOM_BELT_ONLY_FOR_POWER_ARMOR and STR_BELT should be treated the same way.
invs:
- id: STR_MY_CUSTOM_BELT_ONLY_FOR_POWER_ARMOR
x: 192
y: 104
layoutMatchId: STR_BELT # treat this slot same way as STR_BELT slot for equipment layout templates handling
#
# slots and costs definition
#
So, now the question after all the explanations: is someone interested in this feature or is it not worth the (modding) effort?