Restoring XP to players after a server restart

Discussion Forum for Jaymod
Post Reply
jkildu
Server n00b
Posts: 19
Joined: Sun Aug 21, 2011 6:46 am

Restoring XP to players after a server restart

Post by jkildu » Sun Aug 21, 2011 6:49 am

I was just wondering what files I need to save on the desktop to restore players xp after a server restart. Or is this even possible, I would think it could be done.

Tyvm,
J

BubbaG1
Panzer n00b
Posts: 61
Joined: Tue Jan 13, 2009 2:49 pm
Location: Kansas
Contact:

Re: Restoring XP to players after a server restart

Post by BubbaG1 » Sun Aug 21, 2011 8:20 am

I believe the levels/map/user information is stored in levels.db, maps.db, users.db. Users.db saves the specific user level assigned and XP.

jkildu
Server n00b
Posts: 19
Joined: Sun Aug 21, 2011 6:46 am

Re: Restoring XP to players after a server restart

Post by jkildu » Sun Aug 21, 2011 8:28 am

I saved the user.db on my desktop, restarted the server and uploaded the user.db file I save before the server restart. The XP was lost. Do I need to save all the other files you listed as well for this to work properly?

Thanks,
J

User avatar
muppetuk
Server n00b
Posts: 15
Joined: Fri Mar 25, 2011 5:14 pm

Re: Restoring XP to players after a server restart

Post by muppetuk » Sun Aug 21, 2011 3:19 pm

what are your xp save settings in your server cfg

Just leave the db in the jaymod folder
as start/stop/ restart of the server should not reset the xp
Image
Image
Image

Pedro-NF
Spawn Camper
Posts: 107
Joined: Fri Jan 18, 2008 3:35 pm
Location: Rio de Janeiro, Brazil
Contact:

Re: Restoring XP to players after a server restart

Post by Pedro-NF » Sun Aug 21, 2011 5:11 pm

You need to:

1 - Upload the user.db file to the jaymod directory with the server STOPPED and only restart it after the upload completes.

or

2 - Upload the user.db file and issue a !dbload command (admin system must be enabled and you need to have your privileges set to run this command).

If the user.db file was saved correctly, option 1 has to work.

Make sure you have this command in your server's config file:

set g_xpSave 1

Also, you might want to take a look at the Jaymod doc file in the docs directory of the Jaymod package for the other Cvars which define XP save behavior and duration. I use this, for example:

set g_xpCap 1 // players XP's will remain at the value defined by g_xpMax once that value is reached (check other options in the doc file)
set g_xpMax 999999
set g_xpSave 1 // no=0 / 1=always / 2=during campaign
set g_xpSaveTimeout 30d // XP will last for 30 days since the last time a player was on the server. If he doesn't come back within 30 days, his XP will be reset. Set this to 0 to have XP's saved forever.

Post Reply