Jump to content

monju125

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by monju125

  1. The only problem with that is that the tactic includes the hunt target, so if its set in the init code, it would have to be updated later on when a target is no longer valid (for example, one cap point is taken, and the other becomes active). It's probably as easy as adding some code to BeginTurn to check for a valid XGTactic_Hunt before it resets a unit's tactic.
  2. They normally do, but as the code I posted a few posts back shows, that's because they're hardcoded to use DirectHunt. I changed Roll(100) to Roll(50) in that function to allow them to use WideHunt and FlankHunt, but it doesn't really work well because they choose a hunt path every single turn, making them switch randomly between the three from turn to turn.
  3. Verified. In XGOvermind.BeginTurn: if(UpdateActiveCapturePoint()) { // End:0x121 foreach m_arrPods(kPod,) { kPod.CompleteTactic(); } DetermineCaptureAndHoldTactics(); } else { // End:0x15F if(BattleDesc().m_iMissionType == 5) { DetermineCovertExtractionTactics(); } } Then DetermineCaptureAndHoldTactics and DetermineCovertExtractionTactics both create and initialize a new XGTactic_Hunt calling ChooseHuntPath in the process. So, every turn, each pod switches its hunt path. It's kind of funny to watch; they'll run directly toward the cap point one turn (Direct Hunt), then divert off to the side the next turn (Wide/Flank Hunt), and then just keep changing their minds until eventually they end up in the cap point.
  4. Yeah, I just found it funny. XGTactic_Hunt is currently only ever used in the EXALT missions, so it's not all that noticeable anyway. I changed it to see what would happen, and I'll have to verify in the code, but it seemed like the pods were switching hunt paths every turn, which lead to some odd behavior. Leads me to believe they probably changed it on purpose.
  5. On a slightly different topic, I've been considering tinkering with pod tactics and noticed something strange while looking through the XGTactic classes. This is in XGTactic_Hunt: function ChooseHuntPath() { // End:0x1C if(Roll(100)) { DirectHunt(); } // End:0x42 else { // End:0x38 if(Roll(50)) { WideHunt(); } // End:0x42 else { FlankHunt(); } } //return; } That means that there is a 100% chance that DirectHunt will be chosen instead of the other two. I'm not sure why they even bothered putting the rest of that code in there.
  6. A change could be made to mind control that clears the effects of mindfray when its applied making that combo much stronger. That said, I know I sometimes use mind control just to remove a unit from the fight for a few turns, use its grenade, or just to scout for me, and you could argue that it is powerful enough as it is.
  7. Ah, I see, we're talking about eAbility_PsiControl, not eAbility_MindControl. I would actually keep the line for eAbility_PsiControl in HasPredeterminedAbility and assign eAbility_PsiControl to Ethereals and EtherealUbers (and any other units you want to have stronger psionic abilities) because it isn't affected by MIND_CONTROL_DIFFICULTY and will be used as a predetermined ability when available. eAbility_MindControl is different; it doesn't have an entry in HasPredeterminedAbility and has its efficacy modified by MIND_CONTROL_DIFFICULTY, thus I would grant it to lesser psionic users such as Sectoids.
  8. Huh, must have been a copy error (B9 03 00 00 is the post change memory size). I think I applied the change directly to the UPK and then copied it to the UPK modder file, but never applied it through that. As far as mind control goes, that's entirely up to you. We hadn't really discussed whether or not we it should be removed from HasPredeterminedAbility. In practice you typically won't see Sectoids using mind control as a predetermined skill, as it has a very low chance to hit (unless you've altered MIND_CONTROL_DIFFICULTY) since there's a control in AddBestPsiAbilityToList that will skip an ability if it has less than a 20% chance to hit: if((kAbility != none) && kAbility.CheckAvailable()) { kTarget = kAbility.GetPrimaryTarget(); // End:0x136 if(((kTarget == none) || !kTarget.IsAliveAndWell()) || kAbility.GetHitChance() < 20) { continue; } My feeling is that if somehow a Sectoid or other psionic user does find themselves with a greater than 20% chance of mind controlling a unit, it might not be too unreasonable for them to try it.
  9. I know wghost has been doing some work in this area. Check out this thread: http://forums.nexusmods.com/index.php?/topic/1231530-modding-exalt/page-9
  10. Yeah, I don't necessarily see anything with the hunker down rules themselves that would prevent it from ever being used (I've certainly seen it used before), but it is a fairly rare occurrence since it has two sets of requirements (the only ability to have any set in BuildConditions actually): 1. The alien is overwatched and not flanked Or 2. The alien is alone and outnumbered I think one of the things that was discussed before was that you could freeze an alien in place while you maneuvered right up to it to capture it, and I think the hunker down rules seem to support that. Adding an egress mechanism when alone and outnumbered seems like a good idea, no?
  11. Ah ha, okay, I'll see if I can track those down.
  12. 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?
  13. 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.
  14. 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]
  15. Just realizing that if we want mindfray to follow the same rules for offense score as psi panic and mind control, I'll have to change its ScoreAbility entry to not have an offense score.
  16. 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
  17. I've seen Ethereals use it occasionally, but like you say, only when I somehow allow one to actually live three rounds. You're right that Psi Inspiration isn't currently used by any aliens; I think I was more hinting that it might be interesting to allow them to use it and add some logic for it. Oh, and I was wrong, it's not included in the predetermined ability code; I can't seem to keep the ability types straight in my head, so I keep mistaking them when I see them used. Anyway, one of my pet peeves with the late game AI is that it doesn't handle enemy psionics very well. For example, the AI will often immediately turn on a friendly unit that has been mind controlled by the player, even if they have a good shot at the unit doing the mind control. Not very smart, but maybe you could argue that it fits with the story.
  18. I think what I had noticed that had soured me on the expanding functions idea had to do with expanding multiple functions and potential pitfalls combining mods? This isn't really the place for this though. I'll just go reread that thread.
  19. Ah, you're right, I didn't notice that there wasn't a ScoreAbility for PsiPanic. Yeah, adding a ScoreAbility for it in BuildScores and then setting it up to use the same case logic as mind control would work. Also, did you notice this strangeness with Psi Lance in AI_OffenseScore? case 35: // End:0xDD case 37: // End:0x102 case 7: fScore = GetBaseShotOffenseScore(kAbility); // End:0x502 break; case 35: fScore = 1.0; kTarget = XGAbility_Targeted(kAbility).GetPrimaryTarget(); iWillDiff = m_kUnit.GetWill() - kTarget.GetWill(); fScore -= (float(iWillDiff) / 40.0); // End:0x502 break; The way that's written, eAbility_PsiLance (35) will always fall into the first case and exit and the second case will never be used, right? It also appears that Psi Inspiration does not have a ScoreAbility and is handled entirely by the predetermined ability code.
  20. I was following the thread about the expanded functions for a while and got the impression that there were too many concerns with it that it might not be currently viable. Is that not the case anymore? If not, I'll definitely start using it. Actually, psi abilities have default priority scores set with every other ability in XGAIAbilityRules.BuildScores, and some are then modified in the AI_OffenseScore, AI_DefenseScore, AI_IntangiblesScore functions in XGAIAbilityDM. For example, mind control (ability type 39/60) is set in XGAIAbilityRules.BuildScores with the following: ScoreAbility(39,,1.0,0.0) ScoreAbility(60,,1.0,0.0) That sets the default values of mind control to -999 offense score, 1.0 defense score, 0.0 intangibles score. Then its offense score is set in AI_OffenseScore with the following: case 39: // End:0x2E4 case 60: fScore = 0.0; kTarget = XGAbility_Targeted(kAbility).GetPrimaryTarget(); iWillDiff = m_kUnit.GetWill() - kTarget.GetWill(); fScore += (float(iWillDiff) / 15.0); // End:0x502 break;
  21. You're absolutely correct about it using available psi abilities automatically in the predetermined functions. What happens is that if a Sectoid doesn't have a mind merge available, its HasPredeterminedAbility calls HasPredeterminedAbility in its parent class XGAIBehavior_Psi. That function then checks to see if the unit has any of the other psionic abilities available, and if not calls HasPredeterminedAbility in its parent class XGAIBehavior. Normally for a Sectoid that would mean it would fail to find anything in XGAIBehavior_Psi.HasPredeterminedAbility and call XGAIBehavior.HasPredeterminedAbility and ultimately, more than likely, lead to normal priority behavior. However, since you've added the other psi abilities to the Sectoid, XGAIBehavior_Psi.HasPredeterminedAbility returns true whenever any of those abilities is available for use and the Sectoid defaults to a psi ability. Fixing that seems easy enough, if I can find room to actually add the clause to skip XGAIBehavior_Psi.HasPredeterminedAbility if the unit isn't an Ethereal. I'll have to think about the second part about mindmerged Sectoids a little more.
  22. That looks great. Really looking forward to playing Long War and patiently waiting in the meantime. If there's ever any way us newer modders can help, like with stuff you've decided to put on the backburner/deemed as low priority, just let us know. I know I for one would be willing to pitch in, especially with the AI since I've been knee deep in those functions lately anyway.
  23. I've found that the game doesn't handle revealing enemies all that well and I've been poking around the same code doing some work to try to fix it. I think the problem with this is similar to something I've been working on; there's no logic in XGAction_Fire to handle revealing pods. If you had fired a rocket at or shot those aliens, that would have been handled by the unit's OnTakeDamage function and the pod would have been revealed. However, firing a rocket away from or even just shooting an alien that isn't part of that pod would leave the other pod unrevealed. What I've been working on could be made to fix this, I think. I've co-opted a debug function in XComAlienPodManager and called it from the end of XGAction_Fire.Firing state that will reveal any pods that can see another pod that is taking/returning fire. I initially started working on this to handle the issue where there are two pods close to each other, but only one of them gets revealed due to LOS, and the other one just sits there while you wipe out their buddies right in front of them. I could see maybe using this function to handle the issue you've uncovered as well.
  24. Ah ha, I knew tactical AI had to have been discussed somewhere before, but I hadn't seen a thread for it. Thanks, Amineri.
  25. I've had a similar issue with the difficulty system; simply adding more aliens and giving them increased stats might make the game more difficult, but I don't find it to be in a particularly meaningful way. I've spent quite a bit of time recently mapping out and reading through the AI functions in order to improve it in a way that would be scalable with difficulty. There are currently only a few places in the AI that change with difficulty: Likelihood of using plague/blood call/alien grenade/medikit (XGAIAbilityDM.AI_IntangiblesScore) Maximum number of engaged aliens (XGAIBehavior.IgnoresActiveList and XGAIPlayer.GetMaxEngagedAI) Minimum hit chance used for determining attack priority (XGAIBehavior.GetMinHitChance) Maximum amount of enemy units in overwatch allowed for a unit to move (XGAIBehavior.GetMaxDangerLevelMovement) Low cover preference (XGAIBehavior_Sectoid/ThinMan.PrefersLowCover, only applies on easy difficulty) Whether or not a unit will avoid a VIP on council missions (XGAIPlayer.AvoidVIP, only applies on easy difficulty) The way I see it, there are a couple separate ways to alter the AI that would scale with difficulty: increase potential coordination between units at all difficulty levels but implement less certainty of that coordination being successful at lower difficulties; or maintain current coordination/tactics at low difficulties but implement better coordination/tactics as difficulty increases. Unfortunately both require quite a bit of work to implement. I've actually already implemented a change in my game by co-opting a debug function in XGAIBehavior. It acts as a sort of "mistake" system, randomly altering the priority of potential actions with the chance dictated by the game's difficulty. It's not exactly what I ultimately want to implement, but it was a good test and helped increase my understanding of how the AI chooses its actions.
×
×
  • Create New...