Jump to content

Enemy Within Discovery Thread


Krazyguy75

Recommended Posts

I'm not sure if this is new or not, but when I was tinkering around with the perk entries in DGC, I noticed that if you change a perk that one of your soldiers already has (so that your soldier has neither perk from that level) then the game doesn't register that a perk has been chosen for that level yet, and lets you select a new one. Also, your soldier retains the effects of the perk you moved.

 

I remember in EU when I messed around with the perk trees, it would just pretend that everything was normal.

 

I get the feeling these effects have something to do with the retooling of the perks that Krazyguy75 mentioned - "human perks are now abilities." I think they probably register the perk decision, add the ability to the soldier, and then run a check against the perk trees each time the game loads to make sure that each rank has an ability.

 

I need to test later to see what happens if you add a perk you already have to a later rank, or change it so that your soldier has both perks from a given rank.

 

On a separate note, does anybody know yet if the method for expanding the perk tree in EW is the same as it was in EU? Since Psi Reflect is now a perk-ability, Mind Meld (especially with the Mechtoid changes) might be as well, along with Psi Lance and Psi Leech. We might be able to expand the psi perk tree by another rank or two, as well, depending on what other changes they made. (I remember there was some limitation keeping a 4th psi rank from being added, but I don't remember exactly what it was.)

Link to comment
Share on other sites

  • Replies 248
  • Created
  • Last Reply

Top Posters In This Topic

I've been reading through this forum a couple of times now... And I just can't seem to figure it out:

Everyone's saying they did this and that but, I don't understand how.

I used to use ResourceHacker for EU, but that doesn't seem to work anymore.

 

I'm trying to mod the DefaultGameCore.ini, but I don't know how to patch/hex my .exe to read it or how to mod the .upk files.

 

Any help would be greatly appreciated!

Edited by Eriks14042
Link to comment
Share on other sites

@Krazyguy75

 

Perhaps now is a good time to update your first post with information regarding to what works and what doesn't and how to get things to work with EW. Just so that people don't have to read through several pages of replies and to avoid questions that have already been answered.

Link to comment
Share on other sites

I've been reading through this forum a couple of times now... And I just can't seem to figure it out:

Everyone's saying they did this and that but, I don't understand how.

I used to use ResourceHacker for EU, but that doesn't seem to work anymore.

 

I'm trying to mod the DefaultGameCore.ini, but I don't know how to patch/hex my .exe to read it or how to mod the .upk files.

 

Any help would be greatly appreciated!

 

Resoure hacker works for me... but you need to point it at the XcomEW.exe, ( C:\Program Files (x86)\Steam\SteamApps\common\XCom-Enemy-Unknown\XEW\Binaries\Win32 ) not the old XComGame.exe

 

for most things regard XComEW and XComEU as separate games and you wont go too far wrong

Link to comment
Share on other sites

 

I've been reading through this forum a couple of times now... And I just can't seem to figure it out:

Everyone's saying they did this and that but, I don't understand how.

I used to use ResourceHacker for EU, but that doesn't seem to work anymore.

 

I'm trying to mod the DefaultGameCore.ini, but I don't know how to patch/hex my .exe to read it or how to mod the .upk files.

 

Any help would be greatly appreciated!

 

Resoure hacker works for me... but you need to point it at the XcomEW.exe, ( C:\Program Files (x86)\Steam\SteamApps\common\XCom-Enemy-Unknown\XEW\Binaries\Win32 ) not the old XComGame.exe

 

for most things regard XComEW and XComEU as separate games and you wont go too far wrong

 

But how did you manage resource hacker to work ? When I'm trying to make changes to XCOMEW.exe game just crashes.

Link to comment
Share on other sites

 

On a separate note, does anybody know yet if the method for expanding the perk tree in EW is the same as it was in EU? Since Psi Reflect is now a perk-ability, Mind Meld (especially with the Mechtoid changes) might be as well, along with Psi Lance and Psi Leech. We might be able to expand the psi perk tree by another rank or two, as well, depending on what other changes they made. (I remember there was some limitation keeping a 4th psi rank from being added, but I don't remember exactly what it was.)

 

I've not yet updated the expanded perk tree for EW. From the look of things the actionscript change will be very similar, but the upk changes are all going to have to be re-done to stay compatible with the new structures.

 

------------------

 

Regarding perks and abilities. Unfortunately the game itself blurs the line here, but from a code perspective these things are quite distinct.

 

Perks are drawn from the enum XGTacticalGameCoreNativeBase.EPerkType -- in EU this had 111 entries, while in EW the list has been expanded to 172.

 

Abilities are drawn from the enum XGTacticalGameCoreData.EAbility -- in EU this had 89 entries, while in EW the list has been expanded to 96.

 

As you can see there are 61 new perks but only 7 new abilities.

 

Here's the difference:

 

1) Perk

 

A perk is a passive something that a unit has. Perks are stored in an array in XGCharacter, XGUnit has a m_kChar variable of type XGCharacter that stores this. Typically perk info is accessed via the HasUpgrade function:

simulated function bool HasUpgrade(int iUpgrade)
{
    return m_kChar.aUpgrades[iUpgrade] > 0;
}

A perk directly by itself doesn't do anything. Perks can be coded to have active or passive effects.

 

Perk passive effects are things that do not spawn a pressable button in the tactical HUD. These effects are automatically triggered when the conditions are met, without active intervention from the player. Examples of passive perk effects are Lightning Reflexes and Bullet Swarm.

 

Perk active effects usually trigger abilities, sometimes in combination with other conditions. Examples of active perk effects that trigger abilities are Run And Gun and Suppression. These generate pressable buttons in the tactical HUD.

 

 

2) Abilities

 

