XCOM Squadsight Aim Penalty Get Shot Summary Hex Changes

From Nexus Mods Wiki
Revision as of 03:11, 17 November 2018 by Dubiousintent (talk | contribs) (Added 'Category:Mod_Creation' & 'Category:Mods')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This contains the hex changes to the function XGAbility_Targeted.GetShotSummary in XComGame.upk.

This change supports the additional of an aim penalty when using Squadsight.

This is by far the largest of the hex changes for this mod. The change here is large not because the change is complex, but because of the need to balance file and virtual sizes. The total function is a bit over 7000 bytes, of which this hex changes the first 2000 or so. In order to not change the virtual size, and have to recalculate every single jump offset, a much larger section was modified in order to free enough bytes to make enough "dummy variable calls" to preserve the functions overall virtual size.

XCOM_Squadsight_Aim_Penalty_Mod

Hex Change

XGAbility_Targeted.GetShotSummary
original: 0F 00 3B 7D 00 00 2E 4C AB 00 00 19 19 2E BC 4D 00 00 12 20 4F FE FF FF 0A 00 D7 F9 FF FF 00 1C F5 FB FF FF 16 09 00 55 4D 00 00 00 01 55 4D 00 00 13 00 00 A9 00 00 00 1B 79 2D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 00 3A 7D 00 00 1B 38 34 00 00 00 00 00 00 16 07 0E 04 77 00 3A 7D 00 00 2A 16 0F 35 C5 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 19 00 3A 7D 00 00 0A 00 07 33 00 00 00 1B DE 5E 00 00 00 00 00 00 16 14 2D 35 C2 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 98 92 19 00 3A 7D 00 00 0A 00 37 34 00 00 00 1B 2F 35 00 00 00 00 00 00 16 35 C4 25 00 00 C6 25 00 00 00 00 48 45 7D 00 00 16 25 16 0F 00 41 7D 00 00 19 00 3A 7D 00 00 0A 00 D5 33 00 00 00 1B E4 34 00 00 00 00 00 00 16 07 11 02 82 19 00 3A 7D 00 00 0C 00 C6 33 00 00 00 1B 66 36 00 00 00 00 00 00 2C 0F 16 18 29 00 19 00 3A 7D 00 00 13 00 9E 33 00 00 00 1B 7E 36 00 00 00 00 00 00 01 E6 7B 00 00 16 16 A1 00 41 7D 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 0A 16 07 9E 02 19 00 3A 7D 00 00 0A 00 F9 30 00 00 00 2D 01 F9 30 00 00 A1 00 41 7D 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 14 16 07 2B 03 19 00 3A 7D 00 00 0A 00 FB 30 00 00 00 2D 01 FB 30 00 00 A1 00 41 7D 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 14 16 0F 00 40 7D 00 00 FA 25 93 19 00 3A 7D 00 00 09 00 D6 30 00 00 00 01 D6 30 00 00 00 41 7D 00 00 16 16 07 ED 03 19 00 3A 7D 00 00 0A 00 D1 33 00 00 00 1B 59 36 00 00 00 00 00 00 16 0F 00 3E 7D 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 14 0F 00 40 7D 00 00 FA 25 93 00 40 7D 00 00 00 3E 7D 00 00 16 16 07 1C 1B 1B 15 64 00 00 00 00 00 00 16 0F 35 C4 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 8F 1B 28 34 00 00 00 00 00 00 16 16 07 E4 04 1B 9A 36 00 00 00 00 00 00 24 24 16 07 8F 04 9A 01 E2 7B 00 00 2C 0A 16 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 00 BC 00 00 16 06 B8 04 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 01 BC 00 00 16 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 19 BC 00 00 16 06 29 0C 07 29 0C 82 82 82 9B 01 E2 7B 00 00 2C 19 16 18 0E 00 9B 01 E2 7B 00 00 2C 42 16 16 18 0E 00 9B 01 E2 7B 00 00 2C 16 16 16 18 0E 00 9B 01 E2 7B 00 00 2C 18 16 16 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 0C BC 00 00 16 07 9A 05 19 01 E6 7B 00 00 0A 00 10 34 00 00 00 1B D7 3D 00 00 00 00 00 00 16 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 03 00 2C 64 16 06 03 06 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 4A 00 1A 26 35 CE 0D 00 00 D5 0D 00 00 00 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 09 00 C3 A2 00 00 00 01 C3 A2 00 00 16 07 29 0C 77 00 3A 7D 00 00 2A 16 07 F7 06 97 1A 2C 02 35 CE 0D 00 00 D5 0D 00 00 00 00 19 19 00 3A 7D 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 09 00 C3 A2 00 00 00 01 C3 A2 00 00 25 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 06 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 4D 00 8F 1A 2C 02 35 CE 0D 00 00 D5 0D 00 00 00 00 19 19 00 3A 7D 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 09 00 C3 A2 00 00 00 01 C3 A2 00 00 16 16 07 5D 07 97 00 3E 7D 00 00 25 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 05 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0C 00 8F 00 3E 7D 00 00 16 16 06 48 09 07 48 09 82 9B 00 40 7D 00 00 25 16 18 0D 00 81 2D 01 E6 BB 00 00 16 16 07 17 08 9A 00 40 7D 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 14 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 0A BC 00 00 16 06 40 08 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 09 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0C 00 8F 00 40 7D 00 00 16 16 07 48 09 19 00 3A 7D 00 00 0C 00 AD 33 00 00 00 1B C5 3C 00 00 00 00 00 00 2C 26 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 08 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 71 00 90 93 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 02 26 16 8F 00 40 7D 00 00 16 16 16 07 5D 0A 82 19 00 3A 7D 00 00 0C 00 C6 33 00 00 00 1B 66 36 00 00 00 00 00 00 2C 0F 16 18 29 00 19 00 3A 7D 00 00 13 00 9E 33 00 00 00 1B 7E 36 00 00 00 00 00 00 01 E6 7B 00 00 16 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 0F 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 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 0A 16 16 07 43 0B 19 00 3A 7D 00 00 0A 00 F9 30 00 00 00 2D 01 F9 30 00 00 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 2C 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 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 14 16 16 07 29 0C 19 00 3A 7D 00 00 0A 00 FB 30 00 00 00 2D 01 FB 30 00 00 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 34 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 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 14 16 16

new: 0F 00 3B 7D 00 00 2E 4C AB 00 00 19 19 2E BC 4D 00 00 12 20 4F FE FF FF 0A 00 D7 F9 FF FF 00 1C F5 FB FF FF 16 09 00 55 4D 00 00 00 01 55 4D 00 00 13 00 00 A9 00 00 00 1B 79 2D 00 00 00 00 00 00 1F 58 47 50 61 72 61 6D 00 16 0F 00 3A 7D 00 00 1B 38 34 00 00 00 00 00 00 16 07 96 02 77 00 3A 7D 00 00 2A 16 0F 35 C5 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 19 00 3A 7D 00 00 0A 00 07 33 00 00 00 1B DE 5E 00 00 00 00 00 00 16 14 2D 35 C2 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 98 92 19 00 3A 7D 00 00 0A 00 37 34 00 00 00 1B 2F 35 00 00 00 00 00 00 16 35 C4 25 00 00 C6 25 00 00 00 00 48 45 7D 00 00 16 25 16 0F 00 41 7D 00 00 19 00 3A 7D 00 00 0A 00 D5 33 00 00 00 1B E4 34 00 00 00 00 00 00 16 07 B3 01 82 19 00 3A 7D 00 00 0C 00 C6 33 00 00 00 1B 66 36 00 00 00 00 00 00 2C 0F 16 18 29 00 19 00 3A 7D 00 00 13 00 9E 33 00 00 00 1B 7E 36 00 00 00 00 00 00 01 E6 7B 00 00 16 16 A1 00 41 7D 00 00 2C 0A 16 07 E2 01 19 00 3A 7D 00 00 0A 00 F9 30 00 00 00 2D 01 F9 30 00 00 A1 00 41 7D 00 00 2C 14 16 07 11 02 19 00 3A 7D 00 00 0A 00 FB 30 00 00 00 2D 01 FB 30 00 00 A1 00 41 7D 00 00 2C 14 16 0F 00 40 7D 00 00 FA 25 93 19 00 3A 7D 00 00 09 00 D6 30 00 00 00 01 D6 30 00 00 00 41 7D 00 00 16 16 07 75 02 19 00 3A 7D 00 00 0A 00 D1 33 00 00 00 1B 59 36 00 00 00 00 00 00 16 0F 00 3E 7D 00 00 2C 14 0F 00 40 7D 00 00 FA 25 93 00 40 7D 00 00 00 3E 7D 00 00 16 16 07 1C 1B 1B 15 64 00 00 00 00 00 00 16 0F 35 C4 25 00 00 C6 25 00 00 00 01 48 45 7D 00 00 8F 1B 28 34 00 00 00 00 00 00 16 16 07 6C 03 1B 9A 36 00 00 00 00 00 00 24 24 16 07 17 03 9A 01 E2 7B 00 00 2C 0A 16 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 00 BC 00 00 16 06 40 03 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 01 BC 00 00 16 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 19 BC 00 00 16 06 29 0C 07 29 0C 82 82 82 9B 01 E2 7B 00 00 2C 19 16 18 0E 00 9B 01 E2 7B 00 00 2C 42 16 16 18 0E 00 9B 01 E2 7B 00 00 2C 16 16 16 18 0E 00 9B 01 E2 7B 00 00 2C 18 16 16 55 35 D6 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 0C BC 00 00 16 07 22 04 19 01 E6 7B 00 00 0A 00 10 34 00 00 00 1B D7 3D 00 00 00 00 00 00 16 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 03 00 2C 64 16 06 8B 04 55 35 D5 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 4A 00 1A 26 35 CE 0D 00 00 D5 0D 00 00 00 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 09 00 C3 A2 00 00 00 01 C3 A2 00 00 16 07 29 0C 77 00 3A 7D 00 00 2A 16 07 7F 05 97 1A 2C 02 35 CE 0D 00 00 D5 0D 00 00 00 00 19 19 00 3A 7D 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 09 00 C3 A2 00 00 00 01 C3 A2 00 00 25 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 06 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 4D 00 8F 1A 2C 02 35 CE 0D 00 00 D5 0D 00 00 00 00 19 19 00 3A 7D 00 00 0A 00 63 B4 00 00 00 1B 7B 31 00 00 00 00 00 00 16 09 00 C3 A2 00 00 00 01 C3 A2 00 00 16 16 0F 01 1A BC 00 00 AC E1 D8 19 01 E6 7B 00 00 0A 00 D7 32 00 00 00 1B FE 32 00 00 00 00 00 00 16 19 1B 38 34 00 00 00 00 00 00 16 0A 00 D7 32 00 00 00 1B FE 32 00 00 00 00 00 00 16 16 16 38 3F 2C 40 16 07 B5 06 B1 01 1A BC 00 00 38 3F 1A 2C 0A 19 01 E6 7B 00 00 09 00 0D 31 00 00 00 01 0D 31 00 00 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 FF BB 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 09 00 F9 93 93 90 2C 05 F9 36 19 1B 38 34 00 00 00 00 00 00 16 09 00 9A 30 00 00 00 01 9A 30 00 00 2C 05 16 16 2C 19 16 38 44 AB 1E CD CC 8C 3F AF 01 1A BC 00 00 38 3F 1A 2C 0A 19 01 E6 7B 00 00 09 00 0D 31 00 00 00 01 0D 31 00 00 16 16 16 2C 05 16 16 0B 0B 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 00 3A 7D 00 00 0B 07 3A 09 97 00 3E 7D 00 00 25 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 05 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0C 00 8F 00 3E 7D 00 00 16 16 06 62 0A 07 62 0A 82 9B 00 40 7D 00 00 25 16 18 0D 00 81 2D 01 E6 BB 00 00 16 16 07 96 09 9A 00 40 7D 00 00 2C 14 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 0A BC 00 00 16 06 BF 09 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 09 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0C 00 8F 00 40 7D 00 00 16 16 07 62 0A 19 00 3A 7D 00 00 0C 00 AD 33 00 00 00 1B C5 3C 00 00 00 00 00 00 2C 26 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 0A 00 01 08 BC 00 00 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 71 00 8F 00 40 7D 00 00 16 16 07 19 0B 82 19 00 3A 7D 00 00 0C 00 C6 33 00 00 00 1B 66 36 00 00 00 00 00 00 2C 0F 16 18 29 00 19 00 3A 7D 00 00 13 00 9E 33 00 00 00 1B 7E 36 00 00 00 00 00 00 01 E6 7B 00 00 16 16 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 0F 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 2C 0A 16 16 07 A1 0B 19 00 3A 7D 00 00 0A 00 F9 30 00 00 00 2D 01 F9 30 00 00 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 2C 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 2C 14 16 16 07 29 0C 19 00 3A 7D 00 00 0A 00 FB 30 00 00 00 2D 01 FB 30 00 00 55 35 D4 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 23 00 19 1B 2A 59 00 00 00 00 00 00 16 0C 00 43 66 00 00 00 1B 55 31 00 00 00 00 00 00 2C 34 16 16 55 35 D3 25 00 00 D8 25 00 00 00 00 48 44 7D 00 00 63 00 8F 2C 14 16 16

