Armageddon General Discussion Board

General => Code Discussion => Topic started by: Peabody on July 07, 2003, 02:16:02 PM

Title: save command
Post by: Peabody on July 07, 2003, 02:16:02 PM
I actually dont know if this is how it works already.. but I -really- -really-
wish that the save command also saved the room your in if its a save room.

Im 100% terrified of the following:

>put 'horridly expensive dress' cabinet
>put 'knife i waited for 5 rl months to get and paid TONNES for' cabinet
You have been disconnected.
Title: save command
Post by: Delirium on July 07, 2003, 02:31:30 PM
Yes yes yes. Yes. I can feel this pain.

Actually, I think there should be a

'Save Room' command.

>save

Would save your character...

>save room

Would either save the room you're in, or give you a message that it isn't an appropriate saveroom if you're not in one.
Title: save command
Post by: Sandor on July 07, 2003, 02:40:05 PM
Why not make every room an item safe room?
Title: save command
Post by: Marc on July 07, 2003, 02:47:53 PM
Because that would eat up resources, Sandor.

Everytime the mud saves it would have to go through all 20k+ rooms and write every single object in those rooms to disk.

Even if that is only 5 objects a room average (which I think is a ghastly understatment) you are looking at 100k objects + characters everytime the mud saves.

Unless you plan to buy the staff their own Big Blue, I think you're up a creek
Title: save command
Post by: Northlander on July 07, 2003, 02:49:43 PM
Sandor: Beacuse then things would pile up incredibly fast and become quite the strain on ginka's system, like Marc said... Not to mention spammy.

Agreeing with Delirium here, and feeling the need to add that if you -do- lose something valuable in a crash, mailing the account is the way to get it back.
Title: save command
Post by: Sandor on July 07, 2003, 04:00:07 PM
It isn't that, it's that if the mud does crash all those items are gone, and realistically they would not be gone.  And how do you know the mud's staff doesn't have a powerful enough machine?  Do you speak for the staff?
Title: save command
Post by: Bestatte on July 07, 2003, 04:07:02 PM
The staff just went around re-sizing rooms all over the game just to save on resources. I highly doubt they'd want to let things pile up in rooms that don't currently allow for it.

Don't drop stuff in rooms that don't look like things should be dropped in them, and you shouldn't have any problems.
Title: save command
Post by: crymerci on July 07, 2003, 04:18:31 PM
Back to the original question, I think most people who've used saverooms have run into this problem: you end up losing some things and getting duplicates of others.  I think it would be nice to be able to save a saveroom on command, if possible.
Title: save command
Post by: creeper386 on July 07, 2003, 07:40:08 PM
I'd also add my support for a saveroom save command. I'd prefer if it just happened when you save your character though.

And on the thought of making everyone room a save room, it can be/or is coded so it wouldn't be a strain on the processing time... But it'd add up VERY VERY quickly and continue adding up, not only would every room need to be made a quit room, there'd have to be some sort of code to eventually get rid of items anyways, rather through rot/corrosion, BURRIED under the sands... So on and so forth.... Within a day after a crash/reboot rooms can be already packed especially rooms known for good foraging and such. It can get bad enough without having rooms save over from week to week.


Creeper
Title: save command
Post by: Sandor on July 07, 2003, 07:44:04 PM
Hmm, I think your right..Nevermind..

-Sandor
Title: save command
Post by: John on July 07, 2003, 07:50:04 PM
just save yourself before you dump the items. Rooms and people get saved at the same time by the code, so if the mud crashes and deletes all the items, it will appear back in your inventory ;)
Title: save command
Post by: Angela Christine on July 07, 2003, 07:58:03 PM
Quote from: "John"just save yourself before you dump the items. Rooms and people get saved at the same time by the code, so if the mud crashes and deletes all the items, it will appear back in your inventory ;)

Sort of.  

Save
Drop crap

If the MUD crashes now you will be protected.  Rooms are saved every 20 minutes, so if you want to be protected you can't do anything that would cause a save for 20 minutes.  That means that you can't save, change your objective, or quit for 20 minutes, because if you save and the MUD crashes before the next automatic room save your items won't be saved anywhere.

AC
Title: save command
Post by: Lazloth on July 07, 2003, 08:10:38 PM
By the same token, AC, you could easily:

>save
>drop crap
>saveroom

*shrug* It's fine as is imho.
Title: save command
Post by: Sandor on July 07, 2003, 08:38:04 PM
Yeah let's take into consideration that this apparently isn't happening so much it's in dire need of the change, the original poster was just scared it was gonna happen.  Yeah if I had a steel sword and a crash got rid of it I better well get reimbursed but it hasnt happened....YET


