XCOM:EU Change Zhang's class

From Nexus Mods Wiki
Revision as of 03:19, 17 November 2018 by Dubiousintent (talk | contribs) (Added 'Category:Mod_Creation' & 'Category:Mods')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This is an adaptation of a mod originally published in the thread Toolboks mod for changing Zhang's class by FlyingHigh10000000. It has been updated by ProjectMercy to work with EW patch 3 and the UPKUtils/PatcherGUI tool set instead of ToolBoks, and posted here with permission. It is referenced in the How to DIY common mod solutions - XCOM:EU 2012 wiki article.

This mod simply makes the Council "reward" soldier for the Slingshot DLC "Friends in Low Places" mission (Zhang) be a different class than the hard-coded "assault". It is also possible to make him have a different initial Rank, Aim, Will, and HP. These changes require editing specific, clearly marked locations in the mod. The range of acceptable values are given.

Game Version Compatibility

Game and patch compatibility is given in the mod description section. Initially it is compatible with EW, patch 3. See Patches for how to determine your current game version.

Known Issues

Not tested for EU compatibility.
Not tested for compatibility with other mods, but is unlikely to affect any that do not modify the same soldier.

Programs and Tools

Modding Tools:

Details

Search for the *** in the "AFTER_CODE" section for edit instructions. You can edit Zhang's Class, Rank, Aim, Will, and HP. These changes must be implemented before the "Friends in Low Places" mission is completed. Once Zhang has been added to the barracks, they will not be recognized.

MOD_NAME=Change Zhang's Class
AUTHOR=ProjectMercy
DESCRIPTION= Change Zhang's main stats before he's created. Will do nothing if mission
"Friends in Low Places" is already over. Search for "***" to find things you may change.

Compatible with XCOM Enemy Within (EW), patch 3.
This is a PatcherGUI/UPKUtils compatible mod file. Please read the documentation accompanying those tools to properly implement. { Curly brackets are used for comments. Comments may be multi-line. Try not to forget to close brackets opened. }
{ Do not use curly brackets inside comments!!! }
// You can use C-style comments as well.
// End of description. Code follows:
UPK_FILE=XComStrategyGame.upk OBJECT=XGFundingCouncil.BuildMission:AUTO
[BEFORE_CODE] 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.soldierClass> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 24 02 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.SoldierRank> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 24 04 14 2D 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.bPsiGift> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 28 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.HP> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C 09 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.Aim> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C 4B 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.Will> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C 46

[AFTER_CODE] // CustomSoldier.soldierClass = 2; 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.soldierClass> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 24 // *** Zhang's Class : Change 02 to 01 for sniper, 03 for support or 04 for assault 02
// CustomSoldier.SoldierRank = 4; 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.SoldierRank> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 24 // *** Change Zhang's starting Rank/Level. Change 04 to somewhere between 01 and 07 04
// CustomSoldier.bPsiGift = false; 14 2D 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.bPsiGift> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> // *** Set to 27 for TRUE, though he always ends up a PsiCandidate for me, so I'm not sure what the deal is. 28
// CustomSoldier.HP = 9; 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.HP> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C // *** Change the 09 to how ever many starting HP you want. Avoid setting it larger than 30. Must be in Hex, so 12 HP would be 0C 09
// CustomSoldier.Aim = 75; 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.Aim> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C // *** Change the 4B to whatever you want his starting Aim to be. Must be in Hex, so If you wanted Aim of 65, set it to 41 4B
// CustomSoldier.Will = 70; 0F 35 <XGFundingCouncil.TFundingCouncilRewardSoldier.Will> < XGFundingCouncil.TFundingCouncilRewardSoldier> 00 01 00 <.CustomSoldier> 2C // *** Change the 46 to whatever you want his starting Will to be. Must be in Hex, so If you wanted Will of 40, set it to 28 46

References

Referred to by this article:


That refer to this article: