XCOM 2
Improved Rocket Targeting
Nexolate 13 May, 2022 @ 3:11am
Rockets getting caught on low cover
Hey, RealityMachina. Appreciate all of the mods you've put out for XCOM 2 over the years. The game's better for it.

Like others, I've also been having problems with rockets getting caught on low cover objects. It's been bugging me for a while now, so I finally decided to actually take a look at it. Here are my thoughts:

I think the main problem here is that a lot of people, myself included, are used to XCOM Enemy Unknown's rocket aiming system. I.e. It's essentially an airburst that you can trigger anywhere you want, as long as you aren't shooting directly through a solid wall.

After looking at your source code, it seems like the reason I'm finding rockets getting caught on half cover all the time is that, unless you're shooting it directly at something, it's coded to raycast to the floor. This makes sense logically, because conventional rockets obviously aren't airburst weapons, but it makes them really awkward to aim a lot of the time in my experience. I don't tend to aim rockets directly at enemies, rather, I'll try to get it to detonate in between two or more of them to maximize the number of targets hit.

As an experiment, I hacked your targeting method class to always return a spot at chest-height. This made a noticeable improvement, in that now the AoE would track my cursor a lot more consistently, and only get hung up when trying to shoot through full cover objects, or when aiming near half cover (probably due to how the cursor was interacting with that object's collision).

Video demonstration and Pastebin with the exact hack:
https://www.youtube.com/watch?v=aWl9cXMgFeA
https://pastebin.com/MWRYAUZ6

So yeah, this probably isn't a "bug" per se, due to how rockets should work, but it is often annoying to deal with. Just thought I'd share this on the off chance you're curious and wanted to do an update. Have a good one. o/
Last edited by Nexolate; 13 May, 2022 @ 3:58am
< >
Showing 1-6 of 6 comments
SpookyJumpscare 13 Aug, 2022 @ 3:42pm 
Sorry to bug you, but I was wondering if you could explain in a bit more depth how you got this to work. I don't know anything about modding but I installed the WoTC SDK and poked around a bit; I managed to get most of Improved Rocket Targeting loaded (except for the script) and even paste in the rework you have from the paste bin, but I am pretty lost on what to do after that.

I know this is a bit more of a modding question, but the way rockets work right now make me want to throw a fit to be honest. I also want it work because I am using a few mods that in rockets so the targeting has a much larger overall impact.

Any response that I could get would be a great help, thanks! -Spooky
Nexolate 13 Aug, 2022 @ 11:44pm 
So what I did was set up a new mod project, and copied all the source files in from the Improved Rocket Targeting mod. Built it and made sure it still worked. The idea is to get a local copy of the mod that you can tinker with.

Once that was done, you just edit the file in question with the Pastebin hack. Build and test again.

If you've never done modding before, you may need to edit your AML settings to pick up non-Workshop mods. This is just pointing to your \XComGame\Mods\ directory. You'll know you're in the right place, because you should see your mod there once you've built it.
SpookyJumpscare 15 Aug, 2022 @ 12:17pm 
I've been having a non-stop error (Can't find a part of the path) when trying to build the solution. After doing a lot of looking around online I am still a little lost on why it is happening; I have double checked that my paths in the settings point to the correct folders and even went so far as to name the Solution, Project, and folders the same thing in case it was an issue with how I named them.

I don't know if it would cause an issue but I have only installed the WoTC SDK and am using that, as well as pointing to the XComGame folder in the WoTC add-on. In case it makes a difference I don't have steam in my program files.

Any extra help I could get on fixing this would be great! Thanks for your time! -Spooky
Nexolate 15 Aug, 2022 @ 11:21pm 
Start by doing a sanity check. Set up a basic project and see if you can get it to build. Make sure to follow the steps on r/xcom2mods.

I remember when I was setting it up, I had to follow the steps for Highlander integration, even if I wasn't planning on using Highlander for that mod.
zin 5 Apr, 2023 @ 2:22pm 
I’d love a new version of this mod that incorporates your fixes, if you’re able to figure it out.
Nexolate 6 Apr, 2023 @ 3:05am 
@zin I don't really have a problem with making a patched version of the mod. (Assuming I can re-familiarize myself with the modding tools that is. It's been a while.)

The problem is, it's just a very minor change to the original code, and I don't want to "steal RealityMachina's work" per se by basically just re-releasing it.
< >
Showing 1-6 of 6 comments
Per page: 1530 50