Jump to content

R&D AI Improvements


Amineri

Recommended Posts

Implemented all three changes we discussed using UPKModder (which, by the way, is fantastic) and it works perfectly. Sectoids are cycling through mindfray, mind control, and psi panic like they're normal abilities and still move/fire/overwatch when appropriate:

 

http://i.imgur.com/4BgLkV8.jpg

 

Link to comment
Share on other sites

  • Replies 144
  • Created
  • Last Reply

Top Posters In This Topic

There, that's better:

 

http://i.imgur.com/d00XNSu.jpg

 

UPKModder code:

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B
FUNCTION=BuildScores@XGAIAbilityRules
RESIZE=17

[BEFORE_HEX]
[HEADER]
C0 02 00 00 B4 02 00 00
[/HEADER]
[code]
40 01 FE 98 00 00 25 36 01 FE 98 00 00 16 54 01 FE 98 00 00 2C 60 16 1B 51 6A 00 00 00 00 00 00 24 01 4A 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 12 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 11 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 10 1E 00 00 00 00 1E 00 00 00 00 1E 00 00 00 40 16 1B 51 6A 00 00 00 00 00 00 24 26 1E 00 00 00 40 1E 00 00 00 40 1E 00 00 00 40 16 1B 51 6A 00 00 00 00 00 00 24 05 4A 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 22 1E 00 00 00 00 4A 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 18 1E 00 00 00 3F 1E 00 00 00 3F 4A 16 1B 51 6A 00 00 00 00 00 00 24 23 4A 1E 00 00 00 00 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 3C 4A 1E 00 00 80 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 27 4A 1E 00 00 80 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 2D 1E 00 00 00 00 4A 1E 00 00 00 3F 16 1B 51 6A 00 00 00 00 00 00 24 3A 4A 1E 00 00 00 00 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 39 1E 00 00 00 00 1E 00 00 00 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 21 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 07 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 3F 4A 1E 00 00 80 3F 4A 16 1B 51 6A 00 00 00 00 00 00 24 0D 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 16 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 1B 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 2B 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 2C 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 3E 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 42 1E 00 00 00 00 1E 00 00 00 00 1E 00 00 00 3F 16 1B 51 6A 00 00 00 00 00 00 24 40 1E 00 00 00 3F 1E 00 00 00 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 41 4A 1E 00 00 00 00 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 44 1E 00 00 00 00 1E 00 00 80 3F 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 48 4A 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 1D 1E 00 00 00 00 1E 00 00 80 3F 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 5A 4A 1E 00 00 00 00 4A 16 04 0B 53
[/CODE]
[/BEFORE_HEX]

[AFTER_HEX]
[HEADER]
CF 02 00 00 CB 02 00 00
[/HEADER]
[code]
40 01 FE 98 00 00 25 36 01 FE 98 00 00 16 54 01 FE 98 00 00 2C 60 16 1B 51 6A 00 00 00 00 00 00 24 01 4A 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 12 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 11 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 10 1E 00 00 00 00 1E 00 00 00 00 1E 00 00 00 40 16 1B 51 6A 00 00 00 00 00 00 24 26 1E 00 00 00 40 1E 00 00 00 40 1E 00 00 00 40 16 1B 51 6A 00 00 00 00 00 00 24 05 4A 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 22 1E 00 00 00 00 4A 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 18 1E 00 00 00 3F 1E 00 00 00 3F 4A 16 1B 51 6A 00 00 00 00 00 00 24 23 4A 1E 00 00 00 00 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 3C 4A 1E 00 00 80 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 27 4A 1E 00 00 80 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 2D 1E 00 00 00 00 4A 1E 00 00 00 3F 16 1B 51 6A 00 00 00 00 00 00 24 3A 4A 1E 00 00 00 00 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 39 4A 1E 00 00 00 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 21 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 07 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 3F 4A 1E 00 00 80 3F 4A 16 1B 51 6A 00 00 00 00 00 00 24 0D 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 16 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 1B 1E 00 00 00 00 4A 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 2B 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 2C 4A 4A 4A 16 1B 51 6A 00 00 00 00 00 00 24 3E 1E 00 00 00 00 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 42 1E 00 00 00 00 1E 00 00 00 00 1E 00 00 00 3F 16 1B 51 6A 00 00 00 00 00 00 24 40 1E 00 00 00 3F 1E 00 00 00 3F 1E 00 00 00 00 16 1B 51 6A 00 00 00 00 00 00 24 41 4A 1E 00 00 00 00 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 44 1E 00 00 00 00 1E 00 00 80 3F 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 48 4A 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 1D 1E 00 00 00 00 1E 00 00 80 3F 1E 00 00 80 3F 16 1B 51 6A 00 00 00 00 00 00 24 5A 4A 1E 00 00 00 00 4A 16 1B 51 6A 00 00 00 00 00 00 24 28 4A 1E 00 00 80 3F 1E 00 00 00 00 16 04 0B 0B 0B 0B 0B 53
[/CODE]

