Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
commander.txt
MOD_NAME=Commander's Choice - LW
AUTHOR=Peasly Wellbott
DESCRIPTION=Choose the class of your Squaddies! When being prompted to pick a Squaddie's first skill, the "Cycle Soldier" buttons on the bottom of the screen will instead cycle the soldier's class! Does not affect MECs or any soldier who has locked in their specialty, but should work for reward soldiers and special soldiers.
Version: 1.0
Compatible with XCOM Long War versions:
- All hopefully
UPK_FILE=xcomstrategygame.upk
OBJECT=XGSoldierUI.OnNextSoldier:AUTO
[BEFORE_CODE]
1B <SetActiveSoldier> 00 <.NextSoldier> 16 //SetActiveSoldier(NextSoldier)
[AFTER_CODE]
07 EF 01 //if(
84
84
84
19 01 <XGSoldierUI.m_kSoldier> 2A 00 <XGStrategySoldier.PerkLockedOut.ReturnValue> 00 1B <PerkLockedOut> //m_kSoldier.PerkLockedOut
2C 01 2C 01 28 //(1, 1, false)
16//
18 0E 00
77 01 <XGScreenMgr.m_iCurrentView> 2C 01 16 //|| m_iCurrentView != 1
16
18 20 00
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.IsATank.ReturnValue> 00 1B <IsATank> 16//||m_kSoldier.IsATank
16
18 20 00
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.IsAugmented.ReturnValue> 00 1B <IsAugmented> 16//||m_kSoldier.IsAugmented
16
1B <SetActiveSoldier> 00 <.NextSoldier> 16 //SetActiveSoldier(NextSoldier)
06 67 02 //else
19 1B <STORAGE> 16 13 00 <NullRef> 00 1B <AutoEquip> 01 <XGSoldierUI.m_kSoldier> 16 //STORAGE().AutoEquip(m_kSoldier)
19 01 <XGSoldierUI.m_kSoldier> 0C 00 <NullRef> 00 1B <SetSoldierClass> //m_kSoldier.SetSoldierClass
92 FD
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.GetClass.ReturnValue> 00 1B <GetClass> 16
2C 04 16 26 16 //(m_kSoldier.GetClass % 4) + 1)
16 //
1B <UpdateDoll> 16
OBJECT=XGSoldierUI.OnPrevSoldier:AUTO
[BEFORE_CODE]
1B <SetActiveSoldier> 00 <.PrevSoldier> 16 //SetActiveSoldier(PrevSoldier)
[AFTER_CODE]
07 F3 01 //if(
84
84
84
19 01 <XGSoldierUI.m_kSoldier> 2A 00 <XGStrategySoldier.PerkLockedOut.ReturnValue> 00 1B <PerkLockedOut> //m_kSoldier.PerkLockedOut
2C 01 2C 01 28 //(1, 1, false)
16//
18 0E 00
77 01 <XGScreenMgr.m_iCurrentView> 2C 01 16 //|| m_iCurrentView != 1
16
18 20 00
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.IsATank.ReturnValue> 00 1B <IsATank> 16//||m_kSoldier.IsATank
16
18 20 00
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.IsAugmented.ReturnValue> 00 1B <IsAugmented> 16//||m_kSoldier.IsAugmented
16
1B <SetActiveSoldier> 00 <.PrevSoldier> 16 //SetActiveSoldier(PrevSoldier)
06 6F 02 //else
19 1B <STORAGE> 16 13 00 <NullRef> 00 1B <AutoEquip> 01 <XGSoldierUI.m_kSoldier> 16 //STORAGE().AutoEquip(m_kSoldier)
19 01 <XGSoldierUI.m_kSoldier> 0C 00 <NullRef> 00 1B <SetSoldierClass> //m_kSoldier.SetSoldierClass
92 FD
92
19 01 <XGSoldierUI.m_kSoldier> 0A 00 <XGStrategySoldier.GetClass.ReturnValue> 00 1B <GetClass> 16
2C 02 16
2C 04 16 26 16 //((m_kSoldier.GetClass + 2) % 4) + 1)
16 //
1B <UpdateDoll> 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment