r/xdev•
Kwahn

Need exact game mechanic information? Please ask me here!

I want practice looking for exact values and statistics in the game's files, so please ask me anything when it comes to timers, values, stats and other such things.

Posted Feb 7, 2016, 11:44 PM UTC

875
Reddeyfish-•

where/how is the item upgrade from normal nades to plasma bombs handled? (alternatively, where/how is the item upgrade from normal medkits to snake medkits handled)?

I want to create the same auto-upgrade for EXO suits and spider suits into their powered armor versions.

2
KwahnOP•

Really cool question, checking. I don't think it's in the ini files, meaning it's handled more internally through uc scripts.

2
KwahnOP•

I took the time to look into this, and it seems that Armory_WeaponUpgrade.uc handles going through and upgrading everything, but I'll need more time.

Research time: 1 day, Progress: Fast. I'll report back with my findings, Commander.

2
Reddeyfish-•

nevermind; managed to find it myself. CTRL+SHIFT+F for the phrase "Template.UpgradeItem" in the entire solution. No idea how it works yet, but that's definitely the code that's doing it.

1
KwahnOP•

Aha, so you did. I still had an hour! :(

(And I totally didn't forget I swear)

Okay, so that's good, it upgrades all of the items in X2StrategyElement_DefaultTechs.uc I believe. When it's infinite, add it directly, otherwise, add it the "proper way" (by adding specific quantities).

1
TomSturgis•

Can you see if you can find a way to increase the speed of the gremlin? I'd love to speed that tiny thing up.

2
KwahnOP•

All units seem to travel at the same speed, robro included, and I'm not absolutely certain where that's defined, or if I can define different units with different movement speeds. (I mean, I totally can, but it may be trickier than expected.) I'll post if I come across it!

3
TomSturgis•

Aww, bummer. Thanks anyway!

1

Utility item slots, weapon upgrade slots, and whatever would affect the UI showing 8 slots but not letting you interact with the last two if you increase squad size.

2
Bistritean•

Not sure if it counts, but where the flying f**k is the UILibrary, regarding icons?

1
KwahnOP•

C:\Program Files (x86)\Steam\SteamApps\common\XCOM 2 SDK\XComGame\Content\XCOM_2\Packages\GFx

EDIT: If icons aren't in the UILibrary there, then I'll investigate further. Sorry! D:

2
Bistritean•

Thanks a ton man! They were there, all right! :D

1
jal0001•

Try the Xcom editor from the SDK. It has a really nice search function. Will also show you the icon sizes (64x64 for class icons, 32x32 for skills, etc.)

1
lordshotgun•

How would I add extra aliens to each pod/mission? I would like to go long warish and have 6-8 troopers but with a corresponding 1-2 extra aliens per pod. Perhaps there is some way to add more fodder like more lower level advent, sectoids, vipers to the later game mega pods where its just an andromedan and two mutons.

Right now if one these small but powerful pods it is easy to debuff them with suppression, poision, flashbangs or if they are mechanical then with straight up hacking.

1
KwahnOP•

So it's a bit of a mess to read, but C:\Users\yourname\Documents\my games\XCOM2\XComGame\Config\XComMissions handles a lot of the squad compositions and alien selections. There's two pod types: Guaranteed for missions, and random bounded for missions. Force level is the alien tech level, and alert level is, I believe, the "loudness" of the missions. You should be able to add aliens in there with the MaxSpawnCount variable.

3
lordshotgun•

Hmm, well Beaglerush figured it out so it is possible. Will give this a shot after I finish my first game.

1
Bistritean•

I think it is XComMissions.ini, located in My Docs.\My Games\XCOM2\XComGame\Config. You should have there the max spawn on reinforcement and in a pod.

2
V1P3R13•

What is the aim reduction on overwatch shots?

1
KwahnOP•

Not in the ini files, so I'm not absolutely certain - but it seems to be about 15%. I am not absolutely certain yet, I'll need to look into the classes to learn for sure. Will check when I can.

3
xor50•

Oh I saw something about that somewhere. I think it was 0.7 for OW (like XCOM 1) and 0.6 for dashing OW (not like XCOM 1).

1
R3miel7•

Do you know where the loot drop probabilities are? I've gone about 4 months without seeing an elrium core and I either need to tweak the probability or see if that item drops off in the end-game.

1
KwahnOP•

In the file XComGameCore.ini there's a section labeled

[XComGame.X2LootTableManager]

All the loot details are delineated down there, in pretty thorough detail. You can adjust drop chances and chances of more than 1 drop in there.

Items get more common by end-game, and will gravitate towards the advanced and superior end of the usefulness spectrum.

2
R3miel7•

Thanks! You're awesome

2
KwahnOP•

No, you're awesome. :D

2
metalmartyr•

I was coming here to ask something similar. Thanks for the pre-help, subbed since I'm an aspiring modder.

edit - I think you meant "DefaultGameCore.ini".

2
KwahnOP•

Ah, the defaults are just backup copies to use if you mess up your actual ini's - the actual inis are in C:\Users\yournamehere\Documents\my games\XCOM2\XComGame\Config and aren't led with "Default".

2
metalmartyr•

Oh crap, I've been editing the "default" files. I suppose I can just copy them over.

2
GigawattSandwich•

Ok, in the camera ini there are max zoom and min zoom values, I believe set at 2600 and 1256 by default. If I lower the 1256 to 800 because I want to be able to zoom way in on my troops it won't let me zoom out far enough, even if I pump the other up to like 4000. Any thoughts?

1
KwahnOP•

Try raising both really high, or lower both a ton, and see how the camera acts. There's a lot of possibilities, and I'd have to test to really see how it changes.

1
JermanTK•

Could you see where the names of cities are located?

1
KwahnOP•

Like, the city names where missions take place? Not in the ini files, and I'm reinstalling the sdk right now so I'll have to check later. The ini file XComGameBoard defines almost all of the geoscope statics and variables, and gives coordinates for all the regions, so it can help, but doesn't seem to contain city names explicitly - sorry! D:

1
JermanTK•

Thanks for looking.

1
Venne1138•

I've been trying to work in the .ini files but can't really figure out what elements do what. How do I change the recovery time of "Gravely" and regular wounded? How do I up the amount of health that needs to be lost before those happen?

1
brigglesworth•

I haven't seen how to specifically change the recovery times of those two states, but I do see how to change the rate at which soldiers recover in general.

GameData.ini there is this entry: XComHeadquarters_BaseHealRate=80

1
brigglesworth•

Actually, I did find what you're looking for in GameData.ini. WoundSeverities=(MinHealthPercent=-10000, MaxHealthPercent=20, MinPointsToHeal=10000, MaxPointsToHeal=40000, Difficulty=0) ;Easy WoundSeverities=(MinHealthPercent=21, MaxHealthPercent=50, MinPointsToHeal=6000, MaxPointsToHeal=32000, Difficulty=0) WoundSeverities=(MinHealthPercent=51, MaxHealthPercent=75, MinPointsToHeal=3500, MaxPointsToHeal=20000, Difficulty=0) WoundSeverities=(MinHealthPercent=76, MaxHealthPercent=10000, MinPointsToHeal=1000, MaxPointsToHeal=10000, Difficulty=0)

WoundSeverities=(MinHealthPercent=-10000, MaxHealthPercent=20, MinPointsToHeal=10000, MaxPointsToHeal=40000, Difficulty=1) ;Normal WoundSeverities=(MinHealthPercent=21, MaxHealthPercent=50, MinPointsToHeal=6000, MaxPointsToHeal=32000, Difficulty=1) WoundSeverities=(MinHealthPercent=51, MaxHealthPercent=75, MinPointsToHeal=3500, MaxPointsToHeal=20000, Difficulty=1) WoundSeverities=(MinHealthPercent=76, MaxHealthPercent=10000, MinPointsToHeal=1000, MaxPointsToHeal=10000, Difficulty=1)

WoundSeverities=(MinHealthPercent=-10000, MaxHealthPercent=20, MinPointsToHeal=10000, MaxPointsToHeal=40000, Difficulty=2) ;Classic WoundSeverities=(MinHealthPercent=21, MaxHealthPercent=50, MinPointsToHeal=6000, MaxPointsToHeal=32000, Difficulty=2) WoundSeverities=(MinHealthPercent=51, MaxHealthPercent=75, MinPointsToHeal=3500, MaxPointsToHeal=20000, Difficulty=2) WoundSeverities=(MinHealthPercent=76, MaxHealthPercent=10000, MinPointsToHeal=1000, MaxPointsToHeal=10000, Difficulty=2)

WoundSeverities=(MinHealthPercent=-10000, MaxHealthPercent=20, MinPointsToHeal=10000, MaxPointsToHeal=40000, Difficulty=3) ;Impossible WoundSeverities=(MinHealthPercent=21, MaxHealthPercent=50, MinPointsToHeal=6000, MaxPointsToHeal=32000, Difficulty=3) WoundSeverities=(MinHealthPercent=51, MaxHealthPercent=75, MinPointsToHeal=3500, MaxPointsToHeal=20000, Difficulty=3) WoundSeverities=(MinHealthPercent=76, MaxHealthPercent=10000, MinPointsToHeal=1000, MaxPointsToHeal=10000, Difficulty=3)

1
ulong2874•

I don't usually mess around with ini's and want to make sure I understand what I'm doing. If I wanted to make it so people took no injuries before a set amount of damage, which numbers am I actually changing?

1
brigglesworth•

I'm not actually sure to be honest.

1
jal0001•

I have one for you:

In the Steam\steamapps\common\XCOM 2\XComGame\Localization\INT folder, XComGame.int has a section with the following:

[HuntersInstinct X2AbilityTemplate]

LocFriendlyName="Hunter's Instincts" LocLongDescription="Ranged attacks against flanked enemies deal +Ability:HUNTERSINSTINCTDMG/ damage."

LocHelpText="Ranged attacks against flanked enemies deal +Ability:HUNTERSINSTINCTDMG/ damage."

LocFlyOverText="Hunter's Instincts"

..

..

I believe this is a skill that was coded for the game but not actually put in. I'm able to apply this skill to my custom class, but it's giving +3 damage to ranged flank attacks (too much if you ask me). I'd love to find the location of this damage number so I can find a way to copy this skill as a new one.

edit: Found the damage number. It's just a .ini tweak in XComGameData_SoldierSkills. But I have no idea how to copy it and make it a new skill. haven't figured out custom ones yet.

1
KwahnOP•

That's in the GTS as a bonus skill for rangers. I don't see a place in the ini files, but I can check over the uc files tomorrow. The skills' unlock cost is defined in XComStrategyTuning.ini and it does exist and is used.

1
jal0001•

Oh I didn't even know that. I keep losing campaigns before I can even learn how the game works. Thanks.

1
KwahnOP•

Hah, that's okay - I suck too, I've just dedicated my time to becoming a game knowledge repository to help others and gather any and all details I need for my project. No problem :D

1
omnirusted•

I would love to know where the time limits on being on fire are. I'm trying to figure out a way to import a skill to, you know, Stop Drop and Roll like any sane person when on fire, but part of this might just involve reducing fire damage to one round instead of 1-5 like current (yes I've had fire last 5 rounds.)

1
KwahnOP•

I see that XComGameCore says that BURNING_TURNS=2 and ACID_BURNING_TURNS=2 but I think that these might just be suggestions. Try reducing them to 1 or 0 and seeing what happens.

HOWEVER! I checked X2StatusEffects.uc and found that it declares fire to last as long as BURNING_TURNS is declared. So either the variable's being modified somewhere that I don't know about, or it's not being used properly. I saw eGameRule_PlayerTurnBegin, so that might modify it (assumedly to decrement it). I then checked X2Effect_Burning.uc and saw that it had a damage, spread and damage type, but no duration listed. Now I was really confused. However, I realized something - medikits remove burning! I'll go see how they do it in X2Effect_ApplyMedikitHeal.uc - nothing there related to burning, just health addition handling. I checked X2Action_PersistentEffect, and saw literally not a god damn thing explaining how or when persistent effects are terminated from a damage standpoint.

I'll keep hunting, but this is bothering me a lot. Mess with BURNING_TURNS for now.

2
omnirusted•

Thanks!

1
omnirusted•

And, incidentally, I see, "UNCONSCIOUS_HIERARCHY_VALUE" as an effect. Do you know where this might be applied? I know that Stunlancers can randomly cause the Unconscious effect, I'd love if it there was some way to modify this to only last a set number of turns instead of the entire mission, or permanently change the effect they do in to something else entirely.

1
KwahnOP•

Not a clue, but try looking into the status effects and Stunlancer stats files and see how unconsciousness is applied, how stunning is applied and if you can swap the two or edit how unconsciousness works. :D

1
omnirusted•

Where are the Stunlancer stat files anyway?

1
Jeviar•

Hi! Do you know where I can change ability cooldowns? I've tried checking the soldier skills file but I can't find the specialist's hacking ability.

1
KwahnOP•

Haywire's handled very separately, and isn't grouped with normal soldier abilities - I'll go ahead and see what I can find about it. It's most likely related to Hacking classes.

EDIT: HA, FOUND IT! In X2Ability_SpecialistAbilitySet.uc you can edit Cooldown.iNumTurns = 4 to any number, under the static function X2AbilityTemplate HaywireProtocol() .

1
Jeviar•

Is this in the .ini file? I can't seem to find the .uc files.

1
KwahnOP•

.uc files are most easily found by creating a new default mod project in the sdk ide, and then checking the .uc files under the src class lists.

1
Raeli•

How do I adjust the stat values of the resistance and kevlar armour?

I want to change it so my soldiers have a very small amount of HP, but the body armour all provides some level of armour or dodge, but I can't seem to find where any values are for this.

1
KwahnOP•

XComGameCore.ui defines all of the values for items under the [XComGame.X2Ability_ItemGrantedAbilitySet] header.

For example,

PLATED_VEST_HP_BONUS=2
PLATED_VEST_MITIGATION_CHANCE=100
PLATED_VEST_MITIGATION_AMOUNT=1

If not present, it assumes it's 0 - go ahead and try to add to it.

1
rapkannibale•

Thanks for having this thread btw. Do you have any idea which files I should look at of in trying to do a mod that fixes the class a rookie is promoted to to the class selected for the soldiers in your character pool? So basically if I create a character for my pool and select Ranger I want that character to be promoted from Rookie to Ranger replacing the random function. Hope that is clear. :)

1
KwahnOP•

Okay, so the class a character is going to be is actually initialized not at promotion time, but at creation time. I'm not certain where in the files this function is run, but I do know that it's related to character generation.

If you can find where character class is set, and have that function check for the name of the soldier being added to the roster, you'll have yourself a "set-mod-per-person" mod, and it's just a matter of adding UI to modify that list with button presses and typed inputs. Not a whole ton of help, but I hope it gives you something to look at!

1
rapkannibale•

Thanks! It's a start! :)

1
lmolari•

Hi,

thanks for taking the time!

I would love to remove the free movement of enemies after your soldiers get LoS. Is this possible with a ini change? I also would love if all enemies would immediately take cover if a alert is triggered(without hunting you - just defensive positions) to balance this and to increase tactical depth(like flanking maneuvers).

I'm pretty sure the second thing cannot be done with ini-files. But what is about removing the free movement generally?

Thanks!

1
brigglesworth•

Thanks for starting this thread, a lot of good information present already. I'm currently trying to find where to modify the time it takes to clear Alien Debris, Alien Machinery, etc.. in the Avenger. I'm stumped trying to find these values.

1
xor50•

Where is data about (what perks are available in) the AWC?

1
Reemox•

I've been looking into this as well, and did not find it. But found a .uc that mentioned "AWCAbilityNames".

