jefeonwuka Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
XMarksTheSpot Posted November 11, 2014 Share Posted November 11, 2014 (edited) 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 November 11, 2014 by XMarksTheSpot Link to comment Share on other sites More sharing options...
jefeonwuka Posted November 11, 2014 Author Share Posted November 11, 2014 (edited) 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. Edited November 11, 2014 by jefeonwuka Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted November 12, 2014 Share Posted November 12, 2014 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 More sharing options...
jefeonwuka Posted November 12, 2014 Author Share Posted November 12, 2014 (edited) 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 November 12, 2014 by jefeonwuka Link to comment Share on other sites More sharing options...
wghost81 Posted November 13, 2014 Share Posted November 13, 2014 UE Explorer will give you all the answers you need. :wink: Just search through the code to find all the overwatch related stuff. Link to comment Share on other sites More sharing options...
Amineri Posted November 19, 2014 Share Posted November 19, 2014 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 More sharing options...
jefeonwuka Posted November 20, 2014 Author Share Posted November 20, 2014 Thanks, that's pretty helpful. Have been trying to dig into the code more so I think it'll be a bit before I try to do anything like this. Link to comment Share on other sites More sharing options...
Recommended Posts