temnix Posted September 10, 2019 Share Posted September 10, 2019 I'm looking for a script condition that would check if a creature has anything in the backpack. There are no ready triggers for that. I think I could do this with a list of HasItemSlot(Myself,SLOT_MISC0), covering all backpack slots. Which slots are for the backpack, though? And are they going to be different between these three games: Baldur's Gate, its sequel and Icewind Dale? I don't need Torment. If the list is the same for these three, what about differences between "classic" and Enhanced versions? Different slots or the same? This should be a universal condition, if possible. I've searched the boards and looked in the Guide, but I haven't found clear answers. If the systems are different, I would have to write different scripts. Quote Link to comment
Endurium Posted September 10, 2019 Share Posted September 10, 2019 (edited) For the games you're concerned about all have 20 (IWD2 has 24) such MISC slots for backpack locations, and all have them declared in SLOTS.IDS. That includes classic as well as EE. Incoming 20-trigger OR! Except, BG1 classic doesn't have the OR trigger, so you'll have to resort to other means if you intend to support that game. Perhaps an AND block consisting of checking all non-MISC slots. That would almost work for the other non-PST games too, except IWD2 which has additional equipment slots. Edited September 11, 2019 by Endurium Corrected IWD2 note Quote Link to comment
temnix Posted September 11, 2019 Author Share Posted September 11, 2019 (edited) 6 hours ago, Endurium said: For the games you're concerned about (even IWD2), all have 20 such MISC slots for backpack locations, and all have them declared in SLOTS.IDS. That includes classic as well as EE. Incoming 20-trigger OR! Except, BG1 classic doesn't have the OR trigger, so you'll have to resort to other means if you intend to support that game. Perhaps an AND block consisting of checking all non-MISC slots. That would almost work for the other non-PST games too, except IWD2 which has additional equipment slots. Actually, I need a negative, "nothing in the backpack." A creature with an empty backpack will have no item in any of those slots, so this won't be an OR() but just a list of !. But which MISC slots refer to the backpack? SLOTS.IDS doesn't say it, you know. The full story is, though, that I would like to check for items in quick item slots too, and the games seem to differ in the positions referring to them. Or not? All this is for making a dice game with NPC for stakes. They and the characters should have something to wager, so I need these checks to make sure they have something there before rolling begins. At conclusion the winning side will grab the loser's backpack and quick item contents. I doubt BG1 supports the modern actions I'm going to apply, though. Edited September 11, 2019 by temnix Quote Link to comment
Endurium Posted September 11, 2019 Share Posted September 11, 2019 Apparently the Quick Slots are a subset of the MISC0 through MISC19 inventory slots. Which end, I don't know. CRE Format (scroll down) The link shows the actual order of the slots but doesn't correlate it with the slots.ids values, so you'll have to experiment to find out which of the MISC slots are backpack and which are quick item. Quote Link to comment
temnix Posted September 11, 2019 Author Share Posted September 11, 2019 7 hours ago, Endurium said: Apparently the Quick Slots are a subset of the MISC0 through MISC19 inventory slots. Which end, I don't know. CRE Format (scroll down) The link shows the actual order of the slots but doesn't correlate it with the slots.ids values, so you'll have to experiment to find out which of the MISC slots are backpack and which are quick item. I tested under BG:EE and MISC0-MISC2 correspond to the quick item slots. The rest of the MISC slots must then be the backpack. The question is, is it the same for the rest of the games and editions, not counting Torment? Quote Link to comment
Endurium Posted September 11, 2019 Share Posted September 11, 2019 (edited) It seems that way. Generally, if the format is consistent, so is the behavior. Edited September 11, 2019 by Endurium Quote Link to comment
temnix Posted September 11, 2019 Author Share Posted September 11, 2019 4 minutes ago, Endurium said: I would guess so. It would explain why many enemies in the various games have their loot list starting in the quick slots rather than the backpack. That's just because the designers didn't care which slots to assign it to. It gets dropped, that's good enough. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.