Log in

View Full Version : Strategy setting


aegisx
April 16th, 2007, 03:08 PM
How do you get the AI to assign a certain strategy to a design type? Boarding Ships are assigned Optimal Firing Range (in BM), which makes them pretty useless.

aegisx
April 16th, 2007, 03:27 PM
No where in the AI files is Sys_Set_Vehicle_Design_Strategy() set. It sets the Fleet strategy with the player preference though. I am guessing it is defaulting to Optimal? If this is true, is it even possible for the AI to invade a planet or do anything else other then run or optimal firing range?

Phoenix-D
April 16th, 2007, 03:41 PM
Kwok probably just hasn't implemented that feature yet, since it was only added in the 1.33 patch.

aegisx
April 16th, 2007, 03:44 PM
Oh, I did not realize it was a new function http://forum.shrapnelgames.com/images/smilies/happy.gif

aegisx
April 16th, 2007, 04:23 PM
Success...

Adding

set bool_res :=

Sys_Set_Vehicle_Design_Strategy(sys_long_player_id ,design_id,"Capture Enemy Ships")

to the designcreation file in the function Add_Required_Components_To_Design at the case statement for Boarding Ships changes the ship strategy to Capture Enemy Ships.

There is probably a better place to put it, I just put it there because a case statement was already there and it was called.

Captain Kwok
April 16th, 2007, 04:36 PM
Yeah, it was on the v1.05 to-do list, but keeps getting pushed back. I'll improve the strategy choices for v1.07.

aegisx
April 16th, 2007, 04:40 PM
Kwok, I added a case statement to Create_Design that assigns better strategies, want me to send the function to you?

aegisx
April 16th, 2007, 05:48 PM
The next problem is the Fleet strategy overrides the ship strategy.

Phoenix-D
April 16th, 2007, 06:01 PM
That's, uh, not a problem. Its how its supposed to work.

If you want ship strategies to take effect, have the ships Break Formation.

aegisx
April 16th, 2007, 06:05 PM
The Capture Enemy Ships strategy has Break Formation Immediately set to TRUE...should that be the one that tells them to do it? Optimal Firing Range has that value set to True as well.

In order to get the Boarding Ships to work in the fleet, I had to set the Defensive Strategy to Capture Enemy Ships. Otherwise they always ran.

Phoenix-D
April 16th, 2007, 06:26 PM
Yeah, that's it.

aegisx
April 16th, 2007, 06:34 PM
Break Formation doesn't seem to work, as they both were set to True and the ships just run away.

Phoenix-D
April 16th, 2007, 07:20 PM
Are they unarmed? If a ship doesn't see anything it can hurt, it'll always run away IIRC.

aegisx
April 16th, 2007, 07:25 PM
They have PD but no weapons. Since they are using the Capture Enemy Ships strategy they should not be running.

Captain Kwok
April 16th, 2007, 07:28 PM
PD doesn't count as a weapon, so the ships will still retreat.

aegisx
April 16th, 2007, 07:44 PM
That is not what I am seeing.

A Boarding Ship (no weapons) with a Capture Enemy Ships strategy will not retreat. It attempts to capture the enemy. Works great.

If the same Boarding Ship is in a Fleet, it will always retreat UNLESS the Fleet has a Defensive strategy of Capture Enemy Ships.

aegisx
April 17th, 2007, 01:33 PM
So I am guessing this is a bug.

Captain Kwok
April 17th, 2007, 02:20 PM
Well I wouldn't call it a bug. Usually a fleet with capture ships should be set to capture. However, what happens when the fleet is set to break formation - the Boarding Ships should engage.

aegisx
April 17th, 2007, 02:23 PM
Then thats the bug, as the Boarding Ships do not engage when the fleet is set to.

Q
April 18th, 2007, 09:35 AM
What would be needed is an option in the fleet strategy like : break formation but keep fleet strategy for individual ships.
Another really annoying feature is that ships remain at the end position in the sector after combat and the next combat will start at this position. Warp point defense can be completely messed up by this. Again an option like "remain at position at end of combat" with true/false would be ideal.