Massive Humans vs Humans Game/Lets Player Tracker

Who do you think will win?

  • AstralPhaser

    Votes: 5 7.5%
  • Il Principe

    Votes: 2 3.0%
  • Koshling

    Votes: 14 20.9%
  • Hydromancerx

    Votes: 17 25.4%
  • Vokarya

    Votes: 4 6.0%
  • Acularius

    Votes: 3 4.5%
  • Thunderbrd

    Votes: 8 11.9%
  • ls612

    Votes: 5 7.5%
  • JosEPh_II

    Votes: 8 11.9%
  • Praetyre

    Votes: 1 1.5%
  • Epi3b1rD

    Votes: 0 0.0%

  • Total voters
    67
Any idea where that's located in the code?

Somewhere in the CvInitCore.cpp I think. In CvInitCore::read it reads in the array of player passwords from the save - you should be able to blank it out there in the debugger by breakpointing there on a load as I recall
 
No response from ls612 yet. :/

JosEPh
 
I have PM's Snofru1 to see if he still remembers ls612 Password.

JosEPh
 
Thanks, I'm glad someone is doing something.

I wonder if ppl even notice they have a notification for PMs any more.

Truly sad this game is getting away from us.

JosEPh
 
When I can catch the time to address it I will if you haven't gotten word back. I've just been holding out on the effort since it could save some time if you get the response you're looking for.
 
Problem is I'm stuck on a building pile of bugs in the main mod. That takes precedence.

Just had a thought, did ls612's Another MP empire that Whisperr took over have a password that he supplied? If so maybe try it to unlock this Massive game?

JosEPh
 
Somewhere in the CvInitCore.cpp I think. In CvInitCore::read it reads in the array of player passwords from the save - you should be able to blank it out there in the debugger by breakpointing there on a load as I recall

I'm really banging my head against a brick wall here. Perhaps I'm not sure how to blank it out properly but the last line here is the one you're referring to right?:
Code:
void CvInitCore::read(FDataStreamBase* pStream)
{
	uint uiSaveFlag=0;
	pStream->Read(&uiSaveFlag);		// flags for expansion (see SaveBits)

	//	Reset selection group static caches on load
	CvSelectionGroup::setGroupToCacheFor(NULL);

// BUG - Save Format - start
	bool bugSaveFlag = uiSaveFlag & BUG_DLL_SAVE_FORMAT;
	uiSaveFlag &= ~BUG_DLL_SAVE_FORMAT;
// RevolutionDCM - end BUG

	CvTaggedSaveFormatWrapper&	wrapper = CvTaggedSaveFormatWrapper::getSaveFormatWrapper();

	//	New save format or old?
	if ((uiSaveFlag & GAME_SAVE_UI_FLAG_VALUE_TAGGED_FORMAT) != 0)
	{
		wrapper.reset(true);
	}
	else
	{
		wrapper.reset(false);
	}

	wrapper.AttachToStream(pStream);

	WRAPPER_READ_OBJECT_START(wrapper);

	//	SVN rev of the build that did the save
	m_svnRev = -1;	//	If save doesn't have the info
	m_bRecalcRequestProcessed = false;
	WRAPPER_READ(wrapper, "CvInitCore", &m_svnRev);
	OutputDebugString(CvString::format("SVN Rev of save is %d\n", m_svnRev).c_str());

	//	Asset checksum of the build that did the save
	m_uiSavegameAssetCheckSum = -1;	//	If save doesn't have the info
	WRAPPER_READ(wrapper, "CvInitCore", &m_uiSavegameAssetCheckSum);
	OutputDebugString(CvString::format("Asset CheckSum of save is %d\n", m_uiSavegameAssetCheckSum).c_str());

/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 11/30/07                                MRGENIE      */
/*                                                                                              */
/* Savegame compatibility                                                                       */
/************************************************************************************************/
	int iNumSaveGameVector;
	WRAPPER_READ_DECORATED(wrapper, "CvInitCore", &iNumSaveGameVector, "numModControlVectors");

	// Empty the Vector
	m_aszSaveGameVector.erase(m_aszSaveGameVector.begin(), m_aszSaveGameVector.end());

	CvString szSaveGameVector;
	for (int uiIndex = 0; uiIndex < iNumSaveGameVector; ++uiIndex)
	{
		WRAPPER_READ_STRING_DECORATED(wrapper, "CvInitCore", szSaveGameVector, "ModControlVector");
		m_aszSaveGameVector.push_back(szSaveGameVector);
	}
/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 END                                                  */
/************************************************************************************************/
	// GAME DATA
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eType);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szGameName);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szGamePassword);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szAdminPassword);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szMapScriptName);

	WRAPPER_READ(wrapper, "CvInitCore", &m_bWBMapNoPlayers);

	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eWorldSize);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eClimate);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eSeaLevel);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eEra);

	m_eGameSpeed = NO_GAMESPEED;
	WRAPPER_READ_CLASS_ENUM(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_GAMESPEEDS, (int*)&m_eGameSpeed);
	if (m_eGameSpeed == NO_GAMESPEED)  // Old savegame before gamespeed remapping
	{
		WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eGameSpeed);
		handleOldGameSpeed();
	}

	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eTurnTimer);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eCalendar);

	SAFE_DELETE_ARRAY(m_aeCustomMapOptions);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumCustomMapOptions);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumHiddenCustomMapOptions);
	if (m_iNumCustomMapOptions > 0)
	{
		m_aeCustomMapOptions = new CustomMapOptionTypes[m_iNumCustomMapOptions];
	}

	WRAPPER_READ_ARRAY(wrapper, "CvInitCore", m_iNumCustomMapOptions, (int*)m_aeCustomMapOptions);

	SAFE_DELETE_ARRAY(m_abVictories);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumVictories);
	if (m_iNumVictories > 0)
	{
		m_abVictories = new bool[m_iNumVictories];
		WRAPPER_READ_ARRAY(wrapper, "CvInitCore", m_iNumVictories, m_abVictories);
	}

