[FIXED] Locked down items decay
-
HumbleMeister
- UOX3 Newbie
- Posts: 7
- Joined: Wed Jan 13, 2010 4:09 am
- Has thanked: 0
- Been thanked: 0
Locked down items decay
Hi, every time we lock something down in the house.. it decays and dissappears. scenario is creat a chest using the GM character. saying i wish to lock this down. then in a few minutes.. it dissappears. should the "lock down" command set the item decay to "no decay" (what ever the number is)? This is frustrating. I know you can use the "tweak" command to set the decay to not decay.. but only the GM can do this. other players are stuck without a soltion, or is there something I don't know about? Any help is appreciated. Sincerely, HumbleMeister
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Note: I split this from a thread in the bug archive. Generally it's not a good idea to reply to topics in the bug archive, as they tend to be overlooked (I didn't see it until today, for instance) and in many cases it's easier to deal with a new thread than having to look through long threads with years-old posts. At least in those cases when the new bug differs slightly than the old, fixed one.
Easier then to make a new thread and instead reference the older posts if necessary through a link. Just saying
Anyway, about the bug:
I tried recreating your problem in-game myself, and thought I had found it when I locked down two items, tried to pick one of them back up again (so it would bounce back) and then saw that the item I had tried to pick up decayed. However, when I added some more items to the floor and locked those down too, some of them decayed even though I hadn't touched them afterwards.
Added yet some more items and locked those down - and none of them decayed for a long while. Until suddenly, out of the blue, ALL the items vanished. Including the door to my house :O
Not sure what's up, but there's definitely a bug there somewhere. :/
Edit: A work-around for this is to disable decay for items (changing ALL of the DECAY=1 tags in the item-DFNs from 1 to 0). Another option would be to increase the decay timer in UOX.INI to the max, which I believe is 65535... though this isn't more than 18 hours worth of seconds. :/
Easier then to make a new thread and instead reference the older posts if necessary through a link. Just saying
Anyway, about the bug:
I tried recreating your problem in-game myself, and thought I had found it when I locked down two items, tried to pick one of them back up again (so it would bounce back) and then saw that the item I had tried to pick up decayed. However, when I added some more items to the floor and locked those down too, some of them decayed even though I hadn't touched them afterwards.
Added yet some more items and locked those down - and none of them decayed for a long while. Until suddenly, out of the blue, ALL the items vanished. Including the door to my house :O
Not sure what's up, but there's definitely a bug there somewhere. :/
Edit: A work-around for this is to disable decay for items (changing ALL of the DECAY=1 tags in the item-DFNs from 1 to 0). Another option would be to increase the decay timer in UOX.INI to the max, which I believe is 65535... though this isn't more than 18 hours worth of seconds. :/
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Another work-around:
Put the following in a .js file and set it up as a global script (by giving it script ID = 0 in jse_fileassociations.scp):
This will set all new objects created to non-decayable. Not ideal, but at least the items should longer vanish on you. :/
Put the following in a .js file and set it up as a global script (by giving it script ID = 0 in jse_fileassociations.scp):
Code: Select all
function onCreateDFN( objMade, objType )
{
if( objType == 0 )
objMade.decayable = 0;
}
function onCreateTile( objMade, objType )
{
if( objType == 0 )
objMade.decayable = 0;
}-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Yep, as in ALL new items. The "onCreateDFN" part of it takes care of items created from the DFN entries, while the "onCreateTile" part takes care of items created outside of the DFN entries, i.e. using only the hardcoded hex-id's and tiledata values and nothing more.
There's no known limitation
But at a certain point you/your players will start to run into lag-issues and/or "black hole"-problems when logging in (i.e. you login to a black screen and the client refuses to continue because there's an overload of dynamic objects in the area).
Implement trash-bins, and/or garbage collecting NPCs that delete items they come in contact with ^^
There's no known limitation
Implement trash-bins, and/or garbage collecting NPCs that delete items they come in contact with ^^
-= Ho Eyo He Hum =-
this is weird...
I'm pretty sure I added this properly. When I log in the admin account and look at stuff with .tweak, I see the "Decay" flags set as expected.
For testing I cranked down corpse and item decay timer to 3 in the uox.ini...
and it seems the corpses don't want to rot. at all. If I actually click the "decay" field and manually enter "1" (which was already displayed there), the according corpse decays just fine. Also, I lit a campfire, let it burn down and looked at the glowing leftovers with .tweak. It said decay=0. A few seconds later, the remains of the campfire were gone
Consider me confuzzled.
edit: ignoring the problems I just described... now if I removed the bottom half of the script, would that mean, that only player crafted items are set to decay=0? (Testing right now, and it seems that's what it does.)
I'm pretty sure I added this properly. When I log in the admin account and look at stuff with .tweak, I see the "Decay" flags set as expected.
For testing I cranked down corpse and item decay timer to 3 in the uox.ini...
and it seems the corpses don't want to rot. at all. If I actually click the "decay" field and manually enter "1" (which was already displayed there), the according corpse decays just fine. Also, I lit a campfire, let it burn down and looked at the glowing leftovers with .tweak. It said decay=0. A few seconds later, the remains of the campfire were gone
Consider me confuzzled.
edit: ignoring the problems I just described... now if I removed the bottom half of the script, would that mean, that only player crafted items are set to decay=0? (Testing right now, and it seems that's what it does.)
Like when animals die?
Because after I removed
from the script, animals killed after that point decayed again
Because after I removed
Code: Select all
function onCreateTile( objMade, objType )
{
if( objType == 0 )
objMade.decayable = 0;
}- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Just to add some more info here...
This bug seems to be caused by several different factors.
One of them is that if you attempt to pick up an item that is locked down, it will "bounce" back telling you that you can't do that - and in the process its multi-value will somehow be reset to 0!
The way UOX3's item-decay code is setup, no items inside a multi should ever decay, no matter if they are locked down or not. We can ask questions about this policy, but the fact of the matter is that it doesn't work.
There seems to be several ways in which items lose their multi-value, and when they do, they will decay.
The "findMulti" code also seems to not work correctly at all times, as it will sometime fail to locate the multi a player or item is located in (I've traced through the code and seen this happen, but not sure WHY it happens).
This bug seems to be caused by several different factors.
One of them is that if you attempt to pick up an item that is locked down, it will "bounce" back telling you that you can't do that - and in the process its multi-value will somehow be reset to 0!
The way UOX3's item-decay code is setup, no items inside a multi should ever decay, no matter if they are locked down or not. We can ask questions about this policy, but the fact of the matter is that it doesn't work.
There seems to be several ways in which items lose their multi-value, and when they do, they will decay.
The "findMulti" code also seems to not work correctly at all times, as it will sometime fail to locate the multi a player or item is located in (I've traced through the code and seen this happen, but not sure WHY it happens).
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
More details.
Doors lose their multi-values every time you open them, but regain them every time you close them. This means that if a door should be open when the decay-timer for it runs out, it will actually decay. So - keep those doors closed, people!
Edit: This seems to be only valid for front-doors that get moved outside of the house's "boundary" when they are opened. So technically, UOX3 doesn't do anything "wrong" when it removes those doors - it just doesn't know any better ;P
Doors lose their multi-values every time you open them, but regain them every time you close them. This means that if a door should be open when the decay-timer for it runs out, it will actually decay. So - keep those doors closed, people!
Edit: This seems to be only valid for front-doors that get moved outside of the house's "boundary" when they are opened. So technically, UOX3 doesn't do anything "wrong" when it removes those doors - it just doesn't know any better ;P
-= Ho Eyo He Hum =-