Closed elliotkendall closed 10 years ago
Looks like other non-container items are effected too, like switches.
Hm, interesting. I wonder if they'd been like that on purpose in Book 2, and something's changed in the engine for Book 3, or if it's just always been wrong.
So I did a little more investigation (though not much more actual testing), and that "random" content for those various items is actually what Eschalon itself does with the items in question. It appears to be sort of a default for any of the items created by BW's official tools.
One difference, however, seems to be that the Book 2 datapak files use a lowercase "random" whereas the Book 3 datapak files use an uppercase "RANDOM." I'm wondering if maybe the case is important here, because I otherwise don't see a difference between the kegs that we create and the ones that BW creates. I'll do some testing in a bit...
I didn't look at too many "natural" kegs, but I did observe that if you simply drop a keg, it doesn't have any contents at all.
Okay, did a bit of testing - the case is definitely important. With no contents, or with uppercase RANDOM, exploded kegs disappear entirely. With a lowercase "random," you're left with a clickable broken-barrel decal whose text says something about the remains of the keg.
Which is actually kind of neat, but I suppose we should endeavor to mimic the datapak maps as much as possible. I'll test a bit in Book 2 as well to see how it behaves there, and loop through the Book 3 maps to find out if there are any lowercase "randoms" in there somewhere. I'm guessing that we should probably just change all the Book 3 premade objects to use uppercase, though.
Edit: Confirmed that all instances of "RANDOM" and "EMPTY" in Book 3 datapak maps are uppercacse.
Edit Edit: And confirmed that all instances of "random" and "empty" in Book 2 datapak maps are lowercase.
Edit Edit Edit: And, interestingly, the reverse behavior seems to be true for Book 2. Lowercase "random" on a keg will completely remove the keg, whereas uppercase will leave a clickable decal behind. So, we should definitely only change the case for Book 3 premade objects.
To avoid possible stepping-on-toes: I'm going to put together a commit for this, btw. :)
Creating powder kegs from Entities Tool -> Misc Items -> Powder Keg, the kegs created have "random" as their 0th item, which makes them convert into broken barrels on detonation.