I’m just wondering what’s required for XP/stat saving across campaigns, maps in objective mode, etc. Does anyone have any tips for accomplishing this?
XP Saving
for example :
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=search&mode=results
:nag:
The easy answer is rather simple (should be, right?). XP Save is already programmed into the game, but it’s not being used. To enable it, simply open g_local.h, and somewhere near the top (doesn’t really matter where), insert:
#define USEXPSTORAGE 1
There is a bug that could cause a pointer crash, and it’s also simple to fix. Open g_svcmds.c, and find (around line 208):
for( i = 0; i < MAX_IPFILTERS; i++ ) {
Change this to look like:
for( i = 0; i < MAX_XPSTORAGEITEMS; i++ ) {
and you’ll have yourself a working XP Save mod. This is very basic however. It tracks users by ip address only, and it will only save for 5 minutes after the game disconnects the player (sometimes there is a bit of time between the client disconnecting and the server acknowledging that they disconnected, ie. the client’s computer crashing). If you want a more robust XP Save system that tracks by GUID, among other options, you should check out ETPub’s source code.