Jump to content

Tutorial - How to get XCOM 2 SDK up and running


Drakous79

Recommended Posts

So you heard about XCOM 2 SDK and want to start modding? Here is some info, that may help you.


1. Where to download the SDK and how to start it

Start Steam, mouseover LIBRARY link at the top and select TOOLS, scroll down until you see XCOM 2 Development Tools, right click on it and select Install Game. The SDK doesn't need to be on the same drive as the game.

http://i.imgur.com/elQezDW.jpg

Steam will download over 42 GB of data and install it. You can start the SDK by clicking on XCOM 2 Development Tools desktop icon.


2. Wrong Microsoft Visual Studio 2013 Isolated Shell redistributable package

In early days after game's release, there was wrong Microsoft Visual Studio 2013 Isolated Shell redistributable package shipped with the tool (reported by wghost81 in [bUG] [sOLVED] "Missing components" error while attempting to start ModBuddy thread. It should be fixed now.

http://i.imgur.com/4oLKbt9.jpg

In case the error greets you, there are download links in the thread linked above. Download and install the redistributable package.


3. XCOM ModBuddy - How to set XCOM 2 paths

You will find yourself in XCOM ModBuddy application, after starting the SDK. It is important to set XCOM 2 paths. They can be set by clicking on TOOLS > Options > XCOM 2. The first path is for the game and the second path is for the SDK. Both paths must end with XComGame.

http://i.imgur.com/0QKhyLY.jpg


4. XCOM ModBuddy - How to set verbosity

To get information from the build process / script compiler, you will want to change verbosity options from minimal to normal (or even to detailed and higher). It is done in TOOLS > Projects and Solutions > Build and Run.

http://i.imgur.com/F4Km0re.jpg


5. XCOM ModBuddy - How to start XCOM 2 Editor (UDK)

Easily in TOOLS > XCOM 2 Editor.

http://i.imgur.com/LTsyTBM.jpg

Maybe I should mention the editor is 64-bit application, so it may fail to run under 32-bit operating systems. XCOM ModBuddy is both 32-bit and 64-bit.

After you start it, there is Perforce (Wikipedia link) Login prompt I choosed to Disable Perforce Integration. Tooltip stated it can be re-enabled.

Perforce is a commercial, proprietary revision control system developed by Perforce Software.


http://i.imgur.com/FRZHsu9.jpg


6. XCOM ModBuddy - Where to find documentation

Very nice of developers to provide it! There aren't examples on everything (like retexturing vanilla content) , but still I'm very grateful for it. You should read XCOM2 SDK QuickStart.pdf first and eventually proceed to more technical topics.

http://i.imgur.com/6Bkk4AC.jpg

 

---

 

That's it for now. If you know some good tips what to set in XCOM ModBuddy options, please don't hesitate to share them.

 

If more bugs are found, I'll do my best to post a solution or a link to it here.

Edited by Drakous79
Link to comment
Share on other sites

One thing worthy of note i guess is that the "New-Mod" option neatly dumps the essential starter files and three development folders underneath your working flow.

 

http://s10.postimg.org/j10k4z791/New_Mod_Folder_Structure.png

 

 

1) This will host the Solution (slo) & Mod-Buddy build (suo).

 

2) Your Mod root... which has three default files; ModPreview.JPG image (Steam splasher), Readme.txt (details) & ***.x2proj (Components and Folders referer for what's below)

 

-- 2a) Three basic INI templates; XComEditor + XcomEngine + XcomGame... people develop their resources architecture from those.

 

-- 2b) XComGame.INT file... which will receive whatever localization text(s) you'd want included. Other languages than English receive different extensions.

 

-- 2c) Src \ (your Mod names as written in the opening screen -- minimum of 8 characters) \ XcomGame \ Classes... ONE single compatibility file X2DownloadableContentInfo_q--UI--ck.uc ((PS; Don't use (-) dashes in you Mod names, VB compiling really hates such uncommon characters! I learned that the hard way.

---- this folder is where you'll be joining any source codes with the UC extensions.

 

XComGame \ Classes ... the big pseudo flaw that everyone struggles with, AFAIC.

 

1927 template files (15.6MBs worth) offered by Firaxis as either examples or basic resources for people to edit and push up into (2c) above IF need be. This folder doesn't have to be compiled into your final Mod versions!! Repeat -- stop making your final uploadable Steam-Files bigger than they should really be. It's bad coding habits to neglect such an obvious principle.

 

Then, my appeal to anyone even tempted to tackle these tasks is to clean up a weird mess before you ask us to D/L something from Steam -- no matter how good or great it might look. PLEASE!

 

D) Once you start putting Content (UPK archives, Images, resources, etc) ... a folder (that must be added manually) is being used. Most often via copy-paste.

 

Happy modding days ahead. :wink:

Edited by Zyxpsilon
Link to comment
Share on other sites

Great guide. I have started a sticky thread with resources (not sticky yet :-) and this is the key entry. Hopefully keeping this visible will cut down on the number of "I can't run the sdk" posts :-)

 

Many beginning modders distribute mods which have megabytes of un-needed files which are copied into the mod directory using modbuddy. Can you give the exact details of the step to remove these before distributing?

 

EDIT: I think you can just replace "big pseudo flaw" with the instruction:

 

After the mod is created, use the file view of ModBuddy to delete the entire folder Src\XcomGame which ModBuddy creates for you. This contains almost 2000 template files which are not needed. Deleting them makes the mod much smaller and cleaner.

Edited by davidlallen
Link to comment
Share on other sites

  • 2 weeks later...

It might be a better idea, to not delete the XComGame files but to select them in ModBuddy's SolutionExplorer and in the properties window set their Build Action to None.

 

This way they will not get copied over to your build, but they are still there to look at, or modify if you want to run some uncooked tests...

Edited by eXecator
Link to comment
Share on other sites

Good call, eXecator. It's a fine-tuning detail that should allow (most of us) direct control over a weird side-effect of "XCom2/Firaxis principles" special case of having such referencing resources available but not entirely essential for BUILD processing & Uploading reasons. I was also presuming that Modders *DO* realize that if they use some these files as source requisites, they have to remain there.

Edited by Zyxpsilon
Link to comment
Share on other sites

  • 4 months later...

It might be a better idea, to not delete the XComGame files but to select them in ModBuddy's SolutionExplorer and in the properties window set their Build Action to None.

 

This way they will not get copied over to your build, but they are still there to look at, or modify if you want to run some uncooked tests...

Even doing this, still get a 40 MB XComGame.u.

Here is a snippet from my .xproj

<None Include="Src\XComGame\Classes\AnalyticsManager.uc" />
<None Include="Src\XComGame\Classes\AnimNotify_ApplyPsiEffectsToTarget.uc" />
<None Include="Src\XComGame\Classes\AnimNotify_BlendIK.uc" />

Any idea how to fix this while still having access to source for code exploration while developing the mod?

Link to comment
Share on other sites

  • 1 year later...

These tools (both vanilla and WotC) should (for those that purchased XCOM 2 & the WotC DLC from Steam) still be in Steam Tools:

 

XCOM 2 Development Tools

XCOM 2 War of the Chosen Development Tools [full content requires authorization (i.e. opt-in) via "beta" tab in properties window]

 

Both of the above, by default, install into ...SDK folders. Please explore the nexus XCOM 2 wiki for more information.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...