Opened 9 years ago
Last modified 9 years ago
#316 confirmed enhancement
unitEquipmentItem to fill variable number of equipmentSlot(s)
Reported by: | Tsudico | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | WarFoundry-API | Version: | Trunk |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Some items that occur in wargames may take up more than 1 equipment slot, for example:
<equipmentSlots> <equipmentSlot name="Weapons"> <maxLimit> <core:percentageLimit limit="300" /> </maxLimit> </equipmentSlot> </equipmentSlots> <unitEquipment> <unitEquipmentItem id="Dagger" equipmentSlot="Weapons"> <maxLimit> <core:percentageLimit limit="200" /> </maxLimit> </unitEquipmentItem> <unitEquipmentItem id="Sword" equipmentSlot="Weapons"> <maxLimit> <core:percentageLimit limit="200" /> </maxLimit> </unitEquipmentItem> <unitEquipmentItem id="TwoHandedSword" equipmentSlot="Weapons"> <maxLimit> <core:unitSizeLimit /> </maxLimit> </unitEquipmentItem>
You can easily choose between 2 daggers and a sword or 2 swords and a dagger. But, given the above XML, you can't prevent a person from choosing a two handed sword and two other items. While there might be a way to handle it with mutexes or requirements, it would be much easier if there was an XML attribute for each unitEquipmentItem that indicates how many slots it fills, such as:
<unitEquipmentItem id="TwoHandedSword" equipmentSlot="Weapons" slotsFilled="2"> <maxLimit> <core:unitSizeLimit /> </maxLimit> </unitEquipmentItem>
The default for slotsFilled would be 1 and it would only accept values greater than 0.
This mainly would be needed in war games where at least some units are one model in size or each model in the unit needs to be configured independently.
Change History (3)
comment:1 Changed 9 years ago by
Status: | new → needinfo_new |
---|
comment:2 Changed 9 years ago by
In the above case the following would be accepted equipment loadout per model based on 3 equipment slots:
Config # 1: Config # 2: Config # 3: Slot 1: Dagger Slot 1: Sword Slot 1: Two-Handed Sword Config # 4: Config # 5: Config # 6: Slot 1: Dagger Slot 1: Sword Slot 1: Two-Handed Sword Slot 2: Sword Slot 2: Dagger Slot 2: Sword Config # 7: Config # 8: Config # 9: Slot 1: Dagger Slot 1: Sword Slot 1: Two-Handed Sword Slot 2: Dagger Slot 2: Sword Slot 2: Dagger Config #10: Config #11: Slot 1: Dagger Slot 1: Sword Slot 2: Dagger Slot 2: Sword Slot 3: Sword Slot 3: Dagger
The configurations that shouldn't be allowed:
Config #12: Config #13: Config #14: Slot 1: Two-Handed Sword Slot 1: Two-Handed Sword Slot 1: Two-Handed Sword Slot 2: Dagger Slot 2: Sword Slot 2: Two-Handed Sword Slot 3: Sword Slot 3: Dagger Config #15: Config #16: Slot 1: Two-Handed Sword Slot 1: Two-Handed Sword Slot 2: Dagger Slot 2: Sword Slot 3: Dagger Slot 3: Sword
I understand that each model may need to be a sub unit so that it can have a different configuration. Additionally, the user should be able to use any of the three slots if they do not "over-fill" the number of slots: config 1-3 could occur in slots 1-3, config 4-9 should be able to fill any two slots, etc.
It is my understanding that even with multiple slots and mutexes I couldn't prevent people from taking a two-handed sword and 2 other pieces of equipment without preventing them from taking some of the allowed options. For example, if instead of defining one equipmentItem for each piece of equipment I defined the equipment multiple times so that it could be assigned in each slot do the mutexes work across equipment slots? This may be an example of requirement necessity, but I try to limit that as much as possible.
If my understanding of equipment slots is incorrect, or the above configuration can be done alone with mutex and equipment slots then this ticket should be closed.
comment:3 Changed 9 years ago by
Status: | needinfo_new → confirmed |
---|
Good example received. Now we can look at implementing it.
So in the above example then they should be allowed a two-handed sword and a dagger, but not a two-handed sword and two daggers, or a two-handed sword and two swords? A proper enumeration of what they are allowed and what they aren't allowed from all combinations of what is possible might help. I think multiple slots might work rather than having a "slots filled", but I need to check.