Jump to content
⚠ Known Issue: Media on User Profiles ×

Modpatcher


dreadylein

Recommended Posts

How do you mod class abilities? Such as the Sniper so he gets Squadsight as the first one? Anyone able to help me with this? I cant seem to be able to figure this out.

 

You need to edit UPK files. See the ReadMe for instructions and a tutorial on how to edit UPK files:

 

http://forums.nexusmods.com/index.php?/topic/820867-here-are-upk-modding-tools/

 

Inside that archive is a file called "Changes to UPK files.txt". It contains all Warspace changes as an example. Scroll to the bottom of that file for the abilities bit.

 

I have these tools, I just dont understand how to use them. This modding stuff is very confusing lol. The best way I have found so far (and understand) is ModPatcher. That worked well for me, but there are things I cant seem to figure out how to change with it, such as class abilities and ship weapon damage/range ect.

 

I think my issue is I cant figure out HOW to edit .UPK files. No matter how I open it, the file has a bunch of "NULL" words in black background. I think once I figure this part out, I will be ok.

 

And some files are just numbers, which is "hex" I guess... that is confusing as heck too.

Edited by Remenents
Link to comment
Share on other sites

  • Replies 249
  • Created
  • Last Reply

Top Posters In This Topic

How do you mod class abilities? Such as the Sniper so he gets Squadsight as the first one? Anyone able to help me with this? I cant seem to be able to figure this out.

 

You need to edit UPK files. See the ReadMe for instructions and a tutorial on how to edit UPK files:

 

http://forums.nexusmods.com/index.php?/topic/820867-here-are-upk-modding-tools/

 

Inside that archive is a file called "Changes to UPK files.txt". It contains all Warspace changes as an example. Scroll to the bottom of that file for the abilities bit.

 

I have these tools, I just dont understand how to use them. This modding stuff is very confusing lol. The best way I have found so far (and understand) is ModPatcher. That worked well for me, but there are things I cant seem to figure out how to change with it, such as class abilities and ship weapon damage/range ect.

 

I think my issue is I cant figure out HOW to edit .UPK files. No matter how I open it, the file has a bunch of "NULL" words in black background. I think once I figure this part out, I will be ok.

 

And some files are just numbers, which is "hex" I guess... that is confusing as heck too.

 

You're closer than you think. With Notepad++, activate the hex editor plug in on a upk file. And then you manually change the hex codes -- that is, figure out that this "2f" needs to be "3f" and type in (or search and replace) the changes.

 

More specifically, I use Unreal Explorer to find and look at the particular function I want to edit. Then I "view buffer" to look at the hex that represents that function.

 

Then I try to find some unique string of bytes within that function, and use search to get notepad++ in the right area. Then I spend a long time looking at the function and figuring out what hex does what. For example, if I see "2C 04" I know that either some parameter, operand or variable is being set to 4. I look at the hex code in UE and try to figure out if that's the right "04" that I want to change. If I want to change it to 3, then I substitute 03 for 04. If I want to change it to 20, I substitute 2C 14, because "14" is hex for the decimal "20." (At this point, I can't add or remove bytes, just alter them.) Then I save the upk and reload it in UE, and see if the code reads right.

 

Clear as mud, right?

Link to comment
Share on other sites

How do you mod class abilities? Such as the Sniper so he gets Squadsight as the first one? Anyone able to help me with this? I cant seem to be able to figure this out.

 

You need to edit UPK files. See the ReadMe for instructions and a tutorial on how to edit UPK files:

 

http://forums.nexusmods.com/index.php?/topic/820867-here-are-upk-modding-tools/

 

Inside that archive is a file called "Changes to UPK files.txt". It contains all Warspace changes as an example. Scroll to the bottom of that file for the abilities bit.

 

I have these tools, I just dont understand how to use them. This modding stuff is very confusing lol. The best way I have found so far (and understand) is ModPatcher. That worked well for me, but there are things I cant seem to figure out how to change with it, such as class abilities and ship weapon damage/range ect.

 

I think my issue is I cant figure out HOW to edit .UPK files. No matter how I open it, the file has a bunch of "NULL" words in black background. I think once I figure this part out, I will be ok.

 

And some files are just numbers, which is "hex" I guess... that is confusing as heck too.

 

You're closer than you think. With Notepad++, activate the hex editor plug in on a upk file. And then you manually change the hex codes -- that is, figure out that this "2f" needs to be "3f" and type in (or search and replace) the changes.

 

More specifically, I use Unreal Explorer to find and look at the particular function I want to edit. Then I "view buffer" to look at the hex that represents that function.

 

Then I try to find some unique string of bytes within that function, and use search to get notepad++ in the right area. Then I spend a long time looking at the function and figuring out what hex does what. For example, if I see "2C 04" I know that either some parameter, operand or variable is being set to 4. I look at the hex code in UE and try to figure out if that's the right "04" that I want to change. If I want to change it to 3, then I substitute 03 for 04. If I want to change it to 20, I substitute 2C 14, because "14" is hex for the decimal "20." (At this point, I can't add or remove bytes, just alter them.) Then I save the upk and reload it in UE, and see if the code reads right.

 

Clear as mud, right?

 

Holy hell lol. Well, I was actually expecting it to be a bit easier. It sounds like a real pain in the rump lol. I do understand how I could do it now though, I think. I guess the "hex" just gives me the shivers.

Link to comment
Share on other sites

You can get the hang of it pretty quickly, and get a feel for what you can and can't change. (Mostly think numbers and signs, although it looks like some of the guys on here are making progress moving beyond that). You may notice that a lot of us are posting upk changes threads to save everyone else research time. With those you can do a quick search-and-replace within notepad++ to achieve desired effects.

 

In terms of modding the order in which perks become available, there's a handy tool here:

http://personales.ya.com/anyone/xcom/perks.htm

that generates all the hex changes you'll need.

Edited by johnnylump
Link to comment
Share on other sites

Maybe I'm just too used to editing UPK files, but I can't even get modpatcher to work :/

 

Perhaps someone can tell me what I'm doing wrong?

 

1. Copy patcher.bat, DefaultGameCore.mod and modpatcher.exe to \XCom-Enemy-Unknown\Binaries\Win32\

2. Edit DefaultGameCore.mod with new settings.

3. Run patcher.bat

 

I then open XComGame.exe with a hex editor to confirm the changes have been applied, but nothing has changed. Same with "xcom-orginal.exe", both files are exactly the same with default settings.

 

I make more changes to DefaultGameCore.mod but same again. I've tried renaming DefaultGameCore.mod but that makes no difference either.

 

Contents of log.txt

18:5:25 Startup
18:5:25 steampath c:/program files (x86)/steam
18:5:25 steampath c:/program files (x86)/steam
18:5:25 checkcp return false
18:5:25 steampath c:/program files (x86)/steam
18:5:25 steampath c:/program files (x86)/steam
18:5:25 xcom binarie found @ + comp
18:5:25 steampath c:/program files (x86)/steam
18:5:25 steampath c:/program files (x86)/steam
18:5:25 xcom binarie found @ + comp
18:5:25 path vars org: c:/program files (x86)/steam\SteamApps\common\XCom-Enemy-Unknown\Binaries\Win32\XComGame.exe c:/program files (x86)/steam\SteamApps\common\XCom-Enemy-Unknown\Binaries\Win32\xcom-orginal.exe
18:5:25 steampath c:/program files (x86)/steam
18:5:25 steampath c:/program files (x86)/steam
18:5:25 xcom binarie found @ + comp
18:5:25 updateres var: c:/program files (x86)/steam\SteamApps\common\XCom-Enemy-Unknown\Binaries\Win32\XComGame.exe
18:5:25 getmodfile: DefaultGameCore.mod
18:5:25 done

 

Attempting to run modpatcher more than once gives an error "Error @ copy" and will only run again after deleting "xcom-orginal.exe", is this normal?

 

I must be missing a simple step somewhere? Seems to work for everyone else? I've tried v0.11 and v0.12, no difference.

 

This isn't related to the call home because the changes aren't even being applied to begin with :/

 

I've double and triple checked that I am actually making changes to DefaultGameCore.mod and then saving it because according to the log file, it looks to have been successful?

 

I'm going to kick myself when I realise I'm making a stupid mistake, aren't I? ;)

Link to comment
Share on other sites

All steps seems ok. Modpatcher can be run from any location as long as it is accompanied with *.mod file while using patcher.bat. Also you can use "modpatcher DefaultGameCore.ini" command instead of running patcher.bat.

 

My version is 0.12 and I always delete the backup it does, as it isn't relevant for me and causes trouble with XShape. Also DGC.mod in the archive is outdated since the 3rd patch (LOW and HIGH soldier's stats). I rename DGC.ini from config folder to DGC.mod and add pause at the end of patcher.bat.

 

BlackAlpha had some issues with Error @ copy.

 

Check date and time of XComGame.exe before and after patching.

Edited by Drakous79
Link to comment
Share on other sites

Thanks, Drakous79 :)

 

It turns out my antivirus didn't want to notify me it was blocking modpatcher! Sorted now :)

 

Strange about having to delete the backup though, seems kind of counterintuitive ;)

Edited by bokauk
Link to comment
Share on other sites

I have these tools, I just dont understand how to use them. This modding stuff is very confusing lol. The best way I have found so far (and understand) is ModPatcher. That worked well for me, but there are things I cant seem to figure out how to change with it, such as class abilities and ship weapon damage/range ect.

 

I think my issue is I cant figure out HOW to edit .UPK files. No matter how I open it, the file has a bunch of "NULL" words in black background. I think once I figure this part out, I will be ok.

 

And some files are just numbers, which is "hex" I guess... that is confusing as heck too.

 

See the ReadMe. It contains a tutorial you can follow as an example. Once you've completed the tutorial, you will know all the necessary steps.

Link to comment
Share on other sites

  • 2 months later...

I've blocked those addresses in my hosts file and confirmed that my browser can't reach them, blocked incoming and outgoing connections to my exe in windows firewall, and checked the exe with resource hacker to confirm that my changes to defaultgamecore remain, however, my changes fail to be applied to the game.

Please advise.

Link to comment
Share on other sites

I've blocked those addresses in my hosts file and confirmed that my browser can't reach them, blocked incoming and outgoing connections to my exe in windows firewall, and checked the exe with resource hacker to confirm that my changes to defaultgamecore remain, however, my changes fail to be applied to the game.

 

Please advise.

 

Go find the Warspace technical support thread and try all the options listed there -- many are generally applicable to any kind of modding.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...