Page 1 of 1

Sequential overwatch

Posted: Thu Jan 04, 2018 11:03 am
by szmind
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.

Re: Sequential overwatch

Posted: Mon Jan 08, 2018 6:49 pm
by szmind
https://www.nexusmods.com/xcom/mods/704

Edit: That is fully operational by now - working with seekers, drop-down reinforcements, whatever.

Re: Sequential overwatch

Posted: Thu Jan 11, 2018 7:48 pm
by johnnylump
Applause. Here's the tool we used to change function sizes:

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

Re: Sequential overwatch

Posted: Mon Jan 15, 2018 11:09 am
by szmind
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?

Re: Sequential overwatch

Posted: Mon Jan 15, 2018 5:30 pm
by johnnylump
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.

Re: Sequential overwatch

Posted: Mon Jan 15, 2018 7:18 pm
by Amineri
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.

Re: Sequential overwatch

Posted: Tue Jan 16, 2018 2:33 pm
by szmind
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 :)

Re: Sequential overwatch

Posted: Mon Mar 19, 2018 11:07 pm
by rift
finally, no more wasted OW shots. THANK YOU! :D