Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MOD_NAME=Dump Roster To Log
- AUTHOR=swfdelicious
- DESCRIPTION=Automatically dumps your soldier roster to the game logs in CSV format whenever you access the barracks.
- /**************************************************************************************************************
- *
- * Warning! This mod completely overwrites XGBarracks.UpdateMainMenu, and is incompatible with any mods that attempt
- * to modify the same function.
- *
- * USAGE INSTRUCTIONS:
- *
- * After installing (via PatcherGUI or Long War Mod Manager), this mod will trigger automatically any time you open the
- * Barracks menu on the strategy layer.
- *
- * 1. Load your game to the strategy layer and click the Barracks button.
- * 2. Open the game log in any text editor, such as Notepad++.
- * On Windows, the log is found at "C:\Users\<yourname>\Documents\my games\XCOM - Enemy Within\XComGame\Logs\Launch.log".
- * 3. Search the log file for "DUMPING ROSTER DATA". Beneath this is comma-separated data for your soldiers, one per line.
- * The first row contains column headers to tell you what each value means.
- * 4. Copy these lines out into your spreadsheet of choice. You will have to delete the log timestamp from each line.
- *
- * The data ends once you reach the log which says "END OF ROSTER DATA". You may see your roster data multiple times, which is
- * normal; just take the last one in the log, which is most recent.
- *
- **************************************************************************************************************/
- UPK_FILE = XComStrategyGame.upk
- OBJECT = XGBarracksUI.UpdateMainMenu : AUTO
- [REPLACEMENT_CODE]
- // LogInternal("---------------------------------------------", name("Roster Data"));
- E7 1F <%t "---------------------------------------------"> 38 60 1F <%t "Roster Data"> 16
- // LogInternal("------------ DUMPING ROSTER DATA ------------", name("Roster Data"));
- E7 1F <%t "------------ DUMPING ROSTER DATA ------------"> 38 60 1F <%t "Roster Data"> 16
- // LogInternal("---------------------------------------------", name("Roster Data"));
- E7 1F <%t "---------------------------------------------"> 38 60 1F <%t "Roster Data"> 16
- // LogInternal("Name,HP,Mobility,Will,Aim,Defense,Class", name("Roster Data"));
- E7 1F <%t "Name,HP,Mobility,Will,Aim,Defense,Class"> 38 60 1F <%t "Roster Data"> 16
- // for (iMenuOption = 0; iMenuOption < BARRACKS().m_arrSoldiers.Length; iMenuOption++)
- 0F 00 <.iMenuOption> 25
- [#label_0x0105]
- 07 [@label_0x0577] 96 00 <.iMenuOption> 36 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) 16
- // if (BARRACKS().m_arrSoldiers[iMenuOption] == none || BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_HP] == 0)
- 07 [@label_0x01C0] 84 72 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) 2A 16 18 [@] ( 9A 1A 25 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 25 16 16 )
- // continue;
- 06 [@label_0x0569]
- [#label_0x01C0]
- // kOption.strText = BARRACKS().m_arrSoldiers[iMenuOption].GetName(eNameType_Full);
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.GetName.ReturnValue> 00 ( 1B <GetName> 24 03 16 )
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_HP];
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 38 53 1A 25 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 16 16
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_Mobility];
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 38 53 1A 2C 03 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 16 16
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_Will];
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 38 53 1A 2C 07 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 16 16
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_Offense];
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 38 53 1A 26 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 16 16
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kChar.aStats[eStat_Defense];
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 38 53 1A 2C 02 35 <XComGame.XGTacticalGameCoreNativeBase.TCharacter.aStats> <XComGame.XGTacticalGameCoreNativeBase.TCharacter> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kChar> 00 ( 01 <XGStrategySoldier.m_kChar> ) 16 16
- // kOption.strText $= "," $ BARRACKS().m_arrSoldiers[iMenuOption].m_kSoldier.kClass.strName;
- 0E <Core.Object.ConcatEqual_StrStr.ReturnValue> 61 42 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 70 1F <%t ","> 35 <XComGame.XGTacticalGameCoreNativeBase.TClass.strName> <XComGame.XGTacticalGameCoreNativeBase.TClass> 00 00 35 <XComGame.XGTacticalGameCoreNativeBase.TSoldier.kClass> <XComGame.XGTacticalGameCoreNativeBase.TSoldier> 00 00 19 10 00 <.iMenuOption> 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.m_arrSoldiers> 00 ( 01 <XGFacility_Barracks.m_arrSoldiers> ) [@] <XGStrategySoldier.m_kSoldier> 00 ( 01 <XGStrategySoldier.m_kSoldier> ) 16 16
- // LogInternal(kOption.strText, name("Roster Data"));
- E7 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 00 00 <.kOption> 38 60 1F <%t "Roster Data"> 16
- [#label_0x0569]
- // for loop: iMenuOption++
- A5 00 <.iMenuOption> 16
- // for loop: jump to top
- 06 [@label_0x0105]
- // end for
- [#label_0x0577]
- // LogInternal("---------------------------------------------", name("Roster Data"));
- E7 1F <%t "---------------------------------------------"> 38 60 1F <%t "Roster Data"> 16
- // LogInternal("------------ END OF ROSTER DATA -------------", name("Roster Data"));
- E7 1F <%t "------------ END OF ROSTER DATA -------------"> 38 60 1F <%t "Roster Data"> 16
- // LogInternal("---------------------------------------------", name("Roster Data"));
- E7 1F <%t "---------------------------------------------"> 38 60 1F <%t "Roster Data"> 16
- // ConsoleCommand("flushlog");
- 0E <Engine.Actor.ConsoleCommand.ReturnValue> 1B <ConsoleCommand> 1F <%t "flushlog"> 4A 16
- // Original function follows from here
- 40 01 <@m_arrMenuOptions> 25 36 01 <@m_arrMenuOptions> 16
- 55 01 <@m_arrMenuOptions> [@] ( 26 16 )
- 07 [@label_0x0069] 82 19 1B <HQ> 16 [@] <XGHeadQuarters.HasFacility.ReturnValue> 00 ( 1B <HasFacility> 2C 0C 16 ) 18 [@] ( 81 1B <ISCONTROLLED> 16 16 16 )
- 55 01 <@m_arrMenuOptions> [@] ( 2C 07 16 )
- [#label_0x0069]
- 07 [@label_0x009D] 19 1B <HQ> 16 [@] <XGHeadQuarters.HasFacility.ReturnValue> 00 ( 1B <HasFacility> 2C 11 16 )
- 55 01 <@m_arrMenuOptions> [@] ( 2C 04 16 )
- [#label_0x009D]
- 55 01 <@m_arrMenuOptions> [@] ( 2C 05 16 )
- 55 01 <@m_arrMenuOptions> [@] ( 2C 06 16 )
- 07 [@label_0x00D7] 1B <AreAnyMedalsAvailable> 16
- 55 01 <@m_arrMenuOptions> [@] ( 2C 08 16 )
- [#label_0x00D7]
- 0F 00 <.iMenuOption> 25
- [#label_0x00E2]
- 07 [@label_0x0698] 96 00 <.iMenuOption> 36 01 <@m_arrMenuOptions> 16
- 07 [@label_0x0184] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 26 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 26 01 <@m_strBaseViewNames>
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 26 01 <@m_strBaseViewHelp>
- 06 [@label_0x05FA]
- [#label_0x0184]
- 07 [@label_0x0211] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 2C 07 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 07 01 <@m_strBaseViewNames>
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 07 01 <@m_strBaseViewHelp>
- 06 [@label_0x05FA]
- [#label_0x0211]
- 07 [@label_0x0308] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 2C 05 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 05 01 <@m_strBaseViewNames>
- 07 [@label_0x02C1] 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.HasDeadSoldiers.ReturnValue> 00 ( 1B <HasDeadSoldiers> 16 )
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 05 01 <@m_strBaseViewHelp>
- 06 [@label_0x0305]
- [#label_0x02C1]
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 26
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 01 <@m_strNoSoldiersDied>
- [#label_0x0305]
- 06 [@label_0x05FA]
- [#label_0x0308]
- 07 [@label_0x0395] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 2C 04 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 04 01 <@m_strBaseViewNames>
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 04 01 <@m_strBaseViewHelp>
- 06 [@label_0x05FA]
- [#label_0x0395]
- 07 [@label_0x056A] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 2C 06 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 06 01 <@m_strBaseViewNames>
- 07 [@label_0x044E] 97 35 <XGStrategyActorNativeBase.TItem.iCash> <XGStrategyActorNativeBase.TItem> 01 00 1B <STAFF> 26 16 1B <GetResource> 24 00 16 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 26
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 01 <@m_strErrNoMoneyForSoldiers>
- 06 [@label_0x0567]
- [#label_0x044E]
- 07 [@label_0x0520] 98 19 1B <HQ> 16 [@] <XGHeadQuarters.GetSoldierCapacity.ReturnValue> 00 ( 1B <GetSoldierCapacity> 16 ) 92 92 19 1B <BARRACKS> 16 [@] <XGFacility_Barracks.GetNumSoldiers.ReturnValue> 00 ( 1B <GetNumSoldiers> 16 ) 19 1B <HQ> 16 [@] <XGHeadQuarters.GetStaffOnOrder.ReturnValue> 00 ( 1B <GetStaffOnOrder> 24 01 16 ) 16 19 1B <ENGINEERING> 16 [@] <XGFacility_Engineering.GetNumShivsOrdered.ReturnValue> 00 ( 1B <GetNumShivsOrdered> 16 ) 16 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 26
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 01 <@m_strErrOTRRequired>
- 06 [@label_0x0567]
- [#label_0x0520]
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 06 01 <@m_strBaseViewHelp>
- [#label_0x0567]
- 06 [@label_0x05FA]
- [#label_0x056A]
- 07 [@label_0x05F7] 9A 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 2C 08 16
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strText> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 08 01 <@m_strBaseViewNames>
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 25
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.strHelp> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 1A 2C 08 01 <@m_strBaseViewHelp>
- 06 [@label_0x05FA]
- [#label_0x05F7]
- 06 [@label_0x068A]
- [#label_0x05FA]
- 07 [@label_0x0661] 82 1B <ISCONTROLLED> 16 18 [@] ( 81 19 1B <SETUPMGR> 16 [@] <XGSetupPhaseManager.IsBarracksSectionEnabled.ReturnValue> 00 ( 1B <IsBarracksSectionEnabled> 38 3D 10 00 <.iMenuOption> 01 <@m_arrMenuOptions> 16 ) 16 16 )
- 0F 35 <XComGame.XGTacticalScreenMgr.TMenuOption.iState> <XComGame.XGTacticalScreenMgr.TMenuOption> 00 01 00 <.kOption> 26
- [#label_0x0661]
- 55 35 <XComGame.XGTacticalScreenMgr.TMenu.arrOptions> <XComGame.XGTacticalScreenMgr.TMenu> 00 00 00 <.kMainMenu> [@] ( 00 <.kOption> 16 )
- [#label_0x068A]
- A5 00 <.iMenuOption> 16
- 06 [@label_0x00E2]
- [#label_0x0698]
- 0F 35 <XGBarracksUI.TBarracksMainMenu.mnuOptions> <@TBarracksMainMenu> 00 01 01 <@m_kMainMenu> 00 <.kMainMenu>
- 04 0B
- 53
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement