Condition Zero (Fixed in v0.5)


ArrayKnight

Recommended Posts

One of the items that I placed in my cache wore out while in storage (which seems odd) and reached a condition of 0%. When I transferred it to my inventory, it broke immediately. I think there's already been a discussion about the rate of decay for items, so no reason to revisit that there. But I do think it's a bug if an item reaches 0% and doesn't disappear.

condition-zero.thumb.jpg.7d7079df49c83b9

Link to comment
Share on other sites

Thanks for finding this Ray. This is a great example of how one bug can reveal multiple other bugs... here is what happened with this one:

* First I verified that containers were not checking for items that decay to zero condition, so I added that functionality. Bug fixed.

* While testing, I noticed that the "XXXX worn out" message was appearing for items that got worn out in a container! The logic for that message wasn't ensuring the item was in the player inventory. Bonus bug #1 fixed.

* While thinking about this bug, I realized we are not doing a zero condition check for standalone gear in the world, so I added that. Bonus Bug #2 fixed.

* While stepping through the code (it's always good practice to step through all new/changed code), I noticed some relic code that destroys dropped gear if the player gets far enough away. The idea was to despawn old abandoned gear, but this could very well screw someone out of a carefully placed stash. Removed relic (and ill-conceived) code. Bonus Bug #3 fixed.

* Looking at your screenshot I noticed that you can transfer gear to a corpse. I had argued to not allow this, and put the code in to disable the transfer-to-container button for corpse containers. Turned out the code to do this worked inconsistently... but rather than fix I came to my senses and realized it's fine for players to stash gear on a corpse if they want to (Raph felt this way, and only gave into my whining about it to shut me up). Bonus Bug #4 fixed.

So what seemed like a relatively minor bug on the surface revealed several other issues. I find this often happens... if anything seems "off" in the game, it can often lead you to other more subtle problems.

Over time I've learned that when fixing bugs it's imperative to understand the root cause of the problem first, and never just fix the symptom.

*

Link to comment
Share on other sites

And the lesson here is: always listen to me first otherwise you'll just end up fixing a bunch of bugs.

;)

Interestingly -- I'll have to double-check, but I'm almost positive it's possible for gear to have quite low condition upon discovery, as a function of the randomized starting condition.

That said, most things (apart from clothing and a few types of food items) decay very slowly, so you shouldn't see this very often.

We'll probably need to revisit gear decay and introduce a little more complexity to it, but for now it works (other than clothing decaying too quickly, which I'll fix for the next update).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.