Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Starman01 on April 28, 2004, 10:26:55 am

Title: Docking-Path tutorial
Post by: Starman01 on April 28, 2004, 10:26:55 am
Is there a tutorial out for docking-paths ?

I have working dockpoints (means I can connect the objects together
in FRED, and they work connected ingame). But every docking or undocking-prozess immediatly crashes the game.

I can find no error in my path-editing, so a good tutorial or
example could be helpful.
Title: Docking-Path tutorial
Post by: karajorma on April 28, 2004, 11:14:33 am
I've been meaning to put one together for a while but I've not gotten around to it yet. In the meantime have a look at this

http://www.hard-light.net/forums/index.php/topic,20035.0.html
Title: Docking-Path tutorial
Post by: Starman01 on April 28, 2004, 12:03:12 pm
Sorry, but that didn't help me.

I already know how to make paths for subsystems and fighterbays.
Because Wing Commander relied on carriers, I had more then enough
opportunities to learn pathing :). And for the rest AURORA saves most
of the modders time (except some minor corrections in position).

My problems are only docking-paths, I didn't need them before.
Theoretically they should be simple, but practically they force a
CTD.

For the details :

I have a transport and a container. Both have a dockpoint "dock01"
on the side. Each dockpoint has two points (this is just for
the correct facing of the objects when docked I guess).

For each Dockpoint there is a path called "dock01-01", and this is relied to
the parent "dock01". Each path has 3 vertices. That should do the trick.

Only thing that might be a problem, and I didn't get this correct in
the topic you mentioned, the distance between the path-vertices
are more or less short, maybe exact the size or even smaller than
the width of the transport.

But I don't think that's the problem, because then the ship would
behave strange, but right now it crashes exactly at the moment
the ships starts undocking-procedure. Normally this crash occurs
when the path isn't usable or accessable (at least by fighterbays)

I will try raising the distance between the vertices nevertheless.
Title: Docking-Path tutorial
Post by: karajorma on April 28, 2004, 12:24:21 pm
Try adding an extra vertex to the path also. I remember hearing once that dockpoints had to have 4 (I could be wrong as I only vaguely remember this).
Title: Docking-Path tutorial
Post by: Starman01 on April 28, 2004, 12:36:47 pm
Nope, still no solution. I am now using 4 vertices and also larger
distances between them, it is still crashing. Now I run out of ideas :(
Title: Docking-Path tutorial
Post by: karajorma on April 28, 2004, 01:07:59 pm
The two points on your dockpoint are 1m apart?
Title: Docking-Path tutorial
Post by: Bobboau on April 28, 2004, 01:27:04 pm
you've looked at my sig, yes?
Title: Docking-Path tutorial
Post by: JarC on April 28, 2004, 01:31:27 pm
ehmmm...amateur here...last time I did this is long ago so, from an amateur's viewpoint, this is how I understood it, as far as docking paths are concerned, they is nout more than regular waypoint paths...so you have an incoming vector to the dockpoint, the direction-changing 'sideways' vector and finaly the 'undock' vector traveling outwards, CTD occured mostly when either forgetting the sideways direction-change vector or mixing-up the directions of the vectors (as if the docking ship made an instant 180 and collides with itself, greatly confusing the engine)
Title: Docking-Path tutorial
Post by: Starman01 on April 28, 2004, 03:32:45 pm
I finally found the error. After I researched some original FS-Models
I get the idea (and now the PCS-Tutorial is also clear to me, which
it wasn't at the first time. I should have read it more carefully, an
example could be helpful also, after all this issue isn't so easy, just a
suggestion though).

I forgot to add the path directly in the dockpoint-section and I set
the parent for the path wrong. The parent of the path isn't the dock-
points name, but the syntax $dock01-01 (for the first dockpoint at the first dock)

Now at least docking and undocking works, but what the AI is doing now
isn't funny at all. It interpretates the path very strange, but that
should be solvable, now I don't need such a big path after all.

Thanks for the assistance guys.
Title: Docking-Path tutorial
Post by: Starman01 on May 04, 2004, 03:35:55 pm
Guess I spoke to soon. This AI is really stupid as bred.

After I throw all logic over board, I finally get a path working (not very
different from the others, but only two points), and now
the AI moves straight towards the right position (instead of
making 1000 meter maneuvers).

But one thing remains, that really drives me crazy.

When the AI is approaching a path-point, it uses such a high speed
(looks like even more than the max.speed of the freighter), that It
rushes over the path-point, than it stops, moving back to the point
a little slower, and then approaches the next point. :confused:
(Appears also when I use 3 or 4 path-points).

This is also happening on the last point , (but with a lower speed)
which has only a radius of 1 and is on the same position than the
real dockpoint). So the transport is going (ghostly) through the
container because it doesn't stop fast enough, than goes back to
the point, and then finally docks.

I tried setting the last point a little more distant, but this is one of
this "not logic"-issues, cause the AI ignores this change.

So is there any way to control the speed in which the different
points of the path should be approached by ? First I thought this
might be because the ships was flagged "cruiser", but after
changing it to "freighter" there was no difference.

Any help or Idea is welcome at this point :p


P.S. Sorry for the grammar, i hope it is understandable :)