Drakous79 Posted December 17, 2012 Share Posted December 17, 2012 (edited) Fragments friendly explosivesSomeone mentioned in the past, that explosives shouldn't do more damage to alien weapons than their own self-destruction capability. There's a way how to disable fragment loss, when using explosives.http://i.imgur.com/7uxux.jpgXComGame.upk, class XGUnit function OnDeath(class<DamageType> DamageType, XGUnit kDamageDealer) { ... // End:0x45f if(DamageType == class'XComDamageType_Explosion') { m_bWasKilledByExplosion = true; } ... } SF: 07 5F 04 72 00 4D B4 00 00 20 7A 4A 00 00 16 14 2D 01 6D AF 00 00 27 RW: 07 5F 04 72 00 4D B4 00 00 20 7A 4A 00 00 16 14 2D 01 6D AF 00 00 28 // Thanks to DamarStiehl here's updated hex for XCOM Enemy Within, changelist 394142 SF: BE C7 00 00 20 73 52 00 00 16 16 14 2D 01 0E C3 00 00 27 RW: BE C7 00 00 20 73 52 00 00 16 16 14 2D 01 0E C3 00 00 28 Change 27 to 28, true to false. This tiny change also disables explosives kill narratives.Disabling explosives kill narratives with fragments loss still effectiveIt is a matter of jumping over certain conditionals.Vahlen talking about using explosives during a mission is in XComGame.upk, class XGUnit, function OnKill(). // End:0x4b4 if(kVictim.IsAlien_CheckByCharType() && !XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CharacterHasProperty(GetCharacter().m_kChar.iType, 4)) { // End:0x48e if(kVictim.m_bWasKilledByExplosion) { PRES().UINarrative(xcomnarrativemoment'FirstExplosivesKill', kVictim); } // End:0x4b4 else { m_kFirstKillTarget = kVictim; SetTimer(4.0, false, 'FirstKillNarrative'); } } SF: 07 8E 04 19 00 5B B4 00 00 0A 00 6D AF 00 00 00 2D 01 6D AF 00 00 19 1B 84 5A 00 00 00 00 00 00 16 RW: 06 8E 04 19 00 5B B4 00 00 0A 00 6D AF 00 00 00 2D 01 6D AF 00 00 19 1B 84 5A 00 00 00 00 00 00 16Change the first 07 to 06.Vahlen about grenades in labs - XComStrategyGame.upk, class XGResearchUI, function UpdateView(). // End:0x4bd if(LABS().m_bNagExplosives && -- LABS().m_iExplosiveNags > 0) { LABS().m_bNagExplosives = false; // End:0x4bd if(Narrative(xcomnarrativemoment'NagExplosives')) { return; } } SF: 07 BD 04 1B 71 1F 00 00 00 00 00 00 20 AC 48 00 00 4A 16 04 0B RW: 06 BD 04 1B 71 1F 00 00 00 00 00 00 20 AC 48 00 00 4A 16 04 0BChange the first 07 to 06. Edit: Updated Fragments friendly explosives hex for XCOM Enemy Within Edited November 17, 2013 by Drakous79 Link to comment Share on other sites More sharing options...
DamarStiehl Posted December 19, 2012 Share Posted December 19, 2012 This is cool. Can it be wrapped into a ToolBoks mod? Link to comment Share on other sites More sharing options...
FMod Posted December 19, 2012 Share Posted December 19, 2012 Someone mentioned in the past, that explosives shouldn't do more damage to alien weapons than their own self-destruction capability. There's a way how to disable fragment loss, when using explosives.I think it was me. Yeah, that mechanic made no sense, was just an artificial nerf to discourage explosive tactics. Thanks, nice find! Now, wondering (could check myself later), I guess there isn't a check nearby that could be used to have grenades spoil corpses instead (because that's the kind of thing they might do)? This is cool. Can it be wrapped into a ToolBoks mod? What more wrapping does it need? This seems to already be enough for one. Link to comment Share on other sites More sharing options...
Drakous79 Posted December 19, 2012 Author Share Posted December 19, 2012 (edited) Happy you guys like it :) This is cool. Can it be wrapped into a ToolBoks mod?It can, when there's more time. Christmas preparations :) You can do it yourself, just check sample custom mod in ToolBoks and drop in those 2 hexes. Now, wondering (could check myself later), I guess there isn't a check nearby that could be used to have grenades spoil corpses instead (because that's the kind of thing they might do)? Agreed. But it wouldn't be easy. See CheckForDamagedItems() within XGUnit and CollectArtifactsFromDeadAliens() within XGSummaryUI. One generates fragments and another the rest. I wish we could script. Edited December 20, 2012 by Drakous79 Link to comment Share on other sites More sharing options...
DamarStiehl Posted December 20, 2012 Share Posted December 20, 2012 Yes, oddly enough it worked. I fully expected to pooch my game though. Three cheers for the authors of this mod and ToolBoks. Link to comment Share on other sites More sharing options...
Recommended Posts