// BUG - Save Format - start
	if (bugSaveFlag)
	{
		// read and ignore number of game options as it's only for external tools
		int iNumGameOptions = 0;
		WRAPPER_READ_DECORATED(wrapper, "CvInitCore", &iNumGameOptions, "NUM_GAMEOPTION_TYPES");
	}
// BUG - Save Format - end

/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 11/30/07                                MRGENIE      */
/*                                                                                              */
/* Savegame compatibility                                                                       */
/************************************************************************************************/
/*
	if (uiSaveFlag > 0)
	{
		WRAPPER_READ(wrapper, "CvInitCore", NUM_GAMEOPTION_TYPES, m_abOptions);
	}
	else
	{
		WRAPPER_READ(wrapper, "CvInitCore", NUM_GAMEOPTION_TYPES-1, m_abOptions);
		m_abOptions[NUM_GAMEOPTION_TYPES-1] = false;
	}
*/
	// Set options to default values to handle cases of loading games that pre-dated an added otpion
	setDefaults();

	WRAPPER_READ_CLASS_ARRAY_ALLOW_MISSING(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_GAMEOPTIONS, NUM_GAMEOPTION_TYPES, m_abOptions);
/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 END                                                  */
/************************************************************************************************/
	WRAPPER_READ_CLASS_ARRAY(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_MPOPTIONS, NUM_MPOPTION_TYPES, m_abMPOptions);

	WRAPPER_READ(wrapper, "CvInitCore", &m_bStatReporting);

	WRAPPER_READ(wrapper, "CvInitCore", &m_iGameTurn);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iMaxTurns);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iPitbossTurnTime);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iTargetScore);

	WRAPPER_READ(wrapper, "CvInitCore", &m_iMaxCityElimination);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumAdvancedStartPoints);

	// PLAYER DATA
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszLeaderName);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivDescription);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivShortDesc);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivAdjective);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivPassword);
I've tried to reset all m_aszCivPassword settings and I've tried to change the return for getCivPassword to "" and attempting any of these efforts has led to a crash as soon as the password popup (which is sent by the exe) comes up. I put a breakpoint on that last line and tried the step through command every time it breaks there but it still comes up with the password being wrong.

Any further advice here?
 
I'm really banging my head against a brick wall here. Perhaps I'm not sure how to blank it out properly but the last line here is the one you're referring to right?:
Code:
void CvInitCore::read(FDataStreamBase* pStream)
{
	uint uiSaveFlag=0;
	pStream->Read(&uiSaveFlag);		// flags for expansion (see SaveBits)

	//	Reset selection group static caches on load
	CvSelectionGroup::setGroupToCacheFor(NULL);

// BUG - Save Format - start
	bool bugSaveFlag = uiSaveFlag & BUG_DLL_SAVE_FORMAT;
	uiSaveFlag &= ~BUG_DLL_SAVE_FORMAT;
// RevolutionDCM - end BUG

	CvTaggedSaveFormatWrapper&	wrapper = CvTaggedSaveFormatWrapper::getSaveFormatWrapper();

	//	New save format or old?
	if ((uiSaveFlag & GAME_SAVE_UI_FLAG_VALUE_TAGGED_FORMAT) != 0)
	{
		wrapper.reset(true);
	}
	else
	{
		wrapper.reset(false);
	}

	wrapper.AttachToStream(pStream);

	WRAPPER_READ_OBJECT_START(wrapper);

	//	SVN rev of the build that did the save
	m_svnRev = -1;	//	If save doesn't have the info
	m_bRecalcRequestProcessed = false;
	WRAPPER_READ(wrapper, "CvInitCore", &m_svnRev);
	OutputDebugString(CvString::format("SVN Rev of save is %d\n", m_svnRev).c_str());

	//	Asset checksum of the build that did the save
	m_uiSavegameAssetCheckSum = -1;	//	If save doesn't have the info
	WRAPPER_READ(wrapper, "CvInitCore", &m_uiSavegameAssetCheckSum);
	OutputDebugString(CvString::format("Asset CheckSum of save is %d\n", m_uiSavegameAssetCheckSum).c_str());

/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 11/30/07                                MRGENIE      */
/*                                                                                              */
/* Savegame compatibility                                                                       */
/************************************************************************************************/
	int iNumSaveGameVector;
	WRAPPER_READ_DECORATED(wrapper, "CvInitCore", &iNumSaveGameVector, "numModControlVectors");

	// Empty the Vector
	m_aszSaveGameVector.erase(m_aszSaveGameVector.begin(), m_aszSaveGameVector.end());

	CvString szSaveGameVector;
	for (int uiIndex = 0; uiIndex < iNumSaveGameVector; ++uiIndex)
	{
		WRAPPER_READ_STRING_DECORATED(wrapper, "CvInitCore", szSaveGameVector, "ModControlVector");
		m_aszSaveGameVector.push_back(szSaveGameVector);
	}
/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 END                                                  */
/************************************************************************************************/
	// GAME DATA
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eType);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szGameName);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szGamePassword);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szAdminPassword);
	WRAPPER_READ_STRING(wrapper, "CvInitCore", m_szMapScriptName);

	WRAPPER_READ(wrapper, "CvInitCore", &m_bWBMapNoPlayers);

	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eWorldSize);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eClimate);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eSeaLevel);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eEra);

	m_eGameSpeed = NO_GAMESPEED;
	WRAPPER_READ_CLASS_ENUM(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_GAMESPEEDS, (int*)&m_eGameSpeed);
	if (m_eGameSpeed == NO_GAMESPEED)  // Old savegame before gamespeed remapping
	{
		WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eGameSpeed);
		handleOldGameSpeed();
	}

	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eTurnTimer);
	WRAPPER_READ(wrapper, "CvInitCore", (int*)&m_eCalendar);

	SAFE_DELETE_ARRAY(m_aeCustomMapOptions);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumCustomMapOptions);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumHiddenCustomMapOptions);
	if (m_iNumCustomMapOptions > 0)
	{
		m_aeCustomMapOptions = new CustomMapOptionTypes[m_iNumCustomMapOptions];
	}

	WRAPPER_READ_ARRAY(wrapper, "CvInitCore", m_iNumCustomMapOptions, (int*)m_aeCustomMapOptions);

	SAFE_DELETE_ARRAY(m_abVictories);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumVictories);
	if (m_iNumVictories > 0)
	{
		m_abVictories = new bool[m_iNumVictories];
		WRAPPER_READ_ARRAY(wrapper, "CvInitCore", m_iNumVictories, m_abVictories);
	}

// BUG - Save Format - start
	if (bugSaveFlag)
	{
		// read and ignore number of game options as it's only for external tools
		int iNumGameOptions = 0;
		WRAPPER_READ_DECORATED(wrapper, "CvInitCore", &iNumGameOptions, "NUM_GAMEOPTION_TYPES");
	}
// BUG - Save Format - end

/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 11/30/07                                MRGENIE      */
/*                                                                                              */
/* Savegame compatibility                                                                       */
/************************************************************************************************/
/*
	if (uiSaveFlag > 0)
	{
		WRAPPER_READ(wrapper, "CvInitCore", NUM_GAMEOPTION_TYPES, m_abOptions);
	}
	else
	{
		WRAPPER_READ(wrapper, "CvInitCore", NUM_GAMEOPTION_TYPES-1, m_abOptions);
		m_abOptions[NUM_GAMEOPTION_TYPES-1] = false;
	}
*/
	// Set options to default values to handle cases of loading games that pre-dated an added otpion
	setDefaults();

	WRAPPER_READ_CLASS_ARRAY_ALLOW_MISSING(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_GAMEOPTIONS, NUM_GAMEOPTION_TYPES, m_abOptions);
/************************************************************************************************/
/* MODULAR_LOADING_CONTROL                 END                                                  */
/************************************************************************************************/
	WRAPPER_READ_CLASS_ARRAY(wrapper, "CvInitCore", REMAPPED_CLASS_TYPE_MPOPTIONS, NUM_MPOPTION_TYPES, m_abMPOptions);

	WRAPPER_READ(wrapper, "CvInitCore", &m_bStatReporting);

	WRAPPER_READ(wrapper, "CvInitCore", &m_iGameTurn);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iMaxTurns);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iPitbossTurnTime);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iTargetScore);

	WRAPPER_READ(wrapper, "CvInitCore", &m_iMaxCityElimination);
	WRAPPER_READ(wrapper, "CvInitCore", &m_iNumAdvancedStartPoints);

	// PLAYER DATA
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszLeaderName);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivDescription);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivShortDesc);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivAdjective);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivPassword);
I've tried to reset all m_aszCivPassword settings and I've tried to change the return for getCivPassword to "" and attempting any of these efforts has led to a crash as soon as the password popup (which is sent by the exe) comes up. I put a breakpoint on that last line and tried the step through command every time it breaks there but it still comes up with the password being wrong.

Any further advice here?

It sounds like you're trying the right approach. When you say 'reset all m_aszCivPassword settings' what do you mean exactly be 'reset'? They need to be valid strings not NULLs. Also you cannot omit that line since it is needed to consume the input stream (so step over it, allowing the passwords to be set, then change them to empty strings - easiest way might be to just a add a bit of code temporarily to do that rather than try to use the debugger to do it)
 
It sounds like you're trying the right approach. When you say 'reset all m_aszCivPassword settings' what do you mean exactly be 'reset'? They need to be valid strings not NULLs. Also you cannot omit that line since it is needed to consume the input stream (so step over it, allowing the passwords to be set, then change them to empty strings - easiest way might be to just a add a bit of code temporarily to do that rather than try to use the debugger to do it)

I'm not sure what I'm doing wrong here but adding that bit of code to change the passwords, to "" or anything at all causes a crash in the exe.

