Jump to content

R&D - New Modding Tools


Amineri

Recommended Posts

 

And when it comes to XCom EU. The 4 first patches... Were any of them friendly in nature where references did not change or were they all resulting in new references? (I don't know, but am sort of curious if the advantage of search & replace strategy really is relevant for this specific game) :smile:

 

To be honest, we'd barely cracked modding the upk beyond simple value changes when patch 4 came out -- nearly all the work figuring out how functions worked and rewriting them came after patch 4. I do recall some reference changes (not because I was cross-utilizing variables like we do now, but because my search strings no longer worked). In other words, the impact of patches is now vastly greater because we're doing so much more complex work.

Edited by johnnylump
Link to comment
Share on other sites

  • Replies 211
  • Created
  • Last Reply

Top Posters In This Topic

I've been working on a new modfile definition, borrowing heavily from those that preceded me but focussing primarily on "what I want".

 

It's not nearly as deep as a full XML implementation, looking more like a ToolBoks Custom Mod file.

 

Allowed syntax:

  • // and /* */ style commenting
  • UPKFILE=<name> declarations (needs to be extended to handle before/after upk files for patch updating)
  • FUNCTION=<name> declarations (used to limit scope of search/replace operations)
  • [bEFORE_HEX] and [/bEFORE_HEX] delimiters wrap hex being replaced
  • [AFTER_HEX] and [/AFTER_HEX] delimiters wrap new hex
  • ||<string>|| statements within hex delimiters allow for using named references
  • {{ ## ## ## ## }} statements within hex delimiters allow tagging of hex references
  • [[ ## ## ## ## ]] statements within hex delimiters allow tagging of external hex references -- I'm not quite sure where these are stored

Here is a small snippet of an example/test modfile I'm working on:

// sample comment

/* more 
sample
comments */

UPKFILE=XComGame.upk
FUNCTION=AddStatModifiers.XGUnit

[BEFORE_HEX] // hex from EU patch 4
//final 2 words of header (function memory/file size)
A6 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15  

//iStat = 0
0F ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 {{ 39 B7 00 00 }} 2C 13 16 // example of reference-marking 

As an exercise I went through and created a more realistic example using the Long War First Aid Kit hex change (one of the functions, anyhow).

 

 

 

// sample comment

/* more 
sample
comments */

UPKFILE=XComGame.upk
FUNCTION=AddStatModifiers.XGUnit

[BEFORE_HEX] // hex from EU patch 4
//final 2 words of header (function memory/file size)
A6 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15  

//iStat = 0
0F ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 {{ 39 B7 00 00 }} 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 {{ 39 B7 00 00 }} 16 

	// break
	06 10 00 

// if(kAbility != none)
07 A3 02 77 00 {{ 3A B7 00 00 }} 2A 16 

	// switch(kAbility.GetType())
	05 {{ 1C 7C 00 00 }} 00 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 

		// case 76:
		0A 72 01 2C 4C 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CalcXP(kAbility.m_kUnit, 11, self))
			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 93 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 19 19 2E {{FE 2C 00 00 }} 19 12 20 [[ 4F FE FF FF ]] 0A 00 [[ D8 F9 FF FF ]] 00 1C [[ F6 FB FF FF ]] 16 09 00 [[ 98 F9 FF FF ]] 00 01 [[ 98 F9 FF FF ]] 09 00 {{F0 2C 00 00 }} 00 01 {{ F0 2C 00 00 }} 2B 00 {{ A3 76 00 00 }} 00 1B {{ F3 0E 00 00 }} 00 00 00 00 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 2C 0B 17 16 16 

			// break
			06 A3 02 

		// case 72:
		0A 56 02 2C 48 

			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 93 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 19 19 2E {{FE 2C 00 00 }} 19 12 20 [[ 4F FE FF FF ]] 0A 00 [[ D8 F9 FF FF ]] 00 1C [[ F6 FB FF FF ]] 16 09 00 [[ 98 F9 FF FF ]] 00 01 [[ 98 F9 FF FF ]] 09 00 {{F0 2C 00 00 }} 00 01 {{ F0 2C 00 00 }} 2B 00 {{ A3 76 00 00 }} 00 1B {{ F3 0E 00 00 }} 00 00 00 00 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 2C 0A 17 16 16 

			// break
			06 A3 02 

		// case 74:
		0A 68 02 2C 4A 

			// CreateTelekineticFieldVolume()
			1B {{ 6B 13 00 00 }} 00 00 00 00 16 

			// break
			06 A3 02 

		// case 41:
		0A 70 02 2C 29 

			// break
			06 A3 02 

		// case 88:
		0A A0 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E {{ CF 37 00 00 }} 01 {{ 09 31 00 00 }} 0A 00 00 00 00 00 00 1B {{ F3 03 00 00 }} 00 00 00 00 16 

			// break
			06 A3 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53 	
[/BEFORE_HEX]


[AFTER_HEX]
//final 2 words of header (function memory/file size)
7A 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15  

//iStat = 0
0F ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 {{ 39 B7 00 00 }} 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 {{ 39 B7 00 00 }} 16 

	// goto J0x10
	06 10 00 

// if(kAbility != none)
07 77 02 77 00 {{ 3A B7 00 00 }} 2A 16 

	// switch(kAbility.GetType())
	05 1C 7C 00 00 00 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 

		// case 76:
		0A 93 00 2C 4C 

		// case 72:
		0A 1A 01 2C 48 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(((kAbility.GetType() == 72) ? 20 : 30))
			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 36 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 45 9A 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 2C 48 16 02 00 2C 14 02 00 2C 1E 16 

			// break
			06 77 02 

		// case 74:
		0A 2C 01 2C 4A 

			// CreateTelekineticFieldVolume()
			1B {{ 6B 13 00 00 }} 00 00 00 00 16 

			// break
			06 77 02 

		// case 41:
		0A 44 02 2C 29 

			// m_aCurrentStats[0] -= aStatModifiers[0]
			A2 1A 25 01 {{ 0D 31 00 00 }} 1A 25 00 {{ 3B B7 00 00 }} 16 

			// if(kAbility.m_kUnit.IsInFront(none, float(83)))
			07 EF 01 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0F 00 {{ 8B B1 00 00 }} 00 1B {{ 99 3D 00 00 }} 00 00 00 00 2A 38 3F 2C 53 16 

				// HealBy(2)
				1B {{ D8 36 00 00 }} 00 00 00 00 2C 02 16 

			// if(kAbility.m_kUnit.GetCharacter().HasUpgrade(55))
			07 EC 01 19 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 0C 00 {{ EA A2 00 00 }} 00 1B {{ B8 36 00 00 }} 00 00 00 00 2C 37 16 

				// HealBy(2)
				1B {{ D8 36 00 00 }} 00 00 00 00 2C 02 16 

			// break
			06 04 02 

			// HealBy(aStatModifiers[0])
			1B {{ D8 36 00 00 }} 00 00 00 00 1A 25 00 {{ 3B B7 00 00 }} 16 

			// null-ops
			00 {{ 39 B7 00 00}} 00 {{ 39 B7 00 00}} 00 {{ 39 B7 00 00}} 00 {{ 39 B7 00 00}} 00 {{ 39 B7 00 00}} 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

			// break
			06 77 02 

		// case 88:
		0A 74 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E {{ CF 37 00 00 }} 01 {{ 09 31 00 00 }} 0A 00 00 00 00 00 00 1B {{ F3 03 00 00 }} 00 00 00 00 16 

		// break
		06 77 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53

[/AFTER_HEX] 

 

 

 

The display looks a lot prettier for me in Notepad++ as I created a custom language type that allows for coloring based on the various tag types.

 

Before/after upk files for performing updating would be configured separately, not within the modfile itself.

 

What I like about this format is that it allows for UE Explorer Tokens View-style breakdown of the hex line-by-line. References can be tagged and kept as hex (which seems faster to me) or identified as strings.

 

This file could either be:

1) Converted into a patch-specific before/after set of replacement hex

2) Read and interpreted and directly applied to a upk

 

In terms of workflow the problem with directly applying such changes is correcting jump offsets and function header memory size.

 

 

In this example I went through and marked all of the references by hand, which is a bit cumbersome. I didn't use XML since I'm doing my test-coding in Java (which I'm not very familiar with), and handling the overhead of XML was more than I wanted to mess with :)

 

Open to thoughts/suggestions!

Link to comment
Share on other sites

I view Game().GetDifficulty() like this:

 

Probably19 + ReferenceToGame() + SomeMoreOrLessFixedLengthJunkThatAmineriTendsToEndUpHelpingMeWithAfterIFailAFewTimes + ReferenceToGetDifficulty() + 16

This junk is local ReturnValue reference. Basically, what you wrote is a manual code compilation. Parsing variables and function calls only is easier than full code compilation, but it is still a very complicated task. But, may be it's just my lack of skill. :smile:

 

Amineri, the biggest problem I had with ToolBoks custom mod file format was necessity to copy/past the existing binary code to text document. First, some functions are quite big and when you have about 10 big functions in one text file it's a mess. Second, you need to keep track of several separate files, like your working copy, exported binary function etc. I don't think anyone starts to write a mod using ToolBoks custom mod feature, one usually starts with modifying hex code either in upk or in exported function. And when mod is ready and tested a question about how to distribute it arises. In this case, IMHO, best approach would be to add BINARYFILE field with link to external binary function/state/property file:

OFFSET=value
BINARYFILE=Path/To/BinaryFile
It will simplify matters A LOT, at lest for me. So right now I'm working on tool which will take a list of files like

XGStrategyAI.ProcessPodTypes.Function
XGAIBehavior.ExecutingAI.State
XGStrategyAI.GetAltWeapon.Namelist
find their locations by name and apply changes from binary files.

 

PS The best tool ever should be flexible and should allow everything we just wrote. :smile:

Edited by wghost81
Link to comment
Share on other sites

Well, here's how my current workflow goes in terms of creating a mod:

 

  1. Design -- figuring out which functions have to be changed and functionally what the new code will do. For some mods (like the alien base/retaking countries mod) this can be fairly complex
  2. Start with vanilla decompiled code
  3. Write target code (as unrealscript, not hex)
  4. Extract unrealscript-to-hex line-by-line correspondence using UE Explorer Token view
  5. Copy hex code to create line-by-line target code. Manually compile unrealscript to hex as needed. Use placeholder jump offsets and function header memory size.
  6. Consolidate to before/after hex blocks and insert into upk
  7. Use UE Explorer and Bertilsson's jump offset tool to compute corrected jump offsets
  8. End state is a before/after hex replacement block for the function
  9. Run code and debug

And here are the actual excerpts from my notes when I was modding the OnCodeCracked function for the multiple alien bases:

1) Design:

 

 

Alien Base missions and re-taking countries

Function rework checklist :

*** 1) Rewrite XGStrategyAI.CreateAlienBase 			: inits base detection, adds country and continent, sets location, saves mission ID to country
*** 2) Create new XGStrategy.JoinXCom      				: sets country back up as XCOM member
*** 3) Alter XGStrategyAI.ApplyMissionPanic   			: completing alien base mission triggers XGStrategyAI.JoinXCom
*** 4) Rework XGSatelliteSitRoomUI.UpdateCountryHelp 	: allow occupied countries to have satellites launched over them, coloring changes
*** 5) XGCountry.SetSatelliteCoverage					: prevents collection of resources from sats launched over occupied countries
*** 6) XGHeadquarters.ActivateSatellite					: creation of alien base (via OnCodeCracked) when satellite reaches orbit
*** 7) XGStrategyAI.InitNewGame							: remove creation of alien base from this function
*** 8) XGSituationRoomUI.OnCodeCracked 					: alter to create bases in countries with satellite coverage
*** 8.1) XGFacility_SituationRoom.IsCodeActive			: helper for OnCodeCracked to play alien base reveal cinematic
*** 8.5) XGStrategyAI.AddToAssets						: helper to create alien base mission when country satellite orbited or tech completed
*** 10) XGObjectiveManager.BuildSubObjective			: create condition for new subobjective 7 to be completed
*** 11) XGResearchUI.UpdateView							: display objective 3 (recon country) after finishing outsider shard research
*** 12) XGStrategyAI.AIAddNewObjectives	 				: Add infiltration missions for initial lost countries
*** 12.5) XGStrategyAI.RevealBase/#AddInfTgt 			: Reworked into helper to create infiltration missions
*** 13) XGFacility_Labs.OnResearchComplete				: disable alien base reveal narrative after completing outsider shard research project

Requirements:
*** 1) Alien bases created in occupied countries  (1, 6, 7, 8)
*** 2) When country is occupied existing satellite is destroyed (unchanged from vanilla)
*** 3) Alien base created when Base Shard research complete and satellite coverage over occupied country (6, 7, 8 )
4) Alien base mission can be accepted after completion of Skeleton Key item and with current satellite coverage // defer for now
*** 5) Launching satellite over occupied country creates base (4, 5, 6)
*** 6) Completing alien base mission causes associated country to rejoin XCom with 4 panic (2, 3)
*** 7) Objectives shows requirement to orbit satellite over occupied country (10, 11)
*** 8) Countries lost during initial months from infiltration missions (12)


Display-only changes :
*** 1) XGMissionControlUI.UpdateAlert 					: displays country instead of continent in alien base alert
*** 2) XGSatelliteSitRoomUI.UpdateContinent				: disable sci/eng highlighting for occupied countries
*** 3) XGSatelliteSitRoom.UpdateConfirmUI				: display correct launch rewards on satellite launch confirmation
*** 4) XGSatelliteSitRoom.UpdateCountry					: display correct total funding for countries in satellite launch UI
*** 5) XGCountry.CalcFunding							: Allow return of funding with satellite, plus fix bugs with SW options
*** 6) XComHQPresentationLayer.GetObjectiveImagePath	: change image for objective 3 UI popup
*** 7) XGDebriefUI.UpdateCouncilDebrief					: Display country in debrief after completing alien base mission 

 

 

 

2) Original code:

 

 

XGFacility_SituationRoom.OnCodeCracked

original code:
function OnCodeCracked()
{
    local int iMission;

    m_iCodePieces = 1;
    m_bCodeCracked = true;
    iMission = 0;
    J0x22:
    // End:0x13E [Loop If]
    if(iMission < GEOSCAPE().m_arrMissions.Length)
    {
        if(GEOSCAPE().m_arrMissions[iMission].m_iMissionType == 6)
        {
            GEOSCAPE().m_arrMissions[iMission].m_iDetectedBy = 0;
            GEOSCAPE().m_arrMissions[iMission].SetEntity(Spawn(class'XGMissionEntity'), 19);
        }
        ++ iMission;
        // [Loop Continue]
        goto J0x22;
    }
    Achieve(19);
    PushNarrativeHeadline(2);
    //return;    
} 

 

 

 

3) Target code:

 

 

need a kMission local variable, or perhaps can alter iMission into type kMission

target code:
function OnCodeCracked()
{
    local XGMission kMission;

    m_iCodePieces = 1;
    m_bCodeCracked = true;

	foreach GEOSCAPE().m_arrMissions(kMission,)
    {
        if(kMission.m_iMissionType == 6)
        {
            kMission.m_iDetectedBy = (Country(kMission.m_iCountry).HasSatelliteCoverage() ? 0 : -1);
            kMission.SetEntity(Spawn(class'XGMissionEntity'), 19);
        }
    }
    Achieve(19);
    PushNarrativeHeadline(2);
    //return;    
} 

 

 

 

4) Original unrealscript/hex:

 

 

original hex broken down:
m_iCodePieces = 1
0F 01 2B 2E 00 00 26 

m_bCodeCracked = true
14 2D 01 2D 2E 00 00 27 

iMission = 0
0F 00 AE 2E 00 00 25 

if(iMission < GEOSCAPE().m_arrMissions.Length)
07 3E 01 96 00 AE 2E 00 00 36 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 16 

	if(GEOSCAPE().m_arrMissions[iMission].m_iMissionType == 6)
	07 30 01 9A 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 

		GEOSCAPE().m_arrMissions[iMission].m_iDetectedBy = 0
		0F 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 30 37 00 00 00 01 30 37 00 00 25 

		GEOSCAPE().m_arrMissions[iMission].SetEntity(Spawn(class'XGMissionEntity'), 19)
		19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 26 00 00 00 00 00 00 1B C6 23 00 00 00 00 00 00 1C A3 FD FF FF 20 DB 38 00 00 4A 4A 4A 4A 4A 4A 4A 16 24 13 16 

	++ iMission
	A5 00 AE 2E 00 00 16 

	Loop Continue
	06 22 00 

Achieve(19)
1B 72 00 00 00 00 00 00 00 24 13 16 

PushNarrativeHeadline(2)
1B 4C 22 00 00 00 00 00 00 24 02 16 

return
04 0B 

EOF
53 	 

 

 

 

5) New unrealscript/hex

 

 

new hex broken down:

foreach GEOSCAPE().m_arrMissions(kMission,)
58 19 1B 69 0E 00 00 00 00 00 00 16 0E 01 94 2F 00 00 00 01 94 2F 00 00 00 F7 42 00 00 00 4A 3B 01 

	if(kMission.m_iMissionType == 6)
	07 3A 01 9A 19 00 F7 42 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 
	
		if(Country(kMission.m_iCountry).HasSatelliteCoverage())
		07 3A 01 19 1B 45 06 00 00 00 00 00 00 19 00 F7 42 00 00 09 00 37 37 00 00 00 01 37 37 00 00 16 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 
		
			kMission.m_iDetectedBy = 0;
			0F 19 00 F7 42 00 00 09 00 30 37 00 00 00 01 30 37 00 00 2C 00 0B 0B 0B 

			kMission.SetEntity(Spawn(class'XGMissionEntity'), 19);
			19 00 F7 42 00 00 26 00 00 00 00 00 00 1B C6 23 00 00 00 00 00 00 1C A3 FD FF FF 20 DB 38 00 00 4A 4A 4A 4A 4A 4A 4A 16 24 13 16 

			GEOSCAPE().MissionAlert(kMission.m_iID);
			19 1B 69 0E 00 00 00 00 00 00 16 30 00 00 00 00 00 00 1B 16 1F 00 00 00 00 00 00 19 00 F7 42 00 00 09 00 34 37 00 00 00 01 34 37 00 00 16 
			
			IsCodeActive();
			1B 34 14 00 00 00 00 00 00 16 
			
	Iterator Next
	31 

	Iterator Pop
	30 

PushNarrativeHeadline(2)
1B 4C 22 00 00 00 00 00 00 24 02 16 

null-ops
0B 0B 0B 0B 0B 0B 

return
04 0B 

EOF
53 	 

 

 

 

6) Consolidated before/after hex blocks:

 

 

XGFacility_SituationRoom.OnCodeCracked

original hex:
header:
AE 2E 00 00 AB 1F 00 00 00 00 00 00 AD 2E 00 00 00 00 00 00 00 00 00 00 AE 2E 00 00 00 00 00 00 8C 03 00 00 C0 66 00 00 59 01 00 00 FD 00 00 00 

body:
0F 01 2B 2E 00 00 26 14 2D 01 2D 2E 00 00 27 0F 00 AE 2E 00 00 25 07 3E 01 96 00 AE 2E 00 00 36 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 16 07 30 01 9A 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 0F 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 30 37 00 00 00 01 30 37 00 00 25 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 26 00 00 00 00 00 00 1B C6 23 00 00 00 00 00 00 1C A3 FD FF FF 20 DB 38 00 00 4A 4A 4A 4A 4A 4A 4A 16 24 13 16 A5 00 AE 2E 00 00 16 06 22 00 1B 72 00 00 00 00 00 00 00 24 13 16 1B 4C 22 00 00 00 00 00 00 24 02 16 04 0B 53 

new hex: (virtual 0x151)
header:
AE 2E 00 00 AB 1F 00 00 00 00 00 00 AD 2E 00 00 00 00 00 00 00 00 00 00 AE 2E 00 00 00 00 00 00 8C 03 00 00 C0 66 00 00 51 01 00 00 FD 00 00 00 

body:
58 19 1B 69 0E 00 00 00 00 00 00 16 0E 01 94 2F 00 00 00 01 94 2F 00 00 00 F7 42 00 00 00 4A 3B 01 07 3A 01 9A 19 00 F7 42 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 07 3A 01 19 1B 45 06 00 00 00 00 00 00 19 00 F7 42 00 00 09 00 37 37 00 00 00 01 37 37 00 00 16 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 0F 19 00 F7 42 00 00 09 00 30 37 00 00 00 01 30 37 00 00 2C 00 0B 0B 0B 19 00 F7 42 00 00 26 00 00 00 00 00 00 1B C6 23 00 00 00 00 00 00 1C A3 FD FF FF 20 DB 38 00 00 4A 4A 4A 4A 4A 4A 4A 16 24 13 16 19 1B 69 0E 00 00 00 00 00 00 16 30 00 00 00 00 00 00 1B 16 1F 00 00 00 00 00 00 19 00 F7 42 00 00 09 00 34 37 00 00 00 01 34 37 00 00 16 1B 34 14 00 00 00 00 00 00 16 31 30 1B 4C 22 00 00 00 00 00 00 24 02 16 0B 0B 0B 0B 0B 0B 04 0B 53  

 

 

 

7, 8 ) When I wrote this function I wasn't using Bertilsson's tool yet and iterated the code from steps 5 and 6 until the jump offsets were correct.

 

9) Debugging is typically done by making small temporary changes to narrow down where a fault is happening. Here are some examples:

 

 

crashing bug still present after base reveal cinematic

change:
IsCodeActive();
14 2D 01 2D 2E 00 00 27 1B 34 14 00 00 00 00 00 00 16 

to:
14 2D 01 2D 2E 00 00 27 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 


