Command proposal: zdestruct

... sit down, kick back and relax, and talk about anything that doesn't belong on one of the other forums.
Locked
ladar
Posts: 19
Joined: Sat Jan 01, 2022 6:51 am

Command proposal: zdestruct

Post by ladar » Sun Jan 16, 2022 11:22 pm

There's been a lot of talk about lag lately and fingers pointed at the number of items in the game. This is my proposal for implementing a player accessed command to remove items.

Name: zdestruct
-- Starts with a z because no other command uses this and it will prevent collisions.

Syntax: zdestruct <item> & zdestruct value <number>

zdestruct <item>
places an item into the destructing state.

zdestruct value <number>
places all, non stationary items laying on the ground in the current room with a value in coppers less than the specified number into the zdestruct state

Mechanics:

Both hides, and flags an item as destructing. Items may be retrieved via search and seen via notice. They will otherwise destruct in at most 10 minutes.

ex:
A lantern has been left here.
A torch is here on the ground.
You notice a lantern is hidden here.
You notice a lantern is hidden here.
You notice a mirrored lantern is destructing here. <<--- the new thing.

Coding:
In theory, you could just stick a 5 minute timer on to each item once it is hit by the zdestruct command. However I'm going to assume this will make all the duct tape fall off and crash the mud. So I'll propose a different hack instead.

Create two tables, table A and table B. Both tables run on 10 minute cycles, out of phase by 5 minutes from each other.

Every 5 minutes the server will purge the death-row table (A or B) and then swap the death-row position with the buffer table.

zdestruct command places items into the buffer table. So minutes 1-5 it's placing into table A. Minutes 6-10, it's placing into table B. At minute 5, table A is purged. At minute 10, table B is purged. Wash, rinse repeat.

patch search command to remove a destructing item from its associated table when found and removed from hiding.

This should result in 1 server call to place an item into the destruction state, and then only one more to destroy it. If you are worried about purging an entire table at once, have mud pulses delete first N rows in active table at a time to average out the performance cost. N = row count at table sawp / number of pulses in the period.

Summary: proposal gives players a straightforward way to schedule items for imminent deletion, a way to retrieve them to rescind errors, and a low cost server side implementation.

Alexis
Posts: 77
Joined: Wed Aug 05, 2015 9:07 pm

Re: Command proposal: zdestruct

Post by Alexis » Mon Jan 17, 2022 6:44 am

I really like the idea of giving players a way to help remove items that might be lagging the game, and I'm no coder so I can't speak to that part. But my immediate reaction is concern about this somehow being used inappropriately by players. I'm not sure who would be motivated to do that, or why they might, but giving players a way to permanently destroy items seems likely to cause issues.

Perhaps instead of "destruction", there was a way to send all items to a specific room or location that is only accessible in game by Imms, and then any Imm who is online could see that and take care of it? That lessens the crowdsourcing method of giving players the direct ability to help immediately, but they would still be able to contribute and it might mitigate any potential for abuse. Just a thought.

iria
Posts: 504
Joined: Mon Aug 24, 2015 5:35 pm

Re: Command proposal: zdestruct

Post by iria » Mon Jan 17, 2022 7:34 am

Wouldn't be surprised to see people grief each other by purging their eq or scalps. Wouldn't be a bad idea if all barrels/racks could send its contents to an imm room that purges every x minutes, since we already have the means to do that. Similar to how we can send the contents to different junkyards/eq rooms. DS can send stuff to pit and I believe LS can send things to Caemlyn junkyard or possibly the Caemlyn barrel?

Some command like "send to destruction" would send it to the imm room and donate would still send it to the other places? Guess the onus would still be on the player to ferry the equipment to a barrel, but perhaps more of those could be added to most smobs around the world as well to make it easier for people?

toshiro
Posts: 39
Joined: Fri Oct 30, 2020 10:25 pm

Re: Command proposal: zdestruct

Post by toshiro » Mon Jan 17, 2022 8:11 am

I asked about this on discord the other day, and a straight forward solution that already exists is to give gear to crier mobs, and say quest. Their inventory gets purged after they finish their response. I've been using it to purge barrels the past couple of days, and it's been pretty painless.

Tusty
Posts: 27
Joined: Tue May 05, 2020 3:42 pm

Re: Command proposal: zdestruct

Post by Tusty » Mon Jan 17, 2022 9:57 am

I don't know that I've ever tried this, but what happens when you drop items in a water room?
So if there's a ton of junk piled up, get all, get canoe, go to the water room, drop all.....JK lol.
But you could technically drop all.meat? All.lantern? Would that help?

Nunzio
Posts: 68
Joined: Fri Oct 30, 2020 9:47 am
Location: USA, Virginia

Re: Command proposal: zdestruct

Post by Nunzio » Thu Jan 20, 2022 9:23 am

toshiro wrote:
Mon Jan 17, 2022 8:11 am
I asked about this on discord the other day, and a straight forward solution that already exists is to give gear to crier mobs, and say quest. Their inventory gets purged after they finish their response. I've been using it to purge barrels the past couple of days, and it's been pretty painless.
Fantastic. Love this solution

Feneon
Posts: 1747
Joined: Sat Dec 19, 2015 5:02 pm

Re: Command proposal: zdestruct

Post by Feneon » Thu Jan 20, 2022 12:18 pm

Thanks for the suggestion.

Locked