[/AFTER_HEX]

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B
FUNCTION=AI_OffenseScore@XGAIAbilityDM

[BEFORE_HEX]
[HEADER]
4C 05 00 00 E4 03 00 00
[/HEADER]
[code]
0F 00 1A 98 00 00 19 00 1D 98 00 00 0A 00 61 89 00 00 00 1B 95 3B 00 00 00 00 00 00 16 07 05 05 19 01 C2 97 00 00 13 00 1D 99 00 00 00 1B FF 3C 00 00 00 00 00 00 00 1A 98 00 00 16 05 1A 98 00 00 00 00 1A 98 00 00 0A 97 00 26 0F 00 1B 98 00 00 19 01 CF 97 00 00 0A 00 36 9D 00 00 00 1B AF 39 00 00 00 00 00 00 16 06 02 05 0A D3 00 2C 05 07 D0 00 9A 36 19 01 D1 97 00 00 0A 00 E6 C5 00 00 00 1B C9 3B 00 00 00 00 00 00 16 25 16 B8 00 1B 98 00 00 38 3F 26 16 06 02 05 0A D8 00 2C 23 0A DD 00 2C 25 0A 02 01 2C 07 0F 00 1B 98 00 00 1B 51 37 00 00 00 00 00 00 00 1D 98 00 00 16 06 02 05 0A 7F 01 2C 41 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 07 6D 01 19 01 CF 97 00 00 0A 00 7A 9B 00 00 00 1B 56 3D 00 00 00 00 00 00 16 0F 00 1B 98 00 00 1E 00 00 00 40 06 7C 01 0F 00 1B 98 00 00 1E CD CC 4C 3E 06 02 05 0A 2F 02 2C 23 0F 00 1B 98 00 00 1E 00 00 80 3F 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 0F 00 19 98 00 00 93 19 01 D1 97 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 19 00 15 98 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 16 B9 00 1B 98 00 00 AC 38 3F 00 19 98 00 00 1E 00 00 20 42 16 16 06 02 05 0A 34 02 2C 27 0A E4 02 2C 3C 0F 00 1B 98 00 00 1E 00 00 00 00 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 0F 00 19 98 00 00 93 19 01 D1 97 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 19 00 15 98 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 16 B8 00 1B 98 00 00 AC 38 3F 00 19 98 00 00 1E 00 00 70 41 16 16 06 02 05 0A 7A 03 2C 3A 0F 00 18 98 00 00 19 01 CF 97 00 00 1C 00 10 9B 00 00 00 1B EA 39 00 00 00 00 00 00 2E BA 8A 00 00 00 1D 98 00 00 16 07 46 03 96 00 18 98 00 00 2C 02 16 0F 00 1B 98 00 00 1E 00 00 00 00 06 77 03 07 68 03 9A 00 18 98 00 00 2C 02 16 0F 00 1B 98 00 00 1E 00 00 80 3F 06 77 03 0F 00 1B 98 00 00 1E 00 00 A0 41 06 02 05 0A B4 04 2C 48 07 B1 04 9A 19 01 D1 97 00 00 0A 00 67 C7 00 00 00 1B D2 3A 00 00 00 00 00 00 16 26 16 0F 00 14 98 00 00 19 01 D1 97 00 00 0A 00 E9 C5 00 00 00 1B CB 3B 00 00 00 00 00 00 16 58 00 14 98 00 00 00 13 98 00 00 00 4A 9B 04 0F 00 16 98 00 00 35 56 0F 00 00 58 0F 00 00 00 00 19 19 00 13 98 00 00 0A 00 B3 C7 00 00 00 1B 8F 37 00 00 00 00 00 00 16 09 00 E8 B5 00 00 00 01 E8 B5 00 00 07 9A 04 84 84 9A 00 16 98 00 00 2C 07 16 18 0E 00 9A 00 16 98 00 00 2C 0F 16 16 18 0E 00 9A 00 16 98 00 00 2C 0B 16 16 07 9A 04 81 19 00 13 98 00 00 0C 00 8C 38 00 00 00 1B E2 43 00 00 00 00 00 00 2C 48 16 16 A5 00 17 98 00 00 16 31 30 0F 00 1B 98 00 00 38 3F 00 17 98 00 00 06 02 05 0A FF 04 2C 5A 07 ED 04 19 01 D0 97 00 00 0A 00 CE AB 00 00 00 1B 39 45 00 00 00 00 00 00 16 0F 00 1B 98 00 00 1E 00 00 00 00 06 FC 04 0F 00 1B 98 00 00 1E 00 00 80 3F 06 02 05 0A FF FF 06 37 05 0F 00 1B 98 00 00 19 01 C2 97 00 00 13 00 26 99 00 00 00 1B 18 3A 00 00 00 00 00 00 00 1A 98 00 00 16 04 00 1B 98 00 00 04 3A 1C 98 00 00 53
[/CODE]
[/BEFORE_HEX]

