Sequential overwatch

For general discussion about XCOM: Long War
User avatar
szmind
Long War EU Crew
Posts: 91
Joined: Tue Dec 29, 2015 9:56 pm
Location: Poland

Sequential overwatch

Postby szmind » Thu Jan 04, 2018 11:03 am

After 2 weeks of learning how to hex-mod UPK files and a few hours digging through the code I managed to input 4 hexes (3 would be enough) into .ApplyReactionCost function. Result - sequential overwatch fire; that is shooting one by one. That works for standard overwatch and applies to aliens' fire as well.
Last edited by szmind on Tue Jul 10, 2018 9:19 am, edited 1 time in total.

User avatar
szmind
Long War EU Crew
Posts: 91
Joined: Tue Dec 29, 2015 9:56 pm
Location: Poland

Re: Sequential overwatch

Postby szmind » Mon Jan 08, 2018 6:49 pm

https://www.nexusmods.com/xcom/mods/704

Edit: That is fully operational by now - working with seekers, drop-down reinforcements, whatever.
Last edited by szmind on Mon Jan 15, 2018 3:24 pm, edited 1 time in total.

johnnylump
Site Admin
Posts: 925
Joined: Wed Nov 11, 2015 4:12 am
Location: Colorado
Contact:

Re: Sequential overwatch

Postby johnnylump » Thu Jan 11, 2018 7:48 pm

Applause. Here's the tool we used to change function sizes:

https://github.com/Amineri-R/upk-modder

User avatar
szmind
Long War EU Crew
Posts: 91
Joined: Tue Dec 29, 2015 9:56 pm
Location: Poland

Re: Sequential overwatch

Postby szmind » Mon Jan 15, 2018 11:09 am

johnnylump wrote:Applause. Here's the tool we used to change function sizes:

https://github.com/Amineri-R/upk-modder


Thanks Johnny. I found it during learning process but could not 'build it' (there is no exe). You know - I am a noob :)

My next project - multijet interception. With not much coding effort done (but great research effort) I can already assign and launch >1 interceptors. Their shots are even all visible during engagement - but just one jet is animated. Further work is in progress.

I am able to figure out a lot myself but is there any possibility to get any 'little explanations' (from whoever) on those DEF / BAL / AGG implementation?

johnnylump
Site Admin
Posts: 925
Joined: Wed Nov 11, 2015 4:12 am
Location: Colorado
Contact:

Re: Sequential overwatch

Postby johnnylump » Mon Jan 15, 2018 5:30 pm

Hmm, you're right. I think you should pack everything in src into a .jar file -- but I'll ping Amineri to come on here and clarify.

On the interceptor agg/bal/def implementation, the UI stuff (the buttons) was modded in Flash by XMarksTheSpot. I have no idea how he did what he does, but if you want to ping him directly, send me a PM and I'll get you his contact info. The implementation on the combat logic was by me, although I'd have to dig deep to remember exactly where it was done ... shouldn't be too hard to find; it's with the rest of the combat calculations.

Amineri
Long War Dev
Posts: 221
Joined: Wed Nov 11, 2015 7:34 pm

Re: Sequential overwatch

Postby Amineri » Mon Jan 15, 2018 7:18 pm

So on upkmodder, that github link is for the java source. I'd originally done the develop on Google Code SVN, which allowed separate links for releases (although there wasn't much interest).

There's a public google docs page where you can access the last built version here : https://drive.google.com/drive/folders/ ... sp=sharing

Everything was built in Java, so you'll need the Java run-times installed to make it work. We'd had someone do some testing on Linux (JL and I develop under Windows), but I don't think there was an Mac testing.

I don't recall anything off-hand about the DEF/BAL/AGG settings, other than that they apply to-hit modifiers for both sides. The way I recall air combat working is that it pre-simulated everything (all of the hit and misses) and then played it back while actually viewing. Since it wasn't really dynamic, it made certain things harder to do.

User avatar
szmind
Long War EU Crew
Posts: 91
Joined: Tue Dec 29, 2015 9:56 pm
Location: Poland

Re: Sequential overwatch

Postby szmind » Tue Jan 16, 2018 2:33 pm

Thanks a lot for your feedback - I feel honoured :)

I am a fast-learner so next day after writing the initial post I leveled up from writing code in pure hex into using pseudo-code and I was finishing Sequential Overwatch using UPKUtils :) It has all I need :)

As for aircombat logic everything is clear to me. Amineri is right - there is all logic done behind the scene and a playback in front.

DEF/BAL/AGG - I will send a PM to you, johnnylump. I need to know if it's possible to set color individually for DEF or AGG buttons based on which one has been clicked. The logic itself is clear but I can see the function searches "agg", "bal" and "def" strings. Well, I did not know this and I localized those in XComStrategyGame.POL into "agr", "zrow", "def". And it seemed to work. How?? I mean def is clear, but "agr" vs "agg" or "bal" vs "zrow"??? At least it worked for using modules so the stance must have been applied correctly.

Side note: figuring out what is (1 << 8 ) and then (1 >> 8) took me like a whole day. I finally got this - byte shifting... Why introducing this was neccessary is a mystery to me but interesting piece of knowledge - it shows the beaty of my beloved maths :)

rift
Posts: 47
Joined: Tue Mar 28, 2017 9:36 pm

Re: Sequential overwatch

Postby rift » Mon Mar 19, 2018 11:07 pm

finally, no more wasted OW shots. THANK YOU! :D


Return to “XCOM: Long War General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest