XCOM 2
Welcome to the Resistance
Create your own aliens, weapons, maps, and other content to expand the XCOM2 universe
Learn More
dolman 7 Feb 6, 2016 @ 4:08pm
About adding additional countries.
Here we can discuss modding additional countries into the game, such as my Somalia Mod. Peewi suggested we move it out of my comments and into a thread, so here it is.

Here's a first pass tutorial that needs to be updated but will work for now: https://www.youtube.com/watch?v=ynTcLuVEM9g
Last edited by dolman; Feb 8, 2016 @ 2:52pm
< >
Showing 1-15 of 65 comments
Peewi 6 Feb 6, 2016 @ 4:13pm 
So many things to figure out. I'm particularly looking forward to custom name lists. I've already made lists of common Danish names.
dolman 7 Feb 6, 2016 @ 4:21pm 
That's definitely gonna be a help. It's looking like the name lists are in the localisation files. And I also need to update this mod that it has all the localisation files, cause i was testing with Arno and it looks like it flat out doesn't work when the change the games language from English (which makes sense and I know why but it's still a PITA)
bobby light 2 Feb 6, 2016 @ 4:26pm 
Hey, great job! Mind sharing how you figured it out?

I gave it a stab by creating a template based off X2CountryTemplate, but just could not get it to show up in game. Here is my template for the great Country of "Compton": http://pastebin.com/GXcGwu3i

Added the localization file as well defining the Country, but still no dice.

Either way, great job!
Last edited by bobby light; Feb 6, 2016 @ 4:26pm
dolman 7 Feb 6, 2016 @ 4:27pm 
I'm going to try go through the file in a video tomorrow, but failing that, I'll upload the raw file so you can poke through it. I barely know how I managed to get it to work myself but hopefully I'll be able to explain it.
Peewi 6 Feb 6, 2016 @ 4:28pm 
Try downloading Volman's Somalia mod and looking at the config files. If I'm understanding all of this correctly, those take care of everything you're trying to do in that script.
Peewi 6 Feb 6, 2016 @ 6:28pm 
Volman, it looks like mods come with the source code and your Somalia mod includes all of the game script source from the default mod template.

That script source is 15MB. Everything else is under 200KB.
Peewi 6 Feb 6, 2016 @ 7:15pm 
Names are defined in the XComGame.int localization file under the [XGCharacterGenerator] header.

The existing localizations all have the names, but I don't think that's necessary, as the game seems to fall back on English if a translation is missing.

I'm about to test it.
bobby light 2 Feb 6, 2016 @ 7:42pm 
Originally posted by Peewi:
Volman, it looks like mods come with the source code and your Somalia mod includes all of the game script source from the default mod template.

That script source is 15MB. Everything else is under 200KB.
Yea, it appears so.

How were you able to find the source for Volman's mod? I have it installed, ran the game with it active, but I'm not seeing a folder for it in my mods folder.

EDIT: Derp, found it in: :\Steam\steamapps\workshop\content\268500

EDIT EDIT: Aaah. I see how you did this now Volman. X2StrategyElement_DefaultCountries.uc is the class with the goods.

Looks like you created a new class based off that and set it to override the default X2StrategyElement_DefaultCountries.uc class. I got this to work a bit more "dynamically" by creating that class I previously linked. I'm going to tidy some things up, then post it so you guys can take a look at how I did it.
Last edited by bobby light; Feb 6, 2016 @ 8:15pm
Peewi 6 Feb 6, 2016 @ 8:56pm 
I haven't gotten custom name lists working, but I uploaded Denmark.

http://steamcommunity.com/sharedfiles/filedetails/?id=618102825

You don't need to include all the default countries in X2StrategyElement_DefaultCountries. I was worried that it was overwriting the default version of the script and cause compatibility problems, but using my own mod and Volman's Somalia mod at the same time works fine.

If you're okay with just defaulting to the American name list, you don't actually need your own X2StrategyElement_DefaultCountries.

The override command in XComEngine.ini seems to be unnecessary. I removed it and everything still works fine.
bobby light 2 Feb 6, 2016 @ 9:24pm 
Great job Peewi! Took a look at yours and it's basically exactly what I have at this point.

All I'm having trouble with now is getting my flag image bundled up and included. I have an image of the flag, am pointing to the flag in my code, just no idea what to do beyond that. Any tips?
Top Marx Feb 6, 2016 @ 9:41pm 
Does your Denmark overwrite a nation or is it an outright addition?
Peewi 6 Feb 6, 2016 @ 9:46pm 
Yeah, I had some trouble figuring out UPKs too.

In the content browser in the Unreal editor click the import button and import your flags. Write what you want to call your package in the package field and it'll create it.

You can now save your package, but you also need an XComPatternsContent for the flag that goes on your soldiers' back. I didn't figure out how to make one, so I copied one of the existing ones and changed the properties to use my own flag.
Peewi 6 Feb 6, 2016 @ 9:46pm 
Originally posted by Top Marx:
Does your Denmark overwrite a nation or is it an outright addition?
It doesn't overwrite anything, it is in addition to the existing countries.
bobby light 2 Feb 6, 2016 @ 10:32pm 
Originally posted by Peewi:
Yeah, I had some trouble figuring out UPKs too.

In the content browser in the Unreal editor click the import button and import your flags. Write what you want to call your package in the package field and it'll create it.

You can now save your package, but you also need an XComPatternsContent for the flag that goes on your soldiers' back. I didn't figure out how to make one, so I copied one of the existing ones and changed the properties to use my own flag.
Hmm..yea I'm getting that far, but for some reason can't get my package to save. I'll have to fiddle around with it some more.
Peewi 6 Feb 6, 2016 @ 10:34pm 
Now that I have some mods up, I need to look into getting the flags to look good. They're pretty basic right now.
< >
Showing 1-15 of 65 comments
Per page: 15 30 50

Date Posted: Feb 6, 2016 @ 4:08pm
Posts: 65