Autodock script

This is a basic autodock script for HW2RM: fighters and corvette with damage > 0.5 dock with the closest carrier. At least that is what they’re suposed to do.

If you could help testing it and report any bug/issues, that would be great. Suggestions are welcome.

3 Likes

Finally. This should have been in the game by default.

Well done making it for GB.

Thanks, but give to Caesar what is Caesar’s. :wink: GBX added a lua function that is meant for this or similar repair routines. So now it takes 4 lines of script to do in HWRM what required a whole lot more in HW2C.

1 Like

I’m wondering if this makes more sense as a ship.lua using SobGroup_FillProximitySobGroup() and SobGroup_UnderAttack()

That way ships don’t get as murdered while dock queing

1 Like

That is an interesting idea. There are pros and cons:

  • If you put an autodock routine in the ship files, it will always be there and running. If you put it in the game rule, you can play with or without them; it is also possible to enable/disable it during a game by binding the routine to a key.

  • You can set a maximum distance to carrier in either game rule or the ship files.

  • If you want to add specific conditions for the squadron such as being under attack, using ship files look best.

I doubt a distance check would really solve dock queing. But it is possible to stop docking orders to the carriers that are too busy.