Jump to content

Toolboks mods for changing Zhang's class, and changing the number


FlyingHigh10000000

Recommended Posts

The number...of abduction missions per group. Seems my topic title was a bit too long. x_x

 

 

Make a text file for each of these, paste the entirety of what's in each box of code,(One for each mod.) and load them through Toolboks, as custom mods. Make sure Toolboks is set to back up your files, in case you don't like the changes.

MOD_NAME=Zhang is now an Assault
AUTHOR=Metal_Izanagi(Thanks to Tiress for the code that needed to be changed, and johnnylump for the values that represent each soldier class.)
Description=Changes Zhang to an Assault, instead of a Heavy.\

version: 1.1

UPK_FILE=XComStrategyGame.upk
OFFSET=02147328
[MODDED_HEX]
{Changes Zhang to an Assault. The last 02 in the line determines Zhang's class. Included in brackets are the lines for each class. Replace the hex line for the class you want.}
{Sniper  03 00 00 00 01 00 8A 02 00 00 24 01 0F 35 DF 03}
{Heavy	 03 00 00 00 01 00 8A 02 00 00 24 02 0F 35 DF 03}
{Support 03 00 00 00 01 00 8A 02 00 00 24 03 0F 35 DF 03}
{Assault 03 00 00 00 01 00 8A 02 00 00 24 04 0F 35 DF 03}
03 00 00 00 01 00 8A 02 00 00 24 04 0F 35 DF 03
MOD_NAME=Change abduction mission count
AUTHOR=Metal_Izanagi(Thanks to Drakous79 for the function that needed to be changed.)
Description=Changes the number of abductions per "group" from three to one.

version: 1.0

UPK_FILE=XComStrategyGame.upk
OFFSET=04658096
[MODDED_HEX]
{You can change the last 01 in the code to adjust the number of abductions that you have to choose from. It's set to one, here, though the default is three. More than three may break the UI.}
{Original hex is 79 2F 00 00 0E 00 00 00 0A 00 00 00 04 2C 03 04}
79 2F 00 00 0E 00 00 00 0A 00 00 00 04 2C 01 04

Feel free to leave feedback, and if I messed up on something, please let me know here, so I can fix it.

 

Credit goes out to Drakous79, Tiress, and johnnylump. Without their knowledge of how UPKs work, and the research they did on the functions and values that the game uses, I wouldn't have been able to put these together.

Edited by FlyingHigh10000000
Link to comment
Share on other sites

It does work. I tested with changing the value to 04, and when I completed Friends In Low Places, Zhang was an Assault. The abduction mod works as well. Managed to get one abduction per group, and it should work with two, or the default three. I read in a different thread that the UI gets a bit buggy with more than three, though, so I wouldn't advise using more than three.

Edited by FlyingHigh10000000
Link to comment
Share on other sites

  • 2 weeks later...

Long story short: class of Annette Durand is random :) I got her as assault and support class.

 

She is missing CustomSoldier.soldierClass = [1-4] in XGFundingCouncil.BuildMission.

 

So I think that removing soldierClass for Shaojie Zhang will make his class random as well.

// Overwrite soldierClass with duplicate entry of SoldierRank
CustomSoldier.soldierClass = 2 to CustomSoldier.SoldierRank = 4

EW Patch 1 - 0F 35 E1 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 1F 43 68 69 6C 6F 6E 67 00 0F 35 DD 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 24 02 0F 35 1D FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 2C 02 0F 35 23 FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 2C 02 0F 35 1F FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 1D 34 01 00 00 0F 35 24 FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 2C 10 0F 35 20 FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 1D 33 01 00 00 0F 35 21 FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 2C 16 0F 35 1C FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 25 0F 35 1B FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 2C 14 0F 35 22 FB FF FF CD F9 FF FF 00 00 35 DE 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 26 0F 35 E0 03 00 00 E4 03 00 00 00 01 00 8A 02 00 00 24 02

 

E0 to DF

02 to 04

Link to comment
Share on other sites

I just verified offset and modded_hex from the first post with Enemy Within Patch 1 and everything is allright.

 

I can confirm that manual edit with HxD worked and Zhang had soldierClass = 4. No crash.

Link to comment
Share on other sites

For some reason, Zhang class mod doesn't work for me anymore. It crashes my game before it even gets to startup movies.

 

EDIT:

 

Currently putting together a new version of the mod, that adjusts the offset to the new one, thanks to the first EW patch.

Edited by FlyingHigh10000000
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...