Abilities have a lot more mechanics behind them. Abilities have ability properties and ability effects, both of which have enum lists describing possible properties and effects.

 

Abilities have to be configured (unlike perks). This happens in XGAbilityTree.BuildAbilities. For example :

    BuildAbility(7, 2, 2, -1, -20, 1,,, 1, 47,,,,,,, 8);

is the configuration line for the basic "Fire action" ability. This is the one that allows a unit to perform the basic firing action (typically the left-most button in the tactical HUD).

 

Abilities can be made available by a variety of options:

 

1) Can be directly granted to a weapon, armor or character-type in the config data.

 

For example ghost armor has:

Armors=( ABILITIES[0]=eAbility_Ghost, ABILITIES[1]=eAbility_NONE, ... iType=eItem_ArmorGhost, iHPBonus=6,  iDefenseBonus=20, iFlightFuel=0,  iWillBonus=0,  iLargeItems=1, iSmallItems=1, iMobilityBonus=3 )

Most weapons grant the fire ability directly, like the Assault Rifle:

Weapons=( strName="", iType=eItem_AssaultRifle, ABILITIES[0]=eAbility_ShotStandard, ABILITIES[1]=eAbility_NONE,... ) 

2) Can be made available if the unit has a perk

 

For example:

having ePerk_RunAndGun (6) grants eAbility_RunAndGun (68). To make things more confusing the eAbility_RunAndGun has the eEffect_RunAndGun (30). eEffect_RunAndGun is of type EAbilityEffect.

 

3) Can be made available in special circumstances

 

This mostly applies to alien abilities.

 

For example the Cyberdisc is not granted the eAbility_DeathBlossom by configuration in the DGC.ini, but is instead directly given the ability based on character type.

 

-----------------------------------

 

Available abilities are unfortunately built using native code. The relevant function is XGUnitNativeBase.BuildAbilities. (note that the BuildAbilities name is overloaded, since it is also used in XGAbilityTree.BuildAbilities) :

native function BuildAbilities(optional bool bUpdateUI)
{
    bUpdateUI = false;            
}

1) XGUnitNativeBase.BuildAbilities -- rebuilds the currently available abilities based on circumstances. For example after using Run And Gun grenade abilities are suppressed.

 

2) XGAbilityTree.BuildAbilities -- initially configures abilities, including ability duration, cooldown, properties and effects.

Link to comment
Share on other sites

in order to not let the game override? cant we just change it to this ?

 

[Engine.IniLocPatcher]

;Files=(Filename="XcomGameCore.ini")

 

i noticed that the game doesnt call home anymore , the steam update continue but you doesnt dl the ini anymore

 

Welcome to the forum :smile:

 

Please, can you check Users\YourUserName\Documents\My Games\XCOM - Enemy Within\XComGame\Logs\EMS\ if there's XComGameCore.ini and what date and time it has? It should be close to a moment of the last start of the game. Commenting Engine.IniLocPatcher lines had not much effect in XCOM EU. Disabled phone home took care of it.

 

Anyway, there's sill resource cache in the executable which overrides our changes, which we want to override and that's what UberJumper's XCOM Mod Helper does.

Link to comment
Share on other sites

Unsurprisingly a lot of new basic Pawn types have been added to the game. The list is defined in XGGameData.EPawnType.

 

Here is the complete list:

 

 

