CattailNu
Registered:1430055149 Posts: 78
Posted 1447121724
Reply with quote
#1
What's the best way to make a small fleet of enemy ships hang out at their own station (enemy station) and then attack any neutral / player that comes near it? Point throttle/defend work? Guard station? Or 2 ai stacks, one point throttle, and then another when the player gets within range to attack? v. 2.1.1. - T
Arrew
Registered:1393602597 Posts: 2,750
Posted 1447127312
Reply with quote
#2
I just used to clear their AI stack and set them to zero throttle/top speed.
Then make an event so that when a player ship is close enough you program in the desired AI/Throttle/Top Speed.
For neutrals just add name your neutrals and then add in an event as you would the player ship above.
Does that help? There are other ways, such as using a target throttle?point AI command to keep them near the station.
ryleyra
Registered:1399599588 Posts: 3,214
Posted 1447129419
Reply with quote
#3
It isn't very clear, but the Defend command does not effect enemy ships. It is used by friendly ships to determine the radius at which it will attack an enemy if given a command by Comms to defend a target. Point_throttle should work, and then Chase_player that gets within a certain range. Chase_player will take precedence unless no player is in range, and then Point_throttle should take over. Chase_anger would make the enemy ignore an friendly ship unless directly attacked. But you probably want the ship to defend the base, so Chase_player is the better choice.
Fish Evans
Registered:1381528881 Posts: 383
Posted 1447252692
· Edited
Reply with quote
#4
Excert form the TSN Sandbox:<clear_ai use_gm_selection="" /> <add_ai type="CHASE_PLAYER" use_gm_selection="" /> <add_ai type="CHASE_STATION" use_gm_selection="" value1="100000" /> <add_ai value="0.0" type="GUARD_STATION" value1="20" use_gm_selection="" /> <add_ai type="CHASE_PLAYER" value1="6000" value2="4000" use_gm_selection="" /> <add_ai type="CHASE_PLAYER" value1="1000" value2="1000" use_gm_selection="" /> <add_ai type="CHASE_ANGER" use_gm_selection="" /> <add_ai type="LEADER_LEADS" use_gm_selection="" /> <add_ai type="FOLLOW_LEADER" use_gm_selection="" /> <add_ai type="AVOID_BLACK_HOLE" value1="3000" use_gm_selection="" /> The Key being this line <add_ai value="0.0" type="GUARD_STATION" value1="20" use_gm_selection="" /> It needs to be placed fairly early in the stack, as when it activates (periodicaly based on Value1 it seem) it orders the ships back to the nearest station of the same side. and there for would make them break off the attack of a player midwayitf it was lower in the stack. The Guard Station means that the enemys will tend to lean towards what ever direction the player approches from rather then sitting still , it also means you dont have to define a target for each to go to , it will continue to guard stations, and if you destroy the station it will try and find the next station to go guard
ryleyra
Registered:1399599588 Posts: 3,214
Posted 1447258095
Reply with quote
#5
Excellent. I suspect that's exactly what I'm needing for my mission, too.
locqust
Registered:1421078831 Posts: 70
Posted 1447271760
Reply with quote
#6
So "use gm selection" in this case acts as a catch all target?
Fish Evans
Registered:1381528881 Posts: 383
Posted 1447286351
Reply with quote
#7
Use GM selection means it acts on the ship currently selected in by the Game Master console. for a specific ship in a non GM controled Mission you would replace use_gm_selection="" with name="234" to act on the ship with name 234
CattailNu
Registered:1430055149 Posts: 78
Posted 1447291047
· Edited
Reply with quote
#8
Thank you for the replies! Slight bump in dev due to the Mission Editor erroring on Guard Station. (edit: github apparently has this fixed) My copy of TSN sandbox does not have value = "0.0" which the documentation suggests isn't valid. Obscure value1 as "frequency of command being obeyed", but good to know. I'm currently going to add your suggestions with <set_object_property property="eliteAIType" value="1" name="W028" /> with a "fleet" directed to stay at the desired station,with a toggle to attack the player ship if it gets too close. I imagine I'll play with a few things before settling in on the closest desired result. - T
Arrew
Registered:1393602597 Posts: 2,750
Posted 1447295288
Reply with quote
#9
I thought the Guard Station command was bugged and wasn't functioning in scripted events?
Fish Evans
Registered:1381528881 Posts: 383
Posted 1447335142
· Edited
Reply with quote
#10
Works fine if it didnt the Deep strike/Boarder missions would be .. interesting. Its the mission editor that was bugged. and yes the Git-Hub version works fine - thanks Alice/Gomeric!Quote:
My copy of TSN sandbox does not have value = "0.0" which the documentation suggests isn't valid.
actually thats strange if you copy the statement out of the Mission editor it gives you what I quoted, but saves it with out the value="0.0" to the xml. Probably has something to do with the pria crash bug. the frequency of command being obeyed is semi tested speculation. if you set it to 1 the ships seem to sit on the station, if you set it to 10000 they never go to the station (or it might be the other way around) I know for a fact what ever it is its not in seconds. or if it is there is also a random element added in as well.
Xavier Wise
Registered:1375817447 Posts: 1,362
Posted 1447341864
Reply with quote
#11
Perhaps it is the distance they must maintain from the station? To test, set it in 500 unit increments for different ships.
__________________ Fleet Captain Xavier Wise - TSN SabreLink to TSN RP Community Website Want to follow development of the TSN Sandbox? Head here:https://ko-fi.com/xavierwise