Gwaihir Posted March 29, 2022 Author Share Posted March 29, 2022 Allright then, it is as I suspected. Kind of annoying, but not too bad I guess. The worst part will be paying attention on the number of drops from enemies. In Davaeorn's case, I knew what item to look for, but it might not be the case for others, so might be difficult to even realize if something's missing. There is indeed such a thing as too many mods. Oh well. Quote Link to comment
jmerry Posted March 29, 2022 Share Posted March 29, 2022 So, the fix here - the key should be assigned somewhere, probably one of the inventory slots. In the standard game, it's in the first inventory slot. One of your mods that added items must have bumped it - what's in that first inventory slot? Quote Link to comment
Gwaihir Posted March 29, 2022 Author Share Posted March 29, 2022 In the inventory 1 slot there's DW#RND17.ITM, added by the SCS component 'potions for NPCs'. Quote Link to comment
jmerry Posted March 30, 2022 Share Posted March 30, 2022 I checked my old (2.5, SCS v33) modded install. In that, the SCS random potions are at the end of the inventory slots used, because that's what the functions involved do when they add items. I don't see any good reason for that to have changed, but SCS is a big project and weird stuff sneaks in sometimes. The items in that inventory before things start getting added: the key, three letters, and three specific low-level scrolls. A fourth scroll is in one of the quickslots. SCS adds a couple of no-drop items for scripting stuff, and then the random potions. The other two quickslots are used for the AC 6 bracers and archmage robes in vanilla; SCS moves those to be actually equipped by Dave and another mage earlier in the dungeon. Quote Link to comment
Graion Dilach Posted March 30, 2022 Share Posted March 30, 2022 @jmerry This is how ADD_CRE_ITEM works though. When the inventory is already filled up, it'll start replacing the first item with the newly added one. The doc even mentions this. Quote ADD_CRE_ITEM will add the item to the first empty slot in the list. If no slot is empty, the item will be placed in the first slot in the list and the item that previously occupied the slot will be moved to the general inventory. If the general inventory is full, the moved item will be discarded. Quote Link to comment
jastey Posted March 30, 2022 Share Posted March 30, 2022 Is there a way to check whether the inventory is full before applying ADD_CRE_ITEM? Because quest items disappearing is bad. Quote Link to comment
Gwaihir Posted March 30, 2022 Author Share Posted March 30, 2022 There's also the fact that some items (like MISC83) are flagged as 'critical'. Shouldn't that be taken into account? Quote Link to comment
Magus Posted March 30, 2022 Share Posted March 30, 2022 5 hours ago, jastey said: Is there a way to check whether the inventory is full before applying ADD_CRE_ITEM? Because quest items disappearing is bad. Should be pretty trivial to write a safer function, no? Quote Link to comment
jastey Posted March 30, 2022 Share Posted March 30, 2022 49 minutes ago, Magus said: Should be pretty trivial to write a safer function, no? Not for me, but I'd appreciate it. Quote Link to comment
Guest Graion@Work Posted March 30, 2022 Share Posted March 30, 2022 Unless someone else won't be faster, I'll try to come up with something during the week. I'll need this for my random spell scrolls afterall since those should come even after SCS and while my ADD_CRE_ITEM call includes quick item slots alongside inventory, that's still not fully foulproof and I still shouldn't add anything if both are filled up. If something looks satisfactory to me, I'll share it in the common macros thread. Quote Link to comment
subtledoctor Posted March 30, 2022 Share Posted March 30, 2022 (edited) 3 hours ago, Magus said: Should be pretty trivial to write a safer function, no? Well, it's a question of, where do you want a failure to be? It shouldn't be hard to check whether an item has the 'critical item' flag, but if it does, should the function fail to add the mod-added item? What if that item is critical to the functioning of the mod? These are very much edge-case considerations, to be sure, but apparently Gwaihir has hit an edge case. (And FWIW, I distinctly remember having the same problem when I last played BG1 a couple years ago.) For me the bigger question is, why couldn't it find an empty inventory slot? Is Davaeorn's inventory full?? He's a one-shot enemy who only appears for about five minutes! what is this guy carrying around in his pockets??? EDIT - oh I see, Gwaihir posted a list. I see several modder prefixes there, and several added items without prefixes (but let's not get into that again). The vanilla version has nine open inventory slots; it looks like SCS adds 4 items, the "DS" mod adds two, the "DTK" mod adds two, some unknown mod adds "ogi.itm," and that right there is the nine free slots taken up. Add a potion or two and something's got to give. Frankly, rather than hope a new/better function gets into Weidu anytime soon, what should really happen is mods that add things to bosses' inventory should first check bosses inventory for critical items, and simply remove and add back the critical item after the mod is done adding its own things. This would guarantee no critical items get lost, and the effort would be fairly minimal... EDIT - worth considering, why the heck does this boss have two 1st-level spell scrolls, at this point in the game?? What player is going to care about finding scrolls of Shield, ProEvil, and ProPetrification? And if they are loot, why weren't they put into the nearby loot chest? Tagging @DavidW even though it is very much not his responsibility, but as long as SCS is doing stuff here anyway, it might be worth removing that trash. Edited March 30, 2022 by subtledoctor Quote Link to comment
Graion Dilach Posted March 30, 2022 Share Posted March 30, 2022 The Lv1 spell scrolls are there by default. There are some other ways to decrease this though. Arcane Treasury (MORING9/SPHRIN1), DSotSC and SoD2BG2IU - @Daeros_Trollkiller FYI - should have tried to equip their items first and not add everything just for loot without affecting the fight anyway (ADD_CRE_ITEM accepts a list afterall although the robes are discussable). Additionally, the ogi.itm is also SoD2BG2_IU because it doesn't use prefixes for items copied out from IWD/SoD. My original train of though is to just not add anything if every possible slot is filled up already. "Required" items are not always marked as critical and I wouldn't bother with a static list on this one. 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.