Decompiled Code

Original Code

    kTag = XGParamTag(XComEngine(class'Engine'.static.GetEngine()).LocalizeContext.FindTag("XGParam"));
    kTarget = GetPrimaryTarget();
    // End:0x40E
    if(kTarget != none)
    {
        kResult.strTargetName = kTarget.SafeGetCharacterName();
        kResult.bKillshot = (kTarget.GetUnitHP() + kResult.iPossibleDamage) <= 0;
        coverPerks = kTarget.GetTacticalSenseCoverBonus();
        // End:0x211
        if(kTarget.HasBonus(15) && kTarget.HasHeightAdvantageOver(m_kUnit))
        {
            coverPerks += XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.10;
        }
        // End:0x29E
        if(kTarget.m_bInSmokeBomb)
        {
            coverPerks += XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20;
        }
        // End:0x32B
        if(kTarget.m_bInDenseSmoke)
        {
            coverPerks += XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20;
        }
        coverBonus = Max(0, kTarget.m_iCurrentCoverValue - coverPerks);
        // End:0x3ED
        if(kTarget.HasAirEvadeBonus())
        {
            iEvasionBonus = XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20;
        }
        coverBonus = Max(0, coverBonus - iEvasionBonus);
    }
    // End:0x1B1C
    if(ShouldShowPercentage())
    {
        kResult.iPossibleDamage = -GetPossibleDamage();
        // End:0x4E4
        if(HasProperty(36))
        {
            // End:0x48F
            if(iType == 10)
            {
                kInfo.arrHitBonusStrings.AddItem(m_strDroneHack);
            }
            // End:0x4B8
            else
            {
                kInfo.arrHitBonusStrings.AddItem(m_strChanceToStun);
            }
            kInfo.arrHitBonusValues.AddItem(m_iHitChance);
        }
        // End:0xC29
        else
        {
            // End:0xC29
            if((((iType != 25) && iType != 66) && iType != 22) && iType != 24)
            {
                kInfo.arrHitBonusStrings.AddItem(m_strBonusAim);
                // End:0x59A
                if(m_kUnit.IsMeleeOnly())
                {
                    kInfo.arrHitBonusValues.AddItem(100);
                }
                // End:0x603
                else
                {
                    kInfo.arrHitBonusValues.AddItem(m_kUnit.GetCharacter().m_kChar.aStats[1]);
                }
                // End:0xC29
                if(kTarget != none)
                {
                    // End:0x6F7
                    if(kTarget.GetCharacter().m_kChar.aStats[2] > 0)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyDefense);
                        kInfo.arrHitPenaltyValues.AddItem(-kTarget.GetCharacter().m_kChar.aStats[2]);
                    }
                    // End:0x75D
                    if(iEvasionBonus > 0)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyEvasion);
                        kInfo.arrHitPenaltyValues.AddItem(-iEvasionBonus);
                    }
                    // End:0x948
                    else
                    {
                        // End:0x948
                        if((coverBonus != 0) && !m_bHasFlank)
                        {
                            // End:0x817
                            if(coverBonus == XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20)
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyLowCover);
                            }
                            // End:0x840
                            else
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyHighCover);
                            }
                            kInfo.arrHitPenaltyValues.AddItem(-coverBonus);
                            // End:0x948
                            if(kTarget.IsAffectedByAbility(38))
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strHunker);
                                kInfo.arrHitPenaltyValues.AddItem((XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.2 - 1) * -coverBonus);
                            }
                        }
                    }
                    // End:0xA5D
                    if(kTarget.HasBonus(15) && kTarget.HasHeightAdvantageOver(m_kUnit))
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(15));
                        kInfo.arrHitPenaltyValues.AddItem(-XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.10);
                    }
                    // End:0xB43
                    if(kTarget.m_bInSmokeBomb)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(44));
                        kInfo.arrHitPenaltyValues.AddItem(-XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20);
                    }
                    // End:0xC29
                    if(kTarget.m_bInDenseSmoke)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(52));
                        kInfo.arrHitPenaltyValues.AddItem(-XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20);
                    }
                }
            }
        }

