Members | Sign In
All Forums > Mission Scripting
avatar

Allied ships

posted Jun 08, 2011 22:51:03 by Vorus
I'm trying to make a mission where you have an allied fleet with you. I've worked out most of the kinks I've encountered, except for a couple:

1) Pathing. When you assign your allies to head to a point or target, they have the problem of fleet formations. With enemy fleets, this can be resolved by assigning each ship a different fleetNumber. However, this doesn't seem to work with allied ships. Is it because they are neutral? Is there a way around this?

2) Fleet combat. I can assign them targets, and I can assign the enemy ships to targets in my fleet. However, when the allied ships destroy their targets, they just head off into space. I can still direct them by COMMS, of course, but telling them to attack the nearest enemy doesn't work, they always say that there are no enemies nearby, regardless of how close they are to an enemy ship. Any ideas on how to fix this, other than a giant nested if statement for selecting secondary, tertiary, etc targets?
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
page   1
2 replies
avatar
Mike_Substelny said Jun 09, 2011 20:16:18
What's your problem with pathing? Can't you just point allied ships in a direction and say "go?"

I don't know the answer to your fleet combat question, Vorus, but I sympathize. The AI for allied warships sometimes takes me by surprise. If you turn them toward an enemy they will usually head that way until an enemy engages them. But once they defeat their targets they seem to turn in random directions and run.

Based on the procedurally generated scenarios, my guess is that the destroyer AI is meant to operate them as independent patrol ships. They were not intended to coordinate as a fleet. It's too bad the mission scripts don't allow multiple bridges in the same game (yet). A few player controlled flagships could direct a pretty large fleet in a glorious battle.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
Vorus said Jun 09, 2011 23:23:43
What's your problem with pathing? Can't you just point allied ships in a direction and say "go?"

Well, if they're off by themselves, that does seem to work fine, yes. But when they get close together, they start to act funny. I don't know if it's just a matter of the game trying to keep them spaced out, or if they are actually trying to get into a formation, or what, but the lead ships often peel off and seem to try to get to the back of the formation. (Maybe they think they are geese?) And then the whole formation kind of falls apart and the ships fall into a pattern of trying to get behind each other.

But then again, I'm working on missions for our mod, so I'm not working with just stock ships. So that might be affecting my results.

I don't know how other scripters are doing it, but I have a VERY rudimentary way of keeping them fighting after their first target is taken out. It's sloppy and looking at it makes me cringe, but they stay in the fight for at least two or three targets now. Coupled with my little "faux warp drive" that I give the allies to get them in position, it makes long-distance fleet combat at least possible. And it sure does look cool.
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
Login below to reply: