GamingVirtue Posted July 22, 2014 Share Posted July 22, 2014 Honestly, I used to do this all the time back in Enemy Unknown, and now I can't seem to find a way to do that in Enemy Within. It used to be a simple hex edit and now it's...really not. At least, not in any way I can identify. Anyone know how to do this, by chance, or if it's even possible to do this anymore? I really enjoyed having a nice, calm game where I could throw my skyranger at one mission at a time. After all, why the hell are we limited to one skyranger and one base when the original managed so well with all the base and squad micromanagement? It just makes the game feel heavily scripted and adds artificial difficulty with the whole "who do we sacrifice" thing, which was NEVER a part of the original game if you had good enough squads to handle the aliens. Nevertheless, that's not the point...does anyone know if that can be modified and how it can be done if it's at all possible? Link to comment Share on other sites More sharing options...
Amphibious Posted July 22, 2014 Share Posted July 22, 2014 You probably just have to locate moved hex sequence within upk and delete appropriate uncompressed upk file. Link to comment Share on other sites More sharing options...
GamingVirtue Posted July 22, 2014 Author Share Posted July 22, 2014 Blargh...so, it turns out that the original bytecode for that is just...nowhere to be found. However, I did unpack the entire XComStrategyGame.upk and now I'm stuck, because the file I found under where it'd be edited is ReturnValue.intProperty and I don't know precisely how to edit such a file. Anyone more knowledgeable than myself on this subject, I would appreciate assistance in figuring out how to open this bleeding file. Notepad++ just gives me a bunch of [NUL] characters and some random assorted characters like percent signs and such. I'd really like to know how to manipulate these files because this could easily open the door to much bigger modding adventures on my part, and who doesn't like mods? :D EDIT: So, I figured out that there are also .class and .XGStrategyAI files related to this, but I can't figure out how to open them, either. This is getting more and more interesting by the second, but also more and more confusing... Link to comment Share on other sites More sharing options...
Amphibious Posted July 23, 2014 Share Posted July 23, 2014 Do you know the exact original hex code sequence you altered and how it was altered? if so please post it i could try to search for it. Also did you uncompress the upk file before searching for it. I don't understand what you mean by unpacking and what do you get by doing it. Link to comment Share on other sites More sharing options...
GamingVirtue Posted July 23, 2014 Author Share Posted July 23, 2014 I've searched the original hex sequence and it's not present in the code any longer, regardless of which file I check. It simply doesn't exist in that form at this point. I believe it's because, over the course of the patches, they changed the way it was implemented yet again, thereby wrecking the sequence I knew from before. For instance, it was EW Patch 1 when I first modded it and it's...well, obviously not Patch 1 anymore. Nevertheless, I extracted the entire contents of the upk to a folder and got a bunch of .class files and folders representing the internal hierarchy of the file, but I can't get any of the resultant files opened, and decompressing the upk doesn't seem to have done anything, hence why I turned to extracting the contents in full. I found GetNumAbductionSites in XComStrategyGame.upk with HxD and looked through its values, but I can't find anything that would result in the value in-game currently (by default, 3). This is becoming more and more frustrating by the second, because it seems like they purposely modified the way it was interpreted by the engine specifically to make modding it harder. Which is kinda stupid, imo, because modding extends the life of a game and, let's be honest, who really wants to release a game and have everyone stop playing it forever within 2-3 years? Link to comment Share on other sites More sharing options...
Krazyguy75 Posted July 23, 2014 Share Posted July 23, 2014 So, wait. What are you trying to do? Are you new to modding? Because if you are, we have wiki articles to help you learn. Link to comment Share on other sites More sharing options...
Amphibious Posted July 23, 2014 Share Posted July 23, 2014 Simply uncompress/decomile upk and search for the hex with some hex editor in the whole file (i don't understand why are you trying to chop it up when you don't know where that part of the code is loacted). if your sequence is long enough and/or specific it will have only few similar entries in entire file. Designator 2c usually comes before number entries so you should search for 2c 03 (in hex part, don't search it as text since it isn't there -03 hex will give you 0 on the text side.). but that will give too many hits so i was hoping you knew a longer sequence. Link to comment Share on other sites More sharing options...
Amphibious Posted July 23, 2014 Share Posted July 23, 2014 so i did a brute force hex editing metod and found your code... i took me about 40 mins to find it. search for for the 2C 03 16 07 B1 00 98 19 01 00 as you're guessing just change teh second hex entry to 02. and voila! enjoy only 2 abducion sites at once. if you want only 1 at the time change it to 01. !! enjoy Link to comment Share on other sites More sharing options...
Amineri Posted July 24, 2014 Share Posted July 24, 2014 If you are using UE Explorer, I'm pretty sure that in XComStrategyGame.upk / XGStrategyAI, the function : function int GetNumAbductionSites() { return 3; } is what determined the number of abduction sites spawned as part of the abduction blitz. For Long War in EW this is the function that JL modded to make only a single abduction per blitz (simply changing the 3 to a 1). And here's the UPKmodder file we use to make the change : MODFILEVERSION=4 UPKFILE=XComStrategyGame.upk GUID=BB 93 C6 C8 D2 91 82 44 87 9B 79 9B 49 5B 8D E9 // XComStrategyGame_EW_patch3.upk FUNCTION=GetNumAbductionSites@XGStrategyAI //sets number of abduction sites to 1 [BEFORE_HEX] [HEADER] 0e 00 00 00 0a 00 00 00 [/HEADER] [CODE] //return 3 04 2C 03 //return ReturnValue 04 3A 60 50 00 00 //EOS 53 [/CODE] [/BEFORE_HEX] [AFTER_HEX] [HEADER] 0a 00 00 00 0a 00 00 00 [/HEADER] [CODE] //return 1 04 2C 01 //null ops 0b 0b 0b 0b 0b 0b //EOS 53 [/CODE] [/AFTER_HEX] Link to comment Share on other sites More sharing options...
GamingVirtue Posted July 24, 2014 Author Share Posted July 24, 2014 Clearly, I don't understand this as well as I expected. Nevertheless, thank you. I can't believe I didn't remember UE Explorer... Also, I'm not new to modding, per se...XCOM modding, however, yes, I am very new to. I didn't expect it was going to be so involved, but without a modding toolset provided by the devs, I can see why it would be... Regardless, thank you all, and if it's not too much trouble, could I get a link to this wiki? I found one that I assumed to be it, but it contained a ton of broken links and appeared to be just a single cached page. Link to comment Share on other sites More sharing options...
Recommended Posts