New Code

    kTag = XGParamTag(XComEngine(class'Engine'.static.GetEngine()).LocalizeContext.FindTag("XGParam"));
    kTarget = GetPrimaryTarget();
    // End:0x296
    if(kTarget != none)
    {
        kResult.strTargetName = kTarget.SafeGetCharacterName();
        kResult.bKillshot = (kTarget.GetUnitHP() + kResult.iPossibleDamage) <= 0;
        coverPerks = kTarget.GetTacticalSenseCoverBonus();
        // End:0x1B3
        if(kTarget.HasBonus(15) && kTarget.HasHeightAdvantageOver(m_kUnit))
        {
            coverPerks += 10;
        }
        // End:0x1E2
        if(kTarget.m_bInSmokeBomb)
        {
            coverPerks += 20;
        }
        // End:0x211
        if(kTarget.m_bInDenseSmoke)
        {
            coverPerks += 20;
        }
        coverBonus = Max(0, kTarget.m_iCurrentCoverValue - coverPerks);
        // End:0x275
        if(kTarget.HasAirEvadeBonus())
        {
            iEvasionBonus = 20;
        }
        coverBonus = Max(0, coverBonus - iEvasionBonus);
    }
    // End:0x1B1C
    if(ShouldShowPercentage())
    {
        kResult.iPossibleDamage = -GetPossibleDamage();
        // End:0x36C
        if(HasProperty(36))
        {
            // End:0x317
            if(iType == 10)
            {
                kInfo.arrHitBonusStrings.AddItem(m_strDroneHack);
            }
            // End:0x340
            else
            {
                kInfo.arrHitBonusStrings.AddItem(m_strChanceToStun);
            }
            kInfo.arrHitBonusValues.AddItem(m_iHitChance);
        }
        // End:0xC29
        else
        {
            // End:0xC29
            if((((iType != 25) && iType != 66) && iType != 22) && iType != 24)
            {
                kInfo.arrHitBonusStrings.AddItem(m_strBonusAim);
                // End:0x422
                if(m_kUnit.IsMeleeOnly())
                {
                    kInfo.arrHitBonusValues.AddItem(100);
                }
                // End:0x48B
                else
                {
                    kInfo.arrHitBonusValues.AddItem(m_kUnit.GetCharacter().m_kChar.aStats[1]);
                }
                // End:0xC29
                if(kTarget != none)
                {
                    // End:0x57F
                    if(kTarget.GetCharacter().m_kChar.aStats[2] > 0)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyDefense);
                        kInfo.arrHitPenaltyValues.AddItem(-kTarget.GetCharacter().m_kChar.aStats[2]);
                    }
                    m_fDistanceToTarget = VSize(m_kUnit.GetLocation() - GetPrimaryTarget().GetLocation()) / float(64);
                    // End:0x6B5
                    if(m_fDistanceToTarget > float(m_kUnit.m_aCurrentStats[10]))
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(m_strCheating);
                        kInfo.arrHitPenaltyValues.AddItem(Min(((5 * Min(GetPrimaryTarget().m_arrEnemiesSeenBy.Length, 5)) - 25) - int(1.10 * (m_fDistanceToTarget - float(m_kUnit.m_aCurrentStats[10]))), 5));
                    }                                        
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget
                    kTarget                    
                    // End:0x93A
                    if(iEvasionBonus > 0)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyEvasion);
                        kInfo.arrHitPenaltyValues.AddItem(-iEvasionBonus);
                    }
                    // End:0xA62
                    else
                    {
                        // End:0xA62
                        if((coverBonus != 0) && !m_bHasFlank)
                        {
                            // End:0x996
                            if(coverBonus == 20)
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyLowCover);
                            }
                            // End:0x9BF
                            else
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strPenaltyHighCover);
                            }
                            kInfo.arrHitPenaltyValues.AddItem(-coverBonus);
                            // End:0xA62
                            if(kTarget.IsAffectedByAbility(38))
                            {
                                kInfo.arrHitPenaltyStrings.AddItem(m_strHunker);
                                kInfo.arrHitPenaltyValues.AddItem(-coverBonus);
                            }
                        }
                    }
                    // End:0xB19
                    if(kTarget.HasBonus(15) && kTarget.HasHeightAdvantageOver(m_kUnit))
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(15));
                        kInfo.arrHitPenaltyValues.AddItem(-10);
                    }
                    // End:0xBA1
                    if(kTarget.m_bInSmokeBomb)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(44));
                        kInfo.arrHitPenaltyValues.AddItem(-20);
                    }
                    // End:0xC29
                    if(kTarget.m_bInDenseSmoke)
                    {
                        kInfo.arrHitPenaltyStrings.AddItem(PERKS().GetBonusTitle(52));
                        kInfo.arrHitPenaltyValues.AddItem(-20);
                    }
                }
            }
        }
  

References

Referred to by this article:

That refer to this article:

  • <none>