Jump to content

R&D - New Modding Tools


Amineri

Recommended Posts

Upon doing some more testing I've found that some of the "odd" references (such as F6 FB FF FF) have changed from EU patch 4 to EW release.

 

These are showing up in statement such as (in EU patch 4):

// if(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.false)
07 45 03 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 01 00 F0 2C 00 00 00 28 

I'm thinking it likely that they are some form of export table reference or a static reference of some sort, but currently I haven't figure out where they are defined or how to update them.

 

For EW release the same code was represented as:

if(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.false)
07 45 03 19 19 2E 2D 32 00 00 19 12 20 36 FE FF FF 0A 00 9E F9 FF FF 00 1C DE FB FF FF 16 09 00 5C F9 FF FF 00 01 5C F9 FF FF 09 00 1F 32 00 00 00 01 1F 32 00 00 01 00 1F 32 00 00 00 28

Updates I can't automate were:

  • F4 FE FF FF => 36 FE FF FF
  • D8 F9 FF FF => 9E F9 FF FF
  • F6 FB FF FF => DE FB FF FF
  • 98 F9 FF FF => 5C F9 FF FF

All of the other references I was able correctly updated in an automated fashion.

Link to comment
Share on other sites

  • Replies 211
  • Created
  • Last Reply

Top Posters In This Topic

Those are import references. Import references are negative values. Import table offset-size info is next to export table offset-size info. Header info for XCSG:

Package signature: 0x9e2a83c1
Package version: 0x34d (845)
License version: 0x40 (64)
Header size: 0x1fb148 (2077000)
Folder name length: 0x5 (5)
Folder name: None
Package flags: 0x24a80009
Name count: 0x35a3 (13731)
Name offset: 0x81
Export count: 0x57ac (22444)
Export offset: 0x708dc
Import count: 0x73c (1852)
Import offset: 0x63e4c
Link to comment
Share on other sites

That matches what I've found.

 

It looks like each import table entry is 7 words long:

word 0) package identifier (appears to be namelist index)

word 1) zero

word 2) type

word 3) zero

word 4) owner/outer reference (appears to be import table index)

word 5) name (appears to be namelist index)

word 6) zero

 

I'm thinking that to create a unique string for matching from one version to another that

package:name.owner.owner ...

would work.

Link to comment
Share on other sites

Those are import references. Import references are negative values. Import table offset-size info is next to export table offset-size info. Header info for XCSG:

Package signature: 0x9e2a83c1
Package version: 0x34d (845)
License version: 0x40 (64)
Header size: 0x1fb148 (2077000)
Folder name length: 0x5 (5)
Folder name: None
Package flags: 0x24a80009
Name count: 0x35a3 (13731)
Name offset: 0x81
Export count: 0x57ac (22444)
Export offset: 0x708dc
Import count: 0x73c (1852)
Import offset: 0x63e4c

 

Unfortunately the Package and License version appear to be related to the version of the Unreal Engine and not the upk.

 

However there is a 16-byte GUID in the header located at position 0x45 - 0x54:

For XComStrategyGame.upk:
EU patch 4 : 305046a8-486f-4284-ac1a-72b68d2e6d23  / A8 46 50 30 6F 48 84 42 AC 1A 72 B6 8D 2E 6D 23
EU patch 5 : f133ee1d-8866-49fb-b172-934401bc8539   / 1D EE 33 F1 66 88 FB 49 B1 72 93 44 01 BC 85 39
EW release : 1070f89c-3821-41a0-8b33-a42ee8712300  / 9C F8 70 10 21 38 A0 41 8B 33 A4 2E E8 71 23 00
 
For XComGame.upk:
EU patch 4 : 6a292e33-dda5-40fc-b5cc-57a5a7aa8c41  / 33 2E 29 6A A5 DD FC 40 B5 CC 57 A5 A7 AA 8C 41
EU patch 5 : 29ebe901-f423-4fdb-a82b-8e46a725e5d6  / 01 E9 EB 29 23 F4 DB 4F A8 2B 8E 46 A7 25 E5 D6
EW release : e4d81ab1-2948-43fc-8ec0-7ab0a33e349f / B1 1A D8 E4 48 29 FC 43 8E C0 7A B0 A3 3E 34 9F
 
The first value is how UE Explorer displays the GUID; the second value is how it appears in the upk, at location file position 0x45 - 0x54.

Am thinking of adding the GUID as a tag to the upk_mod file specification so that it is clear what upk hex code is referencing.

Link to comment
Share on other sites

Unsurprisingly, some of the assumptions I've made have turned out to be false.

 

I've just realized that the first entry in the "objectlist" (which is really the Export Table, per UE Explorer) does indeed define the type of the object (e.g. function, integer, etc), but not in a static way.

 

Instead it is an index into the Import Table. This means that what value maps to a function is consistent within a particular upk but may vary between different upks.

 

For instance:

XComGame.upk (EW release) function is -387

XComGame.upk (EU patch 4) function is -360

XComStrategyGame.upk (EW release) function is -279

XComStrategyGame.upk (EU patch 4) function is -232

 

Similar changes are seen for all of the type definitions.

So, it's possible to change the type of a variable but the value necessary to do so changes between upks and versions.

Link to comment
Share on other sites

I can't seem to get program to work. :sad:

 

I type

XCOMMod_Tool.bat -v -t -i test.txt -o test2.txt
it successfully reads data from UPKs then outputs

Read 199 opcodes.
Found file: test.txt
and then... nothing. No output file is generated. test.txt is sample_modfile_no_refs.txt renamed.
Link to comment
Share on other sites

Sorry about that. I've been struggling to wrap some usable interface code around the algorithms, and haven't been doing very well. I'm thinking that the commandline interface is just too cumbersome to work well.

 

Fortunately XMarksTheSpot has volunteered to work on this with me. This is good since I'm a pretty novice Java programmer :).

 

The goal now is to ditch the commandline interface and build a GUI which will be much more usable. Unfortunately my prototype convolved a lot of the I/O operations with the parsing so we're in the process of refactoring things so that parsing of data doesn't have to happen on files -- instead it will be possible to parse data that is in the built-in text editor.

 

There's a Google Code repository set up which I'll give out once the code is in some form of reasonably usable state.

 

Apologies all the delays on this ... hopefully it will be worth it in the end :D

Link to comment
Share on other sites

Some progress finally :smile:.

 

The modfile parsing has been refactored and separated from the file I/O, so hopefully it should be pretty straightforward to run the results into the built-in text editor that XMarksTheSpot has been working on.

 

I've also got the reference marker updated to handle a ModFile stream. I've made a small change in that I now mark the Virtual Function (1B token) references with << ... >> . All of these references are indices to the namelist. The {{ ... }} reference marking is now exclusively for objectlist+importlist references. Yes, importlist references are now marked. This should make updating references generally simpler and easier to visualize.

 

I've also have my first version of a memory size calculator working, also can be applied to a stream of ModFile data. (Probably not in a technical sense but effectively it is ^_^).

 

Here is some output from my sample which has updates to 3 different functions.

 

First is the marking of all references:

 

 

  0:  /*
  1:    Increase max pod size Mod
  2:    Author: Amineri 
  3:    Upks altered : XComGame.upk
  4:    Functions altered :
  5:  				XGBattleDesc.InitAlienLoadoutInfos
  6:  				GetPodCharArray.XComAlienPodManager
  7:  				OvermindSpawn.XComAlienPodManager
  8:  */ 
  9:  
 10:  
 11:  UPKFILE=XComGame.upk 
 12:  FUNCTION=InitAlienLoadoutInfos.XGBattleDesc
 13:  GUID=33 2E 29 6A A5 DD FC 40 B5 CC 57 A5 A7 AA 8C 41 // EU patch 4
 14:  [BEFORE_HEX]
 15:  // last 2 words of header
 16:  [HEADER]
 17:  CC 04 00 00 18 03 00 00 
 18:  [/HEADER] 
 19:  
 20:  // PlayerIndex = 0;
 21:  0F 00 {{ 10 A0 00 00 }} 25 
 22:  
 23:  // if(PlayerIndex < 4)
 24:  07 C9 04 96 00 {{ 10 A0 00 00 }} 2C 04 16 
 25:  
 26:  	// if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 16)
 27:  	07 51 00 9A 38 3A 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 38 3A 24 10 16 
 28:  
 29:  		// return nothing
 30:  		04 0B 
 31:  
 32:  	// else
 33:  	06 BB 04 
 34:  
 35:  		// if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 0)
 36:  		07 BB 04 9A 38 3A 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 38 3A 24 00 16 
 37:  
 38:  			// m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam = 16;
 39:  			0F 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 01 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 24 10 
 40:  
 41:  			// if(!m_bUseAlienInfo)
 42:  			07 BF 03 81 2D 01 {{ A3 9F 00 00 }} 16 
 43:  
 44:  				// iAlienPods = 0;
 45:  				0F 00 {{ 0F A0 00 00 }} 25 
 46:  
 47:  				// if(iAlienPods < m_kAlienSquad.arrPods.Length)
 48:  				07 BC 03 96 00 {{ 0F A0 00 00 }} 36 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 
 49:  
 50:  					// if(m_kAlienSquad.arrPods[iAlienPods].eMain != 0)
 51:  					07 DA 01 9B 38 3A 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 38 3A 24 00 16 
 52:  
 53:  						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eMain, m_kAlienSquad.arrPods[iAlienPods].eMainAltWeapon));
 54:  						55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 35 {{ 33 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 16 
 55:  
 56:  					// if(m_kAlienSquad.arrPods[iAlienPods].eSupport1 != 0)
 57:  					07 C4 02 9B 38 3A 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 38 3A 24 00 16 
 58:  
 59:  						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport1, m_kAlienSquad.arrPods[iAlienPods].eSupport1AltWeapon));
 60:  						55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 35 {{ 32 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 16 
 61:  
 62:  					// if(m_kAlienSquad.arrPods[iAlienPods].eSupport2 != 0)
 63:  					07 AE 03 9B 38 3A 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 38 3A 24 00 16 
 64:  
 65:  						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport2, m_kAlienSquad.arrPods[iAlienPods].eSupport2AltWeapon));
 66:  						55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 35 {{ 31 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 16 
 67:  
 68:  					// ++ iAlienPods;
 69:  					A5 00 {{ 0F A0 00 00 }} 16 
 70:  
 71:  					// goto J0xC5;  // [Loop Continue]
 72:  					06 C5 00 
 73:  
 74:  			// else
 75:  			06 B8 04 
 76:  
 77:  				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodLeaderType)));
 78:  				55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 8C 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
 79:  
 80:  				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodSupporterType)));
 81:  				55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 8B 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
 82:  
 83:  				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iRoamingType)));
 84:  				55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 88 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
 85:  
 86:  			// goto J0x4C9;  // [Explicit Break]
 87:  			06 C9 04 
 88:  
 89:  	// ++ PlayerIndex;
 90:  	A3 00 {{ 10 A0 00 00 }} 16 
 91:  
 92:  	// goto J0x0B; // [Loop Continue]
 93:  	06 0B 00 
 94:  
 95:  // return nothing  
 96:  04 0B 
 97:  
 98:  // endofscript
 99:  53 
