Fire away ...

For technical discussions and help
Post Reply
User avatar
johnnylump
Site Admin
Posts: 1262
Joined: Wed Nov 11, 2015 4:12 am

Fire away ...

Post by johnnylump »

Now that PAX South announcements are out of the way, we're freed up to talk about modding tools and capabilities -- so if anyone stopping by has any questions, ask away and we'll do our best to answer.
fowlJ
Posts: 198
Joined: Thu Jan 21, 2016 1:45 pm

Re: Fire away ...

Post by fowlJ »

Alright, so the little image they showed detailing the things included with the game made me curious - I don't know if you've worked with the map building much, but all the environment props they include, do they have all the needed gameplay information built in by default?

What I'm wondering, essentially, is if I stuck a bunch of vanilla elements together in the UDK, would that be a functional parcel that works in game? Or would it be just a collection of models that one would then need to designate cover information etc for?
Amineri

Re: Fire away ...

Post by Amineri »

fowlJ wrote:Alright, so the little image they showed detailing the things included with the game made me curious - I don't know if you've worked with the map building much, but all the environment props they include, do they have all the needed gameplay information built in by default?

What I'm wondering, essentially, is if I stuck a bunch of vanilla elements together in the UDK, would that be a functional parcel that works in game? Or would it be just a collection of models that one would then need to designate cover information etc for?
I've looked a bit into the map system, but not in any great detail, unfortunately. It wasn't really something that we'd ever got working for XCOM:EU/EW, and so wasn't something we were comfortable promising we could deliver in a good state for the game release.

That said, parcels are just collections of things you'll find in the Content Manager in UnrealEd, although umap files can also contain Kismet visual scripting (which is used more for cinematic scripting, generally, but also for special maps like Avenger defense).

However, those things are definitely more than just static mesh actors. Opening up one particular parcel (the lg_GeneClinic_01 parcel) as an example, it includes :

XComLevelActors
XComDestructibleActors
XComFracLevelActors
XComTileFracLevelActors
AmbientSounds
XComBlueprints
Emitters
DecalActors
XComGroupSpawns
and so on...

Most of these things are archetypes (https://udn.epicgames.com/Three/Archety ... Guide.html), which are code classes that wrap the data (e.g. static mesh) to provide the needed functionalty.

The GeneClinic parcel I checked didn't include any Kismet scripting, which makes things a little simpler.

I think the easiest way to start off is going to be copying an existing map and making alterations, rather than trying to jump in and create a brand new one from scratch.
eXecator
Posts: 3
Joined: Mon Feb 01, 2016 9:47 am

Re: Fire away ...

Post by eXecator »

Hi, thanks for the opportunity. I'm curious to what kind of tools you guys used for the day-1 mods and generall information on how the system works and where to start.
I currently only read some of the UE3 UDK. Is it relevant to Xcom-2? I heard somewhere that they use a heavily modifed UE3.5.
Did the leadership perks involve adding or modifying ScaleformGfx / Flash content? Are corresponding tools part of the SDK?

Wow, so many questions... :o
I'll stop for now
Amineri

Re: Fire away ...

Post by Amineri »

eXecator wrote:Hi, thanks for the opportunity. I'm curious to what kind of tools you guys used for the day-1 mods and generall information on how the system works and where to start.
The tools we used were:
The SDK, both VSShell (ModBuddy) and UnrealEd
Notepad++ for some text searching stuff
Blender for creating 3D models
Photoshop (JC Lewis) and GIMP (me) for texture editing
JPEXS for looking at GFX files (Flash Pro would be better here)
HxD for some occasional hex stuff, mostly to do with Flash stuff
eXecator wrote: I currently only read some of the UE3 UDK. Is it relevant to Xcom-2? I heard somewhere that they use a heavily modifed UE3.5.
The UE 3 documentation is extremely relevant for XCOM 2. They did import some features from UE4 (and the "UE 3.5" designation), but most of the art import pipeline and tools are from 3. Kismet, for example.
eXecator wrote: Did the leadership perks involve adding or modifying ScaleformGfx / Flash content? Are corresponding tools part of the SDK?
I didn't have to modify any of the Scaleform GFX files for the leader perk UI. Firaxis has added a lot of tools for manipulating the Flash elements via Unrealscript. I did crack open the GFX files (which required using a hex editor to extract) to look at what was going on in there. Also, more advanced UI mods will likely want to work in Flash and not just Unrealscript. The SDK doesn't include any tools to work with the Flash (like it doesn't provide 3D modelling tools). I used JPEXS (which is free) for my Flash work, which works pretty well except having some limitations regarding manipulating sprites.
Bulletsix
Posts: 1
Joined: Mon Feb 01, 2016 2:41 pm

Re: Fire away ...

Post by Bulletsix »

Hiya :)

I hope this is the right place to ask my noob-questions:
As i watched some preview lets plays to get my X-com2-"fix" ;) some things sprung to my mind, that i would like to change:

