I’m not going to talk much about sphere, wall, and defensive.
Thing is, those all mostly work right in HW2. You can make scouts that stay in a sphere, stay in that formation as you move them around, and they point their gun around to shoot stuff that comes in range.
The only problem with it is that those are behaviors that are set at match load and there is no way to change them when the formation and/or tactics(stance) changes.
The bigger problem is that you can’t correctly emulate aggressive behavior with claw/line/delta/x/etc. And here’s why:
HW2 has an “AttackStyle” called “Dogfight” in the engine. It’s just virtually unused. Its not used in any of the higg/vaygr MP units.
It’s not used, probably for two reasons:
AttackRun, the style most SC use, is actually really consistent and predictable. Put 5 squads of interceptors vs each other 10 times and you get similar outcomes each time.
Dogfight, is freaking broken.
I played around with Dogfight a lot TRYING to get it to work more like HW1, because the thing is that it’s the most realistic and sensical one.
The problem with “AttackRun” is even removing out tons of randomness, things still want to spread out all over the place. Multiple squads and units eventually stop working together. They break from the flock.
With Dogfight, though, they seem to keep a flock well and rejoin the flock, even though they get out of formation position. Like some ships will slow down and speed up similar to when you give movement orders to join the rest. It makes me think it would be easier to get them to stay closer to formation positions with this if I had the source. You know, just speculating on how things are written and how easy getting things to work right would be, here.
I decided to revisit it and play with the stats some more and see what can be done with modding, and record a video to show the problem(s). @scole was considering changing some ships to dogfight earlier and I pointed out some issues that’d arise.
AttackStyleName = DogFight
Data =
{
-- when approaching the target use this method to split the formation and transition in to the attack style
howToBreakFormation = StraightAndScatter,
-- Ships will try to go no slower than this fraction of their max speed in a dogfight
minSpeedFraction = 1.0,
-- done every sim frame
RandomActions = {},
BeingAttackedActions = {},
FiringActions = {},
}
So usually the “actions” lists would include some things like jinking, looping, changing targets.
I removed all those because that randomness basically is them disobeying orders. That wasn’t something in HW1.
Now for “Evasive”, yeah it’d be nice to have random actions that make them juke and tumble around. But I was trying to get aggressive behavior working.
One of the big things here was “minSpeedFraction”
In other things using dogfight style, this is never 1.0.
This really creates problems when it’s set any lower. What happens is that one ship will slow down to stay on a slower ships tail. This creates problems because against another dogfight behavior ship, they just turning war on each other and the one on the tail can’t get its weapon on the other. Or, if it can shoot, it auto-wins the fight because it’s on their tail. Both are bad.
With it set to 1.0, they get forced to break off, which fixes many issues.
The other, is that I modified ship stats roughly like so
Kus Interceptor
NewShipType.thrusterMaxSpeed=325*0.77 --was 310*0.77
NewShipType.mainEngineMaxSpeed=325 --was 310
NewShipType.rotationMaxSpeed=87
NewShipType.thrusterAccelTime=2 --was 2.3
NewShipType.thrusterBrakeTime=2 -- was 1.1
NewShipType.mainEngineAccelTime=2 --was 2.3
NewShipType.mainEngineBrakeTime=4 --was 1.1
NewShipType.rotationAccelTime=0.75 --was 0.6
NewShipType.rotationBrakeTime=0.75 --was 0.33
NewShipType.thrusterUsage=0.35 --was 0.25
NewShipType.accelerationAngle=175 --no idea what this does
NewShipType.mirrorAngle=30 --no idea what this does
NewShipType.secondaryTurnAngle=90 --no idea what this does
So a lot of what was going on wrong here even if you used a DogFight style with 1.0 minSpeed is that they still seemed to turn on a dime which would still get ships stuck on one anothers’ tail a lot.
The big thing here is brake times being too short. Making the main engine brake time quite slow makes them overshoot and fly backwards. It takes man times longer to break than the turn around, so you get those cool flying backwards things going on.
Another was the thruster usage. It seems higher thruster usage helps them get guns on target better with dogfighting. I didn’t want to make fighters have 1.0 thruster usage though, but maybe they should.
Now this is what it looks like:
There’s two key things I forgot to point out in overlaying text on the video:
If you select some ships and give them an attack order with this DogFight attack style, they seem to be good about grouping themselves up.
They do split up after passing over a target they’re attacking, but that happened in HW1 as well(albeit in a more predictable spline like manner…). Like the part where a big x crosses into some interceptors than fans out behind them, criss crossing to either side, is fairly cool.
The other thing is that this both makes microing ships far more effective, but it also introduces a lot more randomness to the outcomes since groups of ships can randomly get locked into patterns where they never attack.
Now, to point out more of the problems and what needs changed/added to make this really work(because currently, just giving all the strikecraft ships that attack type will create more issues than fixes I think).
I mentioned some in the sticky, but now that I’ve played with it more and have a better understanding and have thought about it more, it bares going over again:
They have WAY too much of a one track mind of keeping the gun on target and just end up doing a bad job of that.
Once they pass a target, they’re just immediately trying to spin around to attack again.
Perhaps some sort of check that their target ship isn’t in the 180 degree hemisphere ahead of them anymore and to have a variable for how long they’ll keep flying straight after a ship is no longer in that hemisphere before they try to put gun on target again? That way after intersecting head on, they’ll keep going a little before turning back around. This will create jousts depending on the arguments given.
The other problem is when ships go into each other, then just by chance they decide to both turn the same way on the same axis.
Then they wind up in far away turning wars where they can’t get their gun on the target on one another. And they just… don’t give up and break off or try something else.
There should be some sort of argument where if dogfighting ships are within some distance of a target, yet have been unable to shoot for a given duration, that they can be ordered to do something else like reverse their turning direction, or to do a half loop.
Then there’s the lack of functionality and arguments to support “Evasive” tactics. You can’t make dogfight ships protect one another. There should be a way to have the closest ship in a group to one that is being attacked change its target to the one shooting its ally.
There are “RandomActions” and “FiringActions” etc but these things are useless here. Especially since the “ChangeTarget” function/flag just makes them change to a random target and not the one attacking their ally.
Not sure how to really close this out. But there you go.
Oh, and about the light corvs thing, I was working on giving them more HW1 like stats than I currently had, balancing them around a 2.7s attack interval. So I gave them 50% more accuracy and damage. Well somehow this 50% increase of damage and accuracy while making their attack speed almost 3x slower(so really it’s a DPS decrease on paper) made them like 3x stronger.
Accuracy just seems to get calculated in a really really screwy way. 40% accuracy vs fighters seems to make something like 4 or 5x more accurate against fighters than 27% does.