[AFTER_HEX]
[HEADER]
4C 05 00 00 E4 03 00 00
[/HEADER]
[code]
0F 00 1A 98 00 00 19 00 1D 98 00 00 0A 00 61 89 00 00 00 1B 95 3B 00 00 00 00 00 00 16 07 05 05 19 01 C2 97 00 00 13 00 1D 99 00 00 00 1B FF 3C 00 00 00 00 00 00 00 1A 98 00 00 16 05 1A 98 00 00 00 00 1A 98 00 00 0A 97 00 26 0F 00 1B 98 00 00 19 01 CF 97 00 00 0A 00 36 9D 00 00 00 1B AF 39 00 00 00 00 00 00 16 06 02 05 0A D3 00 2C 05 07 D0 00 9A 36 19 01 D1 97 00 00 0A 00 E6 C5 00 00 00 1B C9 3B 00 00 00 00 00 00 16 25 16 B8 00 1B 98 00 00 38 3F 26 16 06 02 05 0A F8 00 2C 07 0F 00 1B 98 00 00 1B 51 37 00 00 00 00 00 00 00 1D 98 00 00 16 06 02 05 0A 75 01 2C 41 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 07 63 01 19 01 CF 97 00 00 0A 00 7A 9B 00 00 00 1B 56 3D 00 00 00 00 00 00 16 0F 00 1B 98 00 00 1E 00 00 00 40 06 72 01 0F 00 1B 98 00 00 1E CD CC 4C 3E 06 02 05 0A 25 02 2C 23 0F 00 1B 98 00 00 1E 00 00 80 3F 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 0F 00 19 98 00 00 93 19 01 D1 97 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 19 00 15 98 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 16 B9 00 1B 98 00 00 AC 38 3F 00 19 98 00 00 1E 00 00 20 42 16 16 06 02 05 0A 2A 02 2C 28 0A 2F 02 2C 39 0A 34 02 2C 27 0A E4 02 2C 3C 0F 00 1B 98 00 00 1E 00 00 00 00 0F 00 15 98 00 00 19 2E BA 8A 00 00 00 1D 98 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 0F 00 19 98 00 00 93 19 01 D1 97 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 19 00 15 98 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 16 B8 00 1B 98 00 00 AC 38 3F 00 19 98 00 00 1E 00 00 70 41 16 16 06 02 05 0A 7A 03 2C 3A 0F 00 18 98 00 00 19 01 CF 97 00 00 1C 00 10 9B 00 00 00 1B EA 39 00 00 00 00 00 00 2E BA 8A 00 00 00 1D 98 00 00 16 07 46 03 96 00 18 98 00 00 2C 02 16 0F 00 1B 98 00 00 1E 00 00 00 00 06 77 03 07 68 03 9A 00 18 98 00 00 2C 02 16 0F 00 1B 98 00 00 1E 00 00 80 3F 06 77 03 0F 00 1B 98 00 00 1E 00 00 A0 41 06 02 05 0A B4 04 2C 48 07 B1 04 9A 19 01 D1 97 00 00 0A 00 67 C7 00 00 00 1B D2 3A 00 00 00 00 00 00 16 26 16 0F 00 14 98 00 00 19 01 D1 97 00 00 0A 00 E9 C5 00 00 00 1B CB 3B 00 00 00 00 00 00 16 58 00 14 98 00 00 00 13 98 00 00 00 4A 9B 04 0F 00 16 98 00 00 35 56 0F 00 00 58 0F 00 00 00 00 19 19 00 13 98 00 00 0A 00 B3 C7 00 00 00 1B 8F 37 00 00 00 00 00 00 16 09 00 E8 B5 00 00 00 01 E8 B5 00 00 07 9A 04 84 84 9A 00 16 98 00 00 2C 07 16 18 0E 00 9A 00 16 98 00 00 2C 0F 16 16 18 0E 00 9A 00 16 98 00 00 2C 0B 16 16 07 9A 04 81 19 00 13 98 00 00 0C 00 8C 38 00 00 00 1B E2 43 00 00 00 00 00 00 2C 48 16 16 A5 00 17 98 00 00 16 31 30 0F 00 1B 98 00 00 38 3F 00 17 98 00 00 06 02 05 0A FF 04 2C 5A 07 ED 04 19 01 D0 97 00 00 0A 00 CE AB 00 00 00 1B 39 45 00 00 00 00 00 00 16 0F 00 1B 98 00 00 1E 00 00 00 00 06 FC 04 0F 00 1B 98 00 00 1E 00 00 80 3F 06 02 05 0A FF FF 06 37 05 0F 00 1B 98 00 00 19 01 C2 97 00 00 13 00 26 99 00 00 00 1B 18 3A 00 00 00 00 00 00 00 1A 98 00 00 16 04 00 1B 98 00 00 04 3A 1C 98 00 00 53
[/CODE]
[/AFTER_HEX]

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B
FUNCTION=HasPredeterminedAbility@XGAIBehavior_Psi

[BEFORE_HEX]
[HEADER]
B9 03 00 00 A1 02 00 00
[/HEADER]
[code]
0F 01 58 9A 00 00 2A 0F 36 01 80 A0 00 00 25 07 58 03 81 19 01 90 9A 00 00 0A 00 5A A9 00 00 00 1B A5 60 00 00 00 00 00 00 16 16 07 7B 00 1B FF 32 00 00 00 00 00 00 01 58 9A 00 00 16 0F 01 59 9A 00 00 19 01 90 9A 00 00 09 00 E9 D1 00 00 00 01 E9 D1 00 00 04 27 1B E2 01 00 00 00 00 00 00 01 80 A0 00 00 2C 27 4A 16 0F 00 B3 A0 00 00 1B 4F 38 00 00 00 00 00 00 16 07 5D 01 77 00 B3 A0 00 00 2A 16 0F 00 B4 A0 00 00 2E BA 8A 00 00 19 01 8F 9A 00 00 15 00 7F 3A 00 00 00 1B C1 32 00 00 00 00 00 00 2C 2D 00 B3 A0 00 00 16 07 5D 01 82 77 00 B4 A0 00 00 2A 16 18 20 00 19 00 B4 A0 00 00 0A 00 69 89 00 00 00 1C 6A 89 00 00 16 16 55 01 80 A0 00 00 0A 00 00 B4 A0 00 00 16 07 5D 01 9A 36 01 80 A0 00 00 26 16 0F 01 59 9A 00 00 00 B3 A0 00 00 1B E2 01 00 00 00 00 00 00 01 80 A0 00 00 2C 28 4A 16 0F 00 B4 A0 00 00 2E BA 8A 00 00 19 01 8F 9A 00 00 0D 00 7F 3A 00 00 00 1B C1 32 00 00 00 00 00 00 2C 26 2A 16 07 0C 03 82 82 77 00 B4 A0 00 00 2A 16 18 20 00 19 00 B4 A0 00 00 0A 00 69 89 00 00 00 1C 6A 89 00 00 16 16 18 23 00 97 19 00 B4 A0 00 00 0A 00 D4 89 00 00 00 1B 0D 3A 00 00 00 00 00 00 16 25 16 16 14 2D 00 B2 A0 00 00 82 19 01 8F 9A 00 00 0A 00 2B 36 00 00 00 1C 2C 36 00 00 16 18 22 00 81 19 01 8F 9A 00 00 0A 00 79 C5 00 00 00 1B 8D 44 00 00 00 00 00 00 16 16 16 07 0C 03 84 9A 36 19 01 8F 9A 00 00 09 00 93 39 00 00 00 01 93 39 00 00 25 16 18 7B 00 82 2D 00 B2 A0 00 00 18 6C 00 84 19 01 90 9A 00 00 32 00 DE A9 00 00 00 1B D2 43 00 00 00 00 00 00 19 01 8F 9A 00 00 09 00 9E F8 FF FF 00 01 9E F8 FF FF 01 8F 9A 00 00 4A 16 18 20 00 19 01 90 9A 00 00 0A 00 13 AB 00 00 00 1B 53 3D 00 00 00 00 00 00 16 16 16 16 55 01 80 A0 00 00 0A 00 00 B4 A0 00 00 16 07 47 03 97 36 01 80 A0 00 00 25 16 0F 01 59 9A 00 00 19 10 25 01 80 A0 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 04 97 36 01 80 A0 00 00 25 16 06 A7 03 07 A7 03 9A 36 19 01 90 9A 00 00 09 00 14 D2 00 00 00 01 14 D2 00 00 26 16 0F 01 59 9A 00 00 10 25 19 01 90 9A 00 00 09 00 14 D2 00 00 00 01 14 D2 00 00 04 1C B6 9E 00 00 16 04 3A B5 A0 00 00 53
[/CODE]
[/BEFORE_HEX]


