bokauk Posted September 9, 2013 Share Posted September 9, 2013 It's been mentioned to me that people are interested in implementing the "Display XP" feature of ToolBoks, for use in other mods.Rather than re-invent the wheel when the work has already been done, I'm happy to share how I did it. It's no big secret, I'm just useless when it comes to documenting things as I find them and then quickly move on to the next thing that interests me :smile:I do however, admire those that take the time to document their findings and write up helpful articles, especially the efforts of Amineri, dubiousintent and others :smile:The file and location of interest for the XP mod is:XComGame > UIUnitGermanMode > UpdateHeaderLine 33Change this: AS_SetSoldierInformation(m_kUnit.SafeGetCharacterFullName(), m_kUnit.SafeGetCharacterNickname(), class'UIUtilities'.static.GetClassLabel(m_kUnit.GetSoldierClass(), kCharacterSoldier.m_kChar.bHasPsiGift), class'UIUtilities'.static.GetRankLabel(kCharacterSoldier.m_kSoldier.iRank), kCharacterSoldier.LeveledUp()); To this: AS_SetSoldierInformation(m_kUnit.SafeGetCharacterFullName(), (((("XP: " $ string(kCharacterSoldier.GetXP())) $ " / ") $ string(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.GetXPRequired(kCharacterSoldier.m_kSoldier.iRank + 1))) $ " ") $ m_kUnit.SafeGetCharacterNickname(), class'UIUtilities'.static.GetClassLabel(m_kUnit.GetSoldierClass(), kCharacterSoldier.m_kChar.bHasPsiGift), class'UIUtilities'.static.GetRankLabel(kCharacterSoldier.m_kSoldier.iRank), kCharacterSoldier.LeveledUp()); You'll need to make room for all those extra bytes, so I removed the "else" part of the first "if" statement, which relates to multiplayer.The if/jump addresses will be put out, so they will have to be updated.Here's a ToolBoks Custom Mod so you can easily use the bytecode for your own mods :smile: MOD_NAME=Display Soldiers' XP During Tactical Missions AUTHOR=bokauk DESCRIPTION=Press F1 during Tactical missions to view a soldier's current XP and the XP required to level up. UPK_FILE=XComGame.upk OFFSET=5657268 [MODDED_HEX] 6F 29 00 00 50 55 00 00 00 00 00 00 6C 29 00 00 00 00 00 00 00 00 00 00 6F 29 00 00 00 00 00 00 97 00 00 00 57 15 00 00 33 07 00 00 EB 05 00 00 0F 00 6E 29 00 00 19 01 50 29 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 07 23 06 9A 38 3A 19 01 E9 F9 FF FF 09 00 AB FE FF FF 00 01 AB FE FF FF 38 3A 24 00 16 07 BA 05 84 19 01 50 29 00 00 0A 00 F6 32 00 00 00 1B 82 3D 00 00 00 00 00 00 16 18 20 00 19 01 50 29 00 00 0A 00 F8 32 00 00 00 1B 48 3E 00 00 00 00 00 00 16 16 07 8A 01 9A 35 D3 0D 00 00 D5 0D 00 00 00 00 19 00 6E 29 00 00 09 00 C0 A2 00 00 00 01 C3 A2 00 00 26 16 07 45 01 7B 19 01 50 29 00 00 0A 00 09 33 00 00 00 1B DC 5E 00 00 00 00 00 00 16 1F 00 16 1B AA 05 00 00 00 00 00 00 19 01 50 29 00 00 0A 00 09 33 00 00 00 1B DC 5E 00 00 00 00 00 00 16 19 01 50 29 00 00 0A 00 0F 33 00 00 00 1B DF 5E 00 00 00 00 00 00 16 1F 00 1F 00 28 16 06 7C 01 1B AA 05 00 00 00 00 00 00 19 01 50 29 00 00 0A 00 07 33 00 00 00 1B DE 5E 00 00 00 00 00 00 16 01 55 29 00 00 1F 00 1F 00 28 16 1B B7 05 00 00 00 00 00 00 28 16 06 E8 04 0F 00 6F 29 00 00 2E B4 A3 00 00 00 6E 29 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 1B AA 05 00 00 00 00 00 00 19 01 50 29 00 00 0A 00 09 33 00 00 00 1B DC 5E 00 00 00 00 00 00 16 70 70 70 70 70 1F 58 50 3A 20 00 38 53 19 00 6F 29 00 00 0A 00 9F A3 00 00 00 1B 7E 35 00 00 00 00 00 00 16 16 1F 20 2F 20 00 16 38 53 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 29 00 AE 76 00 00 00 1B 7F 35 00 00 00 00 00 00 92 35 38 0E 00 00 3D 0E 00 00 00 00 19 00 6F 29 00 00 09 00 76 A3 00 00 00 01 79 A3 00 00 2C 01 16 16 16 1F 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 16 19 01 50 29 00 00 0A 00 0F 33 00 00 00 1B DF 5E 00 00 00 00 00 00 16 16 12 20 E5 2A 00 00 5D 00 1E 2A 00 00 00 1B 90 31 00 00 00 00 00 00 38 3A 19 01 50 29 00 00 0A 00 62 B4 00 00 00 1B AF 34 00 00 00 00 00 00 16 2D 35 CB 0D 00 00 D5 0D 00 00 00 00 19 00 6F 29 00 00 09 00 C0 A2 00 00 00 01 C3 A2 00 00 16 12 20 E5 2A 00 00 3B 00 1A 2A 00 00 00 1B 59 34 00 00 00 00 00 00 35 38 0E 00 00 3D 0E 00 00 00 00 19 00 6F 29 00 00 09 00 76 A3 00 00 00 01 79 A3 00 00 16 19 00 6F 29 00 00 0A 00 9F A3 00 00 00 1B A7 43 00 00 00 00 00 00 16 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 1B B8 05 00 00 00 00 00 00 A8 01 59 29 00 00 38 53 FA 19 01 50 29 00 00 0A 00 35 34 00 00 00 1B 32 35 00 00 00 00 00 00 16 1A 25 19 01 50 29 00 00 09 00 0D 31 00 00 00 01 0D 31 00 00 16 16 A8 01 58 29 00 00 38 53 1B 6C 35 00 00 00 00 00 00 01 50 29 00 00 16 16 A8 01 57 29 00 00 38 53 19 01 50 29 00 00 0A 00 13 B3 00 00 00 1B BE 33 00 00 00 00 00 00 16 16 A8 01 56 29 00 00 38 53 1B 14 32 00 00 00 00 00 00 01 50 29 00 00 16 16 16 1B B7 05 00 00 00 00 00 00 28 16 06 23 06 1B 80 05 00 00 00 00 00 00 12 20 E5 2A 00 00 2C 00 15 2A 00 00 00 1B AC 32 00 00 00 00 00 00 19 01 50 29 00 00 0A 00 07 33 00 00 00 1B DE 5E 00 00 00 00 00 00 16 2C 03 4A 16 4A 16 1B B7 05 00 00 00 00 00 00 27 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 00 00 00 03 01 04 00 2E 6E 00 00 00 00 00 00 Hope this helps and saves people some time :smile:Always happy to help if I can, you only need to ask, although I'm a bit out of touch with any recent breakthroughs.I don't frequent this forum as much as I used to, so any other questions about ToolBoks and the features, it's probably best to catch me in the ToolBoks thread or send me a PM :smile: Link to comment Share on other sites More sharing options...
johnnylump Posted September 9, 2013 Share Posted September 9, 2013 Thanks, bokuak! Link to comment Share on other sites More sharing options...
Neonin Posted September 9, 2013 Share Posted September 9, 2013 The race is on to duplicate this, modify it into displaying Mobility (the Holy Grail itself) or both... ;) Link to comment Share on other sites More sharing options...
johnnylump Posted September 10, 2013 Share Posted September 10, 2013 Well, ideally we'll be able to get both XP and mobility on the character card in the Strategy Game, where it would be most useful -- bokuak's method has helped me figure out where to do that ... now it's just figuring out how to pass the right data to the actionscript. Link to comment Share on other sites More sharing options...
Recommended Posts