Maybe I'm just formatting the string wrong but it seems there's some kind of internal validation check I'm colliding with.

Example:
Code:
	// PLAYER DATA
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszLeaderName);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivDescription);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivShortDesc);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivAdjective);
	WRAPPER_READ_STRING_ARRAY(wrapper, "CvInitCore", MAX_PLAYERS, m_aszCivPassword);

	for (int i = 0; i < MAX_PLAYERS; i++)
	{
		PlayerTypes eID = (PlayerTypes)i;
		if ( checkBounds(eID, 0, MAX_PLAYERS) )
		{
			m_aszCivPassword[eID] = m_aszLeaderName[eID];
		}
	}
The last portion there is causing a crash in the exe. Here, I've used a valid string which all players have (and has been loaded - and will be displayed where it prompts for the password) and it still suffers a crash.

This also does:
Code:
	for (int i = 0; i < MAX_PLAYERS; i++)
	{
		PlayerTypes eID = (PlayerTypes)i;
		if ( checkBounds(eID, 0, MAX_PLAYERS) )
		{
			m_aszCivPassword[eID] = CvWString(gDLL->md5String((char*)CvString(m_aszLeaderName[eID]).GetCString()));;
		}
	}
I tested this thinking the encryption portion of setCivPassword and other similar functions here may have been critical to properly resetting the password. Doesn't seem to be the issue.

I've tried formatting a CvWString multiple ways but every attempt to reset the password value has resulted in a crash.

BTW, are you saying you can change the value of a variable while running the debug dll? If that can be done that could be interesting.
 
Got a reply from ls612. He did not have a password for this massive game. So it would seem Spirictum added one? But the question is How did he do that?

JosEPh
 
Got a reply from ls612. He did not have a password for this massive game. So it would seem Spirictum added one? But the question is How did he do that?

JosEPh

I seem to recall that when I took over from Acularius, the game allowed me to (re-)set the password during the first turn that I played, but not during any subsequent turns. It was almost like it knew that the turn was being played on a different machine or something. Presumably, it would have done the same for Spirictum.


Thunderbrd, if you have found in the code where the password is, instead of changing it to nothing (IE, ""), perhaps try changing it to something simple like "aa". That might work better.
 
I am not one to give up without a fight and there's more ways than one to skin a cat. I am also not one to go on guessing as to where it would be safe to reset this infernal password.

So... I've compiled a dll that will enable a reset on ALL passwords at once by setting the password for any player through the normal means, which is to pull up the player details screen and enter a new password. This action will set the password the same for all players with this .dll. Theoretically this should be safe and won't cause a crash but this exe has been crafty at foiling my efforts so far.

What would need to happen here is to have Magnus temporarily replace the dll with the one I'm uploading here (in the MP C2C assets folder - keep the old one as a backup!) and take a turn. During the process of taking the turn (before end turn!) reset your password and share the password you reset it to with us all.

Then commit the save and I can thereafter relieve our missing player of his obligation to the game. Sorry ya gotta take your turn again Magnus, but so that you don't have to update back to the last commit before your turn was taken, I've included the save for you in this upload.

Once you've taken your turn, replace the dll with the original again and we should be back on track.
 

Attachments

Something seems to be bugged.

I replaced the "CvGameCoreDLL.dll" with your new one (after backing up the existing one) and launched from the provided savegame file.

Game launched normally.
Asked me if I wanted to re-calc, as dll changed, but I said no. Perhaps I should have said yes?
Changed password to "na5" without quotation marks.
Turn played fine, saved at the end.
Went to main menu, load PBEM game to load the new save (to Totila) to do a Retire.
Game begins loading normally, but hangs at "Initializing" when the green bar is just slightly past being directly under the lowest point of the hard drive image.
Game crashes to desktop.

I've tried loading twice with the changed dll and three times with the normal dll, and it crashes at the same point (as far as I can tell) each time. I'm attaching the savegame file for going into Totila's turn here just in case you can get it to work.
 

Attachments

Back
Top Bottom