Amineri Posted May 14, 2013 Share Posted May 14, 2013 In the vanilla game, Double Tap and Bullet Swarm have the following restrictions: Bullet Swarm 1) Only works with ShotStandard ability2) Only works with Heavy class3) Only works with Heavy weapon Under these conditions a ShotStandard action takes one move action instead of one fire action Double Tap 1) Only works with Sniper Class2) Only works with restricted set of abilities (ShotStandard, HeadShot, Disabling Shot, and maybe some others)3) Only works if the unit has not moved4) Has a 1 turn cooldown5) Allows an addition "shooting" type action after the first ------------------------------------------------- This modlet removes the Heavy class and Heavy weapon requirements for Bullet Swarm. This allows the perk to be given to any class and any weapon. I have confirmed that this works with Support and Assault classes, with Assault Rifles, Shotguns, and Pistols. Only the ShotStandard ability can be used first, as before. This modlet also removes the Sniper class requirement for Double Tap. This allows the perk to be used with any class and any weapon. I have confirmed this with Support and Assault classes, with Assault Rifles, Shotungs, and Pistols. The set of allowed abilities is the same as before, and the 1 turn cooldown remains. I tried to add an extra conditional to Double Tap so that it would not activate if there were no enemies in sight. However, it appears that the m_arrVisiblEnemies list is updated after XGAbility.ApplyCost is called, as Double Tap still activated when the first shot killed the only remaining visible enemy. ----------------------------------------------- This function rewrites XComGame.upk >> XGAbility.ApplyCost hex code: header:1F 7C 00 00 50 55 00 00 00 00 00 00 0A 7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 01 00 00 05 38 00 00 93 06 00 00 AB 04 00 00 07 11 00 1B 9A 36 00 00 00 00 00 00 24 08 16 04 0B 07 C3 01 1B 9A 36 00 00 00 00 00 00 24 07 16 07 8D 00 82 19 01 E6 7B 00 00 0A 00 FF 30 00 00 00 2D 01 FF 30 00 00 18 22 00 81 19 01 E6 7B 00 00 0A 00 2F 34 00 00 00 1B BD 5E 00 00 00 00 00 00 16 16 16 A1 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 2C 02 16 06 AD 00 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 07 A0 01 19 01 E6 7B 00 00 0A 00 2F 34 00 00 00 1B BD 5E 00 00 00 00 00 00 16 07 3B 01 82 9A 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 16 18 20 00 19 01 E6 7B 00 00 0A 00 FF 30 00 00 00 2D 01 FF 30 00 00 16 14 19 01 E6 7B 00 00 0A 00 F7 30 00 00 00 2D 01 F7 30 00 00 27 06 A0 01 07 A0 01 97 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 16 14 19 01 E6 7B 00 00 0A 00 F7 30 00 00 00 2D 01 F7 30 00 00 27 0F 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 19 01 E6 7B 00 00 0B 00 00 00 00 00 00 1B 7D 0D 00 00 00 00 00 00 27 16 06 26 06 07 D3 01 2D 01 D2 7B 00 00 06 26 06 07 D2 02 82 82 82 82 9A 38 3A 19 01 E6 7B 00 00 0A 00 65 B4 00 00 00 1B AF 34 00 00 00 00 00 00 16 38 3A 24 02 16 18 38 00 19 19 01 E6 7B 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 0C 00 EA A2 00 00 00 1B B8 36 00 00 00 00 00 00 2C 1A 16 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 07 16 16 18 23 00 77 19 2E 66 7D 00 00 17 09 00 E8 BB 00 00 00 01 E8 BB 00 00 2A 16 16 18 38 00 19 19 2E 66 7D 00 00 17 09 00 E8 BB 00 00 00 01 E8 BB 00 00 0C 00 4F B9 00 00 00 1B 9A 36 00 00 00 00 00 00 2C 08 16 16 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 06 26 06 07 06 06 82 82 82 82 9A 38 3A 19 01 E6 7B 00 00 0A 00 65 B4 00 00 00 1B AF 34 00 00 00 00 00 00 16 38 3A 24 01 16 18 22 00 9A 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 25 16 16 18 38 00 19 19 01 E6 7B 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 0C 00 EA A2 00 00 00 1B B8 36 00 00 00 00 00 00 2C 0D 16 16 18 8B 00 81 19 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 09 00 92 0F 00 00 00 01 92 0F 00 00 15 00 14 7F 00 00 00 1B B2 3C 00 00 00 00 00 00 01 E6 7B 00 00 2C 3C 16 16 16 18 8C 00 19 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 09 00 92 0F 00 00 00 01 92 0F 00 00 18 00 23 7F 00 00 00 1B 35 3D 00 00 00 00 00 00 38 3A 38 3D 1B 1E 35 00 00 00 00 00 00 16 16 16 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 0F 35 0D 30 00 00 0F 30 00 00 00 01 1A 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 19 01 E6 7B 00 00 09 00 C8 30 00 00 00 01 C8 30 00 00 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 02 00 F0 2C 00 00 00 2C 03 0F 35 0E 30 00 00 0F 30 00 00 00 01 1A 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 19 01 E6 7B 00 00 09 00 C8 30 00 00 00 01 C8 30 00 00 2C 3C A5 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 16 14 19 01 E6 7B 00 00 0A 00 E5 30 00 00 00 2D 01 E5 30 00 00 27 14 19 01 E6 7B 00 00 0A 00 E9 30 00 00 00 2D 01 E9 30 00 00 27 06 26 06 A5 19 01 E6 7B 00 00 09 00 B3 30 00 00 00 01 B3 30 00 00 16 07 90 06 84 84 9A 1B 1E 35 00 00 00 00 00 00 16 2C 21 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 26 16 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 2D 16 16 19 01 E6 7B 00 00 14 00 00 00 00 00 00 1B 3E 63 00 00 00 00 00 00 1B 1E 35 00 00 00 00 00 00 16 16 1B 46 25 00 00 00 00 00 00 16 04 0B 53 new hex: (virtual 0x673)header:1F 7C 00 00 50 55 00 00 00 00 00 00 0A 7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 57 01 00 00 05 38 00 00 73 06 00 00 AB 04 00 00 07 11 00 1B 9A 36 00 00 00 00 00 00 24 08 16 04 0B 07 C3 01 1B 9A 36 00 00 00 00 00 00 24 07 16 07 8D 00 82 19 01 E6 7B 00 00 0A 00 FF 30 00 00 00 2D 01 FF 30 00 00 18 22 00 81 19 01 E6 7B 00 00 0A 00 2F 34 00 00 00 1B BD 5E 00 00 00 00 00 00 16 16 16 A1 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 2C 02 16 06 AD 00 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 07 A0 01 19 01 E6 7B 00 00 0A 00 2F 34 00 00 00 1B BD 5E 00 00 00 00 00 00 16 07 3B 01 82 9A 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 16 18 20 00 19 01 E6 7B 00 00 0A 00 FF 30 00 00 00 2D 01 FF 30 00 00 16 14 19 01 E6 7B 00 00 0A 00 F7 30 00 00 00 2D 01 F7 30 00 00 27 06 A0 01 07 A0 01 97 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 16 14 19 01 E6 7B 00 00 0A 00 F7 30 00 00 00 2D 01 F7 30 00 00 27 0F 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 26 19 01 E6 7B 00 00 0B 00 00 00 00 00 00 1B 7D 0D 00 00 00 00 00 00 27 16 06 93 05 07 D3 01 2D 01 D2 7B 00 00 06 93 05 07 43 02 82 19 19 01 E6 7B 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 0C 00 EA A2 00 00 00 1B B8 36 00 00 00 00 00 00 2C 1A 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 07 16 16 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 06 93 05 07 73 05 82 82 82 82 97 36 19 01 E6 7B 00 00 09 00 9C 30 00 00 00 01 9C 30 00 00 24 00 16 18 22 00 9A 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 25 16 16 18 38 00 19 19 01 E6 7B 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 0C 00 EA A2 00 00 00 1B B8 36 00 00 00 00 00 00 2C 0D 16 16 18 8B 00 81 19 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 09 00 92 0F 00 00 00 01 92 0F 00 00 15 00 14 7F 00 00 00 1B B2 3C 00 00 00 00 00 00 01 E6 7B 00 00 2C 3C 16 16 16 18 8C 00 19 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 09 00 92 0F 00 00 00 01 92 0F 00 00 18 00 23 7F 00 00 00 1B 35 3D 00 00 00 00 00 00 38 3A 38 3D 1B 1E 35 00 00 00 00 00 00 16 16 16 A5 19 01 E6 7B 00 00 09 00 B6 30 00 00 00 01 B6 30 00 00 16 0F 35 0D 30 00 00 0F 30 00 00 00 01 1A 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 19 01 E6 7B 00 00 09 00 C8 30 00 00 00 01 C8 30 00 00 19 19 2E FE 2C 00 00 19 12 20 4F FE FF FF 0A 00 D8 F9 FF FF 00 1C F6 FB FF FF 16 09 00 98 F9 FF FF 00 01 98 F9 FF FF 09 00 F0 2C 00 00 00 01 F0 2C 00 00 02 00 F0 2C 00 00 00 2C 03 0F 35 0E 30 00 00 0F 30 00 00 00 01 1A 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 19 01 E6 7B 00 00 09 00 C8 30 00 00 00 01 C8 30 00 00 2C 3C A5 19 01 E6 7B 00 00 09 00 BB 30 00 00 00 01 BB 30 00 00 16 14 19 01 E6 7B 00 00 0A 00 E5 30 00 00 00 2D 01 E5 30 00 00 27 14 19 01 E6 7B 00 00 0A 00 E9 30 00 00 00 2D 01 E9 30 00 00 27 06 93 05 A5 19 01 E6 7B 00 00 09 00 B3 30 00 00 00 01 B3 30 00 00 16 07 00 06 84 84 9A 1B 1E 35 00 00 00 00 00 00 16 2C 21 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 26 16 16 18 0F 00 9A 1B 1E 35 00 00 00 00 00 00 16 2C 2D 16 16 19 01 E6 7B 00 00 14 00 00 00 00 00 00 1B 3E 63 00 00 00 00 00 00 1B 1E 35 00 00 00 00 00 00 16 16 1B 46 25 00 00 00 00 00 00 16 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 04 0B 53 decompiled function after change: if(m_bReactionFire) { } // End:0x593 else { // End:0x243 if(m_kUnit.GetCharacter().HasUpgrade(26) && (GetType()) == 7) { ++ m_kUnit.m_iMovesActionsPerformed; } // End:0x593 else { // End:0x573 if(((((m_kUnit.m_arrVisibleEnemies.Length > 0) && m_kUnit.m_iMovesActionsPerformed == 0) && m_kUnit.GetCharacter().HasUpgrade(13)) && !XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.m_kAbilities.IsAbilityCoolingDown(m_kUnit, 60)) && XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.m_kAbilities.IsDoubleTapAllowedAbility(byte(GetType()))) { ++ m_kUnit.m_iMovesActionsPerformed; m_kUnit.m_aAbilitiesOnCooldown[m_kUnit.m_iNumAbilitiesOnCooldown].iCooldown = XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.3; m_kUnit.m_aAbilitiesOnCooldown[m_kUnit.m_iNumAbilitiesOnCooldown].iType = 60; ++ m_kUnit.m_iNumAbilitiesOnCooldown; m_kUnit.m_bDoubleTapActivated = true; m_kUnit.m_bBuildAbilityDataDirty = true; } // End:0x593 else { ++ m_kUnit.m_iFireActionsPerformed; } } Enjoy! Link to comment Share on other sites More sharing options...
Yzaxtol Posted May 14, 2013 Share Posted May 14, 2013 Hmmm interesting, it would take some re-modelling but I guess I could squeeze these perks into other classes in Merciless. Link to comment Share on other sites More sharing options...
Yzaxtol Posted June 15, 2013 Share Posted June 15, 2013 Anything for Headshot as it also requires the Sniper property to fire?Disabling Shot has an animation bug if used with anything but the sniper rifles, otherwise I'd probably request that too :D hehe. Link to comment Share on other sites More sharing options...
Amineri Posted June 15, 2013 Author Share Posted June 15, 2013 Unfortunately I'm not sure where those perks are handled. The function I modified was XGAbility.ApplyCost. This function handles some of the Run N Gun functionality, Bullet Swarm and DoubleTap. It has supplies some of the functionality for Overwatch, Hunker Down and Reload. I did add another capability to the Smoke Grenade perk, making it so that the 'Throw Smoke Grenade' ability takes only a move action if the Smoke Grenade perk is selected, but that really only makes sense in the context of having equippable smoke grenades (it "juices up" the perk a bit). Link to comment Share on other sites More sharing options...
seraglio73 Posted June 30, 2013 Share Posted June 30, 2013 Awsome stuff Amineri. Question...with previous modlets, I simply made the hex changes with HxD, which usually consisted of a handful of byte changes, after searching for a small string. This is quite large though. To implement this modlet I should do search for that whole string and replace with the latter..or is there some way to implement these "modlets" I havent come across yet? Oh and a related question, anyone Know if "In The Zone" sniper ability works for other classes..or does it need to be unlocked as well? Link to comment Share on other sites More sharing options...
Amineri Posted June 30, 2013 Author Share Posted June 30, 2013 (edited) I also use HxD, and do a search/replace on the entire huge string. I typically keep my hex changes in text file which I edit with Notepad++. My typical steps:Triple click on original hex to select entire block, copy Switch to HxD, Ctrl-F to find, select 'hex', search 'all', paste hex into search box, hit 'search' HxD should find and highlight the hex block, indicating that everything is as it should be Switch to Notepad++, triple click new hex to select entire block, copy Switch to HxD, Ctrl-R to replace, select 'hex', search 'all', confirm 'no' Paste hex into replace box (original hex is auto-populated into find box because of the previous find operation) Hit 'replace' New hex should be colored red indicating it has changed. Ctrl-S to save Switch / Open UE Explorer (depending on version) Reload / Load the upk and verify that the new file decompiles correctly Edited June 30, 2013 by Amineri Link to comment Share on other sites More sharing options...
dubiousintent Posted June 30, 2013 Share Posted June 30, 2013 (edited) Are you aware that ToolBoks has the ability to add your own 'Custom Mods' consisting of multiple sections of large hex-code like this? You may need to track down the offset into the EXE using the 'old hex', but then you only need to install the 'new hex'. But once you have such a CM set up, it becomes very easy to re-apply if needed. And about ITZ? It does work with all classes. See the Wiki article 'XCOM:EU Perks'. (Just added that information yesterday.) -Dubious- Edited June 30, 2013 by dubiousintent Link to comment Share on other sites More sharing options...
seraglio73 Posted July 1, 2013 Share Posted July 1, 2013 Thanks, yeah, I've used ToolBoks once before to install a custom mod, but the format was different, it wasn't just hex..it specified what file, breaks etc when I read the text files. Wasn't sure how I set that up. Link to comment Share on other sites More sharing options...
Bertilsson Posted July 1, 2013 Share Posted July 1, 2013 (edited) I have started a little side project to wiki-log and include toolboks mods for all amineris modlets. However I didn't get far before Long War 1.9 beta was released and on top of that I discovered the possibilty to increase squad size... but hopefully in a few days I will resume the toolboks mods for the modlets which will then be available in the wiki Edited July 1, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
Recommended Posts