a: modify the chances to get extra perks from the Advanced Warfare center
b: modify the general recruiting costs for eingineers/scientists
c: modify the mission/"scanplace-on-worldmap" availability time
d: modify the turn limit on limited missions

What of these are possible and with what tools? Maybe some are done via a config-file?
fowlJ
Posts: 198
Joined: Thu Jan 21, 2016 1:45 pm

Re: Fire away ...

Post by fowlJ »

Another curiosity, and forgive me for asking something trivially easy to just find out for myself once the game releases, but how are weapon damage values set? I've been noticing since the first previews that weapons with the same minimum, maximum, or mean damage values do not necessarily have the same possible damage range - indeed, I recently saw footage of a mind controlled ADVENT Trooper, confirming what I suspected for a while which is that they do not actually have a damage range, and always hit for 3.

Do you just set the minimum and maximum value for each weapon, or does each one have its own custom formula?
Amineri

Re: Fire away ...

Post by Amineri »

Bulletsix wrote:Hiya :)

I hope this is the right place to ask my noob-questions:
As i watched some preview lets plays to get my X-com2-"fix" ;) some things sprung to my mind, that i would like to change:

a: modify the chances to get extra perks from the Advanced Warfare center
b: modify the general recruiting costs for eingineers/scientists
c: modify the mission/"scanplace-on-worldmap" availability time
d: modify the turn limit on limited missions

What of these are possible and with what tools? Maybe some are done via a config-file?
a. Extra perks would require unrealscript, as it's currently coded to 1.
b. I'm not sure on this, but I suspect configuration.
c. Scanning times I'm 95% sure are configuration.
d. Mission parameters are set for each mission type in a Missions.ini, so this should be configuration as well.
Amineri

Re: Fire away ...

Post by Amineri »

fowlJ wrote:Another curiosity, and forgive me for asking something trivially easy to just find out for myself once the game releases, but how are weapon damage values set? I've been noticing since the first previews that weapons with the same minimum, maximum, or mean damage values do not necessarily have the same possible damage range - indeed, I recently saw footage of a mind controlled ADVENT Trooper, confirming what I suspected for a while which is that they do not actually have a damage range, and always hit for 3.

Do you just set the minimum and maximum value for each weapon, or does each one have its own custom formula?
The weapon damage range is configured for each weapon. This looks like:

DAMAGE_STRUCT_NAME=(Damage=#, Spread=#, PlusOne=#, Crit=#, Pierce=#, Shred=#, ...)

The Damage is the base damage value (e.g. 3). The Spread is the +/- range possible. Most base-game XCOM weapons have a value of 1 here. The PlusOne value is a % chance to get +1 additional damage. Basically all base-game weapons have a 0 here. Crit is the amount of extra damage on a crit. Pierce is the amount of armor pips ignored, while Shred is the amount of armor pips removed.

Most of these are accumulated from weapons + upgrades + items + abilities (excepting the PlusOne value).
Guardsmen83
Posts: 4
Joined: Thu Jan 21, 2016 3:11 pm

Re: Fire away ...

Post by Guardsmen83 »

hey Amineri could you tell me were steam puts ini files from your mods?
Amineri

Re: Fire away ...

Post by Amineri »

Guardsmen83 wrote:hey Amineri could you tell me were steam puts ini files from your mods?
I'm actually not quite sure, since I've never actually installed any mods from Steam Workshop (being the developer instead of the downloader). I know johnnylump had to figure that out, so hopefully he will drop in with the answer in a bit. I think he's currently wrapped up beating the final mission, but I did poke him about it.
User avatar
johnnylump
Site Admin
Posts: 1262
Joined: Wed Nov 11, 2015 4:12 am

Re: Fire away ...

Post by johnnylump »

It's under here somewhere:

C:\Program Files (x86)\Steam\steamapps\workshop\content
Guardsmen83
Posts: 4
Joined: Thu Jan 21, 2016 3:11 pm

Re: Fire away ...

Post by Guardsmen83 »

THANKS john keep up good modding
User avatar
RedTieGuy
Posts: 18
Joined: Thu Jan 21, 2016 4:19 pm

Re: Fire away ...

Post by RedTieGuy »

Hey John, I'm more focused on modeling and animation so I've got a question on that. Say I use Maya / 3DMax to create an object (such as a pistol, gun or even armor), how would I go about importing that to replace or add to the current list?

Let me use an example: say I use Maya to model and texture a baseball bat wrapped in barbwire and would like to replace the sword in the game with that, do I just need to export the file from Maya and import it into the editor? I'm sure it's not as simple as export / import then done but would there be any coding involved for JUST replacing items?

Another question I have are regarding particles. Say I modeled a banana in Maya, how would I use that to replace a rocket to allow the rocket launcher to shoot banana's? I know it's silly examples but it covers what I have in mind, for now :)
- The biggest adventure you can take is to live the life of your dreams -
Andor
Posts: 40
Joined: Sun Jan 03, 2016 12:48 am

Re: Fire away ...

Post by Andor »

RedTieGuy wrote:Hey John, I'm more focused on modeling and animation so I've got a question on that. Say I use Maya / 3DMax to create an object (such as a pistol, gun or even armor), how would I go about importing that to replace or add to the current list?
Well, I don't have the game yet, due to severe IRL financial constraints (Damn you EXALT!), but according to the PAX south video, the modding kit has some tutorials and templates to walk you through a lot of those functions. IIRC from the vid you would want to import the banana as a particle effect because they mentioned that pidgeons are a particle effect and therefore you could make pidgeon guns.
Amineri

Re: Fire away ...

Post by Amineri »

RedTieGuy wrote:Hey John, I'm more focused on modeling and animation so I've got a question on that. Say I use Maya / 3DMax to create an object (such as a pistol, gun or even armor), how would I go about importing that to replace or add to the current list?

Let me use an example: say I use Maya to model and texture a baseball bat wrapped in barbwire and would like to replace the sword in the game with that, do I just need to export the file from Maya and import it into the editor? I'm sure it's not as simple as export / import then done but would there be any coding involved for JUST replacing items?