-Sandor
Title: save command
Post by: Delirium on July 07, 2003, 08:42:51 PM
Well...

I've lost near roomfuls of items once due to pure bad timing of a crash, and trust me, it sucks. Plus, then the Imm has to go through loading up or trying to reimburse you for each item, and you have to go through trying to recall the sdesc of everything that was there. ;)

A saveroom command isn't something we absolutely need of course, but it could possibly save a lot of future trouble.
Title: save command
Post by: Sandor on July 07, 2003, 09:20:53 PM
Make all the rooms save damnit!
Title: save command
Post by: Dracul on July 07, 2003, 09:35:47 PM
I know...when one person types save. the entire mud should save. every char every romm. hmmm?

a real solution...instead of having an imm call up all the sdesc, just try keep logs. copy and paste
Title: save command
Post by: Sandor on July 07, 2003, 10:27:04 PM
Maybe more rooms should be item safe.  Like certain roads where the items really wouldnt go anywhere unless someone came by and took them.  Or certain areas I think we can all think of times where an item shouldnt have gone anywhere.  If if an imm doesn't want it there for IC reasons:
PURGE


-Sandor
Title: save command
Post by: on July 07, 2003, 10:29:22 PM
The problem with a Save room command (It's been brought up before) is that when a save room saves... the entire area is saved (Or so I believe Sanvean said, just the area, not the entire MUD, but still, you have Northlands area, Tablelands area, Luirs Area, Red desert, Allanak, Red Storms, etc. etc. etc. Which are all pretty large areas, and would likely cause noticable lag every time anyone used saveroom. And if you have people like I used to know in a certain northern merchant house (I was one myself) there'd be an hour long solid block of lag, just from dropping and saving.

Like has been said, log when you get something important, and/or when you put it down, as well as save before you drop, watching out for what Aguelera Christina says.
Title: save command
Post by: creeper386 on July 07, 2003, 11:47:07 PM
Quote from: "Sandor"Yeah let's take into consideration that this apparently isn't happening so much it's in dire need of the change, the original poster was just scared it was gonna happen. Yeah if I had a steel sword and a crash got rid of it I better well get reimbursed but it hasnt happened....YET

Which characters that acctually have someplace to store items in a save room... I've had it happen constantly.

And it's not twenty minutes... At least thats not what I was told. Was told it's like... 43 minutes or something, and not to use it except for long term storage... Thats like... Only using the store room once a IC day just to be safe...


Creeper
Title: save command
Post by: jhunter on July 08, 2003, 01:02:48 AM
I still wish heads could be saved dammit! :cry:
I had some cool trophies that just disappeared when the next reboot happened... :x

Oooohhh...how about a taxidermy skill so you can stuff the heads of people and things and mount them on your wall? :twisted:

Gesturing to the many heads of people and animals mounted upon the wall, the macho, afro-headed man says, in sirihish: "And here are my hunting trophies..."
Title: save command
Post by: John on July 08, 2003, 01:38:21 AM
Quote from: "jhunter"Oooohhh...how about a taxidermy skill so you can stuff the heads of people and things and mount them on your wall? :twisted:
I _jokingly_ suggested to an Imm as a subguild, and she asked me for details on it  :shock:

I haven't seen it IG...............yet  :?
Title: save command
Post by: jhunter on July 08, 2003, 03:59:05 AM
That would be cool....
Your bounty hunter could have the heads of his catches mounted as proof of his success...and if they didn't want it themselves he could add it to his collection.

Your Generic Everyday Room (n)

Blah, blah blah...
stuff, stuff and more stuff...
some walls...and stuff

A wicker chair sits here.
A round, agafari table is here.
Several heads of thieving, bastard elf are here hanging upon the wall.
Many heads of yellow-painted, halfling warrior are here upon the wall.
The head of the grim-faced, jerkoff templar is here upon the wall.
Title: save command
Post by: Peabody on July 08, 2003, 04:47:30 AM
QuoteYeah let's take into consideration that this apparently isn't happening so much it's in dire need of the change, the original poster was just scared it was gonna happen. Yeah if I had a steel sword and a crash got rid of it I better well get reimbursed but it hasnt happened....YET

Uh actually, no I have lost lots of stuff already from this.. what I am woried about is the -expensive- stuff.  Even so.  If I drop my satchel and the mud goes down a) zmud eats my screen b) even if I know all the 30 items that where in there, some imm has to go through replacing all that.  Dupe items are easy, -junk-

But yea you are right there the whole area would need to be saved.. didnt really think about that, make all itemsafe rooms one area, or a few maybe?

