wghost81 Posted March 22, 2014 Share Posted March 22, 2014 Yes, I understand Hyperwave relay code must be working with the pod wrong, but what puzzles me: I can't find it. I tested m_iAlienLimit: it works, but sets camera too close to the activated group. Link to comment Share on other sites More sharing options...
johnnylump Posted March 22, 2014 Share Posted March 22, 2014 I tested m_iAlienLimit: it works, but sets camera too close to the activated group. My observation as well. Link to comment Share on other sites More sharing options...
Amineri Posted March 23, 2014 Author Share Posted March 23, 2014 There are a couple of chunks of code for GeoscapeAlert cases 4 and 6 (eGA_UFOCrash and eGA_UFOLanded) in XGMissionControlUI.UpdateAlert that retrieve the alien types and total count : if(HQ().IsHyperwaveActive()) { txtLabel.strLabel = m_strLabelAlienObjective; txtLabel.StrValue = kUFO.m_kObjective.m_kTObjective.strName; kAlert.arrLabeledText.AddItem(txtLabel); txtLabel.strLabel = m_strLabelAlienCrewSize; txtLabel.StrValue = string(kMission.GetEnemyCount()); kAlert.arrLabeledText.AddItem(txtLabel); txtLabel.strLabel = m_strLabelAlienSpecies; txtLabel.StrValue = kMission.GetSpeciesList(); kAlert.arrLabeledText.AddItem(txtLabel); } I'm guessing that the XGMission.GetEnemyCount() function is the one that has to be rewritten. It looks as though XGMission.GetSpeciesList correctly loops through all of eMain and eSupport1 and eSupport2, so it should be correct. I think that the code : if(iPod < m_kDesc.m_kAlienSquad.arrPods.Length) { if(m_kDesc.m_kAlienSquad.arrPods[iPod].eMain != 0) { ++ iNumEnemies; } if(m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport1 != 0) { ++ iNumEnemies; } if(m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport2 != 0) { ++ iNumEnemies; } ++ iPod; // [Loop Continue] goto J0x0B; } has to be rewritten more like : if(iPod < m_kDesc.m_kAlienSquad.arrPods.Length) { if(m_kDesc.m_kAlienSquad.arrPods[iPod].eMain != 0) { ++ iNumEnemies; } // End:0x113 if(m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport1 != 0) { iNumEnemies += m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport1AltWeapon + 1; } if(m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport2 != 0) { iNumEnemies += m_kDesc.m_kAlienSquad.arrPods[iPod].eSupport2AltWeapon + 1; } ++ iPod; // [Loop Continue] goto J0x0B; } For Long War (in which I included an extra bit to allow a 2nd eMain alien) the first conditional will also need some work. Something like : iNumEnemies += ((m_kDesc.m_kAlienSquad.arrPods[iPod].eMainAltWeapon >> 6) & 1) + 1; Since I used bit 6 to flag whether to add a 2nd eMain type (bit 7 stores the alt weapon flag to allow LPR-wielding Mutons, and bits 0-2 store the leader level). Link to comment Share on other sites More sharing options...
wghost81 Posted March 23, 2014 Share Posted March 23, 2014 (edited) How could I have missed that function? :smile: For my version I use 2 last bytes of all three AltWeapon variables to hold alien numbers. 4 * 3 = 12 aliens per pod is more than enough. Actually, 2 * 3 = 6 is an absolute maximum I ever used, but I decided to reserve some space anyway. Edited March 23, 2014 by wghost81 Link to comment Share on other sites More sharing options...
Amineri Posted April 8, 2014 Author Share Posted April 8, 2014 (edited) I've finally figured out how to completely disable the reveal cinematics (my current motivation for doing so is to prevent the Seekers from automatically stealthing during the reveal cinematic). It turns out that there is a developer console command to disable these cinematics and it worked properly : AIForceSkipPodReveal All that this function does is set the variable bForcePodQuickMode = true. And this variable is only accessed in XComAlienPod.PlayActivatePodMatinee at the end of the line : if((m_arrAlien[0].GetPawnType() != 45) && (((m_bSkipActivateMatinee || (HasMovedThisTurn()) && XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.IsAlienTurn()) || !IsIn3x3Area()) || !class'XComWorldData'.static.GetWorldData().CheckClearanceForPodReveal(TestPodLocation)) || (XComTacticalCheatManager(GetALocalPlayerController().CheatManager) != none) && XComTacticalCheatManager(GetALocalPlayerController().CheatManager).bForcePodQuickMode == true); Just disabling this check works, although only the first 3 outsiders in a pod are revealed. However increasing the default value for XComAlienPod.m_iAlienLimit to 8 (or whatever the max pod size is) allows all outsiders to properly morph from crystal to biped upon activation. In UPKmodder format the two changes are : 1) Disable cinematics : MODFILEVERSION=4 UPKFILE=XComGame.upk GUID=1C 18 A1 1A 2B C3 34 4E 8B 2C 72 33 CD 16 7E 3E // XComGame_EW_patch3.upk FUNCTION=PlayActivatePodMatinee@XComAlienPod // disable pod reveal cinematics [BEFORE_HEX] [HEADER] [/HEADER] [CODE] //if((m_arrAlien[0].GetPawnType() != 45) && (((m_bSkipActivateMatinee || (HasMovedThisTurn()) && XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.IsAlienTurn()) || !IsIn3x3Area()) || !class'XComWorldData'.static.GetWorldData().CheckClearanceForPodReveal(TestPodLocation)) || (XComTacticalCheatManager(GetALocalPlayerController().CheatManager) != none) && XComTacticalCheatManager(GetALocalPlayerController().CheatManager).bForcePodQuickMode == true) 07 35 02 82 9B 38 3A 19 10 25 01 D1 3F 00 00 0A 00 AA 37 00 00 00 1B A5 3A 00 00 00 00 00 00 16 38 3A 24 2D 16 18 53 01 84 84 84 84 2D 01 D9 3F 00 00 18 78 00 82 1B 7C 3D 00 00 00 00 00 00 16 18 69 00 19 19 2E E4 32 00 00 19 12 20 35 FE FF FF 0A 00 92 F9 FF FF 00 1C D5 FB FF FF 16 09 00 50 F9 FF FF 00 01 50 F9 FF FF 09 00 F0 32 00 00 00 01 F0 32 00 00 0A 00 22 B1 00 00 00 1B 56 44 00 00 00 00 00 00 16 16 16 18 0D 00 81 1B 33 45 00 00 00 00 00 00 16 16 16 18 41 00 81 19 12 20 2A 0C 00 00 0A 00 C8 D2 00 00 00 1B 47 3C 00 00 00 00 00 00 16 13 00 30 D2 00 00 00 1B 57 12 00 00 00 00 00 00 00 8C 41 00 00 16 16 16 18 72 00 82 77 2E 6F 80 00 00 19 1C 4B FC FF FF 16 09 00 72 F9 FF FF 00 01 72 F9 FF FF 2A 16 18 42 00 F2 19 2E 6F 80 00 00 19 1C 4B FC FF FF 16 09 00 72 F9 FF FF 00 01 72 F9 FF FF 0A 00 90 7B 00 00 00 2D 01 90 7B 00 00 27 16 16 16 16 [/CODE] [/BEFORE_HEX] [AFTER_HEX] [HEADER] [/HEADER] [CODE] //if((m_arrAlien[0].GetPawnType() != 45) && (((m_bSkipActivateMatinee || (HasMovedThisTurn()) && XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.IsAlienTurn()) || !IsIn3x3Area()) || !class'XComWorldData'.static.GetWorldData().CheckClearanceForPodReveal(TestPodLocation)) || (XComTacticalCheatManager(GetALocalPlayerController().CheatManager) != none) && XComTacticalCheatManager(GetALocalPlayerController().CheatManager).bForcePodQuickMode == true) 06 20 02 82 9B 38 3A 19 10 25 01 D1 3F 00 00 0A 00 AA 37 00 00 00 1B A5 3A 00 00 00 00 00 00 16 38 3A 24 2D 16 18 53 01 84 84 84 84 2D 01 D9 3F 00 00 18 78 00 82 1B 7C 3D 00 00 00 00 00 00 16 18 69 00 19 19 2E E4 32 00 00 19 12 20 35 FE FF FF 0A 00 92 F9 FF FF 00 1C D5 FB FF FF 16 09 00 50 F9 FF FF 00 01 50 F9 FF FF 09 00 F0 32 00 00 00 01 F0 32 00 00 0A 00 22 B1 00 00 00 1B 56 44 00 00 00 00 00 00 16 16 16 18 0D 00 81 1B 33 45 00 00 00 00 00 00 16 16 16 18 41 00 81 19 12 20 2A 0C 00 00 0A 00 C8 D2 00 00 00 1B 47 3C 00 00 00 00 00 00 16 13 00 30 D2 00 00 00 1B 57 12 00 00 00 00 00 00 00 8C 41 00 00 16 16 16 18 72 00 82 77 2E 6F 80 00 00 19 1C 4B FC FF FF 16 09 00 72 F9 FF FF 00 01 72 F9 FF FF 2A 16 18 42 00 F2 19 2E 6F 80 00 00 19 1C 4B FC FF FF 16 09 00 72 F9 FF FF 00 01 72 F9 FF FF 0A 00 90 7B 00 00 00 2D 01 90 7B 00 00 27 16 16 16 16 [/CODE] [/AFTER_HEX] Increase maximum pod size to update on reveal : MODFILEVERSION=4 UPKFILE=XComGame.upk GUID=1C 18 A1 1A 2B C3 34 4E 8B 2C 72 33 CD 16 7E 3E // XComGame_EW_patch3.upk FUNCTION=Default__XComAlienPod //allow more than 3 outsiders to reveal properly [BEFORE_HEX] <|m_iAlienLimit|> 00 00 00 00 // name m_iAlienLimit <|IntProperty|> 00 00 00 00 // type IntProperty 04 00 00 00 00 00 00 00 // size 03 // value [/BEFORE_HEX] [AFTER_HEX] <|m_iAlienLimit|> 00 00 00 00 // name m_iAlienLimit <|IntProperty|> 00 00 00 00 // type IntProperty 04 00 00 00 00 00 00 00 // size 08 // value [/AFTER_HEX] These changes don't alter the default Seeker behavior -- they will still all stealth upon reveal. Further changes are needed to prevent this, and I'm still working on that. One other thing I've noticed is that in a pod of 4 Seekers, only 2 of them move. The other 2 remain motionless. Edited April 8, 2014 by Amineri Link to comment Share on other sites More sharing options...
wghost81 Posted April 8, 2014 Share Posted April 8, 2014 http://forums.nexusmods.com/index.php?/topic/1454050-xcom-interface-tweaks/?p=12970293 :smile: Sorry, forgot to share it in the modding forum. I think, the code you're looking for is located in the XComAlienPod.Active state. Search for: if(m_kActiveUnit.GetCharType() == 23) { // End:0x1651 if(m_kActiveUnit.IsVisible()) { m_kActiveUnit.ResetMoves(); m_kActiveUnit.ResetUseAbilities(); m_kActiveUnit.DoStealthAbility(); } } // End:0x1667 else { MoveToCover(m_kActiveCover); } Removing m_kActiveUnit.DoStealthAbility() should do the trick. Seen it while I was working on Overwatch on Reveal mod. Link to comment Share on other sites More sharing options...
Amineri Posted April 9, 2014 Author Share Posted April 9, 2014 Good find, you beat me to the discovery on the cinematic removal :) I'd found the code in XComAlienPod.Active for removing the Stealth, but I found that not all Seekers perform moves after the pod activates. There's also some problems with the next chunk of code starting with : if((m_arrMovers.Length > 0) && m_arrMovers[0].GetCharType() == 23) which grants extra movement to all units in the pod if the first alien is a Seeker. This causes some problems with mixed pods that contain seekers (we've had reports of mixed pods of Thin Men + Seekers where the Thin Men are getting two moves). So I'm thinking I'm going to have more significantly rewrite the section in order that all Seekers properly move when they can't stealth, and preventing non-stealthing units (seekers or non-seekers) in the same pod from getting a second move. Thanks for the suggestion :) Link to comment Share on other sites More sharing options...
wghost81 Posted April 9, 2014 Share Posted April 9, 2014 Amineri, overwatch-or-shoot code for non-cover aliens in EW also causes strange behavior for pods with more than 1 non-cover alien. For example, if you have 2 Cyberdiscs in one pod, one will overwatch/shoot on reveal and the other will move. This handled in the same state, code just above the one I've posted. I'm going to change it for the next release of Larger Pods, so all non-cover aliens in pod will be processed, not just the first one. Link to comment Share on other sites More sharing options...
Recommended Posts