[AFTER_HEX]
[HEADER]
B9 03 00 00 A1 02 00 00
[/HEADER]
[code]
0F 01 58 9A 00 00 2A 0F 36 01 80 A0 00 00 25 07 54 03 81 19 01 90 9A 00 00 0A 00 5A A9 00 00 00 1B A5 60 00 00 00 00 00 00 16 16 07 7B 00 1B FF 32 00 00 00 00 00 00 01 58 9A 00 00 16 0F 01 59 9A 00 00 19 01 90 9A 00 00 09 00 E9 D1 00 00 00 01 E9 D1 00 00 04 27 1B E2 01 00 00 00 00 00 00 01 80 A0 00 00 2C 27 4A 16 0F 00 B3 A0 00 00 1B 4F 38 00 00 00 00 00 00 16 07 6F 01 77 00 B3 A0 00 00 2A 16 0F 00 B4 A0 00 00 2E BA 8A 00 00 19 01 8F 9A 00 00 15 00 7F 3A 00 00 00 1B C1 32 00 00 00 00 00 00 2C 2D 00 B3 A0 00 00 16 07 6F 01 82 77 00 B4 A0 00 00 2A 16 18 20 00 19 00 B4 A0 00 00 0A 00 69 89 00 00 00 1C 6A 89 00 00 16 16 55 01 80 A0 00 00 0A 00 00 B4 A0 00 00 16 07 6F 01 9A 36 01 80 A0 00 00 26 16 0F 01 59 9A 00 00 00 B3 A0 00 00 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0F 00 B4 A0 00 00 2E BA 8A 00 00 19 01 8F 9A 00 00 0D 00 7F 3A 00 00 00 1B C1 32 00 00 00 00 00 00 2C 26 2A 16 07 08 03 82 82 77 00 B4 A0 00 00 2A 16 18 20 00 19 00 B4 A0 00 00 0A 00 69 89 00 00 00 1C 6A 89 00 00 16 16 18 23 00 97 19 00 B4 A0 00 00 0A 00 D4 89 00 00 00 1B 0D 3A 00 00 00 00 00 00 16 25 16 16 14 2D 00 B2 A0 00 00 82 19 01 8F 9A 00 00 0A 00 2B 36 00 00 00 1C 2C 36 00 00 16 18 22 00 81 19 01 8F 9A 00 00 0A 00 79 C5 00 00 00 1B 8D 44 00 00 00 00 00 00 16 16 16 07 08 03 84 9A 36 19 01 8F 9A 00 00 09 00 93 39 00 00 00 01 93 39 00 00 25 16 18 7B 00 82 2D 00 B2 A0 00 00 18 6C 00 84 19 01 90 9A 00 00 32 00 DE A9 00 00 00 1B D2 43 00 00 00 00 00 00 19 01 8F 9A 00 00 09 00 9E F8 FF FF 00 01 9E F8 FF FF 01 8F 9A 00 00 4A 16 18 20 00 19 01 90 9A 00 00 0A 00 13 AB 00 00 00 1B 53 3D 00 00 00 00 00 00 16 16 16 16 55 01 80 A0 00 00 0A 00 00 B4 A0 00 00 16 07 43 03 97 36 01 80 A0 00 00 25 16 0F 01 59 9A 00 00 19 10 25 01 80 A0 00 00 0A 00 D2 89 00 00 00 1B 9A 3A 00 00 00 00 00 00 16 04 97 36 01 80 A0 00 00 25 16 06 A3 03 07 A3 03 9A 36 19 01 90 9A 00 00 09 00 14 D2 00 00 00 01 14 D2 00 00 26 16 0F 01 59 9A 00 00 10 25 19 01 90 9A 00 00 09 00 14 D2 00 00 00 01 14 D2 00 00 04 1C B6 9E 00 00 16 04 3A B5 A0 00 00 53
[/CODE]
[/AFTER_HEX]
Edited by monju125
Link to comment
Share on other sites

Looks good!

 

As a small aside, you do realize that you can break up the lines of hex (all of the linefeed whitespace is removed when applying), and can also sprinkly comments throughout the blocks? I find it makes for much more readable code.

 

Here are a couple of contributions to make sectoids a bit more formidable:

 

Unlock ability for Sectoids to use Suppression:

 

 

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B // XComGame_EW_patch1.upk
FUNCTION=IsSuppressValid@XGAIAbilityDM

// allow sectoids access to the suppression ability

[BEFORE_HEX]
[CODE]
//if(m_kUnit.GetCharacter().m_kChar.iType == 4)
07 C3 00 9A 35 56 0F 00 00 58 0F 00 00 00 00 19 19 01 D1 97 00 00 0A 00 B3 C7 00 00 00 1B 8F 37 00 00 00 00 00 00 16 09 00 E8 B5 00 00 00 01 E8 B5 00 00 2C 04 16 

	//return false
	04 28 
[/CODE]
[/BEFORE_HEX]


[AFTER_HEX]
[CODE]
//nullops
0B 0B 0B 

//(m_kUnit.GetCharacter().m_kChar.iType == 4)
9A 35 56 0F 00 00 58 0F 00 00 00 00 19 19 01 D1 97 00 00 0A 00 B3 C7 00 00 00 1B 8F 37 00 00 00 00 00 00 16 09 00 E8 B5 00 00 00 01 E8 B5 00 00 2C 04 16 

//null ops
0B 0B 
[/CODE]
[/AFTER_HEX] 

 

 

 

And here are a set of changes that make MindMerge effects scale with the will of the caster :

 

 

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B // XComGame_EW_patch1.upk
FUNCTION=ApplyEffectsToTarget@XGAbilityTree

// scale mindmerge effects based on senders will stat

