XP Save question...


(jaybird) #1

Hello.

I’m in the process of modding the source to (hopefully) replace Shrub on my clan’s server (EXTREME Blitz XP Saver, one of the most popular shrub servers right now). Unfortunately, Shrub is so damn unstable we need something else. Enabling XP Save through the source seems trivial enough, and I haven’t tried it out yet, but we need an XP storage feature that lasts longer than the roughly 5 minutes I’ve read most people get. I’m looking through g_svcmds.c, which seems to be the place a change would have to be made, but I’m not really seeing anything that screams “fix me!”. Does anyone know what I would need to do to make XP Saver work like Shrub’s, that only resets if the person is not on the server when the campaign restarts? Any help would be appreciated.

Thanks.


(dark-tim) #2

search the forum


(jaybird) #3

Yes, I have been looking through this forum for about a week now over various topics, so thanks for your insightful response.
A clan-mate of mine, DRC, said everyone she asked for help on these forums was extremely helpful, so hopefully I’ll have the same experience.

Actually, I answered my own question, just need to change the values when it effectively drops you (5 * 60000 is default), or change that code entirely, depending on what it is I want to do.


(jaybird) #4

Ok, new question. Two actually.

XP save semi-works out of the box. I have two people testing the mod, myself, and a clannie. When on the server, my xp resets after every map and campaign restart. His saves through both. Any ideas?

Also, on forced map restarts or changes, XP resets for everyone everytime. Any ideas on how to change this behaviour?

Thanks!


(bacon) #5

IIRC that was discussed in a thread not too long ago…


(jaybird) #6

I ended up fixing the issue about client 0 not having his XP saved, but I still cannot figure out how to save session information across map_restart events. This is one of the biggest issues I need to sort out for my clan’s server, so please, anyone who can help please do.


(tjw) #7

You need to modify G_WriteClientSessionData() in g_session.c so that it writes the sessionstatsX cvars even when doing a restart.

Have you seen my mod http://et.tjw.org/etpub? It seems like we havethe same goals (in cloning shrub features). All ofl my modifications are published on that site as a patch and you’re welcome to copy them or contribute.


(jaybird) #8

Thanks a million man. With a slight modification to match yours in g_svcmds.c I got it working! Thanks for access to your source, this will help me incredibly.

The mod I’m working on isn’t necessarily to imitate Shrub and improve on it, but to create something similar with my clan’s server in mind. I’ll release it of course, but making it the most popular mod to hit the scene is not my objective. I haven’t tried it yet, but your mod looks incredible.

Thanks so much!