Jump to content

Turning on Alien Pods by Default


chimeracreator

Recommended Posts

I've also seen a post on the main 2k forums where someone activated most aliens and had them teleport off onto the map.

 

The poster (and quite a few others) came to the conclusion that it made the game less fun, because the mission took about 5 times longer than normal to complete, continually inching forward afraid of overwatch fire.

Also, I have not been able to find this post you are referring to... would you be able to point me toward it? :biggrin: I am very curious as to what others have found.

Edited by Andeerz
Link to comment
Share on other sites

  • 3 weeks later...

Okay, I have done some research on issue and found out that basically aliens cannot be "turned on" by default, because game was written around pod-reveal mechanic, not other way around. So when pod created, it becomes active (sort of enabler, that allow pod to do anything at all). After that pod is being assigned default behavior (which is none by default) and it becomes dormant (or pod manager assigns some sort of behavior, like patrolling). Anyway, there is sort of sequence for alien pod to become activated (do not confuse with active); first, there is check, if pod seen by player (changes boolean value m_bSeen), after that pod is changing state (by pod manager assigning to it state "Roam" at aliens turn), if value m_bHasSeenEnemy is false (for situations when player sees aliens, but they are not seeing player-controlled units);if m_bHasSeenEnemy is true (which can only happen, if they actually see enemy units, there is condition to deactivate units, if it is not the case), after that AI DM adds pod reveal move to sequence of actions of pod, and after pod reveal move(cut-scene is optional) AI fully activates pod in question.

So short answer is that: no, game simply cannot handle activated units by default (there is lot of procedures about that running in background, that I have yet to fully comprehend). However, I have managed to get as close as possible to getting activated pods in current game state: in <XGAIBehavior> there is function, that looks like this

native simulated function bool IsDormant(optional bool bFalseIfActivating)
{
bFalseIfActivating = false;
}

and in that function I have changed 'false' to 'true'. HEX code for this:

original:
49 02 00 28 15 29 FE 8A 00 00 0B 53
replacement:
49 02 00 27 15 29 FE 8A 00 00 0B 53

So instead of being put in useless dormant 'state' (not an actual state by in-game definition of it) they are being put in "activating" state, and activation happens as soon as possible (usually at hearing distance, which is roughly 40 units/tiles), so aliens will remain hidden in fog of war for your turn, unless you will dash in their direction or use battlescanner. However, activation may not happen, if pod manager assigned some behavior for that pod already, but that is usually patrol/roam anyway, so either they run into you, or their state will be cleared again (and thus become "activating"). Now please keep in mind, that this "dirty hack" has not been extensively tested, and if your results differ of my experience or you have contradicting information on the topic - feel free to inform me about it.

Edited by Tycus
Link to comment
Share on other sites

Some good work.

 

Interesting that the pod is set to start patrolling if m_bSeen (typically accomplished by means of a battlescanner or ghosted unit) without being activated, but the WarpTo mechanics are still active so that the pod teleports to the destination instead of moving normally.

 

Might have to dig in and see if it is possible to make such m_bSeen pods patrol via movement instead of via WarpTo. This would kill one of the major immersion-breaking aspects of the game without massively slowing down the game by trying to force all units to move on every turn.

Link to comment
Share on other sites

Interesting that the pod is set to start patrolling if m_bSeen (typically accomplished by means of a battlescanner or ghosted unit) without being activated, but the WarpTo mechanics are still active so that the pod teleports to the destination instead of moving normally.
By looks of it game uses 'patrol', 'roam', 'hunt' almost interchangeably, when it should have been different sort-of-tactics, but it looks like this part of the game was never finished properly.

 

Might have to dig in and see if it is possible to make such m_bSeen pods patrol via movement instead of via WarpTo. This would kill one of the major immersion-breaking aspects of the game without massively slowing down the game by trying to force all units to move on every turn.

Unless you can write completely new function to handle just that, I'm afraid it is not possible.

Link to comment
Share on other sites

I'm not sure I follow the logic completely...

Why is it not possible to trigger the event that turns on the pod?

 

Even if it really is impossible by any other means than an XCom-soldier visiting near the pod.. Would it then not be possible to disable the camera and teleport a soldier to all pods as soon as they are created? :)

Link to comment
Share on other sites

Can the default state of spawned pods just be set to m_bSeen and m_bHasSeenEnemy = true when they would otherwise be set as false? I could imagine that screwing with decisions the AI makes during combat, though...

m_bHasSeenEnemy should be named: "is seeing enemy right now?"(because what it basically does), this is why it is bad idea to change its default state and it doesn't do the trick anyway, because AI starts assigning targets, that are in sight, if that value is true, if there is no target in sight AI director simpy changes that value back to false, and defaulting m_bSeen to true would simply put everyone in 'Roam' state at Aliens turn. My solution is kind of better, because aliens become activated as soon as possible for AI to handle them in any intelligent manner and it is sort of does the trick, because it is very possible to activate on your very first move/turn multiple pods of aliens (as well have them chainactivating on next turns), and then they will come down on you hard on their turn (or not, depends on aliens in question; they may just as well sit back and overwatch, till you come to them). Basically, difference with my solution is minimal from already activated aliens, and some missions will be already very hard (and enjoyable) because of that change (I've yet to run mission with this change active with no one wounded/dead; partly of it could be responsible my mod and really unlucky map choices like Graveyard and such).

 

Edit:

 

Even if it really is impossible by any other means than an XCom-soldier visiting near the pod.. Would it then not be possible to disable the camera and teleport a soldier to all pods as soon as they are created? :smile:

From theoretical point of view this could be only real way possible (other than changing native functions) to make pods activated, because this will allow pod-reveal-move launch sequence. However, what do you think will happen next? Have you ever breached contact (and I mean completely, like not even hearing sounds from that unit) after activation of pod (because I have seen what happens in that case). Usually will happen precisely nothing, unit will just sit tight and listen to wind, until it hears sound tracking cues coming from XCOM squad movement (yes, aliens getting them as well), after it will be assigned special 'Hunt' /'Tracking' tactic/behavior and it will slowly begin movement from cover to cover (choice of cover may be questionable) in that general direction. Basically end results will be same as my "fix", if not worse (for activated units sitting somewhere on the map and not moving at all, until player finds them).

And with my "fix" aliens will be activated at same hearing distance as mentioned above, but will also move on map as normal, and as you see pod reveal cutscene - they catch glimpse of position of your soldiers, and take cover accordingly.

However, difference with my fix from activated pods lies in yet another AI shackle/restraint - aliens will not use AI behavior after pod reveal but before XCOM turn, even when reveal happened on their turn (they still may use theirs predefined behaviors, like sectoids using mind merge, or chryssalids have theirs behavior completely overridden by theirs predefined behavior and will not be affected in any case; look more to this in R&D AI Improvements topic).

 

Perhaps I should wrap it all in single statement: AI simply cannot handle activated units very well (or at all), nor they can be activated easily (because entire game mechanic is tied to this pod-reveal sequence).

Edited by Tycus
Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...