enum EPawnType
{
    ePawnType_None,
    ePawnType_HUMAN_START,
    ePawnType_FemaleLevelILight_UNUSED,
    ePawnType_Female_2_Skeleton,
    ePawnType_Female_3_Ghost,
    ePawnType_Female_1_Kevlar,
    ePawnType_Female_2_Carapace,
    ePawnType_Female_3_Titan,
    ePawnType_Female_3_Archangel,
    ePawnType_FemaleLevelIIHeavy_UNUSED,
    ePawnType_FemaleLevelIIIHeavy_UNUSED,
    ePawnType_FemalePsi,
    ePawnType_FemaleCovertOps,
    ePawnType_MaleLevelILight_UNUSED,
    ePawnType_Male_2_Skeleton,
    ePawnType_Male_3_Ghost,
    ePawnType_Male_1_Kevlar,
    ePawnType_Male_2_Carapace,
    ePawnType_Male_3_Titan,
    ePawnType_Male_3_Archangel,
    ePawnType_MaleLevelIIHeavy_UNUSED,
    ePawnType_MaleLevelIIIHeavy_UNUSED,
    ePawnType_MalePsi,
    ePawnType_MaleCovertOps,
    ePawnType_HUMAN_END,
    ePawnType_Tank,
    ePawnType_Tank2,
    ePawnType_Tank3,
    ePawnType_Civilian,
    ePawnType_ALIEN_START,
    ePawnType_Sectoid,
    ePawnType_Sectoid_Commander,
    ePawnType_Floater,
    ePawnType_Floater_Heavy,
    ePawnType_Muton,
    ePawnType_Muton_Elite,
    ePawnType_Muton_Berserker,
    ePawnType_ThinMan,
    ePawnType_Elder,
    ePawnType_CyberDisc,
    ePawnType_Reaper,
    ePawnType_Chryssalid,
    ePawnType_Sectopod,
    ePawnType_SectopodDrone,
    ePawnType_Zombie,
    ePawnType_Outsider,
    ePawnType_EtherealUber,
    ePawnType_ALIEN_END,
    ePawnType_BattleScanner,
    ePawnType_XPACK_ALIEN_START,
    ePawnType_Mechtoid,
    ePawnType_Seeker,
    ePawnType_XPACK_ALIEN_END,
    ePawnType_MEC_START,
    ePawnType_MecCivvies,
    ePawnType_Female_MecCivvies,
    ePawnType_MecMark1,
    ePawnType_MecMark2,
    ePawnType_MecMark3,
    ePawnType_MEC_END,
    ePawnType_EXALT_START,
    ePawnType_ExaltOperative,
    ePawnType_ExaltSniper,
    ePawnType_ExaltHeavy,
    ePawnType_ExaltMedic,
    ePawnType_ExaltEliteOperative,
    ePawnType_ExaltEliteSniper,
    ePawnType_ExaltEliteHeavy,
    ePawnType_ExaltEliteMedic,
    ePawnType_EXALT_END,
    ePawnType_GeneMod_START,
    ePawnType_Female_2_Skeleton_GM,
    ePawnType_Female_3_Ghost_GM,
    ePawnType_Female_1_Kevlar_GM,
    ePawnType_Female_2_Carapace_GM,
    ePawnType_Female_3_Titan_GM,
    ePawnType_Female_3_Archangel_GM,
    ePawnType_FemalePsi_GM,
    ePawnType_Male_2_Skeleton_GM,
    ePawnType_Male_3_Ghost_GM,
    ePawnType_Male_1_Kevlar_GM,
    ePawnType_Male_2_Carapace_GM,
    ePawnType_Male_3_Titan_GM,
    ePawnType_Male_3_Archangel_GM,
    ePawnType_MalePsi_GM,
    ePawnType_GeneMod_END,
    ePawnType_Max
}; 

 

 

 

You can see that down at the bottom is a whole section devoted to the pawns for gene-mod type armors ... they all end with '_GM'.

 

The code that determines whether the regular or gene-mod type pawn is loaded is in XComHumanPawn.state'InHQ'.SetInventory:

        m_bHasGeneMods = class'XComPerkManager'.static.HasAnyGeneMod(inCharacter.aUpgrades);
        PawnType = byte(class'XGBattleDesc'.static.MapSoldierToPawn(Inv.iArmor, Appearance.iGender, m_bHasGeneMods));

Nicely, the MapSoldierToPawn function is not in native code (I think it was in EU?). This is going to allow some possibilities with regard to modding armors, I think.

 

Anyhow, a mod to either SetInventory or MapSoldierToPawn would allow disabling the special gene-mod pawns from being used.

Edited by Amineri
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...