I just can't find that part which I'm almost certain has to have a list of the abilities.

1
[deleted]•

[deleted]

1
jal0001•

I got one for you regarding mechanics. I'm working on a skill that causes stuns from long range. Currently I have it working on an SMG, but I wanted it to work on a pistol instead, and it just never stuns the enemy. I took some code from X2AbilityStunLancer.uc. Take a look at this:

// This will be a stat contest StatContest = new class'X2AbilityToHitCalc_StatCheck_UnitVsUnit'; StatContest.AttackerStat = eStat_Strength; Template.AbilityToHitCalc = StatContest;

// On hit effects // Stunned effect for 1 or 2 unblocked hit DisorientedEffect = class'X2StatusEffects'.static.CreateDisorientedStatusEffect(); DisorientedEffect.MinStatContestResult = 1; DisorientedEffect.MaxStatContestResult = 2; DisorientedEffect.bRemoveWhenSourceDies = false; Template.AddTargetEffect(DisorientedEffect);

// Stunned effect for 3 or 4 unblocked hit StunnedEffect = class'X2StatusEffects'.static.CreateStunnedStatusEffect(1, 100); StunnedEffect.MinStatContestResult = 3; StunnedEffect.MaxStatContestResult = 4; StunnedEffect.bRemoveWhenSourceDies = false; Template.AddTargetEffect(StunnedEffect);

