RBrim08 Posted November 15, 2013 Share Posted November 15, 2013 Would it be possible to make it so that "New Guy" from the Officer's Training school is automatically bought or always on? Essentially removing the Rookie rank from XCOM: EU/EW from the start of the game. Link to comment Share on other sites More sharing options...
endersblade Posted November 15, 2013 Share Posted November 15, 2013 I would imagine, now, I've not actually tested this, but if you change it to require the rank of Squaddie in the DGC file, I think the OTS will unlock earlier, and you can get the ability as soon as you build it. So not instantly, but much earlier than normal. Link to comment Share on other sites More sharing options...
PsyckoSama Posted November 15, 2013 Share Posted November 15, 2013 Yeah, just change the price and rank requirements... maybe rename it "Hiring Standards" :p Link to comment Share on other sites More sharing options...
Bertilsson Posted November 15, 2013 Share Posted November 15, 2013 (edited) In XCOM EU it would be very simple to remove the condition that checks if OTS New Guy is bought before upgrading new soldiers to squaddie.I don't imagine there is any difference regarding this in EW. I'll probably attempt making a little mod for this in a week or so. Edit: Still works the same:XGFacility_Barracks.AddNewSoldier if((HasOTSUpgrade(3)) && !bBlueshirt) { if(kSoldier.GetRank() == 0) { kSoldier.LevelUp(); } } Changing the condition to if((HasOTSUpgrade(3)) && !bBlueshirt) is really all that is needed. Edited November 15, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
RBrim08 Posted November 17, 2013 Author Share Posted November 17, 2013 In XCOM EU it would be very simple to remove the condition that checks if OTS New Guy is bought before upgrading new soldiers to squaddie.I don't imagine there is any difference regarding this in EW. I'll probably attempt making a little mod for this in a week or so. Edit: Still works the same:XGFacility_Barracks.AddNewSoldier if((HasOTSUpgrade(3)) && !bBlueshirt) { if(kSoldier.GetRank() == 0) { kSoldier.LevelUp(); } } Changing the condition to if((HasOTSUpgrade(3)) && !bBlueshirt) is really all that is needed.So... where do I go to change that? I have no modding experience with XCOM. Link to comment Share on other sites More sharing options...
Bertilsson Posted November 18, 2013 Share Posted November 18, 2013 (edited) So... where do I go to change that? I have no modding experience with XCOM. You would first decompress XComStrategyGame.upkThen you would open XGFacility_Barracks.AddNewSoldier in a tool called UE ExplorerThen you would use token view to find this section: (047/02F) [07 AD 00 82 1B 24 14 00 00 00 00 00 00 24 03 16 18 0D 00 81 2D 00 1A 32 00 00 16 16] JIN(32/28) -> NF(29/25) -> VF(12/12) -> BC(2/2) -> EFP(1/1) -> S(15/11) -> NF(12/8) -> BV(10/6) -> LV(9/5) -> EFP(1/1) -> EFP(1/1) if((HasOTSUpgrade(3)) && !bBlueshirt) Then you would break it down into components like this: Goto virtual memory AD if what follows is not true : 07 AD 00 && operator : 82 HasOTSUpgrade(3) : 1B 24 14 00 00 00 00 00 00 24 03 16 !bBlueshirt : 18 0D 00 81 2D 00 1A 32 00 00 16 End of && operator : 16 Then you would remove the unwanted parts like this Goto virtual memory AD if what follows is not true : 07 AD 00 !bBlueshirt : 18 0D 00 81 2D 00 1A 32 00 00 16 And concatenate the remaining parts like this: 07 AD 00 18 0D 00 81 2D 00 1A 32 00 00 16 And then you would have to add 0B-tokens to fill in the missing storage space for the things you removed like this: 07 AD 00 18 0D 00 81 2D 00 1A 32 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B Then you would use a hex editor like HxD to edit XComStrategyGame.upk and replace This: 07 AD 00 82 1B 24 14 00 00 00 00 00 00 24 03 16 18 0D 00 81 2D 00 1A 32 00 00 16 16 With: 07 AD 00 18 0D 00 81 2D 00 1A 32 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B Then you would reload the modified XComStrategyGame.upk file into UE Explorer and verify that the modified code has not changed the virtual memory location where the if statement should jump if not true. Since I didn't mention that detail earlier you would have to roll back to original XComStrategyGame.upk, open it in UE Explorer again and figure out where the virtual memory target line originally existed by finding it in the parenthesis of this section: (0AD/081) [1B F8 33 00 00 00 00 00 00 00 1C 32 00 00 16] VF(19/15) -> LV(9/5) -> EFP(1/1) UpdateOTSPerksForSoldier(kSoldier) Then you would re-apply the changes via HxD and open in UE Explorer again, to finally be able to confirm that the target AD was in fact unchanged and you have completed the mod. If you instead had discovered that the target address was indeed changed you would have been best of by using my little jump offset repair tool to fix the virtual memory size in the function header and any additional jump offsets that may have been broken by your mod. But fortunately that would not happen in this case. Finally you would possibly start a religion dedicated to praising the user-friendliness provided by Firaxis in the new versions of XCom :smile: OR you would wait for toolboks to be updated for Enemy Within, save the following in a text file and load it as a custom toolboks mod: MOD_NAME=Cheat mod to automatically upgrade all rookies to squaddie like OTS New Guy AUTHOR=Bertilsson DESCRIPTION=See MOD_NAME above. Version: 1.2 Offset corrected for Enemy Within Patch 1 Compatible with XCOM Enemy Within version Patch 1. UPK_FILE=XComStrategyGame.upk OFFSET=3539723 [MODDED_HEX] 07 AD 00 81 2D 00 1A 32 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B Was that answer to your question? :smile: EDIT: In above examples there are 07 AD 00 (jump to virtual memory 00 AD if following is not true:) Some weird 18 0D 00 (I'm guessing this is related to the removed && and means something like if not true skip 13 virtual memory bytes).By just getting rid of them and adding 3 more 0B tokens in the end of the example it works like a charm. So to finish the example:Get rid of the 18 0D 00 thing by changingThis:07 AD 00 18 0D 00 81 2D 00 1A 32 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0Bto this:07 AD 00 81 2D 00 1A 32 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B Sorry for being lazy and not testing that it actually worked. Have tested now. And have also corrected the toolboks mod. Edited December 3, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
FirebrandXL Posted November 27, 2013 Share Posted November 27, 2013 Man i tried for hours to figure this s#*! out, but its not working. If I go the simple route using toolbooks (toolbooks is updated for EW) to add it as a custom mod, the game crashes when starting any mission. If I decompress the UPK and look for the function, i dont find the described section. I found the described function in object view, but everything else looks way different and I have no idea how to proceed. This is frustrating :[ UE Explorer is not very user friendly i have to say... Link to comment Share on other sites More sharing options...
Bertilsson Posted November 27, 2013 Share Posted November 27, 2013 It was my bad :( See edit in above post. However it seems very strange that you cannot find anything like the examples in your game. Are you really looking at the upk's inside XEW folder and not the old Enemy Unknown files? Link to comment Share on other sites More sharing options...
FirebrandXL Posted November 28, 2013 Share Posted November 28, 2013 Wow Aweseome dude, it works perfectly fine now, no crashes or anything. And i will figure out the UE thing eventually I think :) Thanks a lot, I really appreciate your help. Link to comment Share on other sites More sharing options...
Bertilsson Posted December 3, 2013 Share Posted December 3, 2013 I have now updated the toolboks mod in the example above to be compatible with EW Patch 1. Link to comment Share on other sites More sharing options...
Recommended Posts