Page 1 of 1
Campaign - Save game - Experience
Posted: 02 Mar 2008, 16:25
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...)
Re: Campaign - Save game - Experience
Posted: 02 Mar 2008, 17:53
by Misthafalls
This problemn is in the game since the beginning so (1999)
So this problemn is known (I hope

)
Re: Campaign - Save game - Experience
Posted: 02 Mar 2008, 18:25
by themousemaster
Misthafalls wrote:
This problemn is in the game since the beginning so (1999)
So this problemn is known (I hope

)
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.
Re: Campaign - Save game - Experience
Posted: 02 Mar 2008, 18:27
by Arcadias
Well, then I have either never had this issue before or didn't notice it...
Thanks for the info

Re: Campaign - Save game - Experience
Posted: 02 Mar 2008, 18:31
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.
Re: Campaign - Save game - Experience
Posted: 03 Mar 2008, 08:07
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
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.
Re: Campaign - Save game - Experience
Posted: 03 Mar 2008, 19:20
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.
Re: Campaign - Save game - Experience
Posted: 03 Mar 2008, 21:47
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

Re: Campaign - Save game - Experience
Posted: 03 Mar 2008, 22:27
by Misthafalls
mmmh seems like the integer value got way too high

(Lots of kills then m8

)
well if i should know shouldnt be too much problem to fix (except dont know the coding of warzone

)
Re: Campaign - Save game - Experience
Posted: 03 Mar 2008, 22:33
by Arcadias
Misthafalls wrote:
mmmh seems like the integer value got way too high

(Lots of kills then m8

)
well if i should know shouldnt be too much problem to fix (except dont know the coding of warzone

)
Yeah, but he never made "Hero" before that happened...
I would understand it if he was "Hero" and then got way too many kills.
Re: Campaign - Save game - Experience
Posted: 04 Mar 2008, 00:02
by Misthafalls
OOps overlooked that one

Re: Campaign - Save game - Experience
Posted: 04 Mar 2008, 07:26
by Buginator

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!

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?
Re: Campaign - Save game - Experience
Posted: 04 Mar 2008, 07:44
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.