A topic, since someone else http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10111392 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10112643 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10123648 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10124300 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10124311 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10125486 http://www.gamesas.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10125542 - scripted items do some really weird %*!# when there are two items with the same script added about the same time. It seems incredibly spotty, though, so if any ideas on what causes the problems would be a great boon. From my experience, I can tell that the problem is with two items that have the same script (at least, two CloneFormed items, that have different FormIDs), not just two of the same item that, of course, have the same script.
My esperiences:
I have 'buttons' in my containers. These are misc. items that run onAdd/MenuMode blocks. They all seem to initialize when added by another script to my container. They are all set to do some processing once the player selects them (adds them to the player's inventory) and then remove themselves. However, if the player presses "Take All" some of the buttons won't do anything, and won't even remove themselves (even the ones that don't do any processing, that only remove themselves). The buttons that do this seem to be random. Also, if you double-click on the buttons, so that you take two of them very fast, then one of them will process, while the other won't (won't remove itself).
My other experience was even stranger - I had an item that would initialize itself, clone itself, add the clone to the container (which would in turn initialize itself, etc. until the end of the list), and then move itself to another container. At first, I had the item set to add the new CloneFormed self immediately after initialization (immediately being the next line of code). This resulted in one of them initializing, but not finishing the script by moving to the final container, while the other would move to the other container, but wouldn't be initialized - almost as if one started running the script from where the first left off. I fixed this by waiting until moving to the final container before adding the new CloneFormed item. (I now use a totally different system, so this is no longer an issue)
What really gets me, though, is that my latest form of buttons don't have any of these problems. I'm really stumped on what's different, other than a less active script when set to remove (though by no means less active when processing). So there must be some way around the problem. Anyone else have some good examples of this problem?
Haama,
The wiki description of this bug, documented as http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#Adding_Multiple_Items_with_the_Same_Script is overly vague. Can we improve this description with any more details?
Sounds to me like we're talking about the duplicate script continuing from the same point but missing any previous data? So, if you had an earlier GetContainer or similar then you'd have a great recipe for CTDs, right?
I'll try to gather up some details about the Dueling Inventory Changes theory and post here to follow up.