Jump to content

Consistent Overwatch Indicator


jefeonwuka

Recommended Posts

Can anyone help me figure out how to mod XCOM so that it'll keep an eye up or something over the enemies that are on overwatch? I've heard that the Long War mod has something like this, but I'm not really interested in the millions of other features that are in that mod. I figure it should be fairly simple, I just don't know where the battle indicator stuff is.

Link to comment
Share on other sites

Can anyone help me figure out how to mod XCOM so that it'll keep an eye up or something over the enemies that are on overwatch? I've heard that the Long War mod has something like this, but I'm not really interested in the millions of other features that are in that mod. I figure it should be fairly simple, I just don't know where the battle indicator stuff is.

The overwatch indicator in LW is an all-new effect and as such is not 'fairly simple', at least not in the context of XCOM, which is pretty mod-unfriendly w.r.t. things like this. Furthermore the changes introduced in LW to show that indicator are also tied to some other adjustments to the tactical unit info display (more specifically health display). It's not impossible to divorce the overwatch indicator from the other LW changes, but this is no trivial task by any means.

 

To elaborate on that, the game uses the Scaleform middleware which essentially incorporates Flash files for use as user interface components. The overwatch indicator is a custom sprite inserted into the 'unit flag' component via advanced hex editing techniques. Additionally some additional logic had to be inserted into related ActionScript and UnrealScript (the scripting languages of Flash and the Unreal engine respectively) classes to make the indicator respond to game events.

Edited by XMarksTheSpot
Link to comment
Share on other sites

So there isn't a way to simply set a flag or variable so that instead of fading away the initial indicator just stays as long as Overwatch is on? There has to be a flag that holds whether Overwatch is on or not.

There is no overwatch indicator in the vanilla game, unless you're talking about the 'world message' popup that is displayed when a unit is using the ability. It would be possible to remove the timeout of that popup to make it stay visible, but the hard part would be tracking and clearing these quasi-persistent popup instances once reaction fire is triggered or a new turn begins.

Link to comment
Share on other sites

I'd have to look at the code, I suppose. Conceptually what I'd do is just have it check who's tagged at the beginning of each turn and then after reaction fire. Seems like it'd just be a matter of putting calls within relevant methods. But I don't know how far into the code it's possible to dig.

 

Any light that could be shed on the question would be helpful.

Edited by jefeonwuka
Link to comment
Share on other sites

One more issue : overwatch is not stored (internally to XGUnit) as a boolean flag. Firaxis built upon and mutated something similar to the original X-COM reaction stat in order to implement overwatch.

 

Basically each firing action is set to have a reaction cost of 20. Each XGUnit has a reaction stat, which is normally zero. Activating the overwatch ability typically sets the units reaction stat to 20. However units with Sentinel or Rapid Reaction instead have the reaction stat set to 40. The current UIUnitFlag implementation in Long War registers a watch variable on the reaction stat so that when it changes, a particular method in UIUnitFlag is triggered. This calls the Actionscript (mentioned by XMTS above) to set the overwatch icon status based on a test "if(<ReactionStat> > 0)".

Link to comment
Share on other sites

  • Recently Browsing   0 members

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