Jump to content

Modding details? Ask away!


Amineri

Recommended Posts

Hi,

 

I'm trying to make people fall unconscious instead of dying. Originally I was trying to override TakeEffectDamage from XComGameState_Unit, but as pointed on page 3 that doesn't work. So now I'm trying to override OnEffectAdded from X2Effect_ApplyWeaponDamage instead. That also didn't work, and none of the 'LOG triggered in launcher.log when shots fired. I had the +ModClassOverrides in XComEngine.ini and the .u file show up in sdk directory.

 

Am I looking at the wrong file to override for altering damage/death deal to units? Or are there some more set up I am missing when it comes to overriding classes?

 

Also, is there a way to add new stats to track? like number of times panicked or shot by certain weapons?

Link to comment
Share on other sites

  • Replies 399
  • Created
  • Last Reply

Top Posters In This Topic

Hey guys! I'm asking a quick question as it's nagging me to no end. I see that in the SDK quick start guide, it says that XCOM 2 comes with it's own 64bit version of UnrealEd. But for the life of me I can't find it anywhere! Could someone please be so kind as to point me into the direction of it so I can start modding? :smile:

 

UnrealEd is actually a upk that runs under the XComGame.exe included in the SDK. The simplest way to launch UnrealEd is from the VS Shell ModBuddy under Tools / XCOM 2 Editor. For this to work, you have to have set up the paths in the VS Shell under Tools / Options / XCOM 2 -- to both the SDK and Game.

Link to comment
Share on other sites

Quick question about the ExampleVoicePack, if I open the UPK files in the editor and play the sound cues I get voiced Russian lines. But when I debug the example and use them in game they sound like Windows Speech Generation reading the lines or something. I have made no modifications to the example mod at all, any idea as to why this might be happening?

Link to comment
Share on other sites

I'm still trying to find a way to randomize the stats on Rookies.

My idea would be to somehow get RandStatAmount from X2SoldierClassTemplateManager or X2SoldierClassTemplate in the XcomClassData.ini to work in the Xcomgamedata_Characterstats.ini for the X2CharacterTemplate. But I'm at a loss here on how to progress.

Link to comment
Share on other sites

Hi,

 

I'm trying to make people fall unconscious instead of dying. Originally I was trying to override TakeEffectDamage from XComGameState_Unit, but as pointed on page 3 that doesn't work. So now I'm trying to override OnEffectAdded from X2Effect_ApplyWeaponDamage instead. That also didn't work, and none of the 'LOG triggered in launcher.log when shots fired. I had the +ModClassOverrides in XComEngine.ini and the .u file show up in sdk directory.

 

Am I looking at the wrong file to override for altering damage/death deal to units? Or are there some more set up I am missing when it comes to overriding classes?

 

 

Currently the logic for whether to bleed out or outright kill is in XComGameState_Unit.TakeDamage. However, if you want to always replace death with falling unconscious, it will likely be a bit more work.

 

You'll basically be interrupting the usual Death action, and replacing it with an Unconscious Effect. To do this I'd register an event to 'UnitDied'. The Untouchable ability for Rangers hooks into this.

 

There's also the code for the psi ability Sustain, which prevents death once per mission. This works by giving the unit a persistent X2Effect which triggers on the PreBleedoutCheck(), and PreDeathCheck().

 

Also, is there a way to add new stats to track? like number of times panicked or shot by certain weapons?

It is possible to add new tactical-level or strategy-level stats.
For tactical-level the "simplest" way is to create a new gamestate and attach it as a component to the XcomGameState_Effect class the X2Effect template creates. You can see the LWS Officer mod X2Effect_FocusFire and XComGameState_Effect_FocusFire for examples of how to track the number of times a designated enemy has been shot at since the last turn.
For strategy-level, again creating a new gamestate is the way to go, but in this case attaching it directly to the XComGameState_Unit is preferred, in order to make it more persistent. In the LWS Officer mod, I did this with the XComGameState_Unit_LWOfficer, which gets attached as a component to an XComGameState_Unit, and is used to track things such as current officer rank.
Link to comment
Share on other sites

Is there a way to start a new campaign in the Avenger? Testing out if a new Item shows up in a new campaign is currently quite cumbersome.

 

I do this all the time. When launching in Debug mode, under Strategy there is a "Debug NonCheat Start" option. This runs the SimCombat() function for the first mission and then takes you directly to the Avenger UIAfterAction.

 

I don't recommend using the "Debug Strategy Start" because a bunch of things about the HQ setup are hard-coded, so it tends to miss picking up some new mod code.

Link to comment
Share on other sites

Quick question about the ExampleVoicePack, if I open the UPK files in the editor and play the sound cues I get voiced Russian lines. But when I debug the example and use them in game they sound like Windows Speech Generation reading the lines or something. I have made no modifications to the example mod at all, any idea as to why this might be happening?

 

I'm not quite sure, as I haven't had this happen, nor have I cracked open the ExampleVoicePack mod. It could be that the content upk wasn't added to the VS project (I've done that sort of thing a few times), or that some necessary configuration was mission (which I've also done many times!).

Link to comment
Share on other sites

I'm still trying to find a way to randomize the stats on Rookies.

 

My idea would be to somehow get RandStatAmount from X2SoldierClassTemplateManager or X2SoldierClassTemplate in the XcomClassData.ini to work in the Xcomgamedata_Characterstats.ini for the X2CharacterTemplate. But I'm at a loss here on how to progress.

 

 

 

Yes, this one is a bit tricky. I'm not quite sure what the most direct way to proceed is in this case... sorry ~_~.

Link to comment
Share on other sites

 

I'm still trying to find a way to randomize the stats on Rookies.

 

My idea would be to somehow get RandStatAmount from X2SoldierClassTemplateManager or X2SoldierClassTemplate in the XcomClassData.ini to work in the Xcomgamedata_Characterstats.ini for the X2CharacterTemplate. But I'm at a loss here on how to progress.

 

 

 

Yes, this one is a bit tricky. I'm not quite sure what the most direct way to proceed is in this case... sorry ~_~.

 

Thanks for trying though.

 

Damn I knew I should have studied something useful, like programming, instead of languages and history :blush:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...