I am kind of new to modding but would like to play around with some ideas. I know how to mod a unit so that it does not lead a target. How can I set LeadTarget when the unit has ground fire mode selected? I couldn't find the commands I need in the LUA documentation so is it even possible to do it this way?
No - leading a target implies just that - a target. Ground fire is firing at NO target.
When I say ground fire, I mean the fire mode, not the action. There are 3 modes. Return fire, ground fire and hold fire.