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 is currently offline fightcancer

 
Messages:214
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!

Report message to a moderator

Sergeant 1st Class
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:3509
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

Report message to a moderator

Captain

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

 
Messages:214
Registered:February 2005
Location: USA
Vielen dank Flugente! Donated!

Report message to a moderator

Sergeant 1st Class
Previous Topic: Sir tech title
Next Topic: Editing MercProfiles.xml Mid Game
Goto Forum:
  


Current Time: Fri Apr 19 07:22:30 GMT+3 2024

Total time taken to generate the page: 0.00820 seconds