Author Topic: Autopilot  (Read 2313 times)

0 Members and 1 Guest are viewing this topic.

Offline SL1

  • 26
Is there a walkthrough somewhere that takes you through every step of making a mission with WCS-style autopilot?

I've gone through the WCS tutorial a few times, but it just has you change things in the template mission and doesn't really explain how to set things up yourself. Also, WCS's template isn't much use if you want to make something in regular FS2. I also tried this tutorial: https://wiki.hard-light.net/index.php/Tutorial_-_Autopilot_missions. I was able to set up the waypoints, but the autopilot isn't working. Not only am I not getting a flyby scene, but my ship flies in random directions instead of toward the waypoint. Obviously I'm doing something wrong, but I don't know where to find out what that is.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Aside from that wiki article, I don't think there is.

Admiral Nelson has a lot of experience fixing autopilot for Wing Commander Saga, so try asking him.

  
Can't tell about WCS as I never played that, but using a player-use-ai SEXP and adding a goal should work.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Didn’t they add this feature for WCS then ditch it entirely in favor of another solution?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Yep. The flyby stuff is hand coded if I remember correctly. I don't know if anyone is using the actual autopilot features in the code.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline SL1

  • 26
Didn’t they add this feature for WCS then ditch it entirely in favor of another solution?

Yep. The flyby stuff is hand coded if I remember correctly. I don't know if anyone is using the actual autopilot features in the code.

Well, WCS (including WCS for FSO) obviously uses it, and I remember seeing it used once or twice in Aftermath Reboot and an older mod called Twist of Fate. So it can be done in regular FS2 somehow.

 
Can't tell about WCS as I never played that, but using a player-use-ai SEXP and adding a goal should work.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Can't tell about WCS as I never played that, but using a player-use-ai SEXP and adding a goal should work.

That procedure is different from the Autopilot procedure.  There are a certain number of settings and sexps that must be configured.

@SL1, if you can't get ahold of Admiral Nelson, then I recommend just opening a mission in FRED and reverse-engineering it.  That's how many of us figured out how to use the less-well-documented features.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Well, WCS (including WCS for FSO) obviously uses it, and I remember seeing it used once or twice in Aftermath Reboot and an older mod called Twist of Fate. So it can be done in regular FS2 somehow.

I think there is some confusion going on here about Battuta and my replies. It's also been many years since I played WCS so I might be misremembering something. Basically there are two ways to achieve an autopilot effect in FS2_Open.

1) Fake an autopilot effect. Basically you have the player choose nav points etc and then when they click activate the game plays an in-game cutscene that was handcrafted in FRED by the mission designer. While that is playing, the player and any ships that are in their group are teleported to near the nav point using SEXPs.
2) Use the built in autopilot tools. When you hit activate the AI will take over the ship and you and any grouped ships will form up and fly in the direction of the nav point. The game will then activate a time dilation effect and speed up until the player is close and then slowly move back down to normal speed.

The WCS requested built in tools which were coded in by Kazan if I remember correctly. However, they later switched over to method 1) and largely ignored the built in tools, presumably because the flyby animations when activating autopilot are more Wing Commander in style.

If you want to make a mission with the actual autopilot stuff that is coded into the game, I can talk you through a lot of that since I've been using it for Diaspora R2. I've been using them as a placeholder since I also intend to move over to handcrafted flyby animations at some point. So I'm not as familiar with how WCS did those, but I do plan to eventually crack open the WCS VPs and reverse engineer how they did them.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline SL1

  • 26
I think there is some confusion going on here about Battuta and my replies. It's also been many years since I played WCS so I might be misremembering something. Basically there are two ways to achieve an autopilot effect in FS2_Open.

1) Fake an autopilot effect. Basically you have the player choose nav points etc and then when they click activate the game plays an in-game cutscene that was handcrafted in FRED by the mission designer. While that is playing, the player and any ships that are in their group are teleported to near the nav point using SEXPs.
2) Use the built in autopilot tools. When you hit activate the AI will take over the ship and you and any grouped ships will form up and fly in the direction of the nav point. The game will then activate a time dilation effect and speed up until the player is close and then slowly move back down to normal speed.

The WCS requested built in tools which were coded in by Kazan if I remember correctly. However, they later switched over to method 1) and largely ignored the built in tools, presumably because the flyby animations when activating autopilot are more Wing Commander in style.

I seem to recall someone on the WCS team saying that they'd found a way to use the actual ships for the flyby sequences, instead of having to hand-craft a scene each time. I don't remember exactly where I saw that, though (and of course, I could very well be wrong).


If you want to make a mission with the actual autopilot stuff that is coded into the game, I can talk you through a lot of that since I've been using it for Diaspora R2. I've been using them as a placeholder since I also intend to move over to handcrafted flyby animations at some point. So I'm not as familiar with how WCS did those, but I do plan to eventually crack open the WCS VPs and reverse engineer how they did them.

If you could post some kind of guide for using the built-in functionality, that would certainly be a helpful resource. I'm sure I'm not the only one who would be interested.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I don't mind doing that, it's just that if you use that, you won't get the flyby animation at all. If you're cool with that, I'll get to writing.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline SL1

  • 26
I don't mind doing that, it's just that if you use that, you won't get the flyby animation at all. If you're cool with that, I'll get to writing.

Yeah, I'd be interested.

I did discover something else that you might find interesting. Earlier, I mentioned Aftermath Reboot using autopilot, with flyby, for one of its missions. I played that mission today and noticed that it lets you change your fighter, which I would assume wouldn't be possible if the FREDer had to handcraft the flyby sequences, since you'd have to somehow account for every possible choice. I opened the mission in FRED and edited Team Loadout to let myself use a bunch of other fighters, and it worked. So unless Herkie went to the trouble of making scenes for every possible combination of flyable ships, it looks like flyby sequences don't have to be handcrafted. You might want to take a look at it for your work on Diaspora R2 and/or writing up an autopilot guide. The mission is called "Somewhere in the Rocks" (Act 6-e.fs2 in the VP).
« Last Edit: November 19, 2019, 10:05:26 pm by SL1 »

 
In this context handcrafted simply means an event has to be set up in FRED for every autopilot sequence, the actual cutscene is generated by the engine so it doesn't matter what ship you're flying.
The assigned ship name(usually Alpha 1) doesn't change regardless of ship class.

THat's how WCS Open does it, it's a rather simple event that sets the facing for alpha wing and any linked ships, sets camera distance and position while making it track the player ship. Feel free to just crack open the mission files to see how it's done.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded