Solving the Support Frigate Issue via Custom Script?

Perhaps the most groundbreaking new modding feature in Homeworld Remastered is the ability to create custom scripts. An example of this is found in the Kushan Drone Frigate.

addAbility(NewShipType,"CustomCommand",1,"Drones",1,0,1000,200,0.25,2,0,"data:Ship/Kus_DroneFrigate/Kus_DroneFrigate.lua","Start_DroneFrigate","Do_DroneFrigate","Finish_DroneFrigate","Kus_DroneFrigate",1.15,2,1) addCustomCode(NewShipType,"data:Ship/Kus_DroneFrigate/Kus_DroneFrigate.lua","","Create_DroneFrigate","Update_DroneFrigate","Destroy_DroneFrigate","Kus_DroneFrigate",1.15)

I’m far from an expert here and have next to no coding skills, but it seems like this sort of function should be useable in doing things such as solving the support frigate heal beam. Anyone spent any time looking into it yet?

I took a quick look at this.
It’s useful for making new abilities, but at the end of the day you only have access to the usual gamerule functions near as I can tell (feel free to chime in Gearbox).

You could butcher the support frigate then rebuild it and have it heal things through lua script, but it’s probably not the best way to fix the problem, and it certainly wouldn’t be the fast method using lua.
You are able to do the same with an ordinary gamerule/mission script that just runs through all the support frigates looking for targets to heal. The customcommand/addcustomcode functionality primarily seems to be aimed at giving modders and developers the ability to link luascripts to buttons quickly which is still very handy.

I’m sure everyone can agree the real fix lays in the hands of Gearbox implementing the support frigate functionality properly. Worst comes to worst it’s not hard to fix through script but it’ll come at a performance price.

Currently looking at ways to use this feature to add HW1 style tactics and/or formation behaviors. Right now I’m less worried about performance and more about obtaining the result.

That should be doable by issuing orders, but as I said, the performance will be abysmal. Support frigates might be viable through this method but I think formations would really be pushing it. Once you have 100 strikecraft involved you’ll have saturated the cpu.
If you’re dead set on doing it I suggest you make strong usage of coroutine(doesn’t exist in lua 4?)/processing distribution so it doesn’t cause stalling while managing the formation.

All that said, if you need to change the movement style of ships in realtime I’m not entirely sure it’s possible to alter; I don’t think the customcommand/addcustomcode has access to it’s own parent :frowning:

Yeah thats the jist of what iv been running into. I’m trying to come up with a method to even do it then try to streamline from there.