Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Killfrenzy on January 10, 2004, 06:12:25 am

Title: I need some pathing help
Post by: Killfrenzy on January 10, 2004, 06:12:25 am
This is a general plea to anyone who knows what they're doing! :D

I'd like someone to create a launch bay on the Cylon Base Star essentially.

I'll send the volunteer the model and textures. :)
Title: I need some pathing help
Post by: diamondgeezer on January 10, 2004, 01:49:07 pm
Oh crikey. I would, but I've never dared attempt to path a fighter bay before.
Title: I need some pathing help
Post by: Killfrenzy on January 10, 2004, 02:14:06 pm
Oh....You don't even want to have a go? :D
Title: I need some pathing help
Post by: diamondgeezer on January 10, 2004, 02:23:48 pm
Bleah.. you won't get it over night you realise, even if I can work it out...
Title: I need some pathing help
Post by: magatsu1 on January 10, 2004, 02:29:14 pm
I'll have a pop, though like DG, I'm not 100% sure about it.
Title: I need some pathing help
Post by: Killfrenzy on January 10, 2004, 04:03:02 pm
Ah, but at least you know something about it! :D

What's your email addy?
Title: I need some pathing help
Post by: magatsu1 on January 10, 2004, 05:14:29 pm
uh, not an awful lot like....
Check your inbox.:)
Title: I need some pathing help
Post by: diamondgeezer on January 10, 2004, 05:17:02 pm
w00t, I'm free! :D
Title: I need some pathing help
Post by: Killfrenzy on January 10, 2004, 06:08:49 pm
Hehe - you say that now! :D
Title: I need some pathing help
Post by: Whitelight on January 10, 2004, 07:04:25 pm
Fightrbay paths aren`t that bad, just takes a lot more time to place than do say 4 turret paths.. Just add 3 more verts for each fighterbay path.

Docking paths are simular to fighterbay paths, but can be a headache at times to implament...
Title: I need some pathing help
Post by: Killfrenzy on January 10, 2004, 09:19:25 pm
Well, seeing as I don't know how ANY of them work.....:D
Title: I need some pathing help
Post by: diamondgeezer on January 11, 2004, 12:40:21 am
Well it's not to hard in theory. You enter the co-ords for your dockpoint (for example) then assign a path to it. You give the path four vertices (usually). The first vert is, like, a kilometer out. The second is, say, 500m out, the third 250m out and the fourth is on the dockpoint. The idea is that the docker follows the path down to the dockpoint, with a radius for each vert deciding which vert the docker will start at (the radius gets bigger as the verts move farther out).

To make your docker line up in a certain way, you need to add a second point to the dock. Have a look at some V models to see how this works.

To determine co-ords for stuff, I make a new subsys in ModelView and move it about until it's where I want the dockpoint or path vert then simply read off the co-ord numbers. There are other ways of doing this, and Bob's Aurora theoretically makes paths for you.

The trick is to make the distances between vertices big enough for bigger transports. The reason the Argo often ****s up when docking with V ships is that the final vertice before the dockpoint is less than an Argo-length away from the dock. This is becuase many ships were pathed with the old Elysium in mind. Fact.

And that is the sum of my knowledge of pathing. Ph34r.
Title: I need some pathing help
Post by: karajorma on January 11, 2004, 07:06:08 am
Nicely put DG. Couldn't have explained it better myself :)
Title: I need some pathing help
Post by: magatsu1 on January 11, 2004, 08:10:14 am
*sees the POF. after recieving mail*

*wounders what he's gotten himself into*

:shaking:

Bob's PCS walkthrough is good aswell.
Title: I need some pathing help
Post by: Killfrenzy on January 11, 2004, 08:35:22 am
Try flying against the ruddy thing! :D

Anyway DG, what I gather is a dockpoint path for a fighter bay is like this:

Code: [Select]

DOCK                      Vert 2
+------------------------+
Vert 1                         \
                                    \
                                     \
                                      \
                                       + Vert 3
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        + Vert 4



Thus creating a path for a fighter when it 'arrives' via the fighterbay. The more paths you have, the more fighters can be launched at any one time.

Have I understood?
Title: I need some pathing help
Post by: diamondgeezer on January 11, 2004, 09:17:29 am
I guess. Look at an Orion  - it launches fighters in pairs IIRC, so it ought to have two paths assigned to its fighter bay... sooner or later I'm going to have to figure this out for my UEF carrier...
Title: I need some pathing help
Post by: karajorma on January 11, 2004, 12:47:17 pm
I've never actually tried making a fighterbay path but I assume it's like all the others so here's a little visual guide to help people understand paths I knocked up in TS.

(http://homepage.ntlworld.com/karajorma/freespace/FAQ-Images/Modding-Tutorial/Paths-FighterBays.jpg)

Basically that is all a path is. A series of two or more (upto 4) spheres. Each sphere is described by a point in space and a radius. When a ship launches, attacks a turret or subsystem or attempts to dock it will follow a path to the desired subsytem.

In the picture above the fighter would first try to get itself inside the blue sphere. Once it was inside it would then attempt to move inside the green, then yellow and finally red spheres.

That's pretty much all there is to it. As DG said with docking paths you have to make sure that the final sphere is far away enough from the ship that an Argo doesn't have to stick it's nose inside another model to reach it but apart from that everything else shouldn't be too hard.

EDIT : BTW these paths are nothing like that on a real orion. The red sphere should be inside the docking bay (so that fighters actually end up there) and the blue sphere further away. But it should get the point across.
Title: I need some pathing help
Post by: aldo_14 on January 11, 2004, 12:59:05 pm
Yup.  I normally view it as a 'cone' increasing from the outwards point.  If you're familiar with the idea of 'air corridors' used for landing passenger jets it helps-  IMO that's a perfect analogy.
Title: I need some pathing help
Post by: magatsu1 on January 11, 2004, 01:02:28 pm
I'm curious aout a couple of details myself. The Orion actually has 4 paths for just the one bay, thoughas DG said fighters launch 2x2. Not sure why that is.

Also, does a bay haved to have that many paths, and does a path haved to have 5 points ?
Title: I need some pathing help
Post by: aldo_14 on January 11, 2004, 01:36:09 pm
Actually, I'm sure fighters launch 4 at a time, but the player starts a bit behind because of the starting speed..... I remember it clearly on the Segomo(?) carrier I did years ago.  so yeah, 4 paths - any less cause collisions as 2 ships try to use the samne path.  

Arguably 6, because enemy wings can have up to 6 ships - although I'm not sure about this.

And no, you don;t need 5 points.  You can actually get by with 1...not that i'd recommend it.  The only real point of paths is to stop the fighters moving of their won free will and flying straight into the hulls of the capship...... basically, all it does is follow points till the last one, regardles sof how many. I think I've done ships with paths using only 2 points.
Title: I need some pathing help
Post by: karajorma on January 11, 2004, 01:44:22 pm
You can usually get away with 2 points unless you have to drag the fighters around some sort of complicated geometry (Like having a wall next to the launch bay on the Orion! :D )

Thinking of the points as a cone is pretty much how I think of it but the picture is harder to do as a cone :D
Title: I need some pathing help
Post by: magatsu1 on January 11, 2004, 01:49:55 pm
actually I've managed with 4. I was just curious if the AI always looked for the final path but if that's not an issue looks like I'm ok.
Title: I need some pathing help
Post by: diamondgeezer on January 11, 2004, 10:13:03 pm
It's something of an arcane science this pathing buisness. Experimentation is probably your best bet :)
Title: I need some pathing help
Post by: StratComm on January 11, 2004, 10:40:30 pm
The basic gist of it is that the AI will follow a path until it reaches it's conclusion.  Turret and subsystem paths are relatively simple, as they basically just provide an approach vector for AI attacking the associated turret/subsystem.  Fighterbay paths are one step more complex, in that they have to be called "$BayXX" to work IIRC.  Lastly, there are docking paths.  I will state that all paths work with one vertex, and work sufficiently with 2.  The only reasons to add more are to either add some manuvering to the launch/land sequence on your hanger-equiped ship, or to make docking work.  Almost all dock paths have 4 points, because they are used for something like approach from 1-2, rotate  into correct alignment from 2-3, move into position from points 3-4.  Once the dock path is run, the docking ship will simply follow the shortest line between the last vertex point and the first associated dockpoint.  That's the arcane science of pathing, pure and simple.

Simply put, having too many or too few points in a given path should not crash the game (ok, 0 points can, but 1+ should not) but can cause some really screwball behavior when fighters try to run them.

Also, for turret and subsystem paths, the autopath function on Aurora is usually perfectly acceptable.  It's the other paths that you have to worry about.

EDIT: as aldo said, it really depends on how complex the geometry is around a specific path as to how many points you need.  I've used anywhere from 2 to 6 points in pathing my caps, but I generally stick to 4 because it usually happens to work out that way.  The biggest catch is figuring out which way the paths need to be ordered, as having them backwards creates some, well,  interesting results.
Title: I need some pathing help
Post by: Killfrenzy on January 12, 2004, 08:45:40 am
This is all starting to make sense now! :D

I'll try out the theory on the only hangar-equipped ship I've made to date: The Senshi class Heavy Cruiser of the Karran Imperium. :)
Title: I need some pathing help
Post by: IPAndrews on January 12, 2004, 09:00:59 am
Killfrenzy Sir. Why didn't you just as me? :) You did tell them it has 10 launch bays right? All of them off the normal axis? Oh well. At least we got to see Karajorma's cool diagram. Never before has a load of balls been so helpful.

If you're intent on doing it yourself bear in mind that if you have one set of co-ords you can use Sin and Cos to rotate the co-ords around the centre of the basestar by 72o intervals to get the paths for the other 4 fighterbays on a disc. Then you can negate the Y coord for the 5 paths you have to generate the paths for the other disc.

If you can code, write a program, save yourself time.
Title: I need some pathing help
Post by: Killfrenzy on January 12, 2004, 06:24:06 pm
I can't code yet! :D

Anyways, Magatsu1's dealing with it. :)
Title: I need some pathing help
Post by: magatsu1 on January 13, 2004, 12:40:26 pm
Not any more.
The pratice was useful though.
Title: I need some pathing help
Post by: Killfrenzy on January 13, 2004, 03:15:16 pm
*Raises eyebrow* Eh? You fobbed it off onto Ian? :D
Title: I need some pathing help
Post by: magatsu1 on January 13, 2004, 03:26:31 pm
I quote:

"w00t! I'm free!"

He says he can do it in less than half the time (or better...maybe) so he took over.

Damn him and his trig!!
Title: I need some pathing help
Post by: karajorma on January 13, 2004, 05:00:27 pm
Quote
Originally posted by IPAndrews
Killfrenzy Sir. Why didn't you just as me? :) You did tell them it has 10 launch bays right? All of them off the normal axis? Oh well. At least we got to see Karajorma's cool diagram. Never before has a load of balls been so helpful.


The thing is that paths are treated as some sort of arcane mystery by most newbies to modding but they are actually reasonably simple to grasp :)

I'll have to turn that picture and explainations on this thread into a Wiki page at some point.
Title: I need some pathing help
Post by: IPAndrews on January 14, 2004, 05:43:13 am
Quote
Originally posted by karajorma
they are actually reasonably simple to grasp :)


I have to say I found them easy enough to work out. Getting everything named correctly on the other hand, that was another matter.
Title: I need some pathing help
Post by: karajorma on January 14, 2004, 01:27:08 pm
Yeah. That's a little tricky but to hear people talk it sounds like pathing is a black art that only a few people could ever understand :D
Title: I need some pathing help
Post by: Killfrenzy on January 14, 2004, 04:17:44 pm
:p
Title: I need some pathing help
Post by: Spicious on January 14, 2004, 06:11:43 pm
Quote
Originally posted by karajorma
Yeah. That's a little tricky but to hear people talk it sounds like pathing is a black art that only a few people could ever understand :D
But it is a black art. It just happens to be rather easy too. :p
Title: I need some pathing help
Post by: magatsu1 on January 15, 2004, 01:05:49 pm
sssshhhhh! don't tell everyone.
Title: I need some pathing help
Post by: Flipside on January 15, 2004, 01:40:00 pm
Can I just say thanks for that info, Pathing is one part of modding I haven't taken on because of that 'Black Art' feeling. It explains a couple of problems I've been having and has de-mystified it for me :)

Nice one!

Wikitize!
Title: I need some pathing help
Post by: Killfrenzy on January 15, 2004, 03:25:18 pm
Shouldn't someone add all the good pathing guides to the Wiki?
Title: I need some pathing help
Post by: CP5670 on January 15, 2004, 03:47:56 pm
lol, everyone here had given me the impression that the paths section was really messy stuff so I stayed away from it until a few months ago, but it indeed turned out to be very simple.

In contrast, I have been told (long ago) that the insignia section is fairly simple, but that is the one pof chunk that I'm having trouble figuring out. :p Is it even possible to add in one of these using PCS alone?
Title: I need some pathing help
Post by: Killfrenzy on January 15, 2004, 03:52:41 pm
I get away with having only one type of insignia - faction insignia as part of the textures! :D
Title: I need some pathing help
Post by: Spicious on January 15, 2004, 04:02:11 pm
Quote
Originally posted by CP5670
In contrast, I have been told (long ago) that the insignia section is fairly simple, but that is the one pof chunk that I'm having trouble figuring out. :p Is it even possible to add in one of these using PCS alone?
Yes it is possible. Although it is much easier to put insignia on a flat surface.