Another question I have are regarding particles. Say I modeled a banana in Maya, how would I use that to replace a rocket to allow the rocket launcher to shoot banana's? I know it's silly examples but it covers what I have in mind, for now :)
For the release-day mods were more focussed on testing with free tools, so JC Lewis used Blender and the FBX import pipeline (https://udn.epicgames.com/Three/FBXSkel ... eline.html). However, if you have Maya / 3DMax, you should be able to import the native file into the SDK, but the SDK and Maya/3DMax have to be on the same machine. I believe this import method is what Firaxis used, not FBX import.
User avatar
RedTieGuy
Posts: 18
Joined: Thu Jan 21, 2016 4:19 pm

Re: Fire away ...

Post by RedTieGuy »

Amineri wrote:
RedTieGuy wrote:Hey John, I'm more focused on modeling and animation so I've got a question on that. Say I use Maya / 3DMax to create an object (such as a pistol, gun or even armor), how would I go about importing that to replace or add to the current list?

Let me use an example: say I use Maya to model and texture a baseball bat wrapped in barbwire and would like to replace the sword in the game with that, do I just need to export the file from Maya and import it into the editor? I'm sure it's not as simple as export / import then done but would there be any coding involved for JUST replacing items?

Another question I have are regarding particles. Say I modeled a banana in Maya, how would I use that to replace a rocket to allow the rocket launcher to shoot banana's? I know it's silly examples but it covers what I have in mind, for now :)
For the release-day mods were more focussed on testing with free tools, so JC Lewis used Blender and the FBX import pipeline (https://udn.epicgames.com/Three/FBXSkel ... eline.html). However, if you have Maya / 3DMax, you should be able to import the native file into the SDK, but the SDK and Maya/3DMax have to be on the same machine. I believe this import method is what Firaxis used, not FBX import.

Thanks a ton! I'm having a slight issue with the SDK. I ran out of space on my one HDD, so I just installed it onto another HDD (made a backup and then restored). Now when I open the SDK, nothing shows. I do not get any errors though, just a "Blank Solution" when trying to create a new file. Any advice on how to restore everything?
- The biggest adventure you can take is to live the life of your dreams -
MrOtakuGamer6
Posts: 17
Joined: Mon Feb 08, 2016 4:26 pm

Re: Fire away ...

Post by MrOtakuGamer6 »

Noobish question, but where exactly is the SDK?
As I said, very noob, just bought the game yesterday.
Amineri

Re: Fire away ...

Post by Amineri »

MrOtakuGamer6 wrote:Noobish question, but where exactly is the SDK?
As I said, very noob, just bought the game yesterday.
In Steam, click "LIBRARY" then "TOOLS(##)" and the XCOM 2 SDK should be in that list.
Nachtwolf
Posts: 3
Joined: Tue Feb 09, 2016 8:30 pm

Re: Fire away ...

Post by Nachtwolf »

I'm completely new to modding anything for Unreal Engine, so i thought i'd start out with something easy and add a modified version of a default weapon, my problem is the stats (damage, critchance, clipsize) don't show up on the loadout menu as they do for the default weapons any tips what i might be missing?
MrOtakuGamer6
Posts: 17
Joined: Mon Feb 08, 2016 4:26 pm

Re: Fire away ...

Post by MrOtakuGamer6 »

Nachtwolf wrote:I'm completely new to modding anything for Unreal Engine, so i thought i'd start out with something easy and add a modified version of a default weapon, my problem is the stats (damage, critchance, clipsize) don't show up on the loadout menu as they do for the default weapons any tips what i might be missing?
Did you edit the ini as well? Just checking.
Nachtwolf
Posts: 3
Joined: Tue Feb 09, 2016 8:30 pm

Re: Fire away ...

Post by Nachtwolf »

thanks for the reply, i'm grateful for any help you can provide
i'll post some of the content of the files i think are relevant, if you need more please tell me :)

i added a new ini file specificially for my mod

basically i got this in my mod class file:

Code: Select all

class X2Item_NachtwolfMods_BetterSnipers extends X2Item config(NachtwolfMods); 

var config WeaponDamageValue NACHTWOLFMODS_BETTERSNIPERS_BASEDAMAGE;
var config int NACHTWOLFMODS_BETTERSNIPERS_AIM;
var config int NACHTWOLFMODS_BETTERSNIPERS_CRITCHANCE;
var config int NACHTWOLFMODS_BETTERSNIPERS_ICLIPSIZE;
var config int NACHTWOLFMODS_BETTERSNIPERS_ISOUNDRANGE;
var config int NACHTWOLFMODS_BETTERSNIPERS_IENVIRONMENTDAMAGE;

var config array<int> NACHTWOLFMODS_BETTERSNIPERS_RANGE;
followed by this inside the CreateTemplate function

Code: Select all

Template.RangeAccuracy = default.NACHTWOLFMODS_BETTERSNIPERS_RANGE;
	Template.BaseDamage = default.NACHTWOLFMODS_BETTERSNIPERS_BASEDAMAGE;
	Template.Aim = default.NACHTWOLFMODS_BETTERSNIPERS_AIM;
	Template.CritChance = default.NACHTWOLFMODS_BETTERSNIPERS_CRITCHANCE;
	Template.iClipSize = default.NACHTWOLFMODS_BETTERSNIPERS_ICLIPSIZE;
	Template.iSoundRange = default.NACHTWOLFMODS_BETTERSNIPERS_ISOUNDRANGE;
	Template.iEnvironmentDamage = default.NACHTWOLFMODS_BETTERSNIPERS_IENVIRONMENTDAMAGE;

and the ini file XComNachtwolfMods consists of this

Code: Select all

;Configuration file for all Mods by Nachtwolf
[NachtwolfMods.X2Item_NachtwolfMods_BetterSnipers]
NACHTWOLFMODS_BETTERSNIPERS_BASEDAMAGE=(Damage=8, Spread=1, PlusOne=0, Crit=2, Pierce=0, Shred=1, Tag="", DamageType="Projectile_Conventional")
NACHTWOLFMODS_BETTERSNIPERS_AIM = 10
NACHTWOLFMODS_BETTERSNIPERS_CRITCHANCE = 20
NACHTWOLFMODS_BETTERSNIPERS_ICLIPSIZE = 1
NACHTWOLFMODS_BETTERSNIPERS_ISOUNDRANGE = 35
NACHTWOLFMODS_BETTERSNIPERS_IENVIRONMENTDAMAGE = 8

NACHTWOLFMODS_BETTERSNIPERS_RANGE[0] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[1] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[2] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[3] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[4] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[5] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[6] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[7] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[8] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[9] = 0
NACHTWOLFMODS_BETTERSNIPERS_RANGE[10] = 2
NACHTWOLFMODS_BETTERSNIPERS_RANGE[11] = 2
NACHTWOLFMODS_BETTERSNIPERS_RANGE[12] = 2
NACHTWOLFMODS_BETTERSNIPERS_RANGE[13] = 4
NACHTWOLFMODS_BETTERSNIPERS_RANGE[14] = 4
NACHTWOLFMODS_BETTERSNIPERS_RANGE[15] = 4
NACHTWOLFMODS_BETTERSNIPERS_RANGE[16] = 6
NACHTWOLFMODS_BETTERSNIPERS_RANGE[17] = 6
NACHTWOLFMODS_BETTERSNIPERS_RANGE[18] = 6
NACHTWOLFMODS_BETTERSNIPERS_RANGE[19] = 8
NACHTWOLFMODS_BETTERSNIPERS_RANGE[20] = 6
NACHTWOLFMODS_BETTERSNIPERS_RANGE[21] = 6
NACHTWOLFMODS_BETTERSNIPERS_RANGE[22] = 4
NACHTWOLFMODS_BETTERSNIPERS_RANGE[23] = 4
NACHTWOLFMODS_BETTERSNIPERS_RANGE[24] = 2
NACHTWOLFMODS_BETTERSNIPERS_RANGE[25] = 0

the mod itself works as i expected (when i set the values hardcoded inside the class i see the values and the sniperrifle performs about the way i expected, still lacking fine tuning obviously, i have not yet tested if it is just a display issue or if there is a difference (e.g.: lack of damage) when i use my ini file)
Nachtwolf
Posts: 3
Joined: Tue Feb 09, 2016 8:30 pm

Re: Fire away ...

Post by Nachtwolf »

alright got a minor update:

when trying to use my ini file (with the setup as shown in the post above), it looks like the values are not found (new sniper rifle has a clipsize of 0 for instance when it should be 1 according to inifile), so i obviously did something wrong in handling the ini file, i just can't figure out what so far (and won't have time to fiddle around some more for about 8-10 hours as i'm at work now :D )
Post Reply