Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Vertigo 7 on August 11, 2008, 01:03:10 am

Title: AI docking
Post by: Vertigo 7 on August 11, 2008, 01:03:10 am
ok i've got a good one for ya...

I'm using trashman's orion mk2 which has a docking point on the port side by the fighter bay. I want it to dock with a station but it appears i can only give docking orders to freighters (either with SEXP's or initial orders).  Anyone know a work around for this?
Title: Re: AI docking
Post by: Droid803 on August 11, 2008, 01:07:26 am
add a freighter flag to the table entry, or replace the "capital" flag with "freighter".
I think that'll work. (though some other things might break)
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 01:09:24 am
yeah i'm playing around with that. what exactly does the capital flag do?
Title: Re: AI docking
Post by: Droid803 on August 11, 2008, 01:15:22 am
I think it sets AI behavior, as in, what orders it can receive, and how it carries them out.
Title: Re: AI docking
Post by: WMCoolmon on August 11, 2008, 02:17:22 am
http://www.hard-light.net/wiki/index.php/Objecttypes.tbl#.2BValid_Goals:

See "+Valid Goals:". You'll probably need to add a "+Active docks:" as well.
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 02:47:38 am
lol i was just about to post that my freighter flag was making my destroyer act retarded. i think you may have found the solution! thanks =D
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 03:23:46 am
its not working =/

i created an orion-obt.tbm with:

Code: [Select]
#Ship Types
$Name: capital
$AI:
   +Valid goals: ( "dock" undock" )
   +Active docks:       ( "generic" )
#End


its allowing me to give dock orders via fred which is really all i want but the ship heads towards the docking point and just keeps going. i donno what i'm missing here... i looked at the table entries for freighters and really can't see anything that is different between the two
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 03:53:07 am
i corrected my missing quotation mark and also changed the table with

Code: [Select]
#Ship Types
$Name: capital
$AI:
   +Valid goals: ( "dock" "undock" )
   +Active docks:       ( "support" "cargo" "generic" )
   +Passive docks:      ( "support" "cargo" "generic" )
#End

it still doesn't work. ive tried a few variations of the above with out the passive docks and still no joy.
Title: Re: AI docking
Post by: Snail on August 11, 2008, 04:18:27 am
You need to modify the model's paths I believe, since destroyers are only designed to be the dockee ship, not the docker. I might be wrong though (probably am).
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 04:51:42 am
i tried that. no joy. the dock paths didn't match up with the vertexes but i fixed that, still didn't change anything.  However, i did pull up a freighter and i noticed the vertex path on the docking point, all of the points have an overlapping radius with each other. would that make a difference?
Title: Re: AI docking
Post by: WMCoolmon on August 11, 2008, 07:49:37 pm
Does the Destroyer line up correctly to dock?

It's hard for me to say since I don't know of anybody who's done/tried this before. :)
Title: Re: AI docking
Post by: Vertigo 7 on August 11, 2008, 08:51:31 pm
well ok, i was being impatient with the docking i suppose. It did eventually dock but it went way out of the way to do it. I did some fiddeling with the paths on both moddels but it didn't change anything. Oh and when it did dock, it was way out of alignment.

I tested it with a freighter on a different docking point and it seemed like it did what it was supposed to do. The freighter aligned itself with the docking path and was sort of "sucked" in to it for lack of better terms.

origionally the docking paths looked something like this...

[station]o-------o------------O            O----------o---------o[ship] and i changed them so that the inside edge of the vertex all lined up with each other like the freighter has but it didn't affect its behavior any =/