Aquadrizzt Posted June 28, 2015 Posted June 28, 2015 I asked this couple of months ago on the beamdog forums but got no response. Is the ITEMEXCL.2da cap hard- or soft-coded in the original engines? What about in GemRB? How does ITEMEXCL.2da actually prevent equipping? Does it just give each item a set of "cannot equip [other item]" effects or is it more complex?
lynx Posted June 28, 2015 Posted June 28, 2015 What cap? If there's a item (row) cap in the original, we don't have it. iesdp: http://gemrb.org/iesdp/files/2da/2da_tob/itemexcl.htm This is handled internally in our inventory code.
Avenger Posted June 28, 2015 Posted June 28, 2015 GemRB implements itemexcl by storing the associated number in the item object. When you try to equip an item it checks if any other equipped items' itemexcl field contain the same bits. If yes, then forbids equipping. The IE doesn't handle multiple bits. If you try to equip an item on the list, it simply checks if you have already equipped another from the list.
Aquadrizzt Posted June 28, 2015 Author Posted June 28, 2015 By "cap" I mean the number of items that can be equipped from that list. It appears that the cap I'm referring to is just 1, according to Avenger. So I take it that implementing a limit of say, 3, items from the list wouldn't be possible.
Jarno Mikkola Posted June 28, 2015 Posted June 28, 2015 You have to realize why the number of items is 1, it's because the magic of the items, in normal game, you won't be able to carry a +1 amulet of protection and a +1 chainmail ... because they use the "same magic" to archive the +1 to the Armor Class. And yeah, you can only restrict the number of maximum items to 1 with this mechanism.
lynx Posted June 28, 2015 Posted June 28, 2015 it wouldn't be that hard to extend, but as was pointed out, it wouldn't make much sense.
Aquadrizzt Posted June 28, 2015 Author Posted June 28, 2015 The reason I was wondering in the first place is because I was thinking about using an "attunement" system similar to 5e in which you can only equip 3 items that require attunement simultaneously. This would be part of a much larger overhaul type mod, and I'm sure with enough coding around the engine I could implement it without using ITEMEXCL.2da, but I figured that it might be able to simplify the process.
lynx Posted June 28, 2015 Posted June 28, 2015 currently none of the other bits are used, so the mechanic could be upgraded/recycled.
Aquadrizzt Posted June 28, 2015 Author Posted June 28, 2015 Thank you all for the information. I'll see what I can do with it.
Avenger Posted June 30, 2015 Posted June 30, 2015 currently none of the other bits are used, so the mechanic could be upgraded/recycled. Actually, i think they are used in GemRB. Items with the same bit(s) are incompatible, but items with disjunct bits are equipable.
lynx Posted June 30, 2015 Posted June 30, 2015 That's true, but I thought all the originals were using the same one. Would be simple to check.
Avenger Posted July 1, 2015 Posted July 1, 2015 That's true, but I thought all the originals were using the same one. Would be simple to check. Yes, original uses only 0 or nonzero.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.