Hack request - redirect TrailOp to FollowOp
-
Another bit of a bizarre hack. In content.dll, offset 0x12904A, there is a call to DirectiveTrailOp that governs what AI do when cargo scanning a ship. For 88 Flak’s wingmen solution (stand-alone version here), I simply punched in DirectiveFollowOp in plaintext (using up one byte of 00 padding after the call) to get the following wing to use basic Follow behavior (use tradelanes, follow to the right of your ship instead of behind, etc.). However, this does not seem to be a full redirect, as they do not use the nice accurate formation following code that Follow normally uses, but instead loose following code Trail normally uses (they can end up spinning around your ship easily, etc.)
So, basically, could anyone come up with a solution to get AI using true formation following code (such as FollowOp) when scanning a target, instead of crappy trail code via TrailOp?
Thanks in advance!
-
Here’s an untested patch for content.dll that replaces Trail with Follow. It’s basically the proper way to do what you did, but I’m not sure it’s actually used, so I doubt it’ll have an effect (although if it did something for you I guess I’m wrong). The problem with directly replacing TrailOp with FollowOp is that follow has more data than trail, so problems will arise (this patch shouldn’t have that problem, but others might).
content.dll, 85D6F, 33FF897C24->E923F9FFFF
-
Thanks for looking deeper into this. Unfortunately, it causes the NPC to simply sit still upon doing the scan - I’m guessing there’s an issue of trying to pass data needed for Trail to Follow. I played around with values 0x01 through 0x09, and all of them (with 0x08 causing a crash instantly, and 0x02 causing a crash on server shutdown) created the same result. I also tried combining hacks, but nothing seemed to work.
I can’t tell for certain, but combining your earlier hack with mine seemed to make wingmen a little better at following in cruise. It might just be me though; I’ll play around with them a little more and see if anything turns up.
-
Okay, I probably should have done this with the other patch. It adjusts the offsets to work with the Follow structure, but even if it works, they might all follow at the (0,0,0) vector, so a plugin would be needed for that.
6CE24: 14->4C
875BC: 18->50
875C2: 1C->54Hopefully that’s all that’s required.