BanjoOz Posted October 27, 2012 Share Posted October 27, 2012 Attached is my first attempt at a UPK mod for XCom UE... but because modpatcher doesn't work with such mods, I had to go a round-about way to make some way to "install" it without sharing the entire XComGame.upk file (which I considered a "no-no"). Hopefully just sharing the single edited Function script file is okay. This is a VERY "dirty" way to "one click install" such a mod, but I'm no programmer so this is the best I can do. It's probably less hassle to just make the hex edits yourself (see HERE) but I wanted to test if this worked... before I upload this properly (and I may just wait until a proper installer tool for UPK mods is available), I wanted to post this so that others can test out that this method works in their games. More information is in the "Readme.txt". "ModInstall.bat" is all you need to run to install the mod if you follow the directions. It assumes starting with an "unmodded" copy of the game (i.e. you haven't already decompressed your XComGame.upk file or run XSPACE) but experienced users/modders can just open up the .bat file in a text editor and delete the lines they don't need (such as decompressing the or just what to do from scratch!) fairly easily, to run this on modded game files. What It Does:Running "ModInstall.bat" will backup your XComGame.upk, decompress it, unpack it, exchange the original "GetPerkInTreeSupport.Function" file for my modded one, then repack the upk and clean up (deleting the unpacked files, etc.). Optionally, it will also ask if you want to run XSPACE on your XComGame.exe, in case you haven't already. Of course, if you're already making your own UPK mods, you can skip the whole .bat file "installer" and just rename the included "GetPerkInTreeSupport.Function.Mod" to "GetPerkInTreeSupport.Function" and repack it in your own XComGame.upk (with any other edited files/mods of your own). Hopefully this is helpful to other modders making more complex changes to UPKs that want to share their work without uploading entire uncompressed UPK files, too! Note 1: You'll need about 300mb of temporary free space on the game's hard drive for this to work without errors.Note 2: This will take a while to run, as it needs to unpack and repack the entire XComGame.upk. Be patient!Note 3: I really only did this to speed up "reinstalling" my own mod for testing... then thought it might be handy for others too. Link to comment Share on other sites More sharing options...
Jigain Posted October 27, 2012 Share Posted October 27, 2012 If you want people to test this (which I'm sure people will volunteer to do; I'm considering it myself), why not make a very quick juryrigged "proof of concept" edition that switches the very first talent around? Like give Assaults Headshot, give Heavies Run & Gun, give Snipers Smoke Screen and Support Fire Rocket? That way we can pretty much instantly say "yeah, that works" rather than (possibly) "doesn't work with old saves" or "have to play through a lot of the game before I can tell". Link to comment Share on other sites More sharing options...
BanjoOz Posted October 27, 2012 Author Share Posted October 27, 2012 (edited) If you want people to test this (which I'm sure people will volunteer to do; I'm considering it myself), why not make a very quick juryrigged "proof of concept" edition that switches the very first talent around? Like give Assaults Headshot, give Heavies Run & Gun, give Snipers Smoke Screen and Support Fire Rocket? That way we can pretty much instantly say "yeah, that works" rather than (possibly) "doesn't work with old saves" or "have to play through a lot of the game before I can tell".Good idea. I actually was more concerned that the installer (batch file) process worked, so others can do the same to share their own mods. I've tested this mod itself and I got Battlescanners (see the thread I linked to) in my existing game when my Support classes leveled up. A second poster made the same change I did and it worked for them too. I was, however, just about to level up two Support soldiers, so it was easy for me to test. You're right that it would be much easier for others to see if the mod actually installed/worked if it was the first perk that was changed! I'll do an alternative one and attach it here soon. Edited October 27, 2012 by banjo_oz Link to comment Share on other sites More sharing options...
PepprmintButler Posted October 27, 2012 Share Posted October 27, 2012 It works as intended for me, no trouble.It also does work with previous saves.I changed a few other abilities in the tree in the .mod file and had the patching work for that too. Link to comment Share on other sites More sharing options...
PepprmintButler Posted October 27, 2012 Share Posted October 27, 2012 Note that I seem to have trouble running this program to patch multiple times ; modifying the .mod and re-applying with the bat seems to make the game crash a launch systematically. I need to replace xcomganme.upk and the exe to get it working again.I'm not clear on the origin of the problem yet. Link to comment Share on other sites More sharing options...
BanjoOz Posted October 27, 2012 Author Share Posted October 27, 2012 (edited) Note that I seem to have trouble running this program to patch multiple times ; modifying the .mod and re-applying with the bat seems to make the game crash a launch systematically. I need to replace xcomganme.upk and the exe to get it working again.I'm not clear on the origin of the problem yet.I just noticed the exact same thing (or at least I think that was the reason) myself; I thought the mod wasn't working when the game crashed on start, but after replacing XComGame.upk and XComGame.exe with the original unmodded files then reapplying the patch (and XSPACE), and it worked fine. I'm not sure why. Attached is - as requested - a "first level" mod along the same lines: this one is for the Sniper and swaps the first perk "Headshot" with the second-level perk "Squad Sight". The readme.txt contains more info, including limitations I found when using a previous save (something that wasn't an issue with my Battlescanners mod, likely because there was no "choice" involved at that perk's level). While this quick and dirty method seems to work somewhat, it's clearly no substitute for a "proper" tool to install mods. I'm happy to post my progress here and welcome others to do the same with their own efforts (feel free to use/modify the batch files I've included in this thread), but I'd say it's best to wait for a more reliable/stable way to do this before "proper" distribution of these kind of UPK mods, don't you think? I've also attached "step by step" versions of the bat files I made... the idea being that although that means multiple bat files to run (just run each "step" in order, 1 to 6), you can control each step of the progress AND add or combine your own mods by just editing (or adding new) "Step 3" .bat files (the one that adds in the actual modded files). Edited October 27, 2012 by banjo_oz Link to comment Share on other sites More sharing options...
bokauk Posted October 27, 2012 Share Posted October 27, 2012 banjo_oz, good job on creating an interim mod installer while we wait for the Mod Manager :) Link to comment Share on other sites More sharing options...
BanjoOz Posted October 28, 2012 Author Share Posted October 28, 2012 banjo_oz, good job on creating an interim mod installer while we wait for the Mod Manager :)Thanks! It's VERY interim, and just a batch file that runs a bunch of stuff, but it's better than nothing and lets people play around with UPK modding fairly quickly. Obviously, I'm hoping someone much more skilled than me can make a tool that allows multi-mod patching tool and - fingers crossed! - a way to apply/use mods with UPK files more easily! Anyway, I'm thrilled to see my little batch file thingy is encouraging others to try out UPK modding! :D I frankly wish this could be done without needing to directly modify the main .exe but it seems sadly that is going to be the way it must be done... even though Firaxis could obviously have let just editing the ini file effect the fame (I hear the demo was like that?). :( Link to comment Share on other sites More sharing options...
Recommended Posts