[BEFORE_HEX]
[CODE]
//case 21:
0A 90 2B 2C 15 

	//if(Role == ROLE_Authority)
	07 8D 2B 9A 38 3A 01 A6 FE FF FF 38 3A 24 03 16 

		//if((kTarget != none) && (kAbility.iType == 34) || kAbility.iType == 38)
		07 8D 2B 82 77 00 62 8C 00 00 2A 16 18 4A 00 84 9A 19 00 63 8C 00 00 09 00 23 89 00 00 00 01 23 89 00 00 2C 22 16 18 23 00 9A 19 00 63 8C 00 00 09 00 23 89 00 00 00 01 23 89 00 00 2C 26 16 16 16 

			//if(kTarget.GetCharType() == 21)
			07 6D 2A 9A 19 00 62 8C 00 00 0A 00 16 3B 00 00 00 1B 9E 37 00 00 00 00 00 00 16 2C 15 16 

				//kTarget.m_bHadShieldThisTurn = true
				14 19 00 62 8C 00 00 0A 00 EF C2 00 00 00 2D 01 EF C2 00 00 27 

				//kTarget.SetShieldHP(kTarget.GetMaxShieldHP())
				19 00 62 8C 00 00 29 00 00 00 00 00 00 1B 0D 6E 00 00 00 00 00 00 19 00 62 8C 00 00 0A 00 AE 3A 00 00 00 1B 76 39 00 00 00 00 00 00 16 16 

			//else
			06 8D 2B 

				//kTarget.m_aInventoryStats[0] += XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1
				A1 1A 25 19 00 62 8C 00 00 09 00 37 3A 00 00 00 01 37 3A 00 00 19 19 2E 2D 32 00 00 19 12 20 36 FE FF FF 0A 00 9E F9 FF FF 00 1C DE FB FF FF 16 09 00 5C F9 FF FF 00 01 5C F9 FF FF 09 00 1F 32 00 00 00 01 1F 32 00 00 01 00 1F 32 00 00 00 26 16 

				//kTarget.SetUnitHP(kTarget.GetUnitHP() + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1)
				19 00 62 8C 00 00 8A 00 00 00 00 00 00 1B 87 6E 00 00 00 00 00 00 92 19 00 62 8C 00 00 0A 00 AA 3A 00 00 00 1B A6 3B 00 00 00 00 00 00 16 19 19 2E 2D 32 00 00 19 12 20 36 FE FF FF 0A 00 9E F9 FF FF 00 1C DE FB FF FF 16 09 00 5C F9 FF FF 00 01 5C F9 FF FF 09 00 1F 32 00 00 00 01 1F 32 00 00 01 00 1F 32 00 00 00 26 16 16 

	//break
	06 42 31 

[/CODE]
[/BEFORE_HEX]


// snag local int to use from XComTacticalCheatManager.AIDebugWaveSystem
// local int iSet   00 D3 7F 00 00

[AFTER_HEX]
[HEADER]

[/HEADER]
[CODE]
//case 21:
0A 90 2B 2C 15 

	//if(Role == ROLE_Authority)
	07 8D 2B 9A 38 3A 01 A6 FE FF FF 2C 03 16 

		//if((kTarget != none))
		07 8D 2B 77 00 62 8C 00 00 2A 16 

			//if(kTarget.GetCharType() == 21)
			07 FC 29 9A 19 00 62 8C 00 00 0A 00 16 3B 00 00 00 1B 9E 37 00 00 00 00 00 00 16 2C 15 16 

				//kTarget.SetShieldHP(kTarget.GetMaxShieldHP())
				19 00 62 8C 00 00 29 00 00 00 00 00 00 1B 0D 6E 00 00 00 00 00 00 19 00 62 8C 00 00 0A 00 AE 3A 00 00 00 1B 76 39 00 00 00 00 00 00 16 16 

			//else
			06 8D 2B 

				//kTarget.m_iWillCheatBonus = kAbility.m_kUnit.GetWill()
				0F 19 00 62 8C 00 00 09 00 D6 C2 00 00 00 01 D6 C2 00 00 19 19 00 63 8C 00 00 09 00 27 89 00 00 00 01 27 89 00 00 0A 00 A0 37 00 00 00 1B E6 3B 00 00 00 00 00 00 16 
                                                                    	    
				//kTarget.m_aInventoryStats[0] +=  1 + kTarget.m_iWillCheatBonus / 25
				A1 1A 25 19 00 62 8C 00 00 09 00 37 3A 00 00 00 01 37 3A 00 00 92 26 91 19 00 62 8C 00 00 09 00 D6 C2 00 00 00 01 D6 C2 00 00 2C 19 16 16 16 

				//kTarget.HealBy(1 + kTarget.m_iWillCheatBonus/25) // shorter and resets any Red Fog effects
				19 00 62 8C 00 00 2F 00 90 C7 00 00 00 1B 7D 3D 00 00 00 00 00 00 92 26 91 19 00 62 8C 00 00 09 00 D6 C2 00 00 00 01 D6 C2 00 00 2C 19 16 16 16 

				//kTarget.SetUnitHP(kTarget.GetUnitHP() + 1 + kTarget.m_iWillCheatBonus / 25)
				//19 00 62 8C 00 00 8A 00 00 00 00 00 00 1B 87 6E 00 00 00 00 00 00 92 19 00 62 8C 00 00 0A 00 AA 3A 00 00 00 1B A6 3B 00 00 00 00 00 00 16 92 26 91 19 00 62 8C 00 00 09 00 D6 C2 00 00 00 01 D6 C2 00 00 2C 19 16 16 16 16

				//kTarget.m_aInventoryStats[7] += 20 + kTarget.m_iWillCheatBonus/5;
				A1 1A 2C 07 19 00 62 8C 00 00 09 00 37 3A 00 00 00 01 37 3A 00 00 92 2C 14 91 19 00 62 8C 00 00 09 00 D6 C2 00 00 00 01 D6 C2 00 00 2C 05 16 16 16 

	//null ops
	00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 00 D3 7F 00 00 
	0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 
		
	//break
	06 42 31 
 
[/CODE]
[/AFTER_HEX] 
MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B // XComGame_EW_patch1.upk
FUNCTION=PassesWillTest@XGUnit

// remove call to m_iWillCheatBonus

[BEFORE_HEX]
[CODE]
//iChance = WillTestChance(iWillTest, iMyMods + m_iWillCheatBonus, !bThisIsPanic, !bThisIsPanic, kVersus, iEvenStatsChanceToFail)
0F 00 F6 C7 00 00 1B 6D 7E 00 00 00 00 00 00 00 FC C7 00 00 92 00 FB C7 00 00 01 D6 C2 00 00 16 81 2D 00 FA C7 00 00 16 81 2D 00 FA C7 00 00 16 00 F9 C7 00 00 00 F8 C7 00 00 4A 16 

[/CODE]
[/BEFORE_HEX]


[AFTER_HEX]
[CODE]
//iChance = WillTestChance(iWillTest, iMyMods , !bThisIsPanic, !bThisIsPanic, kVersus, iEvenStatsChanceToFail)
0F 00 F6 C7 00 00 1B 6D 7E 00 00 00 00 00 00 00 FC C7 00 00 00 FB C7 00 00 81 2D 00 FA C7 00 00 16 81 2D 00 FA C7 00 00 16 00 F9 C7 00 00 00 F8 C7 00 00 4A 16 

//null ops
0B 01 D6 C2 00 00 0B
[/CODE]
[/AFTER_HEX] 
MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B // XComGame_EW_patch1.upk
FUNCTION=UpdateEquipment@XGUnit

// rewrite to remove extra mind-merge stats

[BEFORE_HEX]
[HEADER]
4D 01 00 00 F1 00 00 00 
[/HEADER]
[CODE]
//kInventory = GetInventory()
0F 00 62 C6 00 00 1B FE 38 00 00 00 00 00 00 16 

//if(kInventory != none)
07 4A 01 77 00 62 C6 00 00 2A 16 

	//I = 0
	0F 00 60 C6 00 00 25 

	//if(I < 26)
	07 4A 01 96 00 60 C6 00 00 2C 1A 16 

		//kWeapon = XGWeapon(kInventory.GetItem(byte(I)))
		0F 00 61 C6 00 00 2E 5B CD 00 00 19 00 62 C6 00 00 15 00 1F 0B 00 00 00 1B 03 39 00 00 00 00 00 00 38 3D 00 60 C6 00 00 16 

		//if(kWeapon == none)
		07 8D 00 72 00 61 C6 00 00 2A 16 

		//else
		06 3C 01 

			//if(kWeapon.HasProperty(11) && kWeapon.IsOverheated())
			07 3C 01 82 19 00 61 C6 00 00 0C 00 52 CD 00 00 00 1B 2E 3D 00 00 00 00 00 00 2C 0B 16 18 20 00 19 00 61 C6 00 00 0A 00 4A CD 00 00 00 1B 3E 45 00 00 00 00 00 00 16 16 

				//if(kWeapon.m_iTurnFired <= 0)
				07 1B 01 98 19 00 61 C6 00 00 09 00 1F CD 00 00 00 01 1F CD 00 00 25 16 

					//kWeapon.CoolDown()
					19 00 61 C6 00 00 0A 00 00 00 00 00 00 1B EF 14 00 00 00 00 00 00 16 

				//else
				06 3C 01 

					//kWeapon.m_iTurnFired -= 1
					A2 19 00 61 C6 00 00 09 00 1F CD 00 00 00 01 1F CD 00 00 26 16 

	//++ I
	A5 00 60 C6 00 00 16 

	//goto J0x2E
	06 2E 00 

//return
04 0B 

//EOS
53

[/CODE]
[/BEFORE_HEX]


