XCOM: Enemy Unknown

XCOM: Enemy Unknown

61 ratings
How to make your very own mod for XCOM:EU
By Kodiak Ghost
A simple tutorial for making a basic mod for XCOM: Enemy Unknown. What you can mod is limited, due to the limitations Firaxis has put into place, and they've added some post-release restrictions, but this guide will explain what you can do, how to do it, and how to get around Firaxis' attempts to stifle modding thus far.
   
Award
Favorite
Favorited
Unfavorite
Intro: What you need and where to get it.
Modding XCOM is limited, but what we can do is very easy to do. I know there are some programs on XCOM Nexus[xcom.nexusmods.com] that automate a lot of this, but I personally like to mess around with things myself. There are a few caveats, but I'll go over everything I can remember below. Someone who is more concise could probably boil this down to 500 characters, but you have me, and I ramble and repeat myself. A lot. Sorry.

First off, you're going to need a few things. First is a copy of XCOM, second is your favorite notepad program, and lastly, a program to explore the .exe. Links below to my preferences, although I'm sure there are a myriad of others that work just as well or better.

  • Windows Notepad works perfectly, but I happen to like this one[notepad-plus-plus.org] a lot more. Any basic text editor will work though.

  • Resource Hacker[www.angusj.com] is a very simple, lightweight, and free program that will let you explore the .exe.
How to make the mod.
Here's a breakdown of how to make your own mod, I apologize for the long wall of text. I'm sure I'll repeat myself, but make backups of everything. Make backups of the original files you edit, make backups of your modded files in case you want to edit them slightly, make backups of everything!

  • Step 1: Install Resource Hacker and the Notepad program if you don't want to use Window's Notepad.

  • Step 2: Make sure XCOM:EU is fully up to date, then use Steam to Verify Integrity. (Right click on the XCOM: Enemy Unknown in your game library, select Properties, then Local Files, then Verify Integrity of Game Cache.) Once it is done, open the game up to the main menu, then exit it. Some say to start a new game and play the first mission, but I've never had to do that. This is all very important, do not skip any part of this step!

  • Step 3: Locate where ever you installed XCOM EU. Mine is under (Computer > D: > Games > Steam > steamapps > common > XCom-Enemy-Unkown) but yours will vary. If you can't find it, keep looking.

  • Step 4: Once in the XCOM directory, go to Binaries > Win32 and locate "XCOMGame.exe" make a few backup copies of this. (Copy - Paste)

  • Step 5: Open Resource Hacker, click File, then Open, then navigate to the "XCOMGame.exe" again and select it.

  • Step 6: In Resource Hacker, expand RCDATA, then 1020. The only file under 1020 should be a text file called 1033. In the right panel, the top should say "[XComGame.XGTacticalGameCore]." Right click on 1033, and select "Save [RCDATA : 1020 : 1033] ..." and save that .txt file somewhere you will be able to find it easily.

  • Step 7: Open the extracted 1033 in your text editor of preference. This file holds most of the easy to edit items for XCOM modding. There is A LOT to change here, and I'll go over a few examples later, but if you read through you should pick up 99% of it easily.

  • Step 8: Make all of the changes that you want, beware that you can make the game incredibly easy or hard, which will ruin the fun of the game entirely.

  • Step 9: Once you have made all of your edits, save the file, and go back to Resource Hacker. You can either copy all of the text from your modded 1033.txt and paste it into the right window, then click "compile script" or right click on "1033" in the left window and select Replace Resource, then
    Open File with New Resource, then navigate to wherever your modded "1033" is located. Once done, click File, then Save.

Now assuming you didn't make any egregious typos, you're almost ready to go. Why almost? Because Firaxis decided to make modding harder than necessary. Why? Ask them, since they said they were going to be pro-mods.
How to make your edits stick.
Every single time you start XCOM, it phones home and downloads some data packets that will update your game, making some or all of your edits invalid. I've read that some edits still work but I have no idea which do and don't since I've never tested. The excuse was to limit cheating and make MP fair. I'm no expert, but there are better, more user friendly ways to do this without screwing me over in a game I have zero interest in ever playing online.

So how do you get around these call home updates? You have three options. From worst to best:

  • Disconnect from the internet. It can't call home if there's no dial tone.

  • Boot up steam in offline mode , which has the same effect as above.

  • (What I've done) Modify your hosts file to block the firaxis call home. Very easy to do, easy to undo, and doesn't take away any part of the game important to me. Details below.

What do I lose by doing this? You probably lose the ability to play a MP match, I haven't tested it, but if you want to play MP just edit the host file back and forth as needed. You lose the ability to send your high scores to the Firaxis database. It wouldn't be fair to send in your modded scores anyway, since you could've made each UFO give you 10,000 Lyrium and each soldier have 50 HP, 500 Aim, and each Assault Rifle do 50 damage.

What do I gain by doing #3 instead of turning steam off? Well you don't lose your internet access, or steam's features, but you also don't lose the ability to get the achievements. This is a bit cheesy, since you can make the game easy to get them, but if you want the game easy just play it on easy and get them anyway. It admittedly means you can change the rules for Impossible and Classic to play just like easy and get those achievements, so those internet points won't mean as much to the purists, but I care for e-peen contests even less than I do about MP.

How do I edit my host file? This is how on Windows 7. If you have something different then hopefully google or someone helpful below will chime in. If they do, I'll edit this post to clarify. But on Windows 7:
  • Open up notepad (regular old notepad) and click File, then Open, then past this
%systemroot%\system32\drivers\etc\hosts

and click open. If it didn't work, you pasted it wrong, or I typed it wrong and it's still your fault. Deal with it. :)
  • Now paste this at the bottom of the file:
# Prevent XCOM Phone Home 127.0.0.1 prod.xcom.firaxis.com 127.0.0.1 65.118.245.165

Save the file, then exit. I rebooted, but I don't actually think you have to on Windows 7. You can make a backup copy of your host file and replace it if you want to edit it back, or just delete the above code and save it again. You're now ready to play your very own XCOM MOD! Load up the game and hope you didn't break it with a typo, or make it too easy or hard to ruin the enjoyment.

Now, I've heard various reports that that doesn't work anymore either, so I also have the XCOM.exe blocked at my firewall, just to be safe. Again, this prevents me from having the MP function work properly, but I don't care about that. Cheating and trying to play a modded game in MP is a ♥♥♥♥♥♥ thing to do anyway, so please don't try.

Final Thoughts, Advice, and Warnings.
To reset the game back to normal, either Verify the game Integrity again, or just replace your modded files with your backups. Be aware that any game updates, patches, new DLC, etc, WILL break your mod and override the files. If it updates, you'll have to make all of your edits again. I keep a spare file where I jot down all of the changes I've made, and my thoughts on them (too much, too little, etc) so when I go back to edit or remake a mod I'm not starting from scratch and forget something.

If you're having problems feel freeto ask and I or someone else will try to help you out. By reading and experimenting you should be able to do quite a lot by yourself though. Just keep in mind that every line (left to right) is an item. A quick example: the very first few lines start with "armors=". These are all of the armor types in game. If you scroll to the right the names will be there, under "iType=eItem_ArmorXXX, where XXX is Kevlar, Carapace, Skeleton, Titan, Archangel, Ghost, Psi, ShivDeck_I, II, and III. You can change the armors HP Bonus, Abilities, Defense Bonuses, Flight Fuel, Will Bonus, Mobility Bonus, etc. The same goes for editing all of the enemies, weapons, characters, research costs and time, mission bonuses and rewards, chance that off screen Chryssalid kills spawn a Zombie, etc etc etc. You just have to read a little bit.

Note that not all of the options work, just most of them. Many options are hard coded, or can't be handled by the GUI. IE Making your character have 200 health, move 50 spaces, and his Kevlar armor holds 8 small items.

Final Warning: Do not make the game super easy. You will lose interest and it will be boring. I've personally made the game harder in some areas (More expensive, time consuming), easier in others (made all enemies and troops have even hit percentages, no artificial bonuses or disadvantages) and played around with the Health to be more challenging since I'm no longer at a large disadvantage for aiming. I want the enemies to be tough to kill, not tough for a military veteran to shoot from two feet away. It boils down to editing a Single Player game to be the most fun to you.

Have fun, and Good Luck Commanders. [/corny]
30 Comments
genghisjayder 23 Jul, 2020 @ 10:49am 
explain step 9 more thoroughly next time. I cant understand it (specifically the last part either/or what?).
Dino 15 Oct, 2017 @ 3:20am 
Hey man what's up? Its 2017 but maybe you can still help me out? I followed through your guide step-by-step, using resource hacker to make a few adjustment to XcomEW.exe, mainly changing the price cost of Interceptor, Satellites and changing the repair hours, days injured yadayadayada (I made sure to change in every difficulty). Disconected from Internet, hit play and got inside the game allright, but there were absolutely no changes. Closed the game, opened the .exe again and all the changes are still there... there were no "...exe_Original" there, which happens if im connected to the internet... Any Ideas?
CM Gabriel Angelos 1 Jul, 2016 @ 2:48pm 
Now, I've heard various reports that that doesn't work anymore either, so I also have the XCOM.exe blocked at my firewall, just to be safe. Again, this prevents me from having the MP function work properly, but I don't care about that. Cheating and trying to play a modded game in MP is a ♥♥♥♥♥♥ thing to do anyway, so please don't try.
now i've tried to block it on my firewall but it keeps on getting back on and even when i comepletely delete if from my firewall whitelist it still phones home and crashes my game
CM Gabriel Angelos 1 Jul, 2016 @ 2:16pm 
what does this line mean

SKYRANGER_CAPACITY = 4

1. is it to make a team of 7+?
2. is it to set the lowest possible to 7+?
3. is it to set the starting team limit to 7+?
or is it something else entirely that i dont know what is
BleakSnowman 16 Jan, 2016 @ 11:05am 
How would I add new helmets(model and all) to the game?
MrBigCookie 19 Jun, 2015 @ 11:18am 
Hallo dar! :D I'd like to change the name of the interceptors in both EW and EU. Is this the way to do it? Are there other options for this?
Fuzzyballs01 ꦙ 18 Apr, 2015 @ 1:43am 
even if I just change one little number from 1 to 2, I get an error message (0x000142)
and that's half a day ruined just trying to modify one little thing about a shitty game, isn't life grand?
Hawk 27 Oct, 2013 @ 5:00am 
if it works for me thanks. I had a modded one but cant find it to just duplicate it to get desired results
Neurone 20 Oct, 2013 @ 8:19pm 
Thanks pal, this guide is really clear and straightforward. Here just some minor improvements for your guide:

* The second line of the hosts file is incorrect (and useless): you can't translate an IP to another IP using the file hosts. You can force to locally translate only hostnames to specific IP. If you really need to make an IP unreachable, an easy way is to block it with a proper configuration of the Windows firewall
* When you use Resource Hacker to replace configuration using the "Replace Resource" command, you need to specify following parameters also before to be able to save: Resource Type = RCData, Resource Name = 1020, Resource Language = 1033.

I hope Firaxis will sooner or later release a real editor, like for Civ.
masterdelvin1 12 Oct, 2013 @ 11:04am 
Ya I found the problem, had an extra [space] between some values which knocked the command line out of whack. Everything works as you mentioned, and thank you again for all the work. Still having problems with psi, but working on it :)