Fixing the Dawg -- How to tell if gate is destroyed?

I’m learning scripting by fixing some things I consider bugs in HW1RM/Mission13 (the junkyard). These are also bugs in HW1 classic, and once I figure it all out, I may try to correct them there as well if that is possible.

I have one fix for a problem where he gets stuck with a bone without dropping it in the Watch_Mission13_JYDTeam_DumpGateX state. This is causes by command not going to idle, “solved” with a timeout after which he drops it where ever it is. A better fix might be to understand why it doesn’t get to command_idle. Ideas on that?

Now I would like to address the issue of his getting stuck when gates are destroyed after they have been selected.

How in code would I learn that a gate has been destroyed? In the .level, I see GATETeleportOutPointX definitions, and TeleportTriggerX boxes, but I don’t see anything that directly identifies the gate objects and their lifecycles.

I suppose I could reuse the stuck timer and just have him SobGroup_MoveToPoint(wherever) the slow way whenever that happens, but that feels as expedient and arguably wrong as the drop timer.

If this all can be made to work, I am also inclined to have the dog resurrect after some time. There’s no reason the automata there couldn’'t make another

Hints or suggestions?

Is is possible to patch HW1C missionX.lua files?

(Thanks to Magitex for hand holding to date!)

Of course, I still have absolutely no idea what this mission entails so I may be barking up the wrong tree. The whole time I’ve been unable to figure out if you were joking about a dog or not…

Add the gate to a sobgroup and continue to check its health with SobGroup_HealthPercentage. If it doesn’t die like ordinary things, i.e teleport, create a volume where the gate resides:
And use this to check if the gate is still there.

If you cannot identify the gate, try printing the contents of a volume that captures the gate and you should learn its ID… alternatively check the ship files from the HW1 campaign file for the gate (I’m assuming it’s a ship).

It sounds theoretically possible, bearing in mind you will have to recreate necessary variables for it, if it doesn’t automatically function as a … dog.

This is far outside of my knowledge, but probably not. I was about to say yes, but HW1C doesn’t use Lua! It’s hardcoded and that’s why Gearbox had so much trouble porting it as they had to rewrite everything.
You could however fix it in the SDL source, assuming it contains it. You can google it and with a bit of luck get access, I suspect you’ll need a couple decades of C experience to get anywhere though :wink:
Edit: Unless you were intending to refer to HWRM remastered version (not classic!), in which case yes.