[AFTER_HEX]
[HEADER]
11 01 00 00 F1 00 00 00 
[/HEADER]
[CODE]
// if(m_iWillCheatBonus > 0)
07 93 00 97 01 D6 C2 00 00 25 16 

	//I = GetUnitHP()
	0F 00 60 C6 00 00 1B A6 3B 00 00 00 00 00 00 16 

	//m_aInventoryStats[0] -= 0 + m_iWillCheatBonus/25
	A2 1A 25 01 37 3A 00 00 92 25 91 01 D6 C2 00 00 2C 19 16 16 16 

	//m_aInventoryStats[7] -= 20 + m_iWillCheatBonus/5
	A2 1A 2C 07 01 37 3A 00 00 92 2C 14 91 01 D6 C2 00 00 2C 05 16 16 16 

	//LoadoutChanged_UpdateModifiers()
	1B 14 4C 00 00 00 00 00 00 16 

	//SetUnitHP(Min(I, GetUnitMaxHP())
	1B 87 6E 00 00 00 00 00 00 F9 00 60 C6 00 00 1B A9 3B 00 00 00 00 00 00 16 16 16

	//m_iWillCheatBonus = 0
	0F 01 D6 C2 00 00 25 

//return
04 0B 

//null ops
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 0B 0B 0B 0B 0B 0B 0B 0B 

//EOS
53 

[/CODE]
[/AFTER_HEX] 

 

 

 

This preserves the +25 Crit bonus but changes the bonus HP (and healing) to use : +1 + Will/25, and grants bonus will to the receiver of : 20 + Will/5.

 

These same bonuses apply if MindMerge is given to and used by XCOM. I upped the base Will stat for Sectoids to be 25 so that starting Sectoids granted +2 HP and +25 Will. With 50 Will a Sectoid can be fairly formidable with Psi Panic and MindFray.

 

I'd recommend dropping the MindFray damage to 1 -- the -50 aim, -50 Will, and -50% movement debuff is more than enough without dealing 5 damage on top of it all.

 

Here's a change that will set MindFray damage to 1:

 

 

MODFILEVERSION=4
UPKFILE=XComGame.upk
GUID=5B 06 B8 18 67 22 12 44 85 9B A8 5B 9D 57 1D 4B // XComGame_EW_patch1.upk
FUNCTION=CalcDamage@XGAbility_Targeted

// Reduce Mindfray damage to 1

[BEFORE_HEX]
[CODE]
//if((GetType()) == 57)
07 AC 02 9A 1B 95 3B 00 00 00 00 00 00 16 2C 39 16 

	//m_iActualDamage = XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.5
	0F 01 DC D2 00 00 19 19 2E 2D 32 00 00 19 12 20 36 FE FF FF 0A 00 9E F9 FF FF 00 1C DE FB FF FF 16 09 00 5C F9 FF FF 00 01 5C F9 FF FF 09 00 1F 32 00 00 00 01 1F 32 00 00 02 00 1F 32 00 00 00 2C 05 


[/CODE]
[/BEFORE_HEX]


[AFTER_HEX]
[CODE]
//if((GetType()) == 57)
07 AC 02 9A 1B 95 3B 00 00 00 00 00 00 16 2C 39 16 

	//m_iActualDamage = XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1
	0F 01 DC D2 00 00 19 19 2E 2D 32 00 00 19 12 20 36 FE FF FF 0A 00 9E F9 FF FF 00 1C DE FB FF FF 16 09 00 5C F9 FF FF 00 01 5C F9 FF FF 09 00 1F 32 00 00 00 01 1F 32 00 00 02 00 1F 32 00 00 00 2C 01 

[/CODE]
[/AFTER_HEX] 

 

 

 

 

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

 

I'm also getting pretty close to reworking the psionic system for XCOM soldiers. Unfortunately it's already at 37 distinct changes (on top of the the changes needed to implement the Expanded Perk Tree), and I haven't even started adding code to expand the number of psionic abilities.

 

It would be a fairly big mod to distribute via pasting in Mod Talk ... :)

Link to comment
Share on other sites

As a small aside, you do realize that you can break up the lines of hex (all of the linefeed whitespace is removed when applying), and can also sprinkly comments throughout the blocks? I find it makes for much more readable code.

 

Yeah, I do, but the changes were so minor that parsing out and commenting out the entire function just for the one new line in BuildScores, for example, seemed like overkill.

Link to comment
Share on other sites

About Suppression... Aliens in EW still tend to skip turn when suppressed. It would be nice, if some of you could look into this. :wink:

 

I know this was discussed before, but I'm not sure if consensus was ever reached. What should their default action be if every other action is filtered out while suppressed? Was it that they should flee if they're alone? Maybe go on overwatch or hunker down if they have visible friendlies?

Link to comment
Share on other sites

 

 

What should their default action be if every other action is filtered out while suppressed?

 

Amineri can correct me, but I believe answering this question isn't necessary -- there is a math bug in the code that caused the aliens to skip their turn: It wasn't a deliberate choice for them to freeze.

 

I believe there was another math problem that prevented the aliens from using hunker down.

 

We haven't confirmed the math bugs are still there in the EW code, but it seems likely that's the case. When corrected, their AI runs properly, and the aliens will do something when suppressed and flanked, and will sometimes hunker down when the situation warrants.

Edited by johnnylump
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...