Campaign - Save game - Experience

Warzone 2.1.x series. (Unsupported--read only!)
Locked
Arcadias
Greenhorn
Posts: 12
Joined: 03 Oct 2007, 17:59
Contact:

Campaign - Save game - Experience

Post by Arcadias »

Heya,

I have noticed something strange.
I've ordered my mortars to be recycled (9 units).
When they were all gone I ordered 9 new units with upgraded tech.

Now usually they would all come out with the experience from the recycled units but they didn't.

How this happened:
I had to leave my PC and saved the game right after ordering the 9 new units.
Closed the game and everything.
When I restarted the game, loaded the save game and the units came out... they were all novice with zero experience.

This was in campaign mode btw.
(I never had this issue before but this might be because I never had this scenario before...)
Misthafalls
Trained
Trained
Posts: 35
Joined: 23 Oct 2007, 23:53

Re: Campaign - Save game - Experience

Post by Misthafalls »

This problemn is in the game since the beginning so (1999) :P

So this problemn is known (I hope :P)
themousemaster
Regular
Regular
Posts: 611
Joined: 10 Nov 2006, 16:54

Re: Campaign - Save game - Experience

Post by themousemaster »

Misthafalls wrote: This problemn is in the game since the beginning so (1999) :P

So this problemn is known (I hope :P)
All of us have been hit with this at some point.  trust me, I'm not exerpt.

The array variable that holds recycled units EXP values is local to the current running of WZ only, and is not saved with the game.  Not sure this is a "bug" per se, but a featuer that was never implemented, and probably should be ;p.
Arcadias
Greenhorn
Posts: 12
Joined: 03 Oct 2007, 17:59
Contact:

Re: Campaign - Save game - Experience

Post by Arcadias »

Well, then I have either never had this issue before or didn't notice it...

Thanks for the info ;)
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: Campaign - Save game - Experience

Post by EvilGuru »

Code: Select all

static bool serializeSaveGameV27Data(PHYSFS_file* fileHandle, const SAVE_GAME_V27* serializeGame)
{
	unsigned int i, j;

	if (!serializeSaveGameV24Data(fileHandle, (const SAVE_GAME_V24*) serializeGame))
		return false;

	for (i = 0; i < MAX_PLAYERS; ++i)
	{
		for (j = 0; j < MAX_RECYCLED_DROIDS; ++j)
		{
			if (!PHYSFS_writeUBE16(fileHandle, serializeGame->awDroidExperience[i][j]))
				return false;
		}
	}

	return true;
}
Taken from 1205, game.c. (Similar functionality existed as far back as V15).

Regards, Freddie.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Campaign - Save game - Experience

Post by Buginator »

EvilGuru wrote: Taken from 1205, game.c. (Similar functionality existed as far back as V15).

Regards, Freddie.
AAARRRGH  My eyes!  My eyes!  Please, no more posting game.c code  :P

:D

You know, I was thinking about having a resevoir with 'points' you can 'give' units, but not really sure how this will affect balance and what not.
and it ends here.
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: Campaign - Save game - Experience

Post by EvilGuru »

Buginator wrote: You know, I was thinking about having a resevoir with 'points' you can 'give' units, but not really sure how this will affect balance and what not.
https://gna.org/patch/?854

Regards, Freddie.
Arcadias
Greenhorn
Posts: 12
Joined: 03 Oct 2007, 17:59
Contact:

Re: Campaign - Save game - Experience

Post by Arcadias »

Hmm, while we are at it...

My Commander went into negative XP.
I think he was "Special" before that happened. I didn't recycle him and now he is a "Rookie" with something like
-2574958473 Experience

???

Again, if this is an old bug I must have missed it before.
I still got a savegame if anybody needs it and yes... I did cheat...  :-\ only "Biffer Baker", though.
To advance through the campaign faster and without problems to check for bugs.
If that would be the reason for the bug, just ignore this post ;)
Misthafalls
Trained
Trained
Posts: 35
Joined: 23 Oct 2007, 23:53

Re: Campaign - Save game - Experience

Post by Misthafalls »

mmmh seems like the integer value got way too high :P (Lots of kills then m8 8) :P)

well if i should know shouldnt be too much problem to fix (except dont know the coding of warzone :P)
Arcadias
Greenhorn
Posts: 12
Joined: 03 Oct 2007, 17:59
Contact:

Re: Campaign - Save game - Experience

Post by Arcadias »

Misthafalls wrote: mmmh seems like the integer value got way too high :P (Lots of kills then m8 8) :P)

well if i should know shouldnt be too much problem to fix (except dont know the coding of warzone :P)
Yeah, but he never made "Hero" before that happened...
I would understand it if he was "Hero" and then got way too many kills.
Misthafalls
Trained
Trained
Posts: 35
Joined: 23 Oct 2007, 23:53

Re: Campaign - Save game - Experience

Post by Misthafalls »

OOps overlooked that one :)
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Campaign - Save game - Experience

Post by Buginator »

EvilGuru wrote: https://gna.org/patch/?854

Regards, Freddie.
:o  Whoops!  :-[
Arcadias wrote: Hmm, while we are at it...

My Commander went into negative XP.
I think he was "Special" before that happened. I didn't recycle him and now he is a "Rookie" with something like
-2574958473 Experience

???

Again, if this is an old bug I must have missed it before.
I still got a savegame if anybody needs it and yes... I did cheat...  :-\ only "Biffer Baker", though.
To advance through the campaign faster and without problems to check for bugs.
If that would be the reason for the bug, just ignore this post ;)
Ya cheater!  :P
It is all these conversions, going from un/signed word/long crapola.  Way too much of that going on.
Go ahead and upload the save game.

The real question is, did the unit(s) get worse once it got negative xp points?
and it ends here.
Arcadias
Greenhorn
Posts: 12
Joined: 03 Oct 2007, 17:59
Contact:

Re: Campaign - Save game - Experience

Post by Arcadias »

Never mind...  ::)

1. Went back into the game to make sure which savegame it is and it seems that reloading it has now set the Experience to 0. Most likely because the integer was out of bounds.
2. Checking prior savgames to get one to duplicate the "bug" made me notice something... I had completely missed that he was indeed "Hero" and all worked (more or less) fine.

So, scratch that. Because... in a non-cheat game... how likely is your commander to survive for that long anyway? ;)
However, if somebody would have the time to look into it, why not set a max value at which point experience gain is disabled to prevent this issue.
After all, it could happen even without cheating if you are really good/lucky.
Locked