Plus, I dont think people would really use this command all the time.. saving a room would be kind of dumb if you dropped a hide, but would not be if you just changed your clothing and stuck all your hard to find armor in your cabinet, or are taking a bath.
Title: save command
Post by: Twilight on July 08, 2003, 06:58:06 AM
The character saving and room saving work in different ways, and it has been explained since they work on different save methods, you can't really have a character save work for saving items in a room.  The way characters are saved in DIKU, if I am remembering correctly, is that they are placed in a queue.  Using the save command changes the place of your character in the queue, I believe.  They might have it be that it just does a force save of your character though, not sure what modification they might have made.  So, you might do a forced save, but two minutes later your place in the queue comes up and you are saved again.

My understanding of save rooms was that there were zones of save rooms.  So like you have a 100 room zone or whatever, and all it has is save rooms.  The problem with saving a room was, as someone pointed out, it has to save the entire zone.  Of save rooms.  Filled with stuff.  I can't exactly remember what someone said the delay was for this (and this was quite awhile ago, so its probably changed), but something on the order of 2-3 second machine lag every time that zone is saved.  And you want to give a zone saving command to mortals!!!  That could be a lot of lag, especially if people were dropping, saving, dropping more, saving, etc.

Without a more dynamic saving mechanism where it saves a specific item to the room file every time a list of commands is performed (get,take,put,steal,palm,etc) I'm not sure what a solution is.  Personally, I find that mailing the account for critical items, and not worrying about the rest works for me.
Title: Re: save command
Post by: tortall on December 11, 2008, 11:51:59 AM
I wanted to bump this because the topic has come up among players again. I felt this was the thread that best answered questions.
Title: Re: save command
Post by: Xygax on December 11, 2008, 11:55:49 AM
Here's the reason we don't do this.

The current structure of the MUD's zone database is such that each room is recorded in a huge file with all the other rooms in that zone.  In other words, its contents are serialized in a giant lump with every other item in that zone.

-rw-r--r-- 1 mud mud 6942916 Dec 11 11:27 /armag/lib/cmds/z3.cmd
-rw-r--r-- 1 mud mud 7943146 Dec 11 11:27 /armag/lib/cmds/z13.cmd
-rw-r--r-- 1 mud mud 2266014 Dec 11 11:27 /armag/lib/cmds/z33.cmd
-rw-r--r-- 1 mud mud  458841 Dec 11 11:27 /armag/lib/cmds/z73.cmd


For most of these zones, then, typing save would require writing a multi-megabyte file.  As it is, there is already a noticeable pause when these zones save in the game.  Allowing players to cause that pause would allow a downright denial-of-service attack.

For 2.arm, the situation will be drastically improved, but for now, it's a bit too much to tackle for Arm.

A few years ago, I wrote code to allow the saving of a single room, and even that code is extremely tricky because it tries to -avoid- capturing the state of other rooms, and it still must read/write the contents of all the other rooms in the zone before and after this one, to maintain our DB structure.

-- X
Title: Re: save command
Post by: tortall on December 11, 2008, 12:03:34 PM
Quote from: Xygax on December 11, 2008, 11:55:49 AM
Stuff

Yup, that's why I wanted to bump it. Because this thread explained WHY it didn't work, rather than hashing it out yet again.
Title: Re: save command
Post by: Halcyon on December 12, 2008, 02:54:47 AM
I was previously an admin on a mud with save enabled on every room.  It required a large, regular amount of cleanup to prevent players from being packrats, or abusing various things, to the tune of manually removing 10-15k objects.  There was an option for an automated cleanup janitor, but it caused its own set of problems.
Title: Re: save command
Post by: fourTwenty on December 12, 2008, 02:49:11 PM
Quote from: Halcyon on December 12, 2008, 02:54:47 AM
I was previously an admin on a mud with save enabled on every room.  It required a large, regular amount of cleanup to prevent players from being packrats, or abusing various things, to the tune of manually removing 10-15k objects.  There was an option for an automated cleanup janitor, but it caused its own set of problems.

My current PC has been called a packkank.
Title: Re: save command
Post by: brytta.leofa on December 12, 2008, 03:24:56 PM
Quote from: Halcyon on December 12, 2008, 02:54:47 AM
I was previously an admin on a mud with save enabled on every room.  It required a large, regular amount of cleanup to prevent players from being packrats, or abusing various things, to the tune of manually removing 10-15k objects.  There was an option for an automated cleanup janitor, but it caused its own set of problems.

'Twould be interesting to have things coded such that objects were almost never destroyed (remove the junk command, etc.)...   
...or created.

- Armchair Critic