100:  [/BEFORE_HEX]
101:  
102:  
103:  [AFTER_HEX]
104:  // last 2 words of header
105:  [HEADER]
106:  A8 04 00 00 18 03 00 00
107:  [/HEADER]
108:  
109:  // PlayerIndex = 0;
110:  0F 00 {{ 10 A0 00 00 }} 25 
111:  
112:  // if(PlayerIndex < 4)
113:  07 89 04 96 00 {{ 10 A0 00 00 }} 2C 04 16 
114:  
115:      // if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 16)
116:  07 51 00 9A 38 3A 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 38 3A 24 10 16 
117:  
118:          // return nothing
119:  04 0B 
120:  
121:      // else
122:  06 7B 04 
123:  
124:          // if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 0)
125:  07 7B 04 9A 38 3A 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 38 3A 24 00 16 
126:  
127:              // m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam = 16;
128:  0F 35 {{ 96 9F 00 00 }} {{ 98 9F 00 00 }} 00 01 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 24 10 
129:  
130:              // if(!m_bUseAlienInfo)
131:  07 7F 03 81 2D 01 {{ A3 9F 00 00 }} 16 
132:  
133:                  // iAlienPods = 0;
134:  0F 00 {{ 0F A0 00 00 }} 25 
135:  
136:                  // if(iAlienPods < m_kAlienSquad.arrPods.Length)
137:  07 7C 03 96 00 {{ 0F A0 00 00 }} 36 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 
138:  
139:  					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eMain;  m_iLowestDifficulty : 01 B1 9F 00 00    int-to-byte : 38 3D
140:  					0F 01 {{ B1 9F 00 00 }} 38 3A 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 
141:  					
142:  					// if(m_iLowestDifficulty > 0)
143:  					07 84 01 97 01 {{ B1 9F 00 00 }} 25 16 
144:  					
145:  						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
146:  						55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 01 {{ B1 9F 00 00 }} 25 16 16 
147:  						
148:  					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eSupport1;
149:  					0F 01 {{ B1 9F 00 00 }} 38 3A 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 
150:  					
151:  					// if(m_iLowestDifficulty > 0)
152:  					07 79 02 97 01 {{ B1 9F 00 00 }} 25 16 
153:  
154:  						// local variable Index, stolen from another function: 00 68 A0 00 00
155:  						// Index = 0;
156:  						0F 00 {{ 68 A0 00 00 }} 25 
157:  						
158:  						// if(Index <= m_kAlienSquad.arrPods[iAlienPods].eSupport1AltWeapon)
159:  						07 79 02 98 00 {{ 68 A0 00 00 }} 35 {{ 32 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 
160:  
161:                              // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
162:  55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 01 {{ B1 9F 00 00 }} 24 00 16 16 
163:  							
164:  							// ++ Index;
165:  							A5 00 {{ 68 A0 00 00 }} 16 
166:  							
167:  							// goto // while loop continue
168:  							06 E3 01 
169:  
170:  					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eSupport2;
171:  					0F 01 {{ B1 9F 00 00 }} 38 3A 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 
172:  					
173:  					// if(m_iLowestDifficulty > 0)
174:  					07 6E 03 97 01 {{ B1 9F 00 00 }} 25 16 
175:  						
176:  						// Index = 0;
177:  						0F 00 {{ 68 A0 00 00 }} 25 
178:  						
179:  						// if(Index <= m_kAlienSquad.arrPods[iAlienPods].eSupport2AltWeapon)
180:  						07 6E 03 98 00 {{ 68 A0 00 00 }} 35 {{ 31 00 00 00 }} {{ 38 00 00 00 }} 00 00 10 00 {{ 0F A0 00 00 }} 35 {{ 3B 00 00 00 }} {{ 3C 00 00 00 }} 00 00 01 {{ AE 9F 00 00 }} 16 
181:  
182:                              // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
183:  55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 7D 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 01 {{ B1 9F 00 00 }} 24 00 16 16 
184:  
185:  							// ++ Index;
186:  							A5 00 {{ 68 A0 00 00 }} 16 
187:  							
188:  							// goto // while loop continue
189:  							06 D8 02 
190:  
191:  					// ++ iAlienPods;
192:  A5 00 {{ 0F A0 00 00 }} 16 
193:  
194:                      // goto J0xC5;  // [while Loop Continue]
195:  06 C5 00 
196:  
197:              // else
198:  06 78 04 
199:  
200:                  // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodLeaderType)));
201:  55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 8C 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
202:  
203:                  // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodSupporterType)));
204:  55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 8B 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
205:  
206:                  // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iRoamingType)));
207:  55 35 {{ 97 9F 00 00 }} {{ 98 9F 00 00 }} 00 00 1A 00 {{ 10 A0 00 00 }} 01 {{ BF 9F 00 00 }} 2A 00 1B << 82 0D 00 00 >> 00 00 00 00 38 3D 35 {{ 88 9F 00 00 }} {{ 93 9F 00 00 }} 00 00 01 {{ 9E 9F 00 00 }} 4A 16 16 
208:  
209:              // goto J0x4C9;  // [Explicit Break]
210:  06 89 04 
211:  
212:      // ++ PlayerIndex;
213:  A3 00 {{ 10 A0 00 00 }} 16 
214:  
215:      // while loop continue
216:  06 0B 00 
217:  
218:  // return nothing  
219:  04 0B 
220:  
221:  // null-ops (28 bytes)
222:  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 
223:  
224:  // endofscript
225:  53 
226:  
227:  [/AFTER_HEX]
228:  // END XGBattleDesc.InitAlienLoadoutInfos
229:  
230:  
231:  
232:  FUNCTION=GetPodCharArray.XComAlienPodManager 
233:  [BEFORE_HEX]
234:  // last 2 words of header
235:  [HEADER]
236:  80 01 00 00 F4 00 00 00 
237:  [/HEADER] 
238:  
239:  // if(kPod.eMain != 0)
240:  07 50 00 9B 38 3A 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 38 3A 24 00 16 
241:  
242:  	// arrEnemies.AddItem(kPod.eMain);
243:  	55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
244:  
245:  // if(kPod.eSupport1 != 0)
246:  07 A0 00 9B 38 3A 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 38 3A 24 00 16 
247:  
248:  	// arrEnemies.AddItem(kPod.eSupport1);
249:  	55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
250:  
251:  // if(kPod.eSupport2 != 0)
252:  07 F0 00 9B 38 3A 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 38 3A 24 00 16 
253:  
254:  	// arrEnemies.AddItem(kPod.eSupport2);
255:  	55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
256:  
257:  // arrAltWeapon.AddItem(kPod.eMainAltWeapon);
258:  55 48 {{ 6F 3B 00 00 }} 1D 00 35 {{ 33 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
259:  
260:  // arrAltWeapon.AddItem(kPod.eSupport1AltWeapon);
261:  55 48 {{ 6F 3B 00 00 }} 1D 00 35 {{ 32 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
262:  
263:  // arrAltWeapon.AddItem(kPod.eSupport2AltWeapon);
264:  55 48 {{ 6F 3B 00 00 }} 1D 00 35 {{ 31 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
265:  
266:  // return arrEnemies;
267:  04 00 {{ 6D 3B 00 00 }} 
268:  
269:  //return ReturnValue;   
270:  04 3A {{ 6E 3B 00 00 }} 
271:  
272:  // endofscript
273:  53 
274:  [/BEFORE_HEX]
275:  
276:  
277:  [AFTER_HEX]
278:  //last 2 words of header
279:  [HEADER]
280:  7C 01 00 00 F4 00 00 00 
281:  [/HEADER] 
282:  
283:  // if(kPod.eMain1 > 0) (24 bytes)
284:  07 4D 00 97 38 3A 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 25 16 
285:  
286:      // arrEnemies.AddItem(kPod.eMain); (25 bytes) 
287:  55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 36 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
288:  
289:  // if(kPod.eSupport1 > 0) (24 bytes)
290:  07 DF 00 97 38 3A 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 25 16 
291:  
292:      // SeqIdx = 0;
293:  0F 00 {{ A9 3B 00 00 }} 25 
294:  
295:      // if(SeqIdx <= kPod.eSupport1AltWeapon)
296:  07 DF 00 98 00 {{ A9 3B 00 00 }} 38 3A 35 {{ 32 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
297:      
298:          // arrEnemies.AddItem(kPod.eSupport1); (25 bytes)
299:  55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 35 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
300:          
301:          // ++ SeqIdx
302:  A3 00 {{ A9 3B 00 00 }} 16 
303:          
304:          // goto Jx7C // while Loop Continue
305:  06 7C 00 
306:  
307:  // if(kPod.eSupport2 > 0) (24 bytes)
308:  07 71 01 97 38 3A 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 25 16 
309:  
310:      // SeqIdx = 0;
311:  0F 00 {{ A9 3B 00 00 }} 25 
312:  
313:      // if(SeqIdx <= Pod.eSupport2AltWeapon)
314:  07 71 01 98 00 {{ A9 3B 00 00 }} 38 3A 35 {{ 31 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
315:      
316:          // arrEnemies.AddItem(kPod.eSupport2); (25 bytes)
317:  55 00 {{ 6D 3B 00 00 }} 1D 00 35 {{ 34 00 00 00 }} {{ 38 00 00 00 }} 00 00 48 {{ 70 3B 00 00 }} 16 
318:  
319:          // ++ SeqIdx
320:  A3 00 {{ A9 3B 00 00 }} 16 
321:          
322:          // goto JxF3 // while Loop Continue
323:  06 0E 01 
324:  
325:  // return arrEnemies;
326:  04 00 {{ 6D 3B 00 00 }} 
327:  
328:  // endofscript
329:  53 
330:  
331:  [/AFTER_HEX]
332:  // END GetPodCharArray.XComAlienPodManager
333:  
334:  
335:  
336:  
337:  // Rewrite function to call DebugAnims.XGUnit with leader info
338:  FUNCTION=OvermindSpawn.XComAlienPodManager 
339:  [BEFORE_HEX] // hex from EU patch 4
340:  //final 2 words of header (function memory/file size)
341:  [HEADER]
342:  13 08 00 00 5F 05 00 00  
343:  [/HEADER] 
344:  
345:  // if((iSpawn >= m_arrSpawnList.Length) || iSpawn < 0)
346:  07 2B 00 84 99 00 {{ 8E 3B 00 00 }} 36 01 {{ AA 3A 00 00 }} 16 18 0D 00 96 00 {{ 8E 3B 00 00 }} 25 16 16 
347:  
348:  	// return 0;
349:  	04 25 
350:  
351:  // kSpawn = m_arrSpawnList[iSpawn];
352:  0F 00 {{ 84 3B 00 00 }} 10 00 {{ 8E 3B 00 00 }} 01 {{ AA 3A 00 00 }} 
353:  
354:  // nSpawned = 0;
355:  0F 00 {{ 8B 3B 00 00 }} 25 
356:  
357:  // kPod = kSpawn.kSpawnLoc; 
358:  0F 00 {{ 85 3B 00 00 }} 35 {{ 7A 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 
359:  
360:  // if(kPod != none)
361:  07 FE 07 77 00 {{ 85 3B 00 00 }} 2A 16 
362:  
363:  	// arrPodMembers = GetPodCharArray(kSpawn.kPod, arrAltWeapon);
364:  	0F 00 {{ 83 3B 00 00 }} 1B << 12 34 00 00 >> 00 00 00 00 35 {{ 79 3B 00 00 }} {{ 7B 3B 00 00 }} 00 01 00 {{ 84 3B 00 00 }} 00 {{ 81 3B 00 00 }} 16 
365:  
366:  	// kPod.NumAliens = arrPodMembers.Length;
367:  	0F 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 36 00 {{ 83 3B 00 00 }} 
368:  
369:  	// if(kSpawn.ePodDevice != 0)
370:  	07 4C 01 9B 38 3A 35 {{ 77 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 38 3A 24 00 16 
371:  
372:  		// kPod.SetItemType(kSpawn.ePodDevice);
373:  		19 00 {{ 85 3B 00 00 }} 26 00 00 00 00 00 00 1B << 32 62 00 00 >> 00 00 00 00 35 {{ 77 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 16 
374:  
375:  	// if(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.false)
376:  	07 45 03 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 }} 01 00 {{ F0 2C 00 00 }} 00 28 
377:  
378:  		// if(class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[1]) == 41)
379:  		07 45 03 9A 38 3A 12 20 {{ B2 00 00 00 }} 15 00 {{ A6 00 00 00 }} 00 1B << F2 51 00 00 >> 00 00 00 00 10 26 00 {{ 83 3B 00 00 }} 16 38 3A 24 29 16 
380:  
381:  			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[0]);
382:  			0F 00 {{ 86 3B 00 00 }} 12 20 {{ B2 00 00 00 }} 15 00 {{ A6 00 00 00 }} 00 1B << F2 51 00 00 >> 00 00 00 00 10 25 00 {{ 83 3B 00 00 }} 16 
383:  
384:  			// if(eAlienType == 37)
385:  			07 AF 02 9A 38 3A 00 {{ 86 3B 00 00 }} 38 3A 24 25 16 
386:  
387:  				// kPod.NumAliens = 1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1;
388:  				0F 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 92 26 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 }} 01 00 {{ F0 2C 00 00 }} 00 26 16 
389:  
390:  			// else
391:  			06 45 03 
392:  
393:  				// if(eAlienType == 40)
394:  				07 45 03 9A 38 3A 00 {{ 86 3B 00 00 }} 38 3A 24 28 16 
395:  
396:  					// kPod.NumAliens = 1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.3; 03
397:  					0F 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 92 26 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 }} 02 00 {{ F0 2C 00 00 }} 00 2C 03 16 
398:  
399:  	// kPod.PreSpawnInit(true);
400:  	19 00 {{ 85 3B 00 00 }} 0B 00 00 00 00 00 00 1B << 93 5A 00 00 >> 00 00 00 00 27 16 
401:  
402:  	// iPod = m_arrPod.Length;
403:  	0F 00 {{ 8A 3B 00 00 }} 36 01 {{ C1 3A 00 00 }} 
404:  
405:  	// m_arrPod.AddItem(kPod);
406:  	55 01 {{ C1 3A 00 00 }} 0A 00 00 {{ 85 3B 00 00 }} 16 
407:  
408:  	// XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kLevel.AddPod(kPod);
409:  	19 19 19 2E {{ 64 2D 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 {{ 71 2D 00 00 }} 00 01 {{ 71 2D 00 00 }} 09 00 {{ A2 9C 00 00 }} 00 01 {{ A2 9C 00 00 }} 13 00 00 00 00 00 00 1B << 31 02 00 00 >> 00 00 00 00 00 {{ 85 3B 00 00 }} 16 
410:  
411:  	// iNum = 0;
412:  	0F 00 {{ 8C 3B 00 00 }} 25 
413:  
414:  	// if(iNum < kPod.NumAliens)
415:  	07 AD 07 96 00 {{ 8C 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 16 
416:  
417:  		// kSpawnPt = kPod.GetSpawnPoint(iNum, vLoc, true);
418:  		0F 00 {{ 87 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 1D 00 {{ 76 39 00 00 }} 00 1B << BC 34 00 00 >> 00 00 00 00 00 {{ 8C 3B 00 00 }} 00 {{ 88 3B 00 00 }} 27 16 
419:  
420:  		// if(kSpawnPt != none)
421:  		07 74 07 77 00 {{ 87 3B 00 00 }} 2A 16 
422:  
423:  			// kSpawnPt.SnapToGround(32.0);
424:  			19 00 {{ 87 3B 00 00 }} 0F 00 {{ 00 6D 00 00 }} 00 1B << 4D 65 00 00 >> 00 00 00 00 1E 00 00 00 42 16 
425:  
426:  			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[iNum]);
427:  			0F 00 {{ 86 3B 00 00 }} 12 20 {{ B2 00 00 00 }} 1D 00 {{ A6 00 00 00 }} 00 1B << F2 51 00 00 >> 00 00 00 00 10 00 {{ 8C 3B 00 00 }} 00 {{ 83 3B 00 00 }} 16 
428:  
429:  			// bUseAltWeapon = arrAltWeapon[iNum] != 0;
430:  			14 2D 00 {{ 80 3B 00 00 }} 9B 38 3A 10 00 {{ 8C 3B 00 00 }} 00 {{ 81 3B 00 00 }} 38 3A 24 00 16 
431:  
432:  			// kAlien = m_kPlayer.SpawnAlien(eAlienType, kSpawnPt, bUseAltWeapon);
433:  			0F 00 {{ 89 3B 00 00 }} 19 01 {{ B5 3A 00 00 }} 2A 00 {{ D8 96 00 00 }} 00 1B << 76 66 00 00 >> 00 00 00 00 00 {{ 86 3B 00 00 }} 00 {{ 87 3B 00 00 }} 4A 4A 4A 2D 00 {{ 80 3B 00 00 }} 4A 16 
434:  
435:  			// if(kAlien != none)
436:  			07 46 07 77 00 {{ 89 3B 00 00 }} 2A 16 
437:  
438:  				// kAlien.m_kBehavior.InitPod(iPod, kPod.m_bEnabled);
439:  				19 19 00 {{ 89 3B 00 00 }} 09 00 {{ D9 30 00 00 }} 00 01 {{ D9 30 00 00 }} 32 00 00 00 00 00 00 1B << D8 3A 00 00 >> 00 00 00 00 00 {{ 8A 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 0A 00 {{ 7E 38 00 00 }} 00 2D 01 {{ 7E 38 00 00 }} 16 
440:  
441:  				// if(kPod.m_bEnabled)
442:  				07 1E 06 19 00 {{ 85 3B 00 00 }} 0A 00 {{ 7E 38 00 00 }} 00 2D 01 {{ 7E 38 00 00 }} 
443:  
444:  					// kPod.AddAlien(kAlien);
445:  					19 00 {{ 85 3B 00 00 }} 13 00 00 00 00 00 00 1B << 97 01 00 00 >> 00 00 00 00 00 {{ 89 3B 00 00 }} 16 
446:  
447:  				// else
448:  				06 A6 06 
449:  
450:  					// if(kPod.bUse == false)
451:  					07 A6 06 F2 19 00 {{ 85 3B 00 00 }} 0A 00 {{ 80 38 00 00 }} 00 2D 01 {{ 80 38 00 00 }} 28 16 
452:  
453:  						// strUser = XComEngine(class'Engine'.static.GetEngine()).GetEnvironmentVariable("usr");
454:  						0F 00 {{ 7F 3B 00 00 }} 19 2E {{ BC 4D 00 00 }} 12 20 {{ 4F FE FF FF }} 0A 00 {{ D7 F9 FF FF }} 00 1C {{ F5 FB FF FF }} 16 0F 00 {{ 16 F9 FF FF }} 00 1C {{ F3 FB FF FF }} 1F 75 73 72 00 16 
455:  
456:  							// if(strUser == "acheng")
457:  							07 A6 06 7A 00 {{ 7F 3B 00 00 }} 1F 61 63 68 65 6E 67 00 16 
458:  
459:  				// arrAlienList.AddItem(kAlien);
460:  				55 00 {{ 82 3B 00 00 }} 0A 00 00 {{ 89 3B 00 00 }} 16 
461:  
462:  				// ++ nSpawned;
463:  				A5 00 {{ 8B 3B 00 00 }} 16 
464:  
465:  				// if(m_bHasTerrorPods)
466:  				07 F0 06 2D 01 {{ C0 3A 00 00 }} 
467:  
468:  					// InitTerroristAlien(kAlien, iNum);
469:  					1B << F5 3A 00 00 >> 00 00 00 00 00 {{ 89 3B 00 00 }} 00 {{ 8C 3B 00 00 }} 16 
470:  
471:  				// kAlien.m_kPod = kPod;
472:  				0F 19 00 {{ 89 3B 00 00 }} 09 00 {{ 6B AF 00 00 }} 00 01 {{ 6B AF 00 00 }} 00 {{ 85 3B 00 00 }} 
473:  
474:  				// kPod.m_arrAlienSpawnPts.AddItem(kSpawnPt);
475:  				55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 52 38 00 00 }} 00 01 {{ 52 38 00 00 }} 0A 00 00 {{ 87 3B 00 00 }} 16 
476:  
477:  			// else
478:  			06 71 07 
479:  
480:  				// kPod.m_aBadSpawnLoc.AddItem(vLoc);
481:  				55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 3B 38 00 00 }} 00 01 {{ 3B 38 00 00 }} 0A 00 00 {{ 88 3B 00 00 }} 16 
482:  
483:  		// else
484:  		06 9F 07 
485:  
486:  			// kPod.m_aBadSpawnLoc.AddItem(vLoc);
487:  			55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 3B 38 00 00 }} 00 01 {{ 3B 38 00 00 }} 0A 00 00 {{ 88 3B 00 00 }} 16 
488:  
489:  		// ++ iNum;
490:  		A5 00 {{ 8C 3B 00 00 }} 16 
491:  
492:  		// goto J0x420; // [Loop Continue]
493:  		06 20 04 
494:  
495:  	// kPod.PostSpawnInit();
496:  	19 00 {{ 85 3B 00 00 }} 0B 00 00 00 00 00 00 1B << 54 5A 00 00 >> 00 00 00 00 4A 16 
497:  
498:  	// m_kPlayer.OnSpawn(iSpawn, arrAlienList);
499:  	19 01 {{ B5 3A 00 00 }} 1C 00 00 00 00 00 00 1B << F5 56 00 00 >> 00 00 00 00 00 {{ 8E 3B 00 00 }} 00 {{ 82 3B 00 00 }} 16 
500:  
501:  // return nSpawned;
502:  04 00 {{ 8B 3B 00 00 }} 
503:  
504:  //return ReturnValue; endofscript
505:  04 3A {{ 8D 3B 00 00 }} 53 
506:  [/BEFORE_HEX] 
507:  
508:  
509:  [AFTER_HEX] 
510:  //final 2 words of header (function memory/file size)
511:  [HEADER] 
512:  77 07 00 00 5F 05 00 00 
513:  [/HEADER] 
514:  
515:  // if((iSpawn >= m_arrSpawnList.Length) || iSpawn < 0)
516:  07 2B 00 84 99 00 {{ 8E 3B 00 00 }} 36 01 {{ AA 3A 00 00 }} 16 18 0D 00 96 00 {{ 8E 3B 00 00 }} 25 16 16 
517:  
518:  	// return 0;
519:  	04 25 
520:  
521:  // kSpawn = m_arrSpawnList[iSpawn];
522:  0F 00 {{ 84 3B 00 00 }} 10 00 {{ 8E 3B 00 00 }} 01 {{ AA 3A 00 00 }} 
523:  
524:  // nSpawned = 0;
525:  0F 00 {{ 8B 3B 00 00 }} 25 
526:  
527:  // kPod = kSpawn.kSpawnLoc; 
528:  0F 00 {{ 85 3B 00 00 }} 35 {{ 7A 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 
529:  
530:  // if(kPod != none)
531:  07 1D 06 77 00 {{ 85 3B 00 00 }} 2A 16 
532:  
533:  	// arrPodMembers = GetPodCharArray(kSpawn.kPod, arrAltWeapon);
534:  	0F 00 {{ 83 3B 00 00 }} 1B << 12 34 00 00 >> 00 00 00 00 35 {{ 79 3B 00 00 }} {{ 7B 3B 00 00 }} 00 01 00 {{ 84 3B 00 00 }} 00 {{ 81 3B 00 00 }} 16 
535:  
536:  	// kPod.NumAliens = arrPodMembers.Length;
537:  	0F 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 36 00 {{ 83 3B 00 00 }} 
538:  
539:  	// if(kSpawn.ePodDevice != 0)
540:  	07 4C 01 9B 38 3A 35 {{ 77 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 38 3A 24 00 16 
541:  
542:  		// kPod.SetItemType(kSpawn.ePodDevice);
543:  		19 00 {{ 85 3B 00 00 }} 26 00 00 00 00 00 00 1B << 32 62 00 00 >> 00 00 00 00 35 {{ 77 3B 00 00 }} {{ 7B 3B 00 00 }} 00 00 00 {{ 84 3B 00 00 }} 16 
544:  
545:  	// kPod.PreSpawnInit(true);
546:  	19 00 {{ 85 3B 00 00 }} 0B 00 00 00 00 00 00 1B << 93 5A 00 00 >> 00 00 00 00 27 16 
547:  
548:  	// iPod = m_arrPod.Length;
549:  	0F 00 {{ 8A 3B 00 00 }} 36 01 {{ C1 3A 00 00 }} 
550:  
551:  	// m_arrPod.AddItem(kPod);
552:  	55 01 {{ C1 3A 00 00 }} 0A 00 00 {{ 85 3B 00 00 }} 16 
553:  
554:  	// XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kLevel.AddPod(kPod);
555:  	19 19 19 2E {{ 64 2D 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 {{ 71 2D 00 00 }} 00 01 {{ 71 2D 00 00 }} 09 00 {{ A2 9C 00 00 }} 00 01 {{ A2 9C 00 00 }} 13 00 00 00 00 00 00 1B << 31 02 00 00 >> 00 00 00 00 00 {{ 85 3B 00 00 }} 16 
556:  
557:  	// iNum = 0;
558:  	0F 00 {{ 8C 3B 00 00 }} 25 
559:  
560:  	// if(iNum < kPod.NumAliens)
561:  	07 CC 05 96 00 {{ 8C 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 09 00 {{ 83 38 00 00 }} 00 01 {{ 83 38 00 00 }} 16 
562:  
563:  		// kSpawnPt = kPod.GetSpawnPoint(iNum, vLoc, true);
564:  		0F 00 {{ 87 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 1D 00 {{ 76 39 00 00 }} 00 1B << BC 34 00 00 >> 00 00 00 00 00 {{ 8C 3B 00 00 }} 00 {{ 88 3B 00 00 }} 27 16 
565:  
566:  		// if(kSpawnPt != none)
567:  		07 93 05 77 00 {{ 87 3B 00 00 }} 2A 16 
568:  
569:  			// kSpawnPt.SnapToGround(32.0);
570:  			19 00 {{ 87 3B 00 00 }} 0F 00 {{ 00 6D 00 00 }} 00 1B << 4D 65 00 00 >> 00 00 00 00 1E 00 00 00 42 16 
571:  
572:  			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[iNum]);
573:  			0F 00 {{ 86 3B 00 00 }} 12 20 {{ B2 00 00 00 }} 1D 00 {{ A6 00 00 00 }} 00 1B << F2 51 00 00 >> 00 00 00 00 10 00 {{ 8C 3B 00 00 }} 00 {{ 83 3B 00 00 }} 16 
574:  
575:  			// bUseAltWeapon = (0x128 & int(kSpawn.kPod.eMainAltWeapon)) != 0;
576:  			14 2D 00 {{ 80 3B 00 00 }} 9B 9C 2C 80 38 3A 35 {{ 33 00 00 00 }} {{ 38 00 00 00 }} 00 00 35 {{ 79 3B 00 00 }} {{ 7B 3B 00 00 }} 00 01 00 {{ 84 3B 00 00 }} 16 2C 00 16 
577:  
578:  			// kAlien = m_kPlayer.SpawnAlien(eAlienType, kSpawnPt, bUseAltWeapon);
579:  			0F 00 {{ 89 3B 00 00 }} 19 01 {{ B5 3A 00 00 }} 2A 00 {{ D8 96 00 00 }} 00 1B << 76 66 00 00 >> 00 00 00 00 00 {{ 86 3B 00 00 }} 00 {{ 87 3B 00 00 }} 4A 4A 4A 2D 00 {{ 80 3B 00 00 }} 4A 16 
580:  
581:  			// if(kAlien != none)
582:  			07 65 05 77 00 {{ 89 3B 00 00 }} 2A 16 
583:  
584:  				// if (iNum == 0) // only apply level to leader
585:  				07 FD 03 9A 00 {{ 8C 3B 00 00 }} 25 16 
586:  				
587:  					// kAlien.m_iSmokeGrenades = 0x7 & int(kSpawn.kPod.eMainAltWeapon); // store the main alien's level in its unit
588:  					0F 19 00 {{ 89 3B 00 00 }} 09 00 {{ AE 30 00 00 }} 00 01 {{ AE 30 00 00 }} 9C 2C 07 38 3A 35 {{ 33 00 00 00 }} {{ 38 00 00 00 }} 00 00 35 {{ 79 3B 00 00 }} {{ 7B 3B 00 00 }} 00 01 00 {{ 84 3B 00 00 }} 16 
589:  					
590:  								// kSpawn.kPod.eMainAltWeapon
591:  								// 35 33 00 00 00 38 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 
592:  					
593:  									// kSpawn.kPod
594:  									// 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 
595:  
596:  									// From GetPodCharArray
597:  									// kPod.eMainAltWeapon
598:  									// 35 33 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 
599:  					
600:  				// kAlien.DebugAnims(none, none); // call the helper function to "level up" potentially any unit
601:  				19 00 {{ 89 3B 00 00 }} 0C 00 00 00 00 00 00 1B << 91 14 00 00 >> 00 00 00 00 2A 2A 16 0B 
602:  				
603:  				// kAlien.m_kBehavior.InitPod(iPod, kPod.m_bEnabled);
604:  				19 19 00 {{ 89 3B 00 00 }} 09 00 {{ D9 30 00 00 }} 00 01 {{ D9 30 00 00 }} 32 00 00 00 00 00 00 1B << D8 3A 00 00 >> 00 00 00 00 00 {{ 8A 3B 00 00 }} 19 00 {{ 85 3B 00 00 }} 0A 00 {{ 7E 38 00 00 }} 00 2D 01 {{ 7E 38 00 00 }} 16 
605:  
606:  				// if(kPod.m_bEnabled)
607:  				07 C5 04 19 00 {{ 85 3B 00 00 }} 0A 00 {{ 7E 38 00 00 }} 00 2D 01 {{ 7E 38 00 00 }} 
608:  
609:  					// kPod.AddAlien(kAlien);
610:  					19 00 {{ 85 3B 00 00 }} 13 00 00 00 00 00 00 1B << 97 01 00 00 >> 00 00 00 00 00 {{ 89 3B 00 00 }} 16 
611:  
612:  				// arrAlienList.AddItem(kAlien);
613:  				55 00 {{ 82 3B 00 00 }} 0A 00 00 {{ 89 3B 00 00 }} 16 
614:  
615:  				// ++ nSpawned;
616:  				A5 00 {{ 8B 3B 00 00 }} 16 
617:  
618:  				// if(m_bHasTerrorPods)
619:  				07 0F 05 2D 01 {{ C0 3A 00 00 }} 
620:  
621:  					// InitTerroristAlien(kAlien, iNum);
622:  					1B << F5 3A 00 00 >> 00 00 00 00 00 {{ 89 3B 00 00 }} 00 {{ 8C 3B 00 00 }} 16 
623:  
624:  				// kAlien.m_kPod = kPod;
625:  				0F 19 00 {{ 89 3B 00 00 }} 09 00 {{ 6B AF 00 00 }} 00 01 {{ 6B AF 00 00 }} 00 {{ 85 3B 00 00 }} 
626:  
627:  				// kPod.m_arrAlienSpawnPts.AddItem(kSpawnPt);
628:  				55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 52 38 00 00 }} 00 01 {{ 52 38 00 00 }} 0A 00 00 {{ 87 3B 00 00 }} 16 
629:  
630:  			// else
631:  			06 90 05 
632:  
633:  				// kPod.m_aBadSpawnLoc.AddItem(vLoc);
634:  				55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 3B 38 00 00 }} 00 01 {{ 3B 38 00 00 }} 0A 00 00 {{ 88 3B 00 00 }} 16 
635:  
636:  		// else
637:  		06 BE 05 
638:  
639:  			// kPod.m_aBadSpawnLoc.AddItem(vLoc);
640:  			55 19 00 {{ 85 3B 00 00 }} 09 00 {{ 3B 38 00 00 }} 00 01 {{ 3B 38 00 00 }} 0A 00 00 {{ 88 3B 00 00 }} 16 
641:  
642:  		// ++ iNum;
643:  		A5 00 {{ 8C 3B 00 00 }} 16 
644:  
645:  		// goto J0x227; // [Loop Continue]
646:  		06 27 02 
647:  
648:  	// kPod.PostSpawnInit();
649:  	19 00 {{ 85 3B 00 00 }} 0B 00 00 00 00 00 00 1B << 54 5A 00 00 >> 00 00 00 00 4A 16 
650:  
651:  	// m_kPlayer.OnSpawn(iSpawn, arrAlienList);
652:  	19 01 {{ B5 3A 00 00 }} 1C 00 00 00 00 00 00 1B << F5 56 00 00 >> 00 00 00 00 00 {{ 8E 3B 00 00 }} 00 {{ 82 3B 00 00 }} 16 
653:  
654:  // return nSpawned;
655:  04 00 {{ 8B 3B 00 00 }} 
656:  
657:  // null-ops (325 bytes)
658:  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 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 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 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 
659:  
660:  //return ReturnValue; endofscript
661:  04 3A {{ 8D 3B 00 00 }} 53 
662:  
663:  
664:  [/AFTER_HEX]  

 

 

 

 

The second example has memory sizes computed for every valid line of hex:

 

 

  0:      /*
  1:        Increase max pod size Mod
  2:        Author: Amineri 
  3:        Upks altered : XComGame.upk
  4:        Functions altered :
  5:      				XGBattleDesc.InitAlienLoadoutInfos
  6:      				GetPodCharArray.XComAlienPodManager
  7:      				OvermindSpawn.XComAlienPodManager
  8:      */ 
  9:      
 10:      
 11:      UPKFILE=XComGame.upk 
 12:      FUNCTION=InitAlienLoadoutInfos.XGBattleDesc
 13:      GUID=33 2E 29 6A A5 DD FC 40 B5 CC 57 A5 A7 AA 8C 41 // EU patch 4
 14:      [BEFORE_HEX]
 15:      // last 2 words of header
 16:      [HEADER]
 17:      CC 04 00 00 18 03 00 00 
 18:      [/HEADER] 
 19:      
 20:      // PlayerIndex = 0;
 21:  11: 0F 00 10 A0 00 00 25 
 22:      
 23:      // if(PlayerIndex < 4)
 24:  16: 07 C9 04 96 00 10 A0 00 00 2C 04 16 
 25:      
 26:      	// if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 16)
 27:  49: 	07 51 00 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 10 16 
 28:      
 29:      		// return nothing
 30:   2: 		04 0B 
 31:      
 32:      	// else
 33:   3: 	06 BB 04 
 34:      
 35:      		// if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 0)
 36:  49: 		07 BB 04 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 00 16 
 37:      
 38:      			// m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam = 16;
 39:  41: 			0F 35 96 9F 00 00 98 9F 00 00 00 01 1A 00 10 A0 00 00 01 BF 9F 00 00 24 10 
 40:      
 41:      			// if(!m_bUseAlienInfo)
 42:  15: 			07 BF 03 81 2D 01 A3 9F 00 00 16 
 43:      
 44:      				// iAlienPods = 0;
 45:  11: 				0F 00 0F A0 00 00 25 
 46:      
 47:      				// if(iAlienPods < m_kAlienSquad.arrPods.Length)
 48:  43: 				07 BC 03 96 00 0F A0 00 00 36 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 
 49:      
 50:      					// if(m_kAlienSquad.arrPods[iAlienPods].eMain != 0)
 51:  68: 					07 DA 01 9B 38 3A 35 36 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16 
 52:      
 53:      						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eMain, m_kAlienSquad.arrPods[iAlienPods].eMainAltWeapon));
 54: 166: 						55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 36 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 33 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16 
 55:      
 56:      					// if(m_kAlienSquad.arrPods[iAlienPods].eSupport1 != 0)
 57:  68: 					07 C4 02 9B 38 3A 35 35 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16 
 58:      
 59:      						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport1, m_kAlienSquad.arrPods[iAlienPods].eSupport1AltWeapon));
 60: 166: 						55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 35 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 32 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16 
 61:      
 62:      					// if(m_kAlienSquad.arrPods[iAlienPods].eSupport2 != 0)
 63:  68: 					07 AE 03 9B 38 3A 35 34 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16 
 64:      
 65:      						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport2, m_kAlienSquad.arrPods[iAlienPods].eSupport2AltWeapon));
 66: 166: 						55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 34 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 31 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16 
 67:      
 68:      					// ++ iAlienPods;
 69:  11: 					A5 00 0F A0 00 00 16 
 70:      
 71:      					// goto J0xC5;  // [Loop Continue]
 72:   3: 					06 C5 00 
 73:      
 74:      			// else
 75:   3: 			06 B8 04 
 76:      
 77:      				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodLeaderType)));
 78:  83: 				55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8C 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
 79:      
 80:      				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodSupporterType)));
 81:  83: 				55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8B 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
 82:      
 83:      				// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iRoamingType)));
 84:  83: 				55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 88 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
 85:      
 86:      			// goto J0x4C9;  // [Explicit Break]
 87:   3: 			06 C9 04 
 88:      
 89:      	// ++ PlayerIndex;
 90:  11: 	A3 00 10 A0 00 00 16 
 91:      
 92:      	// goto J0x0B; // [Loop Continue]
 93:   3: 	06 0B 00 
 94:      
 95:      // return nothing  
 96:   2: 04 0B 
 97:      
 98:      // endofscript
 99:   1: 53 
100:      [/BEFORE_HEX]
101:      
102:      
103:      [AFTER_HEX]
104:      // last 2 words of header
105:      [HEADER]
106:      A8 04 00 00 18 03 00 00
107:      [/HEADER]
108:      
109:      // PlayerIndex = 0;
110:  11: 0F 00 10 A0 00 00 25 
111:      
112:      // if(PlayerIndex < 4)
113:  16: 07 89 04 96 00 10 A0 00 00 2C 04 16 
114:      
115:          // if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 16)
116:  49:     07 51 00 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 10 16 
117:      
118:              // return nothing
119:   2:         04 0B 
120:      
121:          // else
122:   3:     06 7B 04 
123:      
124:              // if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 0)
125:  49:         07 7B 04 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 00 16 
126:      
127:                  // m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam = 16;
128:  41:             0F 35 96 9F 00 00 98 9F 00 00 00 01 1A 00 10 A0 00 00 01 BF 9F 00 00 24 10 
129:      
130:                  // if(!m_bUseAlienInfo)
131:  15:             07 7F 03 81 2D 01 A3 9F 00 00 16 
132:      
133:                      // iAlienPods = 0;
134:  11:                 0F 00 0F A0 00 00 25 
135:      
136:                      // if(iAlienPods < m_kAlienSquad.arrPods.Length)
137:  43:                 07 7C 03 96 00 0F A0 00 00 36 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 
138:      
139:      					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eMain;  m_iLowestDifficulty : 01 B1 9F 00 00    int-to-byte : 38 3D
140:  69: 					0F 01 B1 9F 00 00 38 3A 35 36 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 
141:      					
142:      					// if(m_iLowestDifficulty > 0)
143:  15: 					07 84 01 97 01 B1 9F 00 00 25 16 
144:      					
145:      						// m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
146:  64: 						55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 38 3D 01 B1 9F 00 00 25 16 16 
147:      						
148:      					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eSupport1;
149:  69: 					0F 01 B1 9F 00 00 38 3A 35 35 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 
150:      					
151:      					// if(m_iLowestDifficulty > 0)
152:  15: 					07 79 02 97 01 B1 9F 00 00 25 16 
153:      
154:      						// local variable Index, stolen from another function: 00 68 A0 00 00
155:      						// Index = 0;
156:  11: 						0F 00 68 A0 00 00 25 
157:      						
158:      						// if(Index <= m_kAlienSquad.arrPods[iAlienPods].eSupport1AltWeapon)
159:  71: 						07 79 02 98 00 68 A0 00 00 35 32 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 
160:      
161:                                  // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
162:  65:                             55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 38 3D 01 B1 9F 00 00 24 00 16 16 
163:      							
164:      							// ++ Index;
165:  11: 							A5 00 68 A0 00 00 16 
166:      							
167:      							// goto // while loop continue
168:   3: 							06 E3 01 
169:      
170:      					// m_iLowestDifficulty = m_kAlienSquad.arrPods[iAlienPods].eSupport2;
171:  69: 					0F 01 B1 9F 00 00 38 3A 35 34 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 
172:      					
173:      					// if(m_iLowestDifficulty > 0)
174:  15: 					07 6E 03 97 01 B1 9F 00 00 25 16 
175:      						
176:      						// Index = 0;
177:  11: 						0F 00 68 A0 00 00 25 
178:      						
179:      						// if(Index <= m_kAlienSquad.arrPods[iAlienPods].eSupport2AltWeapon)
180:  71: 						07 6E 03 98 00 68 A0 00 00 35 31 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 
181:      
182:                                  // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_iLowestDifficulty, 0));
183:  65:                             55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 38 3D 01 B1 9F 00 00 24 00 16 16 
184:      
185:      							// ++ Index;
186:  11: 							A5 00 68 A0 00 00 16 
187:      							
188:      							// goto // while loop continue
189:   3: 							06 D8 02 
190:      
191:      					// ++ iAlienPods;
192:  11:                     A5 00 0F A0 00 00 16 
193:      
194:                          // goto J0xC5;  // [while Loop Continue]
195:   3:                     06 C5 00 
196:      
197:                  // else
198:   3:             06 78 04 
199:      
200:                      // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodLeaderType)));
201:  83:                 55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8C 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
202:      
203:                      // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodSupporterType)));
204:  83:                 55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8B 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
205:      
206:                      // m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iRoamingType)));
207:  83:                 55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 88 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16 
208:      
209:                  // goto J0x4C9;  // [Explicit Break]
210:   3:             06 89 04 
211:      
212:          // ++ PlayerIndex;
213:  11:     A3 00 10 A0 00 00 16 
214:      
215:          // while loop continue
216:   3:     06 0B 00 
217:      
218:      // return nothing  
219:   2: 04 0B 
220:      
221:      // null-ops (28 bytes)
222:  28: 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 
223:      
224:      // endofscript
225:   1: 53 
226:      
227:      [/AFTER_HEX]
228:      // END XGBattleDesc.InitAlienLoadoutInfos
229:      
230:      
231:      
232:      FUNCTION=GetPodCharArray.XComAlienPodManager 
233:      [BEFORE_HEX]
234:      // last 2 words of header
235:      [HEADER]
236:      80 01 00 00 F4 00 00 00 
237:      [/HEADER] 
238:      
239:      // if(kPod.eMain != 0)
240:  39: 07 50 00 9B 38 3A 35 36 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 38 3A 24 00 16 
241:      
242:      	// arrEnemies.AddItem(kPod.eMain);
243:  41: 	55 00 6D 3B 00 00 1D 00 35 36 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
244:      
245:      // if(kPod.eSupport1 != 0)
246:  39: 07 A0 00 9B 38 3A 35 35 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 38 3A 24 00 16 
247:      
248:      	// arrEnemies.AddItem(kPod.eSupport1);
249:  41: 	55 00 6D 3B 00 00 1D 00 35 35 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
250:      
251:      // if(kPod.eSupport2 != 0)
252:  39: 07 F0 00 9B 38 3A 35 34 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 38 3A 24 00 16 
253:      
254:      	// arrEnemies.AddItem(kPod.eSupport2);
255:  41: 	55 00 6D 3B 00 00 1D 00 35 34 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
256:      
257:      // arrAltWeapon.AddItem(kPod.eMainAltWeapon);
258:  41: 55 48 6F 3B 00 00 1D 00 35 33 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
259:      
260:      // arrAltWeapon.AddItem(kPod.eSupport1AltWeapon);
261:  41: 55 48 6F 3B 00 00 1D 00 35 32 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
262:      
263:      // arrAltWeapon.AddItem(kPod.eSupport2AltWeapon);
264:  41: 55 48 6F 3B 00 00 1D 00 35 31 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
265:      
266:      // return arrEnemies;
267:  10: 04 00 6D 3B 00 00 
268:      
269:      //return ReturnValue;   
270:  10: 04 3A 6E 3B 00 00 
271:      
272:      // endofscript
273:   1: 53 
274:      [/BEFORE_HEX]
275:      
276:      
277:      [AFTER_HEX]
278:      //last 2 words of header
279:      [HEADER]
280:      7C 01 00 00 F4 00 00 00 
281:      [/HEADER] 
282:      
283:      // if(kPod.eMain1 > 0) (24 bytes)
284:  36: 07 4D 00 97 38 3A 35 36 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 25 16 
285:      
286:          // arrEnemies.AddItem(kPod.eMain); (25 bytes) 
287:  41:     55 00 6D 3B 00 00 1D 00 35 36 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
288:      
289:      // if(kPod.eSupport1 > 0) (24 bytes)
290:  36: 07 DF 00 97 38 3A 35 35 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 25 16 
291:      
292:          // SeqIdx = 0;
293:  11:     0F 00 A9 3B 00 00 25 
294:      
295:          // if(SeqIdx <= kPod.eSupport1AltWeapon)
296:  44:     07 DF 00 98 00 A9 3B 00 00 38 3A 35 32 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
297:          
298:              // arrEnemies.AddItem(kPod.eSupport1); (25 bytes)
299:  41:         55 00 6D 3B 00 00 1D 00 35 35 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
300:              
301:              // ++ SeqIdx
302:  11:         A3 00 A9 3B 00 00 16 
303:              
304:              // goto Jx7C // while Loop Continue
305:   3:         06 7C 00 
306:      
307:      // if(kPod.eSupport2 > 0) (24 bytes)
308:  36: 07 71 01 97 38 3A 35 34 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 25 16 
309:      
310:          // SeqIdx = 0;
311:  11:     0F 00 A9 3B 00 00 25 
312:      
313:          // if(SeqIdx <= Pod.eSupport2AltWeapon)
314:  44:     07 71 01 98 00 A9 3B 00 00 38 3A 35 31 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
315:          
316:              // arrEnemies.AddItem(kPod.eSupport2); (25 bytes)
317:  41:         55 00 6D 3B 00 00 1D 00 35 34 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 16 
318:      
319:              // ++ SeqIdx
320:  11:         A3 00 A9 3B 00 00 16 
321:              
322:              // goto JxF3 // while Loop Continue
323:   3:         06 0E 01 
324:      
325:      // return arrEnemies;
326:  10: 04 00 6D 3B 00 00 
327:      
328:      // endofscript
329:   1: 53 
330:      
331:      [/AFTER_HEX]
332:      // END GetPodCharArray.XComAlienPodManager
333:      
334:      
335:      
336:      
337:      // Rewrite function to call DebugAnims.XGUnit with leader info
338:      FUNCTION=OvermindSpawn.XComAlienPodManager 
339:      [BEFORE_HEX] // hex from EU patch 4
340:      //final 2 words of header (function memory/file size)
341:      [HEADER]
342:      13 08 00 00 5F 05 00 00  
343:      [/HEADER] 
344:      
345:      // if((iSpawn >= m_arrSpawnList.Length) || iSpawn < 0)
346:  41: 07 2B 00 84 99 00 8E 3B 00 00 36 01 AA 3A 00 00 16 18 0D 00 96 00 8E 3B 00 00 25 16 16 
347:      
348:      	// return 0;
349:   2: 	04 25 
350:      
351:      // kSpawn = m_arrSpawnList[iSpawn];
352:  29: 0F 00 84 3B 00 00 10 00 8E 3B 00 00 01 AA 3A 00 00 
353:      
354:      // nSpawned = 0;
355:  11: 0F 00 8B 3B 00 00 25 
356:      
357:      // kPod = kSpawn.kSpawnLoc; 
358:  38: 0F 00 85 3B 00 00 35 7A 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 
359:      
360:      // if(kPod != none)
361:  15: 07 FE 07 77 00 85 3B 00 00 2A 16 
362:      
363:      	// arrPodMembers = GetPodCharArray(kSpawn.kPod, arrAltWeapon);
364:  57: 	0F 00 83 3B 00 00 1B 12 34 00 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 00 81 3B 00 00 16 
365:      
366:      	// kPod.NumAliens = arrPodMembers.Length;
367:  41: 	0F 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 36 00 83 3B 00 00 
368:      
369:      	// if(kSpawn.ePodDevice != 0)
370:  39: 	07 4C 01 9B 38 3A 35 77 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 38 3A 24 00 16 
371:      
372:      		// kPod.SetItemType(kSpawn.ePodDevice);
373:  59: 		19 00 85 3B 00 00 26 00 00 00 00 00 00 1B 32 62 00 00 00 00 00 00 35 77 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 16 
374:      
375:      	// if(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.false)
376:  98: 	07 45 03 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 01 00 F0 2C 00 00 00 28 
377:      
378:      		// if(class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[1]) == 41)
379:  53: 		07 45 03 9A 38 3A 12 20 B2 00 00 00 15 00 A6 00 00 00 00 1B F2 51 00 00 00 00 00 00 10 26 00 83 3B 00 00 16 38 3A 24 29 16 
380:      
381:      			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[0]);
382:  52: 			0F 00 86 3B 00 00 12 20 B2 00 00 00 15 00 A6 00 00 00 00 1B F2 51 00 00 00 00 00 00 10 25 00 83 3B 00 00 16 
383:      
384:      			// if(eAlienType == 37)
385:  20: 			07 AF 02 9A 38 3A 00 86 3B 00 00 38 3A 24 25 16 
386:      
387:      				// kPod.NumAliens = 1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1;
388: 129: 				0F 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 92 26 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 01 00 F0 2C 00 00 00 26 16 
389:      
390:      			// else
391:   3: 			06 45 03 
392:      
393:      				// if(eAlienType == 40)
394:  20: 				07 45 03 9A 38 3A 00 86 3B 00 00 38 3A 24 28 16 
395:      
396:      					// kPod.NumAliens = 1 + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.3; 03
397: 130: 					0F 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 92 26 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 02 00 F0 2C 00 00 00 2C 03 16 
398:      
399:      	// kPod.PreSpawnInit(true);
400:  32: 	19 00 85 3B 00 00 0B 00 00 00 00 00 00 1B 93 5A 00 00 00 00 00 00 27 16 
401:      
402:      	// iPod = m_arrPod.Length;
403:  20: 	0F 00 8A 3B 00 00 36 01 C1 3A 00 00 
404:      
405:      	// m_arrPod.AddItem(kPod);
406:  22: 	55 01 C1 3A 00 00 0A 00 00 85 3B 00 00 16 
407:      
408:      	// XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kLevel.AddPod(kPod);
409: 134: 	19 19 19 2E 64 2D 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 71 2D 00 00 00 01 71 2D 00 00 09 00 A2 9C 00 00 00 01 A2 9C 00 00 13 00 00 00 00 00 00 1B 31 02 00 00 00 00 00 00 00 85 3B 00 00 16 
410:      
411:      	// iNum = 0;
412:  11: 	0F 00 8C 3B 00 00 25 
413:      
414:      	// if(iNum < kPod.NumAliens)
415:  44: 	07 AD 07 96 00 8C 3B 00 00 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 16 
416:      
417:      		// kSpawnPt = kPod.GetSpawnPoint(iNum, vLoc, true);
418:  60: 		0F 00 87 3B 00 00 19 00 85 3B 00 00 1D 00 76 39 00 00 00 1B BC 34 00 00 00 00 00 00 00 8C 3B 00 00 00 88 3B 00 00 27 16 
419:      
420:      		// if(kSpawnPt != none)
421:  15: 		07 74 07 77 00 87 3B 00 00 2A 16 
422:      
423:      			// kSpawnPt.SnapToGround(32.0);
424:  36: 			19 00 87 3B 00 00 0F 00 00 6D 00 00 00 1B 4D 65 00 00 00 00 00 00 1E 00 00 00 42 16 
425:      
426:      			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[iNum]);
427:  60: 			0F 00 86 3B 00 00 12 20 B2 00 00 00 1D 00 A6 00 00 00 00 1B F2 51 00 00 00 00 00 00 10 00 8C 3B 00 00 00 83 3B 00 00 16 
428:      
429:      			// bUseAltWeapon = arrAltWeapon[iNum] != 0;
430:  38: 			14 2D 00 80 3B 00 00 9B 38 3A 10 00 8C 3B 00 00 00 81 3B 00 00 38 3A 24 00 16 
431:      
432:      			// kAlien = m_kPlayer.SpawnAlien(eAlienType, kSpawnPt, bUseAltWeapon);
433:  73: 			0F 00 89 3B 00 00 19 01 B5 3A 00 00 2A 00 D8 96 00 00 00 1B 76 66 00 00 00 00 00 00 00 86 3B 00 00 00 87 3B 00 00 4A 4A 4A 2D 00 80 3B 00 00 4A 16 
434:      
435:      			// if(kAlien != none)
436:  15: 			07 46 07 77 00 89 3B 00 00 2A 16 
437:      
438:      				// kAlien.m_kBehavior.InitPod(iPod, kPod.m_bEnabled);
439:  92: 				19 19 00 89 3B 00 00 09 00 D9 30 00 00 00 01 D9 30 00 00 32 00 00 00 00 00 00 1B D8 3A 00 00 00 00 00 00 00 8A 3B 00 00 19 00 85 3B 00 00 0A 00 7E 38 00 00 00 2D 01 7E 38 00 00 16 
440:      
441:      				// if(kPod.m_bEnabled)
442:  34: 				07 1E 06 19 00 85 3B 00 00 0A 00 7E 38 00 00 00 2D 01 7E 38 00 00 
443:      
444:      					// kPod.AddAlien(kAlien);
445:  40: 					19 00 85 3B 00 00 13 00 00 00 00 00 00 1B 97 01 00 00 00 00 00 00 00 89 3B 00 00 16 
446:      
447:      				// else
448:   3: 				06 A6 06 
449:      
450:      					// if(kPod.bUse == false)
451:  37: 					07 A6 06 F2 19 00 85 3B 00 00 0A 00 80 38 00 00 00 2D 01 80 38 00 00 28 16 
452:      
453:      						// strUser = XComEngine(class'Engine'.static.GetEngine()).GetEnvironmentVariable("usr");
454:  77: 						0F 00 7F 3B 00 00 19 2E BC 4D 00 00 12 20 4F FE FF FF 0A 00 D7 F9 FF FF 00 1C F5 FB FF FF 16 0F 00 16 F9 FF FF 00 1C F3 FB FF FF 1F 75 73 72 00 16 
455:      
456:      							// if(strUser == "acheng")
457:  22: 							07 A6 06 7A 00 7F 3B 00 00 1F 61 63 68 65 6E 67 00 16 
458:      
459:      				// arrAlienList.AddItem(kAlien);
460:  22: 				55 00 82 3B 00 00 0A 00 00 89 3B 00 00 16 
461:      
462:      				// ++ nSpawned;
463:  11: 				A5 00 8B 3B 00 00 16 
464:      
465:      				// if(m_bHasTerrorPods)
466:  13: 				07 F0 06 2D 01 C0 3A 00 00 
467:      
468:      					// InitTerroristAlien(kAlien, iNum);
469:  28: 					1B F5 3A 00 00 00 00 00 00 00 89 3B 00 00 00 8C 3B 00 00 16 
470:      
471:      				// kAlien.m_kPod = kPod;
472:  40: 				0F 19 00 89 3B 00 00 09 00 6B AF 00 00 00 01 6B AF 00 00 00 85 3B 00 00 
473:      
474:      				// kPod.m_arrAlienSpawnPts.AddItem(kSpawnPt);
475:  43: 				55 19 00 85 3B 00 00 09 00 52 38 00 00 00 01 52 38 00 00 0A 00 00 87 3B 00 00 16 
476:      
477:      			// else
478:   3: 			06 71 07 
479:      
480:      				// kPod.m_aBadSpawnLoc.AddItem(vLoc);
481:  43: 				55 19 00 85 3B 00 00 09 00 3B 38 00 00 00 01 3B 38 00 00 0A 00 00 88 3B 00 00 16 
482:      
483:      		// else
484:   3: 		06 9F 07 
485:      
486:      			// kPod.m_aBadSpawnLoc.AddItem(vLoc);
487:  43: 			55 19 00 85 3B 00 00 09 00 3B 38 00 00 00 01 3B 38 00 00 0A 00 00 88 3B 00 00 16 
488:      
489:      		// ++ iNum;
490:  11: 		A5 00 8C 3B 00 00 16 
491:      
492:      		// goto J0x420; // [Loop Continue]
493:   3: 		06 20 04 
494:      
495:      	// kPod.PostSpawnInit();
496:  32: 	19 00 85 3B 00 00 0B 00 00 00 00 00 00 1B 54 5A 00 00 00 00 00 00 4A 16 
497:      
498:      	// m_kPlayer.OnSpawn(iSpawn, arrAlienList);
499:  49: 	19 01 B5 3A 00 00 1C 00 00 00 00 00 00 1B F5 56 00 00 00 00 00 00 00 8E 3B 00 00 00 82 3B 00 00 16 
500:      
501:      // return nSpawned;
502:  10: 04 00 8B 3B 00 00 
503:      
504:      //return ReturnValue; endofscript
505:  11: 04 3A 8D 3B 00 00 53 
506:      [/BEFORE_HEX] 
507:      
508:      
509:      [AFTER_HEX] 
510:      //final 2 words of header (function memory/file size)
511:      [HEADER] 
512:      77 07 00 00 5F 05 00 00 
513:      [/HEADER] 
514:      
515:      // if((iSpawn >= m_arrSpawnList.Length) || iSpawn < 0)
516:  41: 07 2B 00 84 99 00 8E 3B 00 00 36 01 AA 3A 00 00 16 18 0D 00 96 00 8E 3B 00 00 25 16 16 
517:      
518:      	// return 0;
519:   2: 	04 25 
520:      
521:      // kSpawn = m_arrSpawnList[iSpawn];
522:  29: 0F 00 84 3B 00 00 10 00 8E 3B 00 00 01 AA 3A 00 00 
523:      
524:      // nSpawned = 0;
525:  11: 0F 00 8B 3B 00 00 25 
526:      
527:      // kPod = kSpawn.kSpawnLoc; 
528:  38: 0F 00 85 3B 00 00 35 7A 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 
529:      
530:      // if(kPod != none)
531:  15: 07 1D 06 77 00 85 3B 00 00 2A 16 
532:      
533:      	// arrPodMembers = GetPodCharArray(kSpawn.kPod, arrAltWeapon);
534:  57: 	0F 00 83 3B 00 00 1B 12 34 00 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 00 81 3B 00 00 16 
535:      
536:      	// kPod.NumAliens = arrPodMembers.Length;
537:  41: 	0F 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 36 00 83 3B 00 00 
538:      
539:      	// if(kSpawn.ePodDevice != 0)
540:  39: 	07 4C 01 9B 38 3A 35 77 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 38 3A 24 00 16 
541:      
542:      		// kPod.SetItemType(kSpawn.ePodDevice);
543:  59: 		19 00 85 3B 00 00 26 00 00 00 00 00 00 1B 32 62 00 00 00 00 00 00 35 77 3B 00 00 7B 3B 00 00 00 00 00 84 3B 00 00 16 
544:      
545:      	// kPod.PreSpawnInit(true);
546:  32: 	19 00 85 3B 00 00 0B 00 00 00 00 00 00 1B 93 5A 00 00 00 00 00 00 27 16 
547:      
548:      	// iPod = m_arrPod.Length;
549:  20: 	0F 00 8A 3B 00 00 36 01 C1 3A 00 00 
550:      
551:      	// m_arrPod.AddItem(kPod);
552:  22: 	55 01 C1 3A 00 00 0A 00 00 85 3B 00 00 16 
553:      
554:      	// XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kLevel.AddPod(kPod);
555: 134: 	19 19 19 2E 64 2D 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 71 2D 00 00 00 01 71 2D 00 00 09 00 A2 9C 00 00 00 01 A2 9C 00 00 13 00 00 00 00 00 00 1B 31 02 00 00 00 00 00 00 00 85 3B 00 00 16 
556:      
557:      	// iNum = 0;
558:  11: 	0F 00 8C 3B 00 00 25 
559:      
560:      	// if(iNum < kPod.NumAliens)
561:  44: 	07 CC 05 96 00 8C 3B 00 00 19 00 85 3B 00 00 09 00 83 38 00 00 00 01 83 38 00 00 16 
562:      
563:      		// kSpawnPt = kPod.GetSpawnPoint(iNum, vLoc, true);
564:  60: 		0F 00 87 3B 00 00 19 00 85 3B 00 00 1D 00 76 39 00 00 00 1B BC 34 00 00 00 00 00 00 00 8C 3B 00 00 00 88 3B 00 00 27 16 
565:      
566:      		// if(kSpawnPt != none)
567:  15: 		07 93 05 77 00 87 3B 00 00 2A 16 
568:      
569:      			// kSpawnPt.SnapToGround(32.0);
570:  36: 			19 00 87 3B 00 00 0F 00 00 6D 00 00 00 1B 4D 65 00 00 00 00 00 00 1E 00 00 00 42 16 
571:      
572:      			// eAlienType = class'XGGameData'.static.MapCharacterToPawn(arrPodMembers[iNum]);
573:  60: 			0F 00 86 3B 00 00 12 20 B2 00 00 00 1D 00 A6 00 00 00 00 1B F2 51 00 00 00 00 00 00 10 00 8C 3B 00 00 00 83 3B 00 00 16 
574:      
575:      			// bUseAltWeapon = (0x128 & int(kSpawn.kPod.eMainAltWeapon)) != 0;
576:  68: 			14 2D 00 80 3B 00 00 9B 9C 2C 80 38 3A 35 33 00 00 00 38 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 16 2C 00 16 
577:      
578:      			// kAlien = m_kPlayer.SpawnAlien(eAlienType, kSpawnPt, bUseAltWeapon);
579:  73: 			0F 00 89 3B 00 00 19 01 B5 3A 00 00 2A 00 D8 96 00 00 00 1B 76 66 00 00 00 00 00 00 00 86 3B 00 00 00 87 3B 00 00 4A 4A 4A 2D 00 80 3B 00 00 4A 16 
580:      
581:      			// if(kAlien != none)
582:  15: 			07 65 05 77 00 89 3B 00 00 2A 16 
583:      
584:      				// if (iNum == 0) // only apply level to leader
585:  15: 				07 FD 03 9A 00 8C 3B 00 00 25 16 
586:      				
587:      					// kAlien.m_iSmokeGrenades = 0x7 & int(kSpawn.kPod.eMainAltWeapon); // store the main alien's level in its unit
588:  84: 					0F 19 00 89 3B 00 00 09 00 AE 30 00 00 00 01 AE 30 00 00 9C 2C 07 38 3A 35 33 00 00 00 38 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 16 
589:      					
590:      								// kSpawn.kPod.eMainAltWeapon
591:      								// 35 33 00 00 00 38 00 00 00 00 00 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 
592:      					
593:      									// kSpawn.kPod
594:      									// 35 79 3B 00 00 7B 3B 00 00 00 01 00 84 3B 00 00 
595:      
596:      									// From GetPodCharArray
597:      									// kPod.eMainAltWeapon
598:      									// 35 33 00 00 00 38 00 00 00 00 00 48 70 3B 00 00 
599:      					
600:      				// kAlien.DebugAnims(none, none); // call the helper function to "level up" potentially any unit
601:  34: 				19 00 89 3B 00 00 0C 00 00 00 00 00 00 1B 91 14 00 00 00 00 00 00 2A 2A 16 0B 
602:      				
603:      				// kAlien.m_kBehavior.InitPod(iPod, kPod.m_bEnabled);
604:  92: 				19 19 00 89 3B 00 00 09 00 D9 30 00 00 00 01 D9 30 00 00 32 00 00 00 00 00 00 1B D8 3A 00 00 00 00 00 00 00 8A 3B 00 00 19 00 85 3B 00 00 0A 00 7E 38 00 00 00 2D 01 7E 38 00 00 16 
605:      
606:      				// if(kPod.m_bEnabled)
607:  34: 				07 C5 04 19 00 85 3B 00 00 0A 00 7E 38 00 00 00 2D 01 7E 38 00 00 
608:      
609:      					// kPod.AddAlien(kAlien);
610:  40: 					19 00 85 3B 00 00 13 00 00 00 00 00 00 1B 97 01 00 00 00 00 00 00 00 89 3B 00 00 16 
611:      
612:      				// arrAlienList.AddItem(kAlien);
613:  22: 				55 00 82 3B 00 00 0A 00 00 89 3B 00 00 16 
614:      
615:      				// ++ nSpawned;
616:  11: 				A5 00 8B 3B 00 00 16 
617:      
618:      				// if(m_bHasTerrorPods)
619:  13: 				07 0F 05 2D 01 C0 3A 00 00 
620:      
621:      					// InitTerroristAlien(kAlien, iNum);
622:  28: 					1B F5 3A 00 00 00 00 00 00 00 89 3B 00 00 00 8C 3B 00 00 16 
623:      
624:      				// kAlien.m_kPod = kPod;
625:  40: 				0F 19 00 89 3B 00 00 09 00 6B AF 00 00 00 01 6B AF 00 00 00 85 3B 00 00 
626:      
627:      				// kPod.m_arrAlienSpawnPts.AddItem(kSpawnPt);
628:  43: 				55 19 00 85 3B 00 00 09 00 52 38 00 00 00 01 52 38 00 00 0A 00 00 87 3B 00 00 16 
629:      
630:      			// else
631:   3: 			06 90 05 
632:      
633:      				// kPod.m_aBadSpawnLoc.AddItem(vLoc);
634:  43: 				55 19 00 85 3B 00 00 09 00 3B 38 00 00 00 01 3B 38 00 00 0A 00 00 88 3B 00 00 16 
635:      
636:      		// else
637:   3: 		06 BE 05 
638:      
639:      			// kPod.m_aBadSpawnLoc.AddItem(vLoc);
640:  43: 			55 19 00 85 3B 00 00 09 00 3B 38 00 00 00 01 3B 38 00 00 0A 00 00 88 3B 00 00 16 
641:      
642:      		// ++ iNum;
643:  11: 		A5 00 8C 3B 00 00 16 
644:      
645:      		// goto J0x227; // [Loop Continue]
646:   3: 		06 27 02 
647:      
648:      	// kPod.PostSpawnInit();
649:  32: 	19 00 85 3B 00 00 0B 00 00 00 00 00 00 1B 54 5A 00 00 00 00 00 00 4A 16 
650:      
651:      	// m_kPlayer.OnSpawn(iSpawn, arrAlienList);
652:  49: 	19 01 B5 3A 00 00 1C 00 00 00 00 00 00 1B F5 56 00 00 00 00 00 00 00 8E 3B 00 00 00 82 3B 00 00 16 
653:      
654:      // return nSpawned;
655:  10: 04 00 8B 3B 00 00 
656:      
657:      // null-ops (325 bytes)
658: 325: 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 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 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 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 
659:      
660:      //return ReturnValue; endofscript
661:  11: 04 3A 8D 3B 00 00 53 
662:      
663:      
664:      [/AFTER_HEX]  

 

 

 

Memory sizes are in decimal.

 

Computing the memory size is the first step in building in a jump/relative offset correction tool.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...