Items dissapearing as soon as they hit the ground.

If you found a bug in Illarion or need help ask here. / Wenn Du einen Fehler in Illarion gefunden hast oder Hilfe benötigst, frage hier.

Moderator: Developers

Post Reply
User avatar
Pendar
Posts: 926
Joined: Tue Dec 28, 2004 3:36 am
Location: Founding member of H.A.L ~home for abused lichs~http://h.a.l.istheshit.net/

Items dissapearing as soon as they hit the ground.

Post by Pendar »

Hello,
I have been having a this problem on odd occasions. When passing an item to some one or some one passing to me it hits the ground and poof its gone. I am assumeing it has to do with the server "wipe". Usually it happens with a potion appel,dagger today it happend with a double axe. My question is does this happen to other people. Have you found a way around it ?
Literally some one just put my axe down on the ground for me to tale it couldnt have been a second and it was gone.
As stated it is not frequent, and up until now has not occured with an item I much cared about. As my character cant even afford to pay attention as they say, The loss of a expensive in my terms axe is a tragedy for pendar but more over has me more than curiouse about ways i can avoid this ((bug?)) in future,
Thanks for the input
Pendar
User avatar
Naybet Grint
Posts: 92
Joined: Fri Feb 11, 2005 9:24 am
Location: South-eastern forest *me watches* (( UK ))
Contact:

Post by Naybet Grint »

I think I read somewhere that your item lasts two server sweeps if its placed on a table. Although if code for that exists, then I'm a little surprised that its non-trivial to make items on the ground persist for two sweeps. Then again, it could be a feature.

I'm have a question for the techies, and I mean it as a question not a demand for new behaviour: "Would it be feasible when an item is placed on the ground to timestamp either the item or the space where it lands?"

If so then the server sweep could fail to remove items that were placed less than a minute ago. It would also allow for a GM command to drop items with a future timestamp, so that you might have a GM placed trail of grain seeds leading from where a sack of grain was stolen to the theives hideout, that lasts for an hour or two.

But I don't know you're engine so I don't know how hard it would be to store the timestamp or how much work the server sweep can afford to do. As such this is probably a dumb idea, but I thought it was worth mentioning.
User avatar
Adano Eles
Posts: 2436
Joined: Sat Aug 17, 2002 2:48 pm
Location: Eiris sazun idisi, sazun hera duoder...

Post by Adano Eles »

That happened to everyone from time to time.

Are rotting times different for items on tables? Other then that the only really secure way would be to put something cheap on the ground, wait for the server sweep and trade after the test object did vanish ;)
User avatar
Rackere Diplomatre
Posts: 808
Joined: Sun Nov 24, 2002 9:23 pm
Location: Somewhere you don't expect me to be
Contact:

Post by Rackere Diplomatre »

Tables can be used as bags. So don't put it on the table but into the table.
User avatar
Adano Eles
Posts: 2436
Joined: Sat Aug 17, 2002 2:48 pm
Location: Eiris sazun idisi, sazun hera duoder...

Post by Adano Eles »

On table = in table

That's not the point. People said items on (in) tables would disappear too so the question is:
Do items in table last longer then items on the ground?
User avatar
Estralis Seborian
Posts: 12308
Joined: Wed Nov 10, 2004 9:14 pm
Location: Sir Postalot
Contact:

Post by Estralis Seborian »

As long as you keep the table window open, afaik, yes. When you close the table window, the items starts to decay.
User avatar
Rackere Diplomatre
Posts: 808
Joined: Sun Nov 24, 2002 9:23 pm
Location: Somewhere you don't expect me to be
Contact:

Post by Rackere Diplomatre »

Adano Eles wrote:On table = in table

That's not the point.
It might be that some people don't know it and think they have to put it on the table.
User avatar
Adano Eles
Posts: 2436
Joined: Sat Aug 17, 2002 2:48 pm
Location: Eiris sazun idisi, sazun hera duoder...

Post by Adano Eles »

Sure, but we could have gone to this part after knowing that tables are good for keeping your items from disappearing instead of confusing everyone ;)
User avatar
Durin Goldtooth
Posts: 58
Joined: Thu Jan 13, 2005 12:26 am

Post by Durin Goldtooth »

That chest in the shop... will the item decay in that?
User avatar
Naybet Grint
Posts: 92
Joined: Fri Feb 11, 2005 9:24 am
Location: South-eastern forest *me watches* (( UK ))
Contact:

Post by Naybet Grint »

Right, I've been thinking about this and I hope that this is the right place to make a technical proposal. If instead I should be PMing a technical GM then let me know which one and I will in future:

Purpose: To allow the placing of items by Gms that don't rot for an hour, and to ensure that normally dropped items persist for at least a minute, allowing players to give each other items safely while nowhere near a table.

Method: A hashtable of vectors is maintained by the server storing what was dropped and when. Each vector stores what was dropped N minutes after epoch, with N being the hashing key. Also pointers to the vectors N=now, N=now-1, N=now-2 and N=now-3 are stored. When a minute passes the pointer to the N=now-2 vector can be updated to point to the N=now-3 vector, etc. The N=now-3 vector is deleted and removed from the hashtable. At this point the hashtable is inspected for an N=now+1 vector, and if it exists the N=now pointer points to it, otherwise a new vector is created and added to the hashtable.

So, when an item is dropped the location of the item is added to the N=now vector.

When an item is generated on the landscape (like ash from a fire) it is added to the N=now vector.

When an item is taken the N=now vector is inspected, then the N=now-1, etc. When the item location is found it is removed from the vector. Any item not placed by the GMs will be in the first four vectors and given that only one minute of persistence is guaranteed, players will tend to pick items up quickly so the first vector is the most likely place for items to be found. As such this will normally be an efficient operation.

When a GM commands it (however GM commands work) they drop/create an item at their current location but the item is stored in the hashtable under a (created on demand) vector for N=now+60.

Lastly the server no longer removes items when it sweeps, but instead clears the items in exactly the positions listed in the vectors N=now-1 to N=now-3. It would do this every 3 minutes upon completion of the sweep for such things as fields growing, fires burning etc.

Efficiency: The only question mark is on the delay caused by taking items.
All other operations will complete is a small amount of time but asymtotically the worst case for the pick up is linear with the number of droppable/collectable item on the landscape. However as discussed above it is more likely to be linear in the number of items dropped in the last minute, except for when players disrupt a GM placed trail of items. The hashtable should be kept small as it will contain about 4 objects unless a quest is happening at which point it might contain as many as 10.

Weaknesses: Should I drop an item, wait 2 minutes then put another item on the same square, I could lose that second item within seconds of putting it down. But that's easy enough to avoid.

Hope that that is all clear. I'll gladly answer any questions on my thinking by PM or on this forum. If theres a reason why this idea really sucks I'd be curious to hear it, but not offended if the GMs are too busy to respond.

Naybet.
User avatar
Estralis Seborian
Posts: 12308
Joined: Wed Nov 10, 2004 9:14 pm
Location: Sir Postalot
Contact:

Post by Estralis Seborian »

I should add that we can vary the "rotting time" of any item from almost immediatly to never.

We have to find a balance between "players are happy" and "server is happy". That items vanish immediatly is neither intended nor "normal", afaik. Every item I know lasts at least two so called cycles, you can try that by placing items on the ground; everytime some items vanish, you know, a cycle has ended. This way, you can estimate how long such a cycle lasts.
Post Reply