Project 1999

Project 1999 (/forums/index.php)
-   Technical Discussion (/forums/forumdisplay.php?f=40)
-   -   Recover Deleted Chars ? (/forums/showthread.php?t=386565)

RodPulsar 06-16-2021 03:11 PM

Recover Deleted Chars ?
 
Hi there ;)

Long story short :
- I started playing p99 early 2020, it took me like 5mn to get addicted again to the game :)
- I mainly played a bard, she was lvl 29, very nicely stuffed, I spent a lot of time on twinking her, playing sometimes solo, but most of the times in group - all the feelings were back in no time :D
- But when the covid situation went uncontrolled IRL, I had to stop playing. Understand that I didn't want to stop, but working in an hospital, I had to make a choice as I didn't want to spend my spare time playing EQ when my colleagues needed me IRL.

I knew I wouldn't be strong enough to not launch the game, so during august 2020 I decided to erase everything. I kept my accounts, but deleted all my chars, including my bard. And to be sure I would forget them all, I gave all of their hard earned equipement and money to random people in EC - I am not complaining, this was a great afternoon, and oh boy everyone was happy lol - My poor Syleen Black dissapeared mostly poor and naked (but with her Deceiver mask and her two EBW) :D

- Today the situation is slowly coming back into control, and I start to have a bit of spare time once again. I would love to play EQ but think I won't be able to spend again the dozens of hours on a character again so... you saw me coming : my question is simple :

Do you think there is a way to get back my deleted chars (at least my main char) ? I searched everywhere but can't find any explaination to do so, I'm not even sure that DB backups are done on a regular basis :/

I have not much hope, but I think I have to try.

Thanks in advance for any information and be safe all :D

Rod / Syleen

Gustoo 06-16-2021 04:39 PM

No

Also, don't do it. Trust your past self.

Really, try to spend 4 hours doing something miserable like learning to play the guitar or the piano. OR download the free demo of Propellerhead reason and try to learn to make music on there (follow demo videos, ETC)

Do it do it do it

Baler 06-16-2021 04:58 PM

You may even lose access to a name if you delete a character. It has happened to me, they won't restore names.

The general rule of thumb is,.. Re-Roll if you want another character.

mcoy 06-16-2021 07:21 PM

Your best bet would be to post in the petition forum. Like Baler said, you may have lost the name, but that can be changed.

https://www.project1999.com/forums/f...splay.php?f=25

-Mcoy

RodPulsar 06-17-2021 03:14 AM

Thank you all !

Mcoy : yes that's what I did, respectfully explaining my "problem" as I understand there is close to no chance, if at all :)

RodPulsar 06-20-2021 02:25 PM

Well no answer from the Petition forum (yet). Perhaps there is only a few moderators on these days ? Or perhaps that silence is just a "No"...

Hard to tell :)

mcoy 06-20-2021 10:13 PM

There's a limited staff of volunteers. These things take a while. You'll get an answer eventually.

-Mcoy

Sojor 11-06-2021 01:49 PM

I've been waiting since February. :) They responded and said someone will get to it when they can........

TercerRigo 11-06-2021 04:15 PM

I just tried the following on a local eqemu instance I keep to fart around in (compiled sometime a year ago):

Code:

select
    cd.id,
    cd.name,
    cd.deleted_at
from
    account a
    join character_data cd
        on a.id = cd.account_id
where
    a.name = 'test_account'
;

which gave me my test characters :

Code:

id        name        deleted_at
12        Testcharacter        NULL
13        Tiwegrapi        NULL
14        Zyygraxit        NULL
15        Skitid-deleted-1636227165        2021-11-06 12:32:45

then I ran this :

Code:

select @id := 15;

update
    character_data
set
    name = (
        select
            left(name, locate('-deleted-', name) - 1)
        from
            character_data
        where
            id = @id
    )
where
    id = @id
;

update
    character_data
set
    deleted_at = NULL
where
    id = @id
;

which gave me this when I ran the first query again :

Code:

id        name        deleted_at
12        Testcharacter        NULL
13        Tiwegrapi        NULL
14        Zyygraxit        NULL
15        Skitid        NULL

I'm now able to see and use my deleted character. I don't know if anything else is necessary, but it seems to work fine (turned in a quest, memorized spells, killed a mob, gained xp). I can't imagine the schema being that different, but who knows, maybe a cron runs nightly on p1999 that purges deleted character data.

I guess what I'm trying to convey is, if they wanted to, they would have already written something like this and ran it in when requested.

TercerRigo 11-06-2021 08:26 PM

I'm the sort of person that wants to be 100% sure, so I looked at the code for deleting a char on eqemu :

https://github.com/EQEmu/Server/blob...rld/client.cpp at 965 we have :

Code:

bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {

        uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
        if(char_acct_id == GetAccountID()) {
                LogInfo("Delete character: [{}]", app->pBuffer);
                database.DeleteCharacter((char *)app->pBuffer);
                SendCharInfo();
        }

        return true;
}

database.DeleteCharacter((char *)app->pBuffer); seems to be where the magic happens, which leads us to : https://github.com/EQEmu/Server/blob...n/database.cpp at 367

For soft deletes it runs this :

Code:

                        SQL(
                                UPDATE
                                character_data
                                SET
                                name = SUBSTRING(CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), 1, 64),
                                deleted_at = NOW()
                                WHERE
                                id = '{}'
                        ),

Which my queries undo, for hard deletes it purges everything related to that character. If p1999 is running this, or similar code, then soft deletes should be easily recoverable. Hard deletes would require restoring from a backup which would be a pain to deal with and unlikely to ever happen.


All times are GMT -4. The time now is 08:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.