crashes without cinematic :(

remove objective pop-up :
change:
PRES().UIObjectiveDisplay(4)
19 1B 12 22 00 00 00 00 00 00 16 0C 00 00 00 00 00 00 1B 2B 2B 00 00 00 00 00 00 24 04 16 

to:
2C 04 2D 01 2D 2E 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

either one will crash the game when it plays. removing both it works, but without objective pop up or cinematic


problem might be with the callback to the research cinematic 

 

 

 

The complete ideal would be to have a fully automated compiler and be able to just write the target unrealscript (STEP 3). The compiler would convert it to hex code.

 

Short of that step 5 in my process is the first point at which I have new hex code, and still involves manually copying/compiling the unrealscript to hex. The tool I'm working to would allow taking that step and directly inserting it into the upk, or at least consolidating it, saving a few steps.

Link to comment
Share on other sites

Steps 1-5 in my case are almost the same, but I found it inefficient to consolidate the code into one string. Initial script seldom works as expected :smile: and when I change the code/binary-code I need to change consolidated version as well. So my "compiled" code usually looks like this:

0F                                    let
00 EB 43 00 00                        iNumPods
FB                                    Clamp
92                                    sum
2C 02                                 int const byte (2)
00 EF 43 00 00                        iMissionDiff
16                                    end sum
2C 02                                 int const byte (2)
2C 04                                 int const byte (4)
16                                    end Clamp
I use UE Explorer to export binary function, HxD to fill function's body with 0B, then block-select a code without text and paste it into function with HxD. Then I use UE Explorer to import new function into upk. Speeds up process for me a lot.

 

Things after step 5 could use a little automation. I worked with Fallout 3 scripts before compiler came out and I wrote a simple tool which converted text files like this one to binary files. It helped me in copy/paste steps. :smile: With information about upk format and text files like this it could be relatively easy to patch upk with one tool and without additional steps. Manual re-calculation of jump offsets still stays, of course.

Link to comment
Share on other sites

Not arguing that my workflow couldn't stand some improvement, not at all ^_^.

 

A lot of it was developed back before UE Explorer had the token view or could replace hex in the upk. Also before Bertilsson's jump offset repair tool.

 

My original workflow had step 4 taking much longer, as I had to copy out the function's hex as a single block and manually break it into lines. That one update of UE Explorer drastically shortened that step of the process. The reason I do step 4 generally is because the replacement function uses much of the same code as the original. Sometimes that isn't the case, such as when doing a complete rewrite of XGUnit.DebugAnims into a helper function to set leader/navigator stats/perks. In those cases I'll skip step 4.

 

The reason for consolidating into hex string blocks is that's basically how I "distribute". For a mod like the multiple alien bases/retaking countries I end up with a single file holding all of the hex changes. For patch 4 EU this was :

 

 

Hex Changes for Multi-base + retaking countries

XGMissionControlUI.UpdateAlert -- display country name instead of continent

original hex: (next line at 0x473A)
07 ED 45 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C C0 16 25 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 CB 38 00 00 01 C3 37 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 CB 38 00 00 2C 03 55 35 64 0D 00 00 67 0D 00 00 00 00 00 CD 38 00 00 0A 00 00 CB 38 00 00 16 0F 35 DE F9 FF FF 6C FA FF FF 00 01 00 CC 38 00 00 01 FA 37 00 00 0F 35 DD F9 FF FF 6C FA FF FF 00 01 00 CC 38 00 00 19 19 00 C8 38 00 00 0A 00 4B 37 00 00 00 1B C5 0E 00 00 00 00 00 00 16 0A 00 9E 23 00 00 00 1B A3 0F 00 00 00 00 00 00 16 0F 35 57 FB FF FF 6C FA FF FF 00 01 00 CC 38 00 00 2C 05 55 35 63 0D 00 00 67 0D 00 00 00 00 00 CD 38 00 00 0A 00 00 CC 38 00 00 16 0F 35 DA F9 FF FF 6A FA FF FF 00 01 00 C9 38 00 00 01 C2 37 00 00 07 1C 47 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C C0 16 25 16 0F 35 56 FB FF FF 6A FA FF FF 00 01 00 C9 38 00 00 26 06 3A 47 0F 35 56 FB FF FF 6A FA FF FF 00 01 00 C9 38 00 00 25 

new hex: (0x473A)
0F 35 56 FB FF FF 6A FA FF FF 00 01 00 C9 38 00 00 25 07 29 46 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C C0 16 25 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 CB 38 00 00 01 C3 37 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 CB 38 00 00 2C 03 55 35 64 0D 00 00 67 0D 00 00 00 00 00 CD 38 00 00 0A 00 00 CB 38 00 00 16 0F 35 56 FB FF FF 6A FA FF FF 00 01 00 C9 38 00 00 26 0F 35 DE F9 FF FF 6C FA FF FF 00 01 00 CC 38 00 00 01 FA 37 00 00 0F 35 DD F9 FF FF 6C FA FF FF 00 01 00 CC 38 00 00 19 1B 45 06 00 00 00 00 00 00 19 00 C8 38 00 00 0A 00 49 37 00 00 00 1B CE 0E 00 00 00 00 00 00 16 16 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 0F 35 57 FB FF FF 6C FA FF FF 00 01 00 CC 38 00 00 2C 05 55 35 63 0D 00 00 67 0D 00 00 00 00 00 CD 38 00 00 0A 00 00 CC 38 00 00 16 0F 35 DA F9 FF FF 6A FA FF FF 00 01 00 C9 38 00 00 01 C2 37 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 00 89 43 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 


------------------------

XGStrategyAI.CreateAlienBase

original hex:
header:
05 43 00 00 AB 1F 00 00 00 00 00 00 04 43 00 00 00 00 00 00 00 00 00 00 05 43 00 00 00 00 00 00 3D 04 00 00 EF 7B 00 00 23 04 00 00 DB 02 00 00 

body:
0F 00 05 43 00 00 1C A3 FD FF FF 20 75 37 00 00 4A 4A 4A 4A 4A 4A 4A 16 0F 19 00 05 43 00 00 09 00 31 37 00 00 00 01 31 37 00 00 1C A3 FD FF FF 20 7A FE FF FF 4A 4A 4A 4A 4A 4A 4A 16 05 6C FC FF FF 00 A7 2C 05 16 0A C5 00 25 0F 19 00 05 43 00 00 09 00 36 37 00 00 00 01 36 37 00 00 25 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 1C B9 FD FF FF 1E BE 9F 9A 3E 1E 5E BA C9 3E 16 06 36 02 0A 20 01 26 0F 19 00 05 43 00 00 09 00 36 37 00 00 00 01 36 37 00 00 2C 04 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 1C B9 FD FF FF 1E BE 9F 1A 3F 1E 10 58 F9 3E 16 06 36 02 0A 7C 01 2C 02 0F 19 00 05 43 00 00 09 00 36 37 00 00 00 01 36 37 00 00 2C 02 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 1C B9 FD FF FF 1E 2F DD E4 3E 1E 29 5C 0F 3E 16 06 36 02 0A D8 01 2C 03 0F 19 00 05 43 00 00 09 00 36 37 00 00 00 01 36 37 00 00 2C 03 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 1C B9 FD FF FF 1E 58 39 54 3F 1E 96 43 0B 3E 16 06 36 02 0A 33 02 2C 04 0F 19 00 05 43 00 00 09 00 36 37 00 00 00 01 36 37 00 00 26 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 1C B9 FD FF FF 1E 2B 87 96 3E 1E C5 20 F0 3E 16 06 36 02 0A FF FF 0F 19 19 00 05 43 00 00 09 00 31 37 00 00 00 01 31 37 00 00 09 00 C1 F9 FF FF 00 01 C1 F9 FF FF 1B C4 07 00 00 00 00 00 00 16 0F 10 2C AC 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 32 0F 10 2C B3 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 03 0F 10 2C AB 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 38 44 AB 10 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 12 20 6D FE FF FF 09 00 CA FF FF FF 00 02 CA FF FF FF 38 3F 10 2C B3 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 16 0F 10 2C B2 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 04 0F 10 2C B0 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 0F 0F 10 2C AF 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 0A 0F 10 2C AE 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 26 0F 10 2C B4 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 26 19 1B 69 0E 00 00 00 00 00 00 16 14 00 AC 2F 00 00 00 1B A9 00 00 00 00 00 00 00 00 05 43 00 00 4A 16 04 0B 53 

new hex: (virtual 0x407)
header:
05 43 00 00 AB 1F 00 00 00 00 00 00 04 43 00 00 00 00 00 00 00 00 00 00 05 43 00 00 00 00 00 00 3D 04 00 00 EF 7B 00 00 07 04 00 00 DB 02 00 00 

body:
0F 00 88 43 00 00 1B 45 06 00 00 00 00 00 00 01 10 42 00 00 16 07 2E 00 72 00 88 43 00 00 2A 16 04 0B 07 54 00 81 19 00 88 43 00 00 0A 00 47 24 00 00 00 1B 40 14 00 00 00 00 00 00 16 16 04 0B 07 7A 00 81 19 00 88 43 00 00 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 16 04 0B 0F 00 05 43 00 00 1C A3 FD FF FF 20 75 37 00 00 4A 4A 4A 4A 4A 4A 4A 16 0F 19 00 05 43 00 00 09 00 31 37 00 00 00 01 31 37 00 00 1C A3 FD FF FF 20 7A FE FF FF 4A 4A 4A 4A 4A 4A 4A 16 0F 19 00 05 43 00 00 09 00 37 37 00 00 00 01 37 37 00 00 19 00 88 43 00 00 0A 00 5E 24 00 00 00 1B 58 0F 00 00 00 00 00 00 16 0F 19 00 05 43 00 00 09 00 39 37 00 00 00 01 39 37 00 00 19 1B AB 05 00 00 00 00 00 00 19 00 88 43 00 00 0A 00 62 24 00 00 00 1B 09 10 00 00 00 00 00 00 16 16 09 00 61 23 00 00 00 01 61 23 00 00 0F 19 00 05 43 00 00 09 00 25 37 00 00 00 01 25 37 00 00 70 19 00 05 43 00 00 09 00 25 37 00 00 00 01 25 37 00 00 19 00 88 43 00 00 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 16 0F 19 19 00 05 43 00 00 09 00 31 37 00 00 00 01 31 37 00 00 09 00 C1 F9 FF FF 00 01 C1 F9 FF FF 1B C4 07 00 00 00 00 00 00 16 0F 10 2C AC 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 32 0F 10 2C B3 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 03 0F 10 2C AB 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 38 44 AB 10 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 12 20 6D FE FF FF 09 00 CA FF FF FF 00 02 CA FF FF FF 38 3F 2C 03 16 0F 10 2C B2 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 04 0F 10 2C B0 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 0F 0F 10 2C AF 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 0A 0F 10 2C AE 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 01 07 9E 03 9A 38 3A 19 1B DE 1F 00 00 00 00 00 00 16 09 00 E1 38 00 00 00 01 E1 38 00 00 38 3A 24 04 16 0F 10 2C B4 19 00 05 43 00 00 09 00 32 37 00 00 00 01 32 37 00 00 2C 01 0F 19 00 05 43 00 00 09 00 30 37 00 00 00 01 30 37 00 00 2C 00 0B 0B 0B 19 1B 69 0E 00 00 00 00 00 00 16 14 00 AC 2F 00 00 00 1B A9 00 00 00 00 00 00 00 00 05 43 00 00 4A 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 


-------------------------

XGStrategyAI.RevealBase // #AddInfTgt -- helper function to create current infiltration objectives

original hex:
header:
F3 42 00 00 AB 1F 00 00 00 00 00 00 F2 42 00 00 00 00 00 00 00 00 00 00 F3 42 00 00 00 00 00 00 F1 03 00 00 0A 72 00 00 AC 00 00 00 7C 00 00 00 

body:
58 19 1B 69 0E 00 00 00 00 00 00 16 92 00 94 2F 00 00 00 01 94 2F 00 00 00 F3 42 00 00 00 4A A8 00 07 A7 00 9A 19 00 F3 42 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 0F 19 00 F3 42 00 00 09 00 30 37 00 00 00 01 30 37 00 00 25 19 1B 69 0E 00 00 00 00 00 00 16 1C 00 00 00 00 00 00 1B EF 1F 00 00 00 00 00 00 2E 75 37 00 00 00 F3 42 00 00 16 30 04 0B 31 30 04 0B 53 

new hex: (virtual 0x94)
header:
F3 42 00 00 AB 1F 00 00 00 00 00 00 F2 42 00 00 00 00 00 00 00 00 00 00 F3 42 00 00 00 00 00 00 F1 03 00 00 0A 72 00 00 94 00 00 00 7C 00 00 00 

body:
0F 00 DD 42 00 00 19 1B 9C 2C 00 00 00 00 00 00 16 0A 00 0B 47 00 00 00 1B 0B 10 00 00 00 00 00 00 16 1B E4 00 00 00 00 00 00 00 24 07 2C 05 19 00 DD 42 00 00 0A 00 74 24 00 00 00 1B C9 0E 00 00 00 00 00 00 16 19 00 DD 42 00 00 0A 00 5E 24 00 00 00 1B 58 0F 00 00 00 00 00 00 16 4A 4A 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 

------------------------------

Function name change

original:
RevealBase
0B 00 00 00 52 65 76 65 61 6C 42 61 73 65 

#AddInfTgt
0B 00 00 00 23 41 64 64 49 6E 66 54 67 74 

------------------------------

XGStrategyAI.AIAddNewObjectives  // add infiltration objectives in first months

Long War 1.9 original hex:
header:
49 42 00 00 AB 1F 00 00 00 00 00 00 41 42 00 00 00 00 00 00 00 00 00 00 49 42 00 00 00 00 00 00 6D 01 00 00 6B 28 00 00 6E 02 00 00 EE 01 00 00 

body:
07 80 01 19 1B 23 27 00 00 00 00 00 00 16 0C 00 80 40 00 00 00 1B 29 0D 00 00 00 00 00 00 2C B4 16 1B A7 00 00 00 00 00 00 00 00 44 42 00 00 00 46 42 00 00 00 47 42 00 00 00 48 42 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0F 00 43 42 00 00 1B AB 00 00 00 00 00 00 00 00 48 42 00 00 96 00 45 42 00 00 25 16 16 07 30 02 96 00 43 42 00 00 00 48 42 00 00 16 


new hex: (virtual 0x276)
header:
49 42 00 00 AB 1F 00 00 00 00 00 00 41 42 00 00 00 00 00 00 00 00 00 00 49 42 00 00 00 00 00 00 6D 01 00 00 6B 28 00 00 76 02 00 00 EE 01 00 00 

body:
07 6C 01 19 1B 23 27 00 00 00 00 00 00 16 0C 00 80 40 00 00 00 1B 29 0D 00 00 00 00 00 00 2C B4 16 1B A7 00 00 00 00 00 00 00 00 44 42 00 00 00 46 42 00 00 00 47 42 00 00 00 48 42 00 00 16 07 A4 01 98 00 45 42 00 00 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 16 1B F7 22 00 00 00 00 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0F 00 43 42 00 00 1B AB 00 00 00 00 00 00 00 00 48 42 00 00 96 00 45 42 00 00 25 16 16 07 38 02 96 00 43 42 00 00 00 48 42 00 00 16 


---------------------------

XGStrategyAI.InitNewGame(); // remove vanilla call to create base at start of new game

original:
1B 5B 06 00 00 00 00 00 00 16 0F 01 0C 42 00 00 2C 02 

new:
0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0F 01 0C 42 00 00 2C 02 


---------------------------

XGHeadquarters.ActivateSatellite // add conditions to create alien bases when satellite arrives, via call to XGFacility_SituationRoom.OnCodeCracked

original hex:
header:
EB 32 00 00 AB 1F 00 00 00 00 00 00 E8 32 00 00 00 00 00 00 00 00 00 00 EB 32 00 00 00 00 00 00 98 01 00 00 42 2E 00 00 14 02 00 00 7C 01 00 00 

body:
07 BD 01 2D 00 EA 32 00 00 0F 00 E9 32 00 00 2E 71 FE FF FF 19 19 2E 94 FE FF FF 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 09 00 09 FB FF FF 00 01 09 FB FF FF 13 00 A4 FA FF FF 00 1B B6 0D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 19 00 E9 32 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 35 C7 02 00 00 C8 02 00 00 01 00 1B 09 15 00 00 00 00 00 00 35 97 02 00 00 98 02 00 00 00 00 10 00 EB 32 00 00 01 BB 32 00 00 4A 16 0F 19 00 E9 32 00 00 09 00 EE F9 FF FF 00 01 EE F9 FF FF 19 1B 45 06 00 00 00 00 00 00 35 94 02 00 00 98 02 00 00 00 00 10 00 EB 32 00 00 01 BB 32 00 00 16 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 19 1B 12 22 00 00 00 00 00 00 16 35 00 5E FE FF FF 00 1B 8F 26 00 00 00 00 00 00 12 20 8C FE FF FF 14 00 09 FA FF FF 00 1B 39 0D 00 00 00 00 00 00 01 99 32 00 00 4A 16 24 08 16 19 1B 12 22 00 00 00 00 00 00 16 17 00 00 00 00 00 00 1B B2 1F 00 00 00 00 00 00 24 21 00 EB 32 00 00 4A 4A 16 19 19 1B 9C 2C 00 00 00 00 00 00 16 09 00 EB 46 00 00 00 01 EB 46 00 00 1F 00 00 00 00 00 00 1B F2 20 00 00 00 00 00 00 10 00 EB 32 00 00 01 BB 32 00 00 4A 4A 16 1B 04 2C 00 00 00 00 00 00 16 04 0B 53 


new hex: (virtual 0x200)
header:
EB 32 00 00 AB 1F 00 00 00 00 00 00 E8 32 00 00 00 00 00 00 00 00 00 00 EB 32 00 00 00 00 00 00 98 01 00 00 42 2E 00 00 00 02 00 00 7C 01 00 00 

body:
07 90 01 2D 00 EA 32 00 00 0F 00 E9 32 00 00 2E 71 FE FF FF 19 19 2E 94 FE FF FF 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 09 00 09 FB FF FF 00 01 09 FB FF FF 13 00 A4 FA FF FF 00 1B B6 0D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 19 00 E9 32 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 35 C7 02 00 00 C8 02 00 00 01 00 1B 09 15 00 00 00 00 00 00 35 97 02 00 00 98 02 00 00 00 00 10 00 EB 32 00 00 01 BB 32 00 00 4A 16 0F 19 00 E9 32 00 00 09 00 EE F9 FF FF 00 01 EE F9 FF FF 19 1B 45 06 00 00 00 00 00 00 35 94 02 00 00 98 02 00 00 00 00 10 00 EB 32 00 00 01 BB 32 00 00 16 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 19 1B 12 22 00 00 00 00 00 00 16 35 00 5E FE FF FF 00 1B 8F 26 00 00 00 00 00 00 12 20 8C FE FF FF 14 00 09 FA FF FF 00 1B 39 0D 00 00 00 00 00 00 01 99 32 00 00 4A 16 24 08 16 07 D5 01 19 1B 8B 16 00 00 00 00 00 00 16 0C 00 77 2C 00 00 00 1B BF 14 00 00 00 00 00 00 2C 03 16 19 1B C5 24 00 00 00 00 00 00 16 0A 00 00 00 00 00 00 1B 25 20 00 00 00 00 00 00 16 1B 04 2C 00 00 00 00 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 


-------------------------------


XGFacility_Labs.OnResearchComplete  // disable alien base reveal narrative after outsider shard research complete

change:
19 1B 12 22 00 00 00 00 00 00 16 29 00 66 FF FF FF 00 1B 27 2B 00 00 00 00 00 00 20 29 48 00 00 2A 43 DC 22 00 00 00 00 00 00 00 00 00 00 4A 4A 4A 4A 16 

to:
01 E7 2B 00 00 0B 0B 01 E7 2B 00 00 0B 01 E7 2B 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 


-------------------------------

XGCountry.SetSatelliteCoverage  // prevent satellite coverage over occupied countries from granting bonuses

original hex:
header:
78 24 00 00 AB 1F 00 00 00 00 00 00 77 24 00 00 00 00 00 00 00 00 00 00 78 24 00 00 00 00 00 00 5D 01 00 00 8F 25 00 00 F8 00 00 00 B0 00 00 00 

body:
07 1B 00 F2 2D 01 32 24 00 00 2D 00 78 24 00 00 16 04 0B 14 2D 01 32 24 00 00 2D 00 78 24 00 00 19 1B 23 06 00 00 00 00 00 00 35 5D 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 16 30 00 00 00 00 00 00 1B F1 23 00 00 00 00 00 00 35 63 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 2D 00 78 24 00 00 16 07 D5 00 2D 00 78 24 00 00 1B B3 00 00 00 00 00 00 00 12 20 6D FE FF FF 09 00 D5 FB FF FF 00 02 D5 FB FF FF 4A 16 1B 64 03 00 00 00 00 00 00 16 06 F5 00 1B 64 03 00 00 00 00 00 00 16 40 01 2D 24 00 00 25 36 01 2D 24 00 00 16 04 0B 53 

new hex: (virtual 0xE4)
header:
78 24 00 00 AB 1F 00 00 00 00 00 00 77 24 00 00 00 00 00 00 00 00 00 00 78 24 00 00 00 00 00 00 5D 01 00 00 8F 25 00 00 E4 00 00 00 B0 00 00 00 

body:
07 1B 00 F2 2D 01 32 24 00 00 2D 00 78 24 00 00 16 04 0B 14 2D 01 32 24 00 00 2D 00 78 24 00 00 07 40 00 2D 01 33 24 00 00 06 B6 00 19 1B 23 06 00 00 00 00 00 00 38 3A 1B C5 0E 00 00 00 00 00 00 16 16 30 00 00 00 00 00 00 1B F1 23 00 00 00 00 00 00 1B 58 0F 00 00 00 00 00 00 16 2D 00 78 24 00 00 16 07 B6 00 2D 00 78 24 00 00 1B B3 00 00 00 00 00 00 00 12 20 6D FE FF FF 09 00 D5 FB FF FF 00 02 D5 FB FF FF 4A 16 40 01 2D 24 00 00 25 36 01 2D 24 00 00 16 1B 64 03 00 00 00 00 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 


--------------------------------


XGSatelliteSitRoomUI.UpdateCountryHelp // allow launching of satellites over occupied countries

original hex:
header:
83 3B 00 00 AB 1F 00 00 00 00 00 00 82 3B 00 00 00 00 00 00 00 00 00 00 83 3B 00 00 00 00 00 00 76 01 00 00 99 28 00 00 2C 04 00 00 AC 02 00 00 

body:
07 99 00 9A 01 5A 3B 00 00 1D FF FF FF FF 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 1F 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 16 04 07 51 01 19 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 49 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 26 06 16 04 07 0A 02 19 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 32 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 16 04 07 A6 02 81 1B 28 11 00 00 00 00 00 00 16 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 33 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 16 04 07 5B 03 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C 6C 16 25 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 4A 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 16 04 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 27 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 26 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 48 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 02 0F 01 61 3B 00 00 00 83 3B 00 00 04 0B 53 


new hex: (virtual 0x420)
header:
83 3B 00 00 AB 1F 00 00 00 00 00 00 82 3B 00 00 00 00 00 00 00 00 00 00 83 3B 00 00 00 00 00 00 76 01 00 00 99 28 00 00 20 04 00 00 AC 02 00 00 

body:
0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 1F 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 07 99 00 9A 01 5A 3B 00 00 1D FF FF FF FF 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 06 F4 03 07 30 01 19 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 32 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 07 E8 01 19 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 49 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 26 06 F4 03 07 84 02 81 1B 28 11 00 00 00 00 00 00 16 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 33 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 F4 03 07 39 03 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C 6C 16 25 16 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 28 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 4A 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 03 06 F4 03 14 2D 35 F4 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 27 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 26 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 01 48 3B 00 00 0F 35 59 FB FF FF 6F FA FF FF 00 00 35 F3 3A 00 00 F5 3A 00 00 00 01 00 83 3B 00 00 2C 02 0F 01 61 3B 00 00 00 83 3B 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 


--------------------------------


XGSatelliteSitRoomUI.UpdateContinent  // disable sci/eng highlighting for occupied countries
// THIS CODE CAUSES CRASHES IN CERTAIN CASES -- REMOVE FOR NOW

original hex:
0F 00 8A 3B 00 00 00 8A 3B 00 00 07 12 06 96 00 8A 3B 00 00 19 00 8D 3B 00 00 0A 00 DC 23 00 00 00 1B D9 0F 00 00 00 00 00 00 16 16 07 02 05 82 9A 00 8A 3B 00 00 19 00 8D 3B 00 00 09 00 8D 23 00 00 00 01 8D 23 00 00 16 18 1E 00 2D 35 F4 3A 00 00 F5 3A 00 00 00 00 01 61 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 70 1B 29 10 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 16 1F 3A 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 2C 04 55 35 FE 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 1B 54 04 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 00 8D 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 2C 04 55 35 FF 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 0F 35 FD 3A 00 00 02 3B 00 00 00 01 00 8E 3B 00 00 00 8A 3B 00 00 06 04 06 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 70 1B 29 10 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 16 1F 3A 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 26 55 35 FE 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 1B 54 04 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 00 8D 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 26 55 35 FF 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 A5 00 8A 3B 00 00 16 06 5A 03 

new hex:
07 12 06 96 00 8A 3B 00 00 19 00 8D 3B 00 00 0A 00 DC 23 00 00 00 1B D9 0F 00 00 00 00 00 00 16 16 14 2D 00 A4 3B 00 00 82 82 82 9A 00 8A 3B 00 00 19 00 8D 3B 00 00 09 00 8D 23 00 00 00 01 8D 23 00 00 16 18 1E 00 2D 35 F4 3A 00 00 F5 3A 00 00 00 00 01 61 3B 00 00 16 18 11 00 9B 01 5A 3B 00 00 1D FF FF FF FF 16 16 18 2C 00 81 19 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 16 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 70 1B 29 10 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 16 1F 3A 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 45 2D 00 A4 3B 00 00 02 00 2C 04 01 00 26 55 35 FE 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 01 00 89 3B 00 00 1B 54 04 00 00 00 00 00 00 92 00 8A 3B 00 00 26 16 00 8D 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 01 00 89 3B 00 00 45 2D 00 A4 3B 00 00 02 00 2C 04 01 00 26 55 35 FF 3A 00 00 02 3B 00 00 00 00 00 8E 3B 00 00 0A 00 00 89 3B 00 00 16 0F 35 FD 3A 00 00 02 3B 00 00 00 01 00 8E 3B 00 00 00 8A 3B 00 00 A5 00 8A 3B 00 00 16 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 00 8A 3B 00 00 06 47 03 

--------------------------------


XGSatelliteSitRoom.UpdateConfirmUI // correct displayed rewards for launch UI for occupied countries


original hex:
header:
98 3B 00 00 AB 1F 00 00 00 00 00 00 93 3B 00 00 00 00 00 00 00 00 00 00 98 3B 00 00 00 00 00 00 3F 02 00 00 ED 3D 00 00 49 07 00 00 A1 04 00 00 

body:
0F 00 95 3B 00 00 2E 71 FE FF FF 19 19 2E 94 FE FF FF 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 09 00 09 FB FF FF 00 01 09 FB FF FF 13 00 A4 FA FF FF 00 1B B6 0D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 00 96 3B 00 00 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0F 00 97 3B 00 00 1B 23 06 00 00 00 00 00 00 01 59 3B 00 00 16 0F 00 94 3B 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 19 00 96 3B 00 00 09 00 34 24 00 00 00 01 34 24 00 00 07 2E 01 84 1B A7 14 00 00 00 00 00 00 24 0C 16 18 0D 00 1B A7 14 00 00 00 00 00 00 24 08 16 16 0F 00 94 3B 00 00 19 00 96 3B 00 00 0B 00 4F 24 00 00 00 1B D6 04 00 00 00 00 00 00 4A 16 0F 35 58 FB FF FF 6D FA FF FF 00 00 35 2B 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C CB 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 2A 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3F 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 2A 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 04 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 29 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3E 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 29 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 28 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3D 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 28 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 27 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3C 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 27 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 26 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 19 00 96 3B 00 00 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 26 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 25 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 A8 38 53 19 1B 69 0E 00 00 00 00 00 00 16 13 00 C9 2F 00 00 00 1B 2A 10 00 00 00 00 00 00 01 5A 3B 00 00 16 01 47 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 25 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 24 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 A8 70 1F 2B 00 1B 34 06 00 00 00 00 00 00 00 94 3B 00 00 16 16 01 46 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 24 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 06 0F 19 00 95 3B 00 00 09 00 2B FC FF FF 00 01 2B FC FF FF 92 19 00 97 3B 00 00 0A 00 F1 23 00 00 00 1B DB 0F 00 00 00 00 00 00 16 26 16 0F 19 00 95 3B 00 00 09 00 2A FC FF FF 00 01 2A FC FF FF 19 00 97 3B 00 00 0A 00 F3 23 00 00 00 1B DD 0F 00 00 00 00 00 00 16 0F 19 00 95 3B 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 19 00 97 3B 00 00 0A 00 9E 23 00 00 00 1B A3 0F 00 00 00 00 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 23 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 12 20 8C FE FF FF 14 00 09 FA FF FF 00 1B 39 0D 00 00 00 00 00 00 01 3B 3B 00 00 4A 16 0F 35 DE F9 FF FF 6C FA FF FF 00 00 35 22 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3A 3B 00 00 0F 35 DD F9 FF FF 6C FA FF FF 00 00 35 22 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 1B 54 04 00 00 00 00 00 00 92 19 00 97 3B 00 00 09 00 8D 23 00 00 00 01 8D 23 00 00 26 16 00 97 3B 00 00 16 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 21 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 26 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 21 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 39 3B 00 00 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 20 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 04 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 20 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 38 3B 00 00 0F 01 5D 3B 00 00 00 98 3B 00 00 04 0B 53 


new hex: (virtual 0x74C
header:
98 3B 00 00 AB 1F 00 00 00 00 00 00 93 3B 00 00 00 00 00 00 00 00 00 00 98 3B 00 00 00 00 00 00 3F 02 00 00 ED 3D 00 00 4C 07 00 00 A1 04 00 00 

body:
0F 00 95 3B 00 00 2E 71 FE FF FF 19 19 2E 94 FE FF FF 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 09 00 09 FB FF FF 00 01 09 FB FF FF 13 00 A4 FA FF FF 00 1B B6 0D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 00 96 3B 00 00 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0F 00 97 3B 00 00 1B 23 06 00 00 00 00 00 00 01 59 3B 00 00 16 07 07 01 19 00 96 3B 00 00 0A 00 33 24 00 00 00 2D 01 33 24 00 00 0F 35 DE F9 FF FF 6C FA FF FF 00 00 35 22 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 32 3B 00 00 06 EF 01 0F 35 DE F9 FF FF 6C FA FF FF 00 00 35 22 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3A 3B 00 00 0F 35 DD F9 FF FF 6C FA FF FF 00 00 35 22 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 1B 54 04 00 00 00 00 00 00 92 19 00 97 3B 00 00 09 00 8D 23 00 00 00 01 8D 23 00 00 26 16 00 97 3B 00 00 16 0F 00 94 3B 00 00 93 19 00 96 3B 00 00 0B 00 4F 24 00 00 00 1B D6 04 00 00 00 00 00 00 2C 0A 16 19 00 96 3B 00 00 09 00 2F 24 00 00 00 01 2F 24 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 2A 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3F 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 2A 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 04 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 29 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3E 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 29 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 28 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3D 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 28 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 27 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 3C 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 27 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 26 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 19 00 96 3B 00 00 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 26 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 25 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 A8 38 53 19 1B 69 0E 00 00 00 00 00 00 16 13 00 C9 2F 00 00 00 1B 2A 10 00 00 00 00 00 00 01 5A 3B 00 00 16 01 47 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 25 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 05 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 24 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 A8 1B 34 06 00 00 00 00 00 00 00 94 3B 00 00 16 01 46 3B 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 24 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 06 0F 19 00 95 3B 00 00 09 00 2B FC FF FF 00 01 2B FC FF FF 92 19 00 97 3B 00 00 0A 00 F1 23 00 00 00 1B DB 0F 00 00 00 00 00 00 16 26 16 0F 19 00 95 3B 00 00 09 00 2A FC FF FF 00 01 2A FC FF FF 19 00 97 3B 00 00 0A 00 F3 23 00 00 00 1B DD 0F 00 00 00 00 00 00 16 0F 19 00 95 3B 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 19 00 97 3B 00 00 0A 00 9E 23 00 00 00 1B A3 0F 00 00 00 00 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 23 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 12 20 8C FE FF FF 14 00 09 FA FF FF 00 1B 39 0D 00 00 00 00 00 00 01 3B 3B 00 00 4A 16 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 21 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 26 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 21 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 39 3B 00 00 0F 35 5A FB FF FF 6F FA FF FF 00 00 35 20 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 2C 04 0F 35 E1 F9 FF FF 6F FA FF FF 00 00 35 20 3B 00 00 2C 3B 00 00 00 01 00 98 3B 00 00 01 38 3B 00 00 0F 01 5D 3B 00 00 00 98 3B 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 	

---------------------------------

XGSatelliteSitRoom.UpdateCountry  // display correct total country funding


original hex:
header:
87 3B 00 00 AB 1F 00 00 00 00 00 00 84 3B 00 00 00 00 00 00 00 00 00 00 87 3B 00 00 00 00 00 00 A8 01 00 00 54 2D 00 00 B7 03 00 00 77 02 00 00 

body:
07 A1 03 9B 01 5A 3B 00 00 1D FF FF FF FF 16 0F 00 86 3B 00 00 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 0F 35 F7 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0A 00 3D 24 00 00 00 1B ED 0F 00 00 00 00 00 00 16 14 2D 35 F6 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 07 4E 01 2D 35 F6 3A 00 00 FA 3A 00 00 00 00 00 87 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 05 06 80 01 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 06 0F 00 85 3B 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 19 00 86 3B 00 00 09 00 34 24 00 00 00 01 34 24 00 00 07 10 02 2D 35 F4 3A 00 00 F5 3A 00 00 00 00 01 61 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 06 06 9B 02 07 6A 02 97 19 00 86 3B 00 00 0A 00 54 24 00 00 00 1B E0 0E 00 00 00 00 00 00 16 25 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 05 06 9B 02 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 26 07 4E 03 84 1B A7 14 00 00 00 00 00 00 24 0C 16 18 0D 00 1B A7 14 00 00 00 00 00 00 24 08 16 16 07 07 03 2D 35 F6 3A 00 00 FA 3A 00 00 00 00 00 87 3B 00 00 0F 00 85 3B 00 00 19 00 86 3B 00 00 0A 00 54 24 00 00 00 1B E0 0E 00 00 00 00 00 00 16 06 4E 03 0F 00 85 3B 00 00 19 00 86 3B 00 00 28 00 4F 24 00 00 00 1B D6 04 00 00 00 00 00 00 12 20 6D FE FF FF 09 00 D5 FB FF FF 00 02 D5 FB FF FF 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 A8 70 1F 2B 00 1B 34 06 00 00 00 00 00 00 00 85 3B 00 00 16 16 01 46 3B 00 00 16 0F 01 60 3B 00 00 00 87 3B 00 00 04 0B 53 


new hex: (virtual 0x3AF)
header:
87 3B 00 00 AB 1F 00 00 00 00 00 00 84 3B 00 00 00 00 00 00 00 00 00 00 87 3B 00 00 00 00 00 00 A8 01 00 00 54 2D 00 00 AF 03 00 00 77 02 00 00 

body:
07 78 03 9B 01 5A 3B 00 00 1D FF FF FF FF 16 0F 00 86 3B 00 00 1B 45 06 00 00 00 00 00 00 01 5A 3B 00 00 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0B 00 58 24 00 00 00 1B A3 0F 00 00 00 00 00 00 4A 16 0F 35 F7 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0A 00 3D 24 00 00 00 1B ED 0F 00 00 00 00 00 00 16 14 2D 35 F6 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 19 00 86 3B 00 00 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 07 50 01 19 00 86 3B 00 00 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 02 06 82 01 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 06 07 D5 01 2D 35 F6 3A 00 00 FA 3A 00 00 00 00 00 87 3B 00 00 A2 35 54 FB FF FF 66 FA FF FF 00 00 35 F9 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 01 16 07 2A 02 2D 35 F4 3A 00 00 F5 3A 00 00 00 00 01 61 3B 00 00 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 06 06 B3 02 07 81 02 19 00 86 3B 00 00 0A 00 41 24 00 00 00 1B B6 16 00 00 00 00 00 00 16 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 01 06 B3 02 0F 35 54 FB FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 2C 05 07 FF 02 2D 35 F6 3A 00 00 FA 3A 00 00 00 00 00 87 3B 00 00 0F 00 85 3B 00 00 19 00 86 3B 00 00 0A 00 54 24 00 00 00 1B E0 0E 00 00 00 00 00 00 16 06 2A 03 0F 00 85 3B 00 00 19 00 86 3B 00 00 28 00 4F 24 00 00 00 1B D6 04 00 00 00 00 00 00 2C 0B 16 0F 35 D8 F9 FF FF 66 FA FF FF 00 00 35 F8 3A 00 00 FA 3A 00 00 00 01 00 87 3B 00 00 A8 1B 34 06 00 00 00 00 00 00 00 85 3B 00 00 16 01 46 3B 00 00 16 0F 01 60 3B 00 00 00 87 3B 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 	


--------------------------------


XGCountry.CalcFunding // allow returning of full amount with satellite coverage

consolidated:
original hex:
50 24 00 00 AB 1F 00 00 00 00 00 00 4A 24 00 00 00 00 00 00 00 00 00 00 50 24 00 00 00 00 00 00 BE 00 00 00 EE 14 00 00 E2 01 00 00 5A 01 00 00 0B 07 10 00 1B B6 16 00 00 00 00 00 00 16 04 25 0F 00 4E 24 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 0F 00 4D 24 00 00 00 4E 24 00 00 0F 00 4C 24 00 00 FB 92 01 2E 24 00 00 00 50 24 00 00 16 25 2C 04 16 07 0F 01 1B A7 14 00 00 00 00 00 00 24 0C 16 0F 00 4B 24 00 00 AB 38 3F 19 1B E1 00 00 00 00 00 00 00 16 0A 00 4B 43 00 00 00 1B 9D 0F 00 00 00 00 00 00 16 1E CD CC CC 3D 16 0F 00 4B 24 00 00 F6 00 4B 24 00 00 1E 00 00 00 00 1E 66 66 66 3F 16 0F 00 4E 24 00 00 38 44 AF 38 3F 00 4E 24 00 00 AB 38 3F 00 4E 24 00 00 00 4B 24 00 00 16 16 0F 00 4D 24 00 00 00 4E 24 00 00 07 CD 01 1B A7 14 00 00 00 00 00 00 24 08 16 07 4E 01 9A 00 4C 24 00 00 25 16 0F 00 4D 24 00 00 38 44 AB 38 3F 00 4E 24 00 00 1E 00 00 A0 3F 16 06 CD 01 07 73 01 9A 00 4C 24 00 00 26 16 0F 00 4D 24 00 00 00 4E 24 00 00 06 CD 01 0F 00 4B 24 00 00 AB 38 3F 93 00 4C 24 00 00 26 16 1E 00 00 80 3E 16 0F 00 4D 24 00 00 FB 00 4D 24 00 00 25 38 44 AF 38 3F 00 4E 24 00 00 AB 38 3F 00 4E 24 00 00 00 4B 24 00 00 16 16 16 04 00 4D 24 00 00 04 3A 4F 24 00 00 53 

Long War 1.9 hex (version 1.0): (virtual 0x1D6)
50 24 00 00 AB 1F 00 00 00 00 00 00 4A 24 00 00 00 00 00 00 00 00 00 00 50 24 00 00 00 00 00 00 BE 00 00 00 EE 14 00 00 D6 01 00 00 5A 01 00 00 0B 07 10 00 1B B6 16 00 00 00 00 00 00 16 04 25 0F 00 4E 24 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 0F 00 4D 24 00 00 00 4E 24 00 00 0F 00 4C 24 00 00 FB 92 01 2E 24 00 00 00 50 24 00 00 16 25 2C 04 16 07 0F 01 1B A7 14 00 00 00 00 00 00 24 0C 16 0F 00 4B 24 00 00 AB 38 3F 19 1B E1 00 00 00 00 00 00 00 16 0A 00 4B 43 00 00 00 1B 9D 0F 00 00 00 00 00 00 16 1E CD CC CC 3D 16 0F 00 4B 24 00 00 F6 00 4B 24 00 00 1E 00 00 00 00 1E 66 66 66 3F 16 0F 00 4E 24 00 00 38 44 AF 38 3F 00 4E 24 00 00 AB 38 3F 00 4E 24 00 00 00 4B 24 00 00 16 16 0F 00 4D 24 00 00 00 4E 24 00 00 07 4D 01 1B A7 14 00 00 00 00 00 00 24 08 16 0F 00 4D 24 00 00 38 44 AB AB 1E 00 00 80 3E 38 3F 93 2C 05 00 4C 24 00 00 16 16 38 3F 00 4E 24 00 00 16 07 BC 01 81 2D 01 32 24 00 00 16 0F 00 4D 24 00 00 38 44 AB 38 3F 00 4D 24 00 00 AC 38 3F 10 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 12 20 6D FE FF FF 09 00 DF FF FF FF 00 02 DF FF FF FF 38 3F 2C 64 16 16 04 00 4D 24 00 00 0B 0B 0B 0B 0B 04 3A 4F 24 00 00 53 

version 2.0 hex: (virtual (0x1BE)
50 24 00 00 AB 1F 00 00 00 00 00 00 4A 24 00 00 00 00 00 00 00 00 00 00 50 24 00 00 00 00 00 00 BE 00 00 00 EE 14 00 00 BE 01 00 00 5A 01 00 00 0B 07 10 00 1B B6 16 00 00 00 00 00 00 16 04 25 0F 00 4E 24 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 0F 00 4D 24 00 00 00 4E 24 00 00 0F 00 4C 24 00 00 FB 92 01 2E 24 00 00 00 50 24 00 00 16 25 2C 04 16 07 E8 00 1B A7 14 00 00 00 00 00 00 24 0C 16 0F 00 4B 24 00 00 AB 38 3F 19 1B E1 00 00 00 00 00 00 00 16 0A 00 4B 43 00 00 00 1B 9D 0F 00 00 00 00 00 00 16 1E CD CC CC 3D 16 0F 00 4B 24 00 00 F6 00 4B 24 00 00 1E 00 00 00 00 1E 66 66 66 3F 16 9F 00 4D 24 00 00 AF 1E 00 00 80 3F 00 4B 24 00 00 16 16 07 18 01 1B A7 14 00 00 00 00 00 00 24 08 16 9F 00 4D 24 00 00 AB 1E 00 00 80 3E 38 3F 93 2C 05 00 4C 24 00 00 16 16 16 07 79 01 81 2D 01 32 24 00 00 16 9F 00 4D 24 00 00 AC 38 3F 10 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 12 20 6D FE FF FF 09 00 DF FF FF FF 00 02 DF FF FF FF 38 3F 2C 64 16 16 04 00 4D 24 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 3A 4F 24 00 00 53 

new version 3.0 hex: (virtual 0x1C2)
header:
50 24 00 00 AB 1F 00 00 00 00 00 00 4A 24 00 00 00 00 00 00 00 00 00 00 50 24 00 00 00 00 00 00 BE 00 00 00 EE 14 00 00 C2 01 00 00 5A 01 00 00 0B 07 10 00 1B B6 16 00 00 00 00 00 00 16 04 25 0F 00 4E 24 00 00 35 5C 1E 00 00 64 1E 00 00 00 00 01 34 24 00 00 0F 00 4D 24 00 00 00 4E 24 00 00 0F 00 4C 24 00 00 FB 92 01 2E 24 00 00 FD 00 50 24 00 00 2C 0A 16 16 25 2C 04 16 07 EC 00 1B A7 14 00 00 00 00 00 00 24 0C 16 0F 00 4B 24 00 00 AB 38 3F 19 1B E1 00 00 00 00 00 00 00 16 0A 00 4B 43 00 00 00 1B 9D 0F 00 00 00 00 00 00 16 1E CD CC CC 3D 16 0F 00 4B 24 00 00 F6 00 4B 24 00 00 1E 00 00 00 00 1E 66 66 66 3F 16 9F 00 4D 24 00 00 AF 1E 00 00 80 3F 00 4B 24 00 00 16 16 07 1C 01 1B A7 14 00 00 00 00 00 00 24 08 16 9F 00 4D 24 00 00 AB 1E 00 00 80 3E 38 3F 93 2C 05 00 4C 24 00 00 16 16 16 07 8F 01 82 96 00 50 24 00 00 2C 0A 16 18 0D 00 81 2D 01 32 24 00 00 16 16 9F 00 4D 24 00 00 AC 38 3F 10 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 43 41 00 00 00 1B F6 0E 00 00 00 00 00 00 16 12 20 6D FE FF FF 09 00 DF FF FF FF 00 02 DF FF FF FF 38 3F 2C 64 16 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 00 4D 24 00 00 04 3A 4F 24 00 00 53 


--------------------------------


XGFacility_SituationRoom.OnCodeCracked // alter to require satellite coverage before creating each alien base, add narrative moment on first base

original hex:
header:
AE 2E 00 00 AB 1F 00 00 00 00 00 00 AD 2E 00 00 00 00 00 00 00 00 00 00 AE 2E 00 00 00 00 00 00 8C 03 00 00 C0 66 00 00 59 01 00 00 FD 00 00 00 

body:
0F 01 2B 2E 00 00 26 14 2D 01 2D 2E 00 00 27 0F 00 AE 2E 00 00 25 07 3E 01 96 00 AE 2E 00 00 36 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 16 07 30 01 9A 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 0F 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 09 00 30 37 00 00 00 01 30 37 00 00 25 19 10 00 AE 2E 00 00 19 1B 69 0E 00 00 00 00 00 00 16 09 00 94 2F 00 00 00 01 94 2F 00 00 26 00 00 00 00 00 00 1B C6 23 00 00 00 00 00 00 1C A3 FD FF FF 20 DB 38 00 00 4A 4A 4A 4A 4A 4A 4A 16 24 13 16 A5 00 AE 2E 00 00 16 06 22 00 1B 72 00 00 00 00 00 00 00 24 13 16 1B 4C 22 00 00 00 00 00 00 24 02 16 04 0B 53 

new hex: (virtual 0x139)
header:
AE 2E 00 00 AB 1F 00 00 00 00 00 00 AD 2E 00 00 00 00 00 00 00 00 00 00 AE 2E 00 00 00 00 00 00 8C 03 00 00 C0 66 00 00 39 01 00 00 FD 00 00 00 

body:
58 19 1B 9C 2C 00 00 00 00 00 00 16 ED 00 EF 46 00 00 00 01 EF 46 00 00 00 DD 42 00 00 00 4A 03 01 07 02 01 19 00 DD 42 00 00 0A 00 33 24 00 00 00 2D 01 33 24 00 00 07 02 01 19 00 DD 42 00 00 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 19 1B E1 00 00 00 00 00 00 00 16 17 00 00 00 00 00 00 1B C7 00 00 00 00 00 00 00 38 3D 19 00 DD 42 00 00 0A 00 5E 24 00 00 00 1B 58 0F 00 00 00 00 00 00 16 00 AB 44 00 00 16 07 02 01 81 2D 01 2D 2E 00 00 16 14 2D 01 2D 2E 00 00 27 1B 34 14 00 00 00 00 00 00 16 19 1B 12 22 00 00 00 00 00 00 16 0C 00 00 00 00 00 00 1B 2B 2B 00 00 00 00 00 00 24 04 16 31 30 1B 72 00 00 00 00 00 00 00 24 13 16 1B 4C 22 00 00 00 00 00 00 24 02 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 


----------------------------

XGStrategyAI.AddToAssets  // helper function to create alien base in country

original hex:
header:
A4 44 00 00 AB 1F 00 00 00 00 00 00 A1 44 00 00 00 00 00 00 00 00 00 00 A4 44 00 00 00 00 00 00 01 0E 00 00 24 AD 01 00 A1 00 00 00 81 00 00 00 

body:
07 41 00 81 1B 18 14 00 00 00 00 00 00 00 A4 44 00 00 48 A3 44 00 00 16 16 55 48 A3 44 00 00 14 00 1B 8A 0E 00 00 00 00 00 00 00 A4 44 00 00 16 16 07 9E 00 84 9A 38 3A 00 A4 44 00 00 38 3A 24 08 16 18 12 00 9A 38 3A 00 A4 44 00 00 38 3A 24 10 16 16 07 9E 00 81 1B 18 14 00 00 00 00 00 00 24 11 48 A3 44 00 00 16 16 55 48 A3 44 00 00 0D 00 1B 8A 0E 00 00 00 00 00 00 24 11 16 16 04 0B 53 

new hex:
header:
A4 44 00 00 AB 1F 00 00 00 00 00 00 A1 44 00 00 00 00 00 00 00 00 00 00 A4 44 00 00 00 00 00 00 01 0E 00 00 24 AD 01 00 B1 00 00 00 81 00 00 00 

body:
0F 01 10 42 00 00 38 3A 00 A4 44 00 00 58 19 1B 69 0E 00 00 00 00 00 00 16 6D 00 94 2F 00 00 00 01 94 2F 00 00 00 EF 42 00 00 00 4A 98 00 07 97 00 9A 19 00 EF 42 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 07 97 00 9A 19 00 EF 42 00 00 09 00 37 37 00 00 00 01 37 37 00 00 01 10 42 00 00 16 0B 30 04 0B 31 30 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 1B 5B 06 00 00 00 00 00 00 16 04 0B 53 

---------------------------------


XGFacility_SituationRoom.IsCodeActive // helper function for OnCodeCracked to play cinematic

original hex:
header:
A1 2E 00 00 AB 1F 00 00 00 00 00 00 A0 2E 00 00 00 00 00 00 00 00 00 00 A1 2E 00 00 00 00 00 00 60 03 00 00 84 62 00 00 57 00 00 00 4B 00 00 00 

body:
04 82 19 1B 8B 16 00 00 00 00 00 00 16 0C 00 77 2C 00 00 00 1B BF 14 00 00 00 00 00 00 2C 03 16 18 25 00 81 19 1B 8B 16 00 00 00 00 00 00 16 0C 00 6B 2C 00 00 00 1B E0 14 00 00 00 00 00 00 24 07 16 16 16 04 3A A1 2E 00 00 53 

new hex: (virtual 0x53)
header:
A1 2E 00 00 AB 1F 00 00 00 00 00 00 A0 2E 00 00 00 00 00 00 00 00 00 00 A1 2E 00 00 00 00 00 00 60 03 00 00 84 62 00 00 53 00 00 00 4B 00 00 00 

body:
19 1B 12 22 00 00 00 00 00 00 16 29 00 66 FF FF FF 00 1B 27 2B 00 00 00 00 00 00 20 29 48 00 00 2A 4A 4A 4A 4A 4A 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 28 53 



---------------------------------

XGSituationRoomUI.UpdateView   // remove call to IsCodeActive

change:
UpdateCode()
1B 9F 2B 00 00 00 00 00 00 16 

to:
2C 01 0B 0B 1D 45 33 00 00 0B 


---------------------------------


XGStrategyAI.CostTest/JoinXCom  // function that makes a country designated via AI().m_iAlienMonth rejoin XCom

original hex:
header:
BD 44 00 00 AB 1F 00 00 00 00 00 00 BC 44 00 00 00 00 00 00 00 00 00 00 BD 44 00 00 00 00 00 00 CD 0E 00 00 7F BC 01 00 DA 01 00 00 7A 01 00 00 

body:
0F 00 BD 44 00 00 1B C4 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B DE 07 00 00 00 00 00 00 27 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B C5 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B D8 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B C4 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B DE 07 00 00 00 00 00 00 27 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B C5 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B D8 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B C4 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B DE 07 00 00 00 00 00 00 27 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B C5 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 0F 00 BD 44 00 00 1B D8 07 00 00 00 00 00 00 16 1B 3E 06 00 00 00 00 00 00 00 BD 44 00 00 16 04 0B 53 


new hex:(virtual 0x1EA)
header:
BD 44 00 00 AB 1F 00 00 00 00 00 00 BC 44 00 00 00 00 00 00 00 00 00 00 BD 44 00 00 00 00 00 00 CD 0E 00 00 7F BC 01 00 EA 01 00 00 7A 01 00 00 

body: 
01 10 42 00 00 0B 0B 0B 0B 0F 00 88 43 00 00 1B 45 06 00 00 00 00 00 00 01 10 42 00 00 16 14 19 00 88 43 00 00 0A 00 33 24 00 00 00 2D 01 33 24 00 00 28 A2 19 1B 9C 2C 00 00 00 00 00 00 16 09 00 E9 46 00 00 00 01 E9 46 00 00 2C 01 16 1B C7 26 00 00 00 00 00 00 24 14 1D FF FF FF FF 16 0F 19 00 88 43 00 00 09 00 2E 24 00 00 00 01 2E 24 00 00 2C 03 07 0D 01 19 00 88 43 00 00 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16 19 1B 23 06 00 00 00 00 00 00 38 3A 19 00 88 43 00 00 0A 00 60 24 00 00 00 1B C5 0E 00 00 00 00 00 00 16 16 30 00 00 00 00 00 00 1B F1 23 00 00 00 00 00 00 01 10 42 00 00 27 16 19 00 88 43 00 00 09 00 64 03 00 00 00 1B 64 03 00 00 00 00 00 00 16 07 9F 01 77 19 00 88 43 00 00 0A 00 23 00 00 00 00 1B 04 0F 00 00 00 00 00 00 16 2A 16 19 00 88 43 00 00 0B 00 00 00 00 00 00 1B 42 11 00 00 00 00 00 00 27 16 19 19 00 88 43 00 00 0A 00 23 00 00 00 00 1B 04 0F 00 00 00 00 00 00 16 03 00 B7 FF FF FF 00 61 17 16 19 1B 69 0E 00 00 00 00 00 00 16 55 00 00 00 00 00 00 1B F3 00 00 00 00 00 00 00 19 1B 69 0E 00 00 00 00 00 00 16 35 00 10 30 00 00 00 1B AB 1E 00 00 00 00 00 00 24 18 2C 01 4A 4A 4A 16 16 0B 04 0B 53 


----------------------------------


rename function :

original:
CostTest
09 00 00 00 43 6F 73 74 54 65 73 74

new:
JoinXCom
09 00 00 00 4A 6F 69 6E 58 43 6F 6D


----------------------------------

XGStrategyAI.ApplyMissionPanic // calls JoinXCom when Alien Base mission is successfully completed

original hex: (next line 0xB1D)
0A 1D 0B 2C 06 0F 35 58 03 00 00 5C 03 00 00 00 01 19 1B 5C 11 00 00 00 00 00 00 16 09 00 A3 32 00 00 00 01 A3 32 00 00 12 20 6D FE FF FF 09 00 E7 FB FF FF 00 02 E7 FB FF FF 19 1B 9C 2C 00 00 00 00 00 00 16 3C 00 00 00 00 00 00 1B B3 00 00 00 00 00 00 00 35 58 03 00 00 5C 03 00 00 00 00 19 1B 5C 11 00 00 00 00 00 00 16 09 00 A3 32 00 00 00 01 A3 32 00 00 16 06 20 0B 

new hex:
0A 1D 0B 2C 06 07 0D 0B 2D 00 7D 43 00 00 0F 01 10 42 00 00 19 00 7A 43 00 00 0A 00 5E 24 00 00 00 1B 58 0F 00 00 00 00 00 00 16 1B 3F 06 00 00 00 00 00 00 16 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 01 10 42 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 06 20 0B 

----------------------------------

XGStrategy.PostCombat // Remove alien base destruction cinematic and other junk		

original hex:
07 36 11 9A 19 00 5F 41 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 07 33 11 2D 00 5D 41 00 00 19 1B 12 22 00 00 00 00 00 00 16 0A 00 00 00 00 00 00 1B 46 11 00 00 00 00 00 00 16 19 1B 12 22 00 00 00 00 00 00 16 29 00 66 FF FF FF 00 1B 27 2B 00 00 00 00 00 00 20 F7 48 00 00 4A 43 00 22 00 00 00 00 00 00 00 00 00 00 4A 4A 4A 4A 16 A1 35 DF 02 00 00 F3 02 00 00 00 01 19 00 5B 41 00 00 09 00 90 23 00 00 00 01 90 23 00 00 26 16 19 1B 69 0E 00 00 00 00 00 00 16 20 00 00 00 00 00 00 1B B5 22 00 00 00 00 00 00 00 5F 41 00 00 2D 00 5D 41 00 00 4A 4A 4A 16 04 27 

new hex:
07 36 11 9A 19 00 5F 41 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 06 16 07 33 11 2D 00 5D 41 00 00 A1 35 DF 02 00 00 F3 02 00 00 00 01 19 00 5B 41 00 00 09 00 90 23 00 00 00 01 90 23 00 00 26 16 19 1B 69 0E 00 00 00 00 00 00 16 20 00 00 00 00 00 00 1B B5 22 00 00 00 00 00 00 00 5F 41 00 00 2D 00 5D 41 00 00 4A 4A 4A 16 00 5B 41 00 00 00 5B 41 00 00 00 5B 41 00 00 00 5B 41 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

----------------------------------

XGObjectiveManager.BuildSubObjective // add subobjective 7, to launch a satellite over an occupied country

original hex: (next line 0x4AD)
0A AD 04 24 07 07 AA 04 9A 19 1B 23 27 00 00 00 00 00 00 16 0C 00 7D 40 00 00 00 1B CC 0F 00 00 00 00 00 00 2C BF 16 26 16 0F 35 D5 08 00 00 D9 08 00 00 00 01 00 F4 38 00 00 24 02 06 FC 0D 

new hex:
0A AD 04 24 07 07 AA 04 19 1B C5 24 00 00 00 00 00 00 16 0A 00 A3 2E 00 00 00 1B 35 14 00 00 00 00 00 00 16 0F 35 D5 08 00 00 D9 08 00 00 00 01 00 F4 38 00 00 24 02 0B 0B 0B 0B 0B 06 FC 0D 



------------------------------------

XGResearchUI.UpdateView // display objective 3 instead of 4 after completing the outsider shard research project

change:
PRES().UIObjectiveDisplay(4)
38 3A 24 03 16 19 1B 12 22 00 00 00 00 00 00 16 0C 00 00 00 00 00 00 1B 2B 2B 00 00 00 00 00 00 24 04 16 

to:
PRES().UIObjectiveDisplay(3)
38 3A 24 03 16 19 1B 12 22 00 00 00 00 00 00 16 0C 00 00 00 00 00 00 1B 2B 2B 00 00 00 00 00 00 24 03 16 


------------------------------------


XComHQPresentationLayer.GetObjectiveImagePath  // change image for objective three UI popup

original hex:
header:
5C 20 00 00 AB 1F 00 00 00 00 00 00 59 20 00 00 00 00 00 00 00 00 00 00 5C 20 00 00 00 00 00 00 00 08 00 00 56 08 01 00 78 01 00 00 48 01 00 00 

body:
0F 00 5A 20 00 00 1F 69 6D 67 3A 2F 2F 2F 55 49 4C 69 62 72 61 72 79 5F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2E 53 63 69 65 6E 63 65 49 63 6F 6E 73 2E 00 05 5C 20 00 00 00 00 5C 20 00 00 0A 73 00 26 04 70 00 5A 20 00 00 1F 49 43 5F 49 6E 74 65 72 72 6F 67 61 74 65 53 65 63 74 6F 69 64 00 16 0A 9C 00 2C 02 04 70 00 5A 20 00 00 1F 49 43 5F 49 6E 74 65 72 72 6F 67 61 74 65 4F 75 74 73 69 64 65 72 00 16 0A BF 00 2C 03 04 70 00 5A 20 00 00 1F 49 43 5F 4F 75 74 73 69 64 65 72 53 68 61 72 64 00 16 0A DE 00 2C 04 04 70 00 5A 20 00 00 1F 49 43 5F 41 6C 69 65 6E 42 61 73 65 00 16 0A 0A 01 2C 05 04 70 00 5A 20 00 00 1F 49 43 5F 48 79 70 65 72 77 61 76 65 43 6F 6D 6D 75 6E 69 63 61 74 69 6F 6E 00 16 0A 2B 01 2C 06 04 70 00 5A 20 00 00 1F 49 43 5F 55 46 4F 54 72 61 63 6B 69 6E 67 00 16 0A 48 01 2C 07 04 70 00 5A 20 00 00 1F 49 43 5F 50 73 69 4C 69 6E 6B 00 16 0A 67 01 2C 08 04 70 00 5A 20 00 00 1F 49 43 5F 55 46 4F 46 6C 69 67 68 74 00 16 0A FF FF 04 1F 00 04 3A 5B 20 00 00 53 

new hex: (virtual 0x174)
header:
5C 20 00 00 AB 1F 00 00 00 00 00 00 59 20 00 00 00 00 00 00 00 00 00 00 5C 20 00 00 00 00 00 00 00 08 00 00 56 08 01 00 74 01 00 00 48 01 00 00 

body:
0F 00 5A 20 00 00 1F 69 6D 67 3A 2F 2F 2F 55 49 4C 69 62 72 61 72 79 5F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2E 53 63 69 65 6E 63 65 49 63 6F 6E 73 2E 00 05 5C 20 00 00 00 00 5C 20 00 00 0A 73 00 26 04 70 00 5A 20 00 00 1F 49 43 5F 49 6E 74 65 72 72 6F 67 61 74 65 53 65 63 74 6F 69 64 00 16 0A 9C 00 2C 02 04 70 00 5A 20 00 00 1F 49 43 5F 49 6E 74 65 72 72 6F 67 61 74 65 4F 75 74 73 69 64 65 72 00 16 0A C2 00 2C 03 04 70 00 5A 20 00 00 1F 49 43 5F 53 74 65 61 6C 74 68 53 61 74 65 6C 6C 69 74 65 00 16 0A E1 00 2C 04 04 70 00 5A 20 00 00 1F 49 43 5F 41 6C 69 65 6E 42 61 73 65 00 16 0A 0D 01 2C 05 04 70 00 5A 20 00 00 1F 49 43 5F 48 79 70 65 72 77 61 76 65 43 6F 6D 6D 75 6E 69 63 61 74 69 6F 6E 00 16 0A 2E 01 2C 06 04 70 00 5A 20 00 00 1F 49 43 5F 55 46 4F 54 72 61 63 6B 69 6E 67 00 16 0A 4B 01 2C 07 04 70 00 5A 20 00 00 1F 49 43 5F 50 73 69 4C 69 6E 6B 00 16 0A 6A 01 2C 08 04 70 00 5A 20 00 00 1F 49 43 5F 55 46 4F 46 6C 69 67 68 74 00 16 0A FF FF 04 1F 00 0B 0B 0B 53 	


-----------------------------------


XGDebriefUI.UpdateCouncilDebrief // on returning from mission, display country in debrief instead of continent (which is blank)

original hex:
07 CA 06 9A 38 3A 35 5B 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 38 3A 24 06 16 0F 00 65 26 00 00 1B 23 06 00 00 00 00 00 00 35 53 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 16 0F 19 00 60 26 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 19 00 65 26 00 00 0A 00 9E 23 00 00 00 1B A3 0F 00 00 00 00 00 00 16 07 8C 06 2D 35 52 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 0F 00 61 26 00 00 12 20 8C FE FF FF 1C 00 08 FA FF FF 00 1B 3A 0D 00 00 00 00 00 00 01 12 26 00 00 00 60 26 00 00 16 06 C7 06 0F 00 61 26 00 00 12 20 8C FE FF FF 1C 00 08 FA FF FF 00 1B 3A 0D 00 00 00 00 00 00 01 11 26 00 00 00 60 26 00 00 16 06 1C 09 


new hex:
07 CA 06 9A 38 3A 35 5B 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 38 3A 24 06 16 0F 19 00 60 26 00 00 09 00 EF F9 FF FF 00 01 EF F9 FF FF 19 1B 45 06 00 00 00 00 00 00 35 54 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 16 0B 00 5B 24 00 00 00 1B A6 0F 00 00 00 00 00 00 27 16 07 7A 06 2D 35 52 03 00 00 5C 03 00 00 00 00 19 00 59 26 00 00 09 00 A3 32 00 00 00 01 A3 32 00 00 0F 00 61 26 00 00 12 20 8C FE FF FF 1C 00 08 FA FF FF 00 1B 3A 0D 00 00 00 00 00 00 01 12 26 00 00 00 60 26 00 00 16 06 C7 06 0F 00 61 26 00 00 12 20 8C FE FF FF 1C 00 08 FA FF FF 00 1B 3A 0D 00 00 00 00 00 00 01 11 26 00 00 00 60 26 00 00 16 00 60 26 00 00 00 60 26 00 00 06 1C 09 

------------------------------------

XGDebriefUI.CheckForMatinee  // prevent cinematic and objective updating except for first alien base mission, prevent destruction of skeleton key

original hex:
07 D7 01 97 10 2C B4 19 1B 5C 11 00 00 00 00 00 00 16 09 00 A2 32 00 00 00 01 A2 32 00 00 25 16 19 1B 12 22 00 00 00 00 00 00 16 29 00 66 FF FF FF 00 1B 27 2B 00 00 00 00 00 00 20 7D 48 00 00 4A 43 FA 21 00 00 00 00 00 00 00 00 00 00 4A 4A 4A 4A 16 19 1B 23 27 00 00 00 00 00 00 16 0D 00 00 00 00 00 00 1B B0 22 00 00 00 00 00 00 2C C0 4A 16 1B CE 26 00 00 00 00 00 00 24 44 19 1B 4C 0E 00 00 00 00 00 00 16 0A 00 82 41 00 00 00 1B F2 0E 00 00 00 00 00 00 16 16 14 2D 01 2C 26 00 00 27 04 27 

new hex:
07 D7 01 82 97 10 2C B4 19 1B 5C 11 00 00 00 00 00 00 16 09 00 A2 32 00 00 00 01 A2 32 00 00 25 16 18 26 00 9A 38 3A 19 1B DE 1F 00 00 00 00 00 00 16 09 00 E1 38 00 00 00 01 E1 38 00 00 2C 04 16 16 19 1B 12 22 00 00 00 00 00 00 16 29 00 66 FF FF FF 00 1B 27 2B 00 00 00 00 00 00 20 7D 48 00 00 4A 43 FA 21 00 00 00 00 00 00 00 00 00 00 4A 4A 4A 4A 16 1B CE 26 00 00 00 00 00 00 24 44 1B CA 26 00 00 00 00 00 00 26 16 16 14 2D 01 2C 26 00 00 27 04 27 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

------------------------------------


XComStrategyGame.int  // New Localization Entry for subobjective 7

placed after SubObjectiveNames[eSubObj_ResearchShard]="Research the Outsider Shard"

SubObjectiveNames[eSubObj_ObtainShards] ="Launch a satellite over an occupied country"

placed after SubObjectiveInDepth[eSubObj_ResearchShard]

SubObjectiveInDepth[eSubObj_ObtainShards]="To find one of the alien bases, we'll need eyes in the sky. We should launch a satellite over an alien-occupied country so that we can do a detailed search."


Change and use objective 3

change:
GameObjectiveNames[eObj_ObtainShards]="Obtain More Outsider shards."

to:
GameObjectiveNames[eObj_ObtainShards]="Recon an Occupied Country"


Update Alien Base debrief localization text:
change:
m_strAlienBaseFeedback="XCOM successfully infiltrated and eliminated the alien base in <XGParam:StrValue0/>!"

to:
m_strAlienBaseFeedback="XCOM successfully infiltrated and eliminated the alien base in <XGParam:StrValue0/>, which has now rejoined the XCOM Project."


Localization Change:
change:
m_strTitle="Alien Base Assault"

to:
m_strTitle="Assault Base: " 

 

 

 

This has 27 separate hex changes required, and also includes related localization changes.

My original mods I didn't have such a file but later I started creating them to help me keep track of all of the changes.

Link to comment
Share on other sites

So I've got a Java tool that can now read and parse two upk files, as well as open and parse a modfile in a format like:

 

 

// sample comment

/* more 
sample
comments */

UPKFILE=XComGame.upk
FUNCTION=AddStatModifiers.XGUnit

[BEFORE_HEX] // hex from EU patch 4
//final 2 words of header (function memory/file size)
A6 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15  

//iStat = 0
0F ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 {{ 39 B7 00 00 }} 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 {{ 39 B7 00 00 }} 16 

	// break
	06 10 00 

// if(kAbility != none)
07 A3 02 77 00 {{ 3A B7 00 00 }} 2A 16 

	// switch(kAbility.GetType())
	05 {{ 1C 7C 00 00 }} 00 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 

		// case 76:
		0A 72 01 2C 4C 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CalcXP(kAbility.m_kUnit, 11, self))
			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 93 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 19 19 2E {{ FE 2C 00 00 }} 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 {{ F0 2C 00 00 }} 00 01 {{ F0 2C 00 00 }} 2B 00 {{ A3 76 00 00 }} 00 1B {{ F3 0E 00 00 }} 00 00 00 00 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 2C 0B 17 16 16 

			// break
			06 A3 02 

		// case 72:
		0A 56 02 2C 48 

			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 93 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 19 19 2E {{ FE 2C 00 00 }} 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 {{ F0 2C 00 00 }} 00 01 {{ F0 2C 00 00 }} 2B 00 {{ A3 76 00 00 }} 00 1B {{ F3 0E 00 00 }} 00 00 00 00 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 2C 0A 17 16 16 

			// break
			06 A3 02 

		// case 74:
		0A 68 02 2C 4A 

			// CreateTelekineticFieldVolume()
			1B {{ 6B 13 00 00 }} 00 00 00 00 16 

			// break
			06 A3 02 

		// case 41:
		0A 70 02 2C 29 

			// break
			06 A3 02 

		// case 88:
		0A A0 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E {{ CF 37 00 00 }} 01 {{ 09 31 00 00 }} 0A 00 00 00 00 00 00 1B {{ F3 03 00 00 }} 00 00 00 00 16 

			// break
			06 A3 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53 	
[/BEFORE_HEX]


[AFTER_HEX]
//final 2 words of header (function memory/file size)
7A 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15  

//iStat = 0
0F ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 {{ 39 B7 00 00 }} 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 {{ 39 B7 00 00 }} 16 

	// goto J0x10
	06 10 00 

// if(kAbility != none)
07 77 02 77 00 {{ 3A B7 00 00 }} 2A 16 

	// switch(kAbility.GetType())
	05 1C 7C 00 00 00 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 

		// case 76:
		0A 93 00 2C 4C 

		// case 72:
		0A 1A 01 2C 48 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(((kAbility.GetType() == 72) ? 20 : 30))
			19 2E {{ B4 A3 00 00 }} 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 36 00 00 00 00 00 00 1B {{ 3F 02 00 00 }} 00 00 00 00 45 9A 19 00 {{ 3A B7 00 00 }} 0A 00 {{ 1C 7C 00 00 }} 00 1B {{ 1E 35 00 00 }} 00 00 00 00 16 2C 48 16 02 00 2C 14 02 00 2C 1E 16 

			// break
			06 77 02 

		// case 74:
		0A 2C 01 2C 4A 

			// CreateTelekineticFieldVolume()
			1B {{ 6B 13 00 00 }} 00 00 00 00 16 

			// break
			06 77 02 

		// case 41:
		0A 44 02 2C 29 

			// m_aCurrentStats[0] -= aStatModifiers[0]
			A2 1A 25 01 {{ 0D 31 00 00 }} 1A 25 00 {{ 3B B7 00 00 }} 16 

			// if(kAbility.m_kUnit.IsInFront(none, float(83)))
			07 EF 01 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0F 00 {{ 8B B1 00 00 }} 00 1B {{ 99 3D 00 00 }} 00 00 00 00 2A 38 3F 2C 53 16 

				// HealBy(2)
				1B {{ D8 36 00 00 }} 00 00 00 00 2C 02 16 

			// if(kAbility.m_kUnit.GetCharacter().HasUpgrade(55))
			07 EC 01 19 19 19 00 {{ 3A B7 00 00 }} 09 00 {{ E6 7B 00 00 }} 00 01 {{ E6 7B 00 00 }} 0A 00 {{ 63 B4 00 00 }} 00 1B {{ 7B 31 00 00 }} 00 00 00 00 16 0C 00 {{ EA A2 00 00 }} 00 1B {{ B8 36 00 00 }} 00 00 00 00 2C 37 16 

				// HealBy(2)
				1B {{ D8 36 00 00 }} 00 00 00 00 2C 02 16 

			// break
			06 04 02 

			// HealBy(aStatModifiers[0])
			1B {{ D8 36 00 00 }} 00 00 00 00 1A 25 00 {{ 3B B7 00 00 }} 16 

			// null-ops
			00 {{ 39 B7 00 00 }} 00 {{ 39 B7 00 00 }} 00 {{ 39 B7 00 00 }} 00 {{ 39 B7 00 00 }} 00 {{ 39 B7 00 00 }} 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

			// break
			06 77 02 

		// case 88:
		0A 74 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E {{ CF 37 00 00 }} 01 {{ 09 31 00 00 }} 0A 00 00 00 00 00 00 1B {{ F3 03 00 00 }} 00 00 00 00 16 

		// break
		06 77 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53

[/AFTER_HEX] 

 

 

 

The above hex references are all for EU patch 4.

 

The output of my (still work-in-progress) tool is :

 

 

UPKFILE=XComGame.upk
FUNCTION=AddStatModifiers.XGUnit
[BEFORE_HEX]
A6 02 00 00 DE 01 00 00 49 02 00 2A 15 0F 00 4A B7 00 00 25 07 56 00 96 00 4A B7 00 00 2C 13 16 A1 1A 00 4A B7 00 00 01 0D 31 00 00 1A 00 4A B7 00 00 00 4C B7 00 00 16 A5 00 4A B7 00 00 16 06 10 00 07 A3 02 77 00 4B B7 00 00 2A 16 05 29 7C 00 00 00 19 00 4B B7 00 00 0A 00 29 7C 00 00 00 1B 22 35 00 00 00 00 00 00 16 0A 72 01 2C 4C 19 2E C4 A3 00 00 19 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 0A 00 73 B4 00 00 00 1B 7F 31 00 00 00 00 00 00 16 93 00 00 00 00 00 00 1B 3F 02 00 00 00 00 00 00 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 2B 00 B0 76 00 00 00 1B F6 0E 00 00 00 00 00 00 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 2C 0B 17 16 16 06 A3 02 0A 56 02 2C 48 19 2E C4 A3 00 00 19 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 0A 00 73 B4 00 00 00 1B 7F 31 00 00 00 00 00 00 16 93 00 00 00 00 00 00 1B 3F 02 00 00 00 00 00 00 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 2B 00 B0 76 00 00 00 1B F6 0E 00 00 00 00 00 00 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 2C 0A 17 16 16 06 A3 02 0A 68 02 2C 4A 1B 6E 13 00 00 00 00 00 00 16 06 A3 02 0A 70 02 2C 29 06 A3 02 0A A0 02 2C 58 19 2E CE 37 00 00 01 09 31 00 00 0A 00 00 00 00 00 00 1B F3 03 00 00 00 00 00 00 16 06 A3 02 0A FF FF 04 0B 53 
[/BEFORE_HEX]

[AFTER_HEX]
7A 02 00 00 DE 01 00 00 49 02 00 2A 15 0F 00 4A B7 00 00 25 07 56 00 96 00 4A B7 00 00 2C 13 16 A1 1A 00 4A B7 00 00 01 0D 31 00 00 1A 00 4A B7 00 00 00 4C B7 00 00 16 A5 00 4A B7 00 00 16 06 10 00 07 77 02 77 00 4B B7 00 00 2A 16 05 1C 7C 00 00 00 19 00 4B B7 00 00 0A 00 29 7C 00 00 00 1B 22 35 00 00 00 00 00 00 16 0A 93 00 2C 4C 0A 1A 01 2C 48 19 2E C4 A3 00 00 19 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 0A 00 73 B4 00 00 00 1B 7F 31 00 00 00 00 00 00 16 36 00 00 00 00 00 00 1B 3F 02 00 00 00 00 00 00 45 9A 19 00 4B B7 00 00 0A 00 29 7C 00 00 00 1B 22 35 00 00 00 00 00 00 16 2C 48 16 02 00 2C 14 02 00 2C 1E 16 06 77 02 0A 2C 01 2C 4A 1B 6E 13 00 00 00 00 00 00 16 06 77 02 0A 44 02 2C 29 A2 1A 25 01 0D 31 00 00 1A 25 00 4C B7 00 00 16 07 EF 01 19 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 0F 00 9B B1 00 00 00 1B 9D 3D 00 00 00 00 00 00 2A 38 3F 2C 53 16 1B DC 36 00 00 00 00 00 00 2C 02 16 07 EC 01 19 19 19 00 4B B7 00 00 09 00 F3 7B 00 00 00 01 F3 7B 00 00 0A 00 73 B4 00 00 00 1B 7F 31 00 00 00 00 00 00 16 0C 00 FA A2 00 00 00 1B BC 36 00 00 00 00 00 00 2C 37 16 1B DC 36 00 00 00 00 00 00 2C 02 16 06 04 02 1B DC 36 00 00 00 00 00 00 1A 25 00 4C B7 00 00 16 00 4A B7 00 00 00 4A B7 00 00 00 4A B7 00 00 00 4A B7 00 00 00 4A B7 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 06 77 02 0A 74 02 2C 58 19 2E CE 37 00 00 01 09 31 00 00 0A 00 00 00 00 00 00 1B F3 03 00 00 00 00 00 00 16 06 77 02 0A FF FF 04 0B 53 
[/AFTER_HEX]

 

 

 

Basically creating before/after replacement hex blocks with all reference-related tags/formatting stripped out. I've verified that the above search and replace is valid in patch 5 EU.

 

At this point I'm wondering which is the better alternative:

  1. Use the more verbose form as the release form of a mod
  2. Use this purely as a mod development tool and release XCom patch-specific hex changes
Link to comment
Share on other sites

As long as the mod installer can parse the verbose format, I would think that to be preferable. Primarily for those who want to tweak something: the verbose format makes each hex byte understandable in context.

 

But perhaps releasing another tool to strip the verbose format into pure hex would be feasible, assuming there is demand due to mod patch size or author wanting to discourage tweaking?

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

For my next mutant version of my proto-tool I've got a version that will automatically update tagged references with appropriate tagged string-names.

 

For example the my sample modfile has been turned into:

 

 

/* more 
sample 
comments */ 

UPKFILE=XComGame.upk 
FUNCTION=AddStatModifiers.XGUnit 

[BEFORE_HEX] // hex from EU patch 4
//final 2 words of header (function memory/file size)
A6 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15 

//iStat = 0
0F 00 ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 ||iStat.AddStatModifiers.XGUnit|| 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A 00 ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 ||iStat.AddStatModifiers.XGUnit|| 16 

	// break
	06 10 00 

// if(kAbility != none)
07 A3 02 77 00 ||kAbility.AddStatModifiers.XGUnit|| 2A 16 

	// switch(kAbility.GetType())
	05 ||ReturnValue.GetType.XGAbility|| 00 19 00 ||kAbility.AddStatModifiers.XGUnit|| 0A 00 ||ReturnValue.GetType.XGAbility|| 00 1B ||GetType|| 00 00 00 00 16 

		// case 76:
		0A 72 01 2C 4C 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CalcXP(kAbility.m_kUnit, 11, self))
			19 2E ||XGCharacter_Soldier|| 19 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 0A 00 ||ReturnValue.GetCharacter.XGUnit|| 00 1B ||GetCharacter|| 00 00 00 00 16 93 00 00 00 00 00 00 1B ||AddPsiXP|| 00 00 00 00 19 19 2E ||XComGameReplicationInfo|| 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 ||m_kGameCore.XComGameReplicationInfo|| 00 01 ||m_kGameCore.XComGameReplicationInfo|| 2B 00 ||ReturnValue.CalcXP.XGTacticalGameCore|| 00 1B ||CalcXP|| 00 00 00 00 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 2C 0B 17 16 16 

			// break
			06 A3 02 

		// case 72:
		0A 56 02 2C 48 

			19 2E ||XGCharacter_Soldier|| 19 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 0A 00 ||ReturnValue.GetCharacter.XGUnit|| 00 1B ||GetCharacter|| 00 00 00 00 16 93 00 00 00 00 00 00 1B ||AddPsiXP|| 00 00 00 00 19 19 2E ||XComGameReplicationInfo|| 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 ||m_kGameCore.XComGameReplicationInfo|| 00 01 ||m_kGameCore.XComGameReplicationInfo|| 2B 00 ||ReturnValue.CalcXP.XGTacticalGameCore|| 00 1B ||CalcXP|| 00 00 00 00 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 2C 0A 17 16 16 

			// break
			06 A3 02 

		// case 74:
		0A 68 02 2C 4A 

			// CreateTelekineticFieldVolume()
			1B ||CreateTelekineticFieldVolume|| 00 00 00 00 16 

			// break
			06 A3 02 

		// case 41:
		0A 70 02 2C 29 

			// break
			06 A3 02 

		// case 88:
		0A A0 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E ||XComUnitPawn|| 01 ||m_kPawn.XGUnitNativeBase|| 0A 00 00 00 00 00 00 1B ||ApplyBloodCall|| 00 00 00 00 16 

			// break
			06 A3 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53 
[/BEFORE_HEX] 


[AFTER_HEX] 
//final 2 words of header (function memory/file size)
7A 02 00 00 DE 01 00 00 

// body
//kAbility = none
49 02 00 2A 15 

//iStat = 0
0F 00 ||iStat.AddStatModifiers.XGUnit|| 25 // example of reference-naming

//if(iStat < 19)
07 56 00 96 00 ||iStat.AddStatModifiers.XGUnit|| 2C 13 16 // example of reference-marking 

	//m_aCurrentStats[iStat] += aStatModifiers[iStat]
	A1 1A 00 ||iStat.AddStatModifiers.XGUnit|| 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

	//++ iStat
	A5 00 ||iStat.AddStatModifiers.XGUnit|| 16 

	// goto J0x10
	06 10 00 

// if(kAbility != none)
07 77 02 77 00 ||kAbility.AddStatModifiers.XGUnit|| 2A 16 

	// switch(kAbility.GetType())
	05 1C 7C 00 00 00 19 00 ||kAbility.AddStatModifiers.XGUnit|| 0A 00 ||ReturnValue.GetType.XGAbility|| 00 1B ||GetType|| 00 00 00 00 16 

		// case 76:
		0A 93 00 2C 4C 

		// case 72:
		0A 1A 01 2C 48 

			// XGCharacter_Soldier(kAbility.m_kUnit.GetCharacter()).AddPsiXP(((kAbility.GetType() == 72) ? 20 : 30))
			19 2E ||XGCharacter_Soldier|| 19 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 0A 00 ||ReturnValue.GetCharacter.XGUnit|| 00 1B ||GetCharacter|| 00 00 00 00 16 36 00 00 00 00 00 00 1B ||AddPsiXP|| 00 00 00 00 45 9A 19 00 ||kAbility.AddStatModifiers.XGUnit|| 0A 00 ||ReturnValue.GetType.XGAbility|| 00 1B ||GetType|| 00 00 00 00 16 2C 48 16 02 00 2C 14 02 00 2C 1E 16 

			// break
			06 77 02 

		// case 74:
		0A 2C 01 2C 4A 

			// CreateTelekineticFieldVolume()
			1B ||CreateTelekineticFieldVolume|| 00 00 00 00 16 

			// break
			06 77 02 

		// case 41:
		0A 44 02 2C 29 

			// m_aCurrentStats[0] -= aStatModifiers[0]
			A2 1A 25 01 ||m_aCurrentStats.XGUnitNativeBase|| 1A 25 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

			// if(kAbility.m_kUnit.IsInFront(none, float(83)))
			07 EF 01 19 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 0F 00 ||ReturnValue.IsInFront.XGUnit|| 00 1B ||IsInFront|| 00 00 00 00 2A 38 3F 2C 53 16 

				// HealBy(2)
				1B ||HealBy|| 00 00 00 00 2C 02 16 

			// if(kAbility.m_kUnit.GetCharacter().HasUpgrade(55))
			07 EC 01 19 19 19 00 ||kAbility.AddStatModifiers.XGUnit|| 09 00 ||m_kUnit.XGAbility|| 00 01 ||m_kUnit.XGAbility|| 0A 00 ||ReturnValue.GetCharacter.XGUnit|| 00 1B ||GetCharacter|| 00 00 00 00 16 0C 00 ||ReturnValue.HasUpgrade.XGCharacter|| 00 1B ||HasUpgrade|| 00 00 00 00 2C 37 16 

				// HealBy(2)
				1B ||HealBy|| 00 00 00 00 2C 02 16 

			// break
			06 04 02 

			// HealBy(aStatModifiers[0])
			1B ||HealBy|| 00 00 00 00 1A 25 00 ||aStatModifiers.AddStatModifiers.XGUnit|| 16 

			// null-ops
			00 ||iStat.AddStatModifiers.XGUnit|| 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||iStat.AddStatModifiers.XGUnit|| 00 ||iStat.AddStatModifiers.XGUnit|| 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 

			// break
			06 77 02 

		// case 88:
		0A 74 02 2C 58 

			// XComUnitPawn(m_kPawn).ApplyBloodCall()
			19 2E ||XComUnitPawn|| 01 ||m_kPawn.XGUnitNativeBase|| 0A 00 00 00 00 00 00 1B ||ApplyBloodCall|| 00 00 00 00 16 

		// break
		06 77 02 

		// default:
		0A FF FF 

// return
04 0B 

// EOS
53 

[/AFTER_HEX] 
BUILD SUCCESSFUL (total time: 1 second) 

 

 

 

Notice that there are some seemingly inconsistent cases such as the line:

// XComUnitPawn(m_kPawn).ApplyBloodCall()
19 2E ||XComUnitPawn|| 01 ||m_kPawn.XGUnitNativeBase|| 0A 00 00 00 00 00 00 1B ||ApplyBloodCall|| 00 00 00 00 16 
  • XComUnitPawn is a singleton because it is an object reference to a class, so has no owner
  • m_kPawn is owned by XGUnitNativeBase, which is the parent of XGUnit
  • ApplyBloodCall needs no owner reference because it is a virtual function reference

All virtual functions with the same stringname have the same 4-byte hex reference, even if they are in different classes. I totally didn't realize this until working on this project, but have confirmed that it is so.

 

 

--------------------------

 

I think the next step I'm going to work on is trying to automate the marking of the references. If I use the line-by-line hex code together with the extended token view info from UE Explorer it might be possible.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...