Need two hints:


(-xXx-Suicide) #1
  1. Where should I look to try and figure out how to start coding XP save? Where should I look? Pointers/suggestions? I don’t want the whole answer, I want to try to learn as much on my own, but I need a starting place :smiley:

  2. I have my pk3 file. I put the knife.weap file in there, with the correct knife model path for pickupmodel. Why, oh why, won’t it load the (or any, I tried mp40 and other models just in case it was a model issue,) #*&%# model?

Thank you folks!


(-xXx-Suicide) #2

	// Arnout: likely there are more cases in which we don't want this
	if( g_gametype.integer != GT_SINGLE_PLAYER &&
		g_gametype.integer != GT_COOP &&
		g_gametype.integer != GT_WOLF &&
		g_gametype.integer != GT_WOLF_STOPWATCH &&
		!(g_gametype.integer == GT_WOLF_CAMPAIGN && ( g_campaigns[level.currentCampaign].current == 0  || level.newCampaign ) ) &&
		!(g_gametype.integer == GT_WOLF_LMS && g_currentRound.integer == 0 ) ) {

		trap_Cvar_VariableStringBuffer( va( "sessionstats%i", client - level.clients ), s, sizeof(s) );

		// Arnout: read the clients stats (7) and medals (7)
		sscanf( s, "%f %f %f %f %f %f %f %i %i %i %i %i %i %i",
			&client->sess.skillpoints[0],
			&client->sess.skillpoints[1],
			&client->sess.skillpoints[2],
			&client->sess.skillpoints[3],
			&client->sess.skillpoints[4],
			&client->sess.skillpoints[5],
			&client->sess.skillpoints[6],
			&client->sess.medals[0],
			&client->sess.medals[1],
			&client->sess.medals[2],
			&client->sess.medals[3],
			&client->sess.medals[4],
			&client->sess.medals[5],
			&client->sess.medals[6]
			);

	}

	G_CalcRank( client );

	test = (g_altStopwatchMode.integer != 0 || g_currentRound.integer == 1);

	if(g_gametype.integer == GT_WOLF_STOPWATCH && g_gamestate.integer != GS_PLAYING && test) {
		G_ClientSwap(client);
	}

	if ( g_swapteams.integer ) {
		trap_Cvar_Set( "g_swapteams", "0" );
		G_ClientSwap(client);
	}

	{
		int j;

		client->sess.startxptotal = 0;
		for( j = 0; j < SK_NUM_SKILLS; j++ ) {
			client->sess.startskillpoints[j] = client->sess.skillpoints[j];
			client->sess.startxptotal += client->sess.skillpoints[j];
		}
	}
}

My guess is XPsave involves this… can anyone please confirm or deny that?


(Demolama) #3

find USEXPSTORAGE they are all #ifdef just # define USEXPSTORAGE and then you have xp save … now anywhere where that #ifdef USEXPSTORAGE is found is where you will find stuff dealing with xp save


(-xXx-Suicide) #4

You know, that’s the first place I looked, thought it was there, and then thought otherwise. That’ll teach me not to follow my gut feeling. Thank you so very, very much for your help!


(-xXx-Suicide) #5

Hehehehe, well, I got xp save kinda working… it saves within the same map! Woo! However… whatever you do, don’t beat the map, ,change maps, or anything… xp is no longer saving across maps :confused:

However, I love finding and squashing things like this… fun! :slight_smile:

edit: it appears that only me. Regardless of client number, ,everyone else saves.
edit: name chnage doesn’t help either, so no weird character in name issues.

Arrg! I can’t find this!


(No1_sonuk) #6

WRT the knife, are you using MD3 and calling MDC, or vice-versa?


(bacon) #7

It doesn’t matter what extension you use. The Quake3 engine cuts off the extension and looks for the file that way, that’s why all images are referenced with .tga, even the ones with the .jpg extension.