// Unconscious effect for 5 unblocked hits UnconsciousEffect = class'X2StatusEffects'.static.CreateUnconsciousStatusEffect(true); UnconsciousEffect.MinStatContestResult = 5; UnconsciousEffect.MaxStatContestResult = 0; UnconsciousEffect.bRemoveWhenSourceDies = false; Template.AddTargetEffect(UnconsciousEffect);

I changed

StatContest.AttackerStat = eStat_Offense

Since the ranged skill would not be melee. It works on a primary weapon, but not on a pistol. I'm curious as to what the game is calculating during these lines. Are unblocked hits a series of dice rolls where they compare two statistics as parameters? I have no idea, but would be interesting to learn.

1
KwahnOP•

Looks like it calls StatContests in the X2AbilityToHitCalc_StatCheck.uc file, and makes comparisons based on that. So the question is, what does the primary weapon do to roll it that the pistol does not?

And yeah, changing it from a strength to an offense roll is correct, since offense is the "aim" stat. Not sure how pistols use that aim stat either.

1
jal0001•

I figured out what I was doing wrong. I was spawning endless sectoids in debugging mode (who have really high will due to psi-powers). I initially shot 5 sectoids with an SMG and just got lucky rolls so I thought they always worked. Swapped to a pistol version and never got it. That's just RNG :P

1