Home » PLAYER'S HQ 1.13 » v1.13 General Gameplay Talk » Editing Merc Attributes
Editing Merc Attributes[message #350610] Wed, 16 August 2017 19:07 Go to next message
fightcancer

 
Messages:163
Registered:February 2005
Location: USA
How can I edit mercenary attributes in 1.13 build 7609 please? I'm in the middle of a campaign, and I want to set Wisdom to 100 instead of planting and disarming land mines over and over.

Do I have to edit the saved game? If so, how? I have MS Visual Studio and HxD hex editor.

Thanks!
Re: Editing Merc Attributes[message #350613 is a reply to message #350610] Wed, 16 August 2017 20:07 Go to previous messageGo to next message
Flugente

 
Messages:3137
Registered:April 2009
Location: Germany
As you have Visual studio, the solution is get the code, compile a debug exe, load your save, set a break point in personnel.cpp, around here:
case 5:
			// wisdom
			if ( !fAmIaRobot )
			{
				// Flugente: stats can have gone up or down, find out which 
				INT16 change = gMercProfiles[Menptr[iId].ubProfile].bWisdomDelta - (INT16)(pSoldier->ubCriticalStatDamage[DAMAGED_STAT_WISDOM]);

				if ( change )
				{
					swprintf( sString, change > 0 ? L"( +%d )" : L"( %d )", change );
					FindFontRightCoordinates( (INT16)(pPersonnelScreenPoints[iCounter].x + (iSlot*TEXT_BOX_WIDTH) + TEXT_BOX_WIDTH - 20 + TEXT_DELTA_OFFSET), 0, 30, 0, sString, PERS_FONT, &sX, &sY );
					mprintf( sX, pPersonnelScreenPoints[iCounter].y, sString );
				}

				swprintf( sString, L"%d", Menptr[iId].stats.bWisdom );       <---- RIGHT HERE
			}

and set Menptr[iId].stats.bWisdom to the value you wish. Then continue and save the game.

[Updated on: Sat, 26 August 2017 08:34] by Moderator



Re: Editing Merc Attributes[message #350620 is a reply to message #350613] Thu, 17 August 2017 00:30 Go to previous message
fightcancer

 
Messages:163
Registered:February 2005
Location: USA
Vielen dank Flugente! Donated!
Previous Topic: Sir tech title
Next Topic: SOG 69 1.13 Build
Goto Forum:
  


Current Time: Thu Sep 21 02:44:42 EEST 2017

Total time taken to generate the page: 0.00666 seconds