42 SAVE_KEY =
"quest_tutorial"
47 COMPLETE_TUTORIAL1 = 5
48 COMPLETE_TUTORIAL2 = 6
49 COMPLETE_TUTORIAL3 = 7
50 COMPLETE_TUTORIAL4 = 8
51 COMPLETE_TUTORIAL5 = 10
81 Director.eraseSaveData(self.player.isPlayerStarship(),key,0)
82 Director.pushSaveData(self.player.isPlayerStarship(),key,value)
86 if Director.getSaveDataLength(self.player.isPlayerStarship(),key) > 0:
88 return int(Director.getSaveData(self.player.isPlayerStarship(),key,0))
93 VS.playSoundCockpit(soundfile)
94 except AttributeError:
95 VS.playSound(soundfile, self.player.Position(), (0,0,0))
105 if (self.startobject.isDocked(self.
player)):
109 self.
stage = STAGE_AWAY
118 name = self.dockedobject.getName()
124 if (name==
"Atlantis"):
128 self.
stage = STAGE_AWAY
129 self.
timer = VS.GetGameTime()+5
133 meter = 17987547500 * lightminute
138 if (
not self.player.isNull()):
140 vec = self.player.Position()
145 self.
drone = VS.launch(
"Oswald",
"Robin.tutorial",
"klkk_citizen",
"unit",
"default",1,1,vec,
'')
147 self.drone.upgrade(
"quadshield15",0,0,1,0)
148 self.drone.upgrade(
"armor06",0,0,1,0)
150 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Hello traveler.")
151 VS.IOmessage (3,
"Oswald",
"Privateer",self.
msgColor+
"My name is Oswald and I am offering flight assistance.")
152 VS.IOmessage (8,
"Oswald",
"Privateer",self.
msgColor+
"Would you like to refresh your space faring skills?")
153 VS.IOmessage (12,
"Oswald",
"Privateer",self.
msgColor+
"To participate in my tutorial mission, cut your engines with the #9999FFBACKSPACE"+self.
msgColor+
" key, let me approach you, and stay put until I contact you again.")
158 self.
sequence = [[0,1,0],[3,3,0],[8,2,0],[12,7,0]]
160 self.
speech = [
"com_tutorial_oswald/oswald_greet_01.ogg",
"com_tutorial_oswald/oswald_greet_02.ogg",
"com_tutorial_oswald/oswald_greet_03.ogg",
"com_tutorial_oswald/oswald_greet_04.ogg"]
164 vec = self.player.Position()
168 self.drone.SetPosition(vec)
170 self.drone.PrimeOrders()
172 self.player.SetTarget(self.
drone)
179 self.
timer = VS.GetGameTime() + 20
186 self.drone.PrimeOrders()
187 self.drone.SetTarget(self.
player)
188 self.drone.LoadAIScript(
"fighter.ace")
189 self.drone.setFgDirective(
"a.")
200 if (self.drone.getDistance(self.
player)>20000):
211 if (self.drone.getDistance(self.
player)>=1100):
213 vec =
Vector.Sub(self.player.Position(),self.drone.Position())
214 self.drone.SetOrientation((1,0,0),vec)
217 self.drone.SetVelocity(vec)
220 if (self.drone.getDistance(self.
player)<1100):
221 self.drone.SetVelocity((0,0,0))
223 self.drone.SetAngularVelocity((0,0,0))
228 velocity =
Vector.Mag(self.player.GetVelocity())
230 if (VS.GetGameTime()>self.
timer and self.drone.getDistance(self.
player)<1100
and velocity<=10):
231 self.player.SetTarget(self.
drone)
232 self.
timer = VS.GetGameTime()
237 self.
stage = STAGE_ACCEPT
238 if (VS.GetGameTime()>self.
timer and velocity>=10):
241 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Have a nice journey and come back for a space faring refresher anytime here in Cephid 17.")
242 self.
speech = [
"com_tutorial_oswald/oswald_bye.ogg"]
244 self.player.commAnimation(
"com_tutorial_oswald.ani")
245 self.
stage = STAGE_DECLINE
246 self.
timer = VS.GetGameTime()
249 self.
timer = VS.GetGameTime() + 10
255 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Glad I can be of help.")
256 VS.IOmessage (5,
"Oswald",
"Privateer",self.
msgColor+
"In the first place let's have a look at your heads up display (HUD).")
257 VS.IOmessage (10,
"Oswald",
"Privateer",self.
msgColor+
"Please do not move your ship in order to better focus on my instructions.")
258 VS.IOmessage (15,
"Oswald",
"Privateer",self.
msgColor+
"In the upper left corner you can see the communication messages.")
259 VS.IOmessage (20,
"Oswald",
"Privateer",self.
msgColor+
"Each communication message shows the sender, the game time of the sending, and the message itself, like this one.")
260 VS.IOmessage (25,
"Oswald",
"Privateer",self.
msgColor+
"To scroll the messages back and forth use the #9999FFPage Up"+self.
msgColor+
" and #9999FFPage Down"+self.
msgColor+
" keys. Try it out now.")
261 VS.IOmessage (35,
"Oswald",
"Privateer",self.
msgColor+
"Good.")
262 VS.IOmessage (37,
"Oswald",
"Privateer",self.
msgColor+
"Now you can send me a message by pressing the #9999FFF1"+self.
msgColor+
" key.")
264 self.
sequence = [[0,1,0],[5,4,0],[10,4,0],[15,4,0],[20,4,0],[25,5,0],[35,1,0],[37,4,0]]
266 self.
speech = [
"com_tutorial_oswald/oswald_comm_01.ogg",
"com_tutorial_oswald/oswald_comm_02.ogg",
"com_tutorial_oswald/oswald_comm_03.ogg",
"com_tutorial_oswald/oswald_comm_04.ogg",
"com_tutorial_oswald/oswald_comm_05.ogg",
"com_tutorial_oswald/oswald_comm_06.ogg",
"com_tutorial_oswald/oswald_comm_07.ogg",
"com_tutorial_oswald/oswald_comm_08.ogg"]
268 self.
timer = VS.GetGameTime()+45
271 for index
in range (len(self.
sequence)):
277 self.
anitime = VS.GetGameTime()+2
281 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Usually, messages assigned to keys #9999FFF1"+self.
msgColor+
" and #9999FFF2"+self.
msgColor+
" are friendly messages which slightly increase you relation with a faction, while the other keys #9999FFF3"+self.
msgColor+
" and #9999FFF4"+self.
msgColor+
" decrease your relationship.")
282 VS.IOmessage (14,
"Oswald",
"Privateer",self.
msgColor+
"Sometimes it can be very useful to send multiple friendly messages to improve your relation with a hostile faction or taunt an enemy into attacking you instead of a ship you are protecting.")
283 VS.IOmessage (26,
"Oswald",
"Privateer",self.
msgColor+
"That's about it on the messages display.")
285 self.
sequence = [[0,12,0],[14,12,0],[26,2,0]]
287 self.
speech = [
"com_tutorial_oswald/oswald_comm_09.ogg",
"com_tutorial_oswald/oswald_comm_10.ogg",
"com_tutorial_oswald/oswald_comm_11.ogg"]
289 self.
timer = VS.GetGameTime()+30
292 for index
in range (len(self.
sequence)):
298 self.
anitime = VS.GetGameTime()+2
304 self.
timer = VS.GetGameTime()+0
305 self.
stage = COMPLETE_TUTORIAL1
311 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Now, let's review the navigation information on your HUD. We'll do theory first, then some practice.")
312 VS.IOmessage (9,
"Oswald",
"Privateer",self.
msgColor+
"In the lower left corner you will find your ship's shield status in blue, and armor status in orange.")
313 VS.IOmessage (16,
"Oswald",
"Privateer",self.
msgColor+
"We will come to the text indicators later.")
314 VS.IOmessage (20,
"Oswald",
"Privateer",self.
msgColor+
"In the middle of the bottom part you have your dashboard with the front radar on the left side and the rear radar on the right side.")
315 VS.IOmessage (29,
"Oswald",
"Privateer",self.
msgColor+
"The active target will display as a small cross on your radar. Other targets will be dots with their colors representing your relation to them.")
316 VS.IOmessage (38,
"Oswald",
"Privateer",self.
msgColor+
"Green is friendly, red is hostile, and yellow is neutral. An attacking ship is blue, a targetting ship is light blue, and a locking ship is violet. Neutral and significant objects like planets, stations, wormholes, or suns are white.")
317 VS.IOmessage (53,
"Oswald",
"Privateer",self.
msgColor+
"The top center part of the dashboard has four round indicators which begin flashing when the following events occur:")
318 VS.IOmessage (59,
"Oswald",
"Privateer",self.
msgColor+
" (L) means a hostile has missile lock on you")
319 VS.IOmessage (63,
"Oswald",
"Privateer",self.
msgColor+
" (J) means you are in range of a jump point and your jump drive is ready")
320 VS.IOmessage (67,
"Oswald",
"Privateer",self.
msgColor+
" (S) means your SPEC drive, needed for faster-than-light (FTL) travel, is activated")
321 VS.IOmessage (73,
"Oswald",
"Privateer",self.
msgColor+
" (E) means your electronic counter measures (ECM) are active")
322 VS.IOmessage (77,
"Oswald",
"Privateer",self.
msgColor+
"Below the round indicators are three colored bars")
323 VS.IOmessage (81,
"Oswald",
"Privateer",self.
msgColor+
" (CAPACITOR) shows your weapons capacitor charge")
324 VS.IOmessage (86,
"Oswald",
"Privateer",self.
msgColor+
" (DRIVES) shows your SPEC and jump drives energy charge")
325 VS.IOmessage (91,
"Oswald",
"Privateer",self.
msgColor+
" (FUEL) shows you capacity for in-system travel and overdrive propulsion")
326 VS.IOmessage (97,
"Oswald",
"Privateer",self.
msgColor+
"The numbers below the bars are your current speed to the left and your set speed to the right.")
327 VS.IOmessage (105,
"Oswald",
"Privateer",self.
msgColor+
"Below that is the effective SPEC velocity to the left and the flight computer (FCMP) mode to the right.")
329 self.
sequence = [[0,8,0],[9,6,0],[16,2,0],[20,8,0],[29,8,0],[38,14,0],[53,6,0],[59,3,0],[63,4,0],[67,6,0],[73,4,0],[77,4,0],[81,4,0],[86,4,0],[91,5,0],[97,6,0],[105,6,0]]
330 self.
speech = [
"com_tutorial_oswald/oswald_nav_01.ogg",
"com_tutorial_oswald/oswald_nav_02.ogg",
"com_tutorial_oswald/oswald_nav_03.ogg",
"com_tutorial_oswald/oswald_nav_04.ogg",
"com_tutorial_oswald/oswald_nav_05.ogg",
"com_tutorial_oswald/oswald_nav_06.ogg",
"com_tutorial_oswald/oswald_nav_07.ogg",
"com_tutorial_oswald/oswald_nav_08.ogg",
"com_tutorial_oswald/oswald_nav_09.ogg",
"com_tutorial_oswald/oswald_nav_10.ogg",
"com_tutorial_oswald/oswald_nav_11.ogg",
"com_tutorial_oswald/oswald_nav_12.ogg",
"com_tutorial_oswald/oswald_nav_13.ogg",
"com_tutorial_oswald/oswald_nav_14.ogg",
"com_tutorial_oswald/oswald_nav_15.ogg",
"com_tutorial_oswald/oswald_nav_16.ogg",
"com_tutorial_oswald/oswald_nav_17.ogg"]
332 self.
timer = VS.GetGameTime()+112
335 for index
in range (len(self.
sequence)):
341 self.
anitime = VS.GetGameTime()+2
347 self.
timer = VS.GetGameTime()+0
348 self.
stage = COMPLETE_TUTORIAL2
355 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"So much for theory. Let's do some practice now.")
356 VS.IOmessage (4,
"Oswald",
"Privateer",self.
msgColor+
"First we'll do some basic navigation and targetting.")
358 self.
speech = [
"com_tutorial_oswald/oswald_target_01.ogg",
"com_tutorial_oswald/oswald_target_02.ogg"]
360 self.
timer = VS.GetGameTime()+10
363 for index
in range (len(self.
sequence)):
369 self.
anitime = VS.GetGameTime()+2
376 self.
objective = VS.addObjective(
"Target %s" % nam)
378 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"In the lower right corner you can see the target video display unit (VDU) where you can see your current target.")
379 VS.IOmessage (8,
"Oswald",
"Privateer",self.
msgColor+
"Target me by repeatedly toggling the #9999FFT"+self.
msgColor+
" key until you see my ship on the right VDU.")
380 VS.IOmessage (16,
"Oswald",
"Privateer",self.
msgColor+
"Should you pass me, you may reverse the target selection sequence by pressing the #9999FFShift+T"+self.
msgColor+
" keys.")
382 self.
sequence = [[0,7,0],[8,7,0],[16,6,0]]
383 self.
speech = [
"com_tutorial_oswald/oswald_target_03.ogg",
"com_tutorial_oswald/oswald_target_04.ogg",
"com_tutorial_oswald/oswald_target_05.ogg"]
385 self.
timer = VS.GetGameTime()+23
390 for index
in range (len(self.
sequence)):
396 self.
anitime = VS.GetGameTime()+2
402 self.
objective = VS.addObjective(
"Face %s" % nam)
404 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"OK. Now, orient your ship so that your targetting reticule (cross) points directly at me.")
405 VS.IOmessage (7,
"Oswald",
"Privateer",self.
msgColor+
"To get my ship into your visual range just turn in the direction of the white target arrow at the edge of your HUD.")
406 VS.IOmessage (14,
"Oswald",
"Privateer",self.
msgColor+
"When my ship is in your visual range you will notice that it is framed by a target box.")
407 VS.IOmessage (20,
"Oswald",
"Privateer",self.
msgColor+
"Align your targetting reticule with my ship.")
409 self.
sequence = [[0,6,0],[7,6,0],[14,5,0],[20,3,0]]
410 self.
speech = [
"com_tutorial_oswald/oswald_target_06.ogg",
"com_tutorial_oswald/oswald_target_07.ogg",
"com_tutorial_oswald/oswald_target_08.ogg",
"com_tutorial_oswald/oswald_target_09.ogg"]
412 self.
timer = VS.GetGameTime()+24
415 for index
in range (len(self.
sequence)):
421 self.
anitime = VS.GetGameTime()+2
430 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Well done.")
431 VS.IOmessage (2,
"Oswald",
"Privateer",self.
msgColor+
"Now, turn your ship away from my ship and accelerate to full speed using the #9999FF\\"+self.
msgColor+
" key.")
432 self.player.commAnimation(
"com_tutorial_oswald.ani")
433 self.
objective = VS.addObjective(
"Set max velocity")
436 self.
speech = [
"com_tutorial_oswald/oswald_nav_21.ogg",
"com_tutorial_oswald/oswald_nav_22.ogg"]
438 self.
timer = VS.GetGameTime()+9
441 for index
in range (len(self.
sequence)):
447 self.
anitime = VS.GetGameTime()+2
453 velocity =
Vector.Mag(self.player.GetVelocity())
455 if (angle>=0.20
and velocity>=295):
457 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"And now set your velocity reference to zero by pressing the #9999FFBACKSPACE"+self.
msgColor+
" key and come to a complete stop.")
458 self.player.commAnimation(
"com_tutorial_oswald.ani")
459 self.player.commAnimation(
"com_tutorial_oswald.ani")
461 self.
objective = VS.addObjective(
"Set full stop")
463 self.
timer = VS.GetGameTime()+9
467 velocity =
Vector.Mag(self.player.GetVelocity())
470 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"You can also increment your velocity gradually with the #9999FF+"+self.
msgColor+
" key. Accelerate to 100 m/s now.")
471 self.player.commAnimation(
"com_tutorial_oswald.ani")
473 self.
objective = VS.addObjective(
"Set velocity reference to 100m/s")
475 self.
timer = VS.GetGameTime()+9
479 velocity =
Vector.Mag(self.player.GetVelocity())
480 if (velocity>=98
and velocity<=110):
482 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"In the same way you can reduce your velocity gradually with the #9999FF-"+self.
msgColor+
" key. Deccelerate to 50 m/s.")
483 self.player.commAnimation(
"com_tutorial_oswald.ani")
485 self.
objective = VS.addObjective(
"Set velocity reference to 50m/s")
487 self.
timer = VS.GetGameTime()+9
491 velocity =
Vector.Mag(self.player.GetVelocity())
492 if (velocity<=55
and velocity>=40):
494 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Great. If you further deccelerate your velocity with the #9999FF-"+self.
msgColor+
" key you can actually reverse your thrust. Deccelerate now to -20 m/s.")
495 self.player.commAnimation(
"com_tutorial_oswald.ani")
497 self.
objective = VS.addObjective(
"Set velocity reference to -20m/s")
499 self.
timer = VS.GetGameTime()+12
506 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Excellent.")
507 VS.IOmessage (2,
"Oswald",
"Privateer",self.
msgColor+
"You have learned how to target, orient your ship, accellerate, decellerate, and bring your ship to a stop.")
508 VS.IOmessage (10,
"Oswald",
"Privateer",self.
msgColor+
"I'm sure this will come in handy during your future endeavors.")
510 self.
sequence = [[0,1,0],[2,7,0],[10,4,0]]
511 self.
speech = [
"com_tutorial_oswald/oswald_nav_27.ogg",
"com_tutorial_oswald/oswald_nav_28.ogg",
"com_tutorial_oswald/oswald_nav_29.ogg"]
513 self.
timer = VS.GetGameTime()+15
516 for index
in range (len(self.
sequence)):
522 self.
anitime = VS.GetGameTime()+2
528 self.
timer = VS.GetGameTime()+10
529 self.
stage = COMPLETE_TUTORIAL3
540 self.
objective = VS.addObjective(
"Target %s" % nam)
542 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Let's practice some faster than light (FTL) travel now.")
545 self.
speech = [
"com_tutorial_oswald/oswald_spec_01.ogg",
""]
547 self.
timer = VS.GetGameTime()+12
550 for index
in range (len(self.
sequence)):
556 self.
anitime = VS.GetGameTime()+2
559 if (self.
practice==2
and self.player.GetTarget()==self.
jump):
561 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Set your velocity to maximum with the #9999FF\\"+self.
msgColor+
" key and activate the SPEC auto pilot with the #9999FFA"+self.
msgColor+
" key to get there. Hang on as this might take a while if you are close to massive objects.")
562 VS.IOmessage (10,
"Oswald",
"Privateer",self.
msgColor+
"You will notice that your SPEC drive indicator (S) is flashing, which indicates that SPEC is active.")
563 VS.IOmessage (20,
"Oswald",
"Privateer",self.
msgColor+
"During FTL travel your shields become inactive, as you can see below on your ship VDU.")
564 VS.IOmessage (26,
"Oswald",
"Privateer",self.
msgColor+
"You will also notice that your steering has no effect on your vessel since the auto pilot has taken over the controls.")
565 VS.IOmessage (32,
"Oswald",
"Privateer",self.
msgColor+
"You can always interrupt and resume the auto pilot by toggling the #9999FFA"+self.
msgColor+
" key. You may try that, if you wish.")
566 VS.IOmessage (40,
"Oswald",
"Privateer",self.
msgColor+
"In the lower left corner, just above your ship staus you will notice two indicators.")
567 VS.IOmessage (45,
"Oswald",
"Privateer",self.
msgColor+
"SPEC shows you if your SPEC drive is enabled.")
568 VS.IOmessage (47,
"Oswald",
"Privateer",self.
msgColor+
"AUTO tells you if auto pilot is engaged.")
570 self.
objective = VS.addObjective(
"Approach %s" % name)
573 self.
sequence = [[0,12,0],[12,6,0],[20,6,0],[26,6,0],[32,7,0],[40,4,0],[45,2,0],[47,4,0]]
574 self.
speech = [
"com_tutorial_oswald/oswald_spec_02.ogg",
"",
"com_tutorial_oswald/oswald_spec_03.ogg",
"",
"",
"com_tutorial_oswald/oswald_spec_04.ogg",
"",
""]
576 self.
timer = VS.GetGameTime()+52
579 for index
in range (len(self.
sequence)):
585 self.
anitime = VS.GetGameTime()+2
588 if (self.
practice==4
and self.player.getDistance(self.
jump)<=10000):
589 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Almost there.")
590 VS.IOmessage (2,
"Oswald",
"Privateer",self.
msgColor+
"The auto pilot only gives back control some time after the SPEC auto pilot light stopped flashing.")
591 VS.IOmessage (8,
"Oswald",
"Privateer",self.
msgColor+
"Notice also how your shields start recharing when leaving FTL travel mode.")
593 self.
sequence = [[0,1,0],[2,5,0],[8,4,0]]
594 self.
speech = [
"com_tutorial_oswald/oswald_spec_05.ogg",
"",
""]
596 self.
timer = VS.GetGameTime()+14
599 for index
in range (len(self.
sequence)):
605 self.
anitime = VS.GetGameTime()+2
608 if (self.
practice==6
and self.player.getDistance(self.
jump)<=3000):
610 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Here we are.")
611 VS.IOmessage (1,
"Oswald",
"Privateer",self.
msgColor+
"You may try out manual FTL travel at this point.")
612 VS.IOmessage (5,
"Oswald",
"Privateer",self.
msgColor+
"Target the planet Atlantis using your significant objects targetting keys #9999FFN"+self.
msgColor+
" and #9999FFShift+N"+self.
msgColor+
".")
614 self.
sequence = [[0,1,0],[1,4,0],[5,7,0]]
615 self.
speech = [
"com_tutorial_oswald/oswald_spec_06.ogg",
"",
""]
617 self.
timer = VS.GetGameTime()+12
620 for index
in range (len(self.
sequence)):
626 self.
anitime = VS.GetGameTime()+2
633 self.
objective = VS.addObjective(
"Target %s" % name)
635 self.
timer = VS.GetGameTime()
639 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Roger that. Turn towards the planet, set your velocity to maximum with the #9999FF\\"+self.
msgColor+
" key, and enable the manual SPEC with the #9999FFShift+A"+self.
msgColor+
" key to approach the planet.")
640 VS.IOmessage (12,
"Oswald",
"Privateer",self.
msgColor+
"Make sure that the planet is fairly well centered in your targetting reticule.")
641 VS.IOmessage (17,
"Oswald",
"Privateer",self.
msgColor+
"Notice how your speed starts increasing gradually after leaving the jump point range.")
642 self.
objective = VS.addObjective(
"Enable manual SPEC")
645 self.
sequence = [[0,12,0],[12,5,0],[17,5,0]]
646 self.
speech = [
"com_tutorial_oswald/oswald_spec_07.ogg",
"",
""]
648 self.
timer = VS.GetGameTime()+22
651 for index
in range (len(self.
sequence)):
657 self.
anitime = VS.GetGameTime()+2
668 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"If your are getting too much off course, stop the SPEC drive toggling the #9999FFShift+A"+self.
msgColor+
" key, recenter your target, and then re-enable the manual SPEC drive again with the same keys.")
669 VS.IOmessage (13,
"Oswald",
"Privateer",self.
msgColor+
"When you have approched Atlantis to 10 000km please disble the SPEC drive toggling the #9999FFShift+A"+self.
msgColor+
" key again and then stop your ship.")
671 self.
objective = VS.addObjective(
"Approach %s" % name)
675 self.
speech = [
"com_tutorial_oswald/oswald_spec_08.ogg",
""]
677 self.
timer = VS.GetGameTime()+22
682 for index
in range (len(self.
sequence)):
688 self.
anitime = VS.GetGameTime()+2
693 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"All right.")
694 VS.IOmessage (2,
"Oswald",
"Privateer",self.
msgColor+
"You have learned how to conveniently travel within the system.")
695 self.
speech = [
"com_tutorial_oswald/oswald_spec_09.ogg",
""]
697 self.player.commAnimation(
"com_tutorial_oswald.ani")
698 self.
timer = VS.GetGameTime()+7
701 velocity =
Vector.Mag(self.player.GetVelocity())
702 if (velocity>=10
and self.player.getDistance(self.
destination)<=2000000):
703 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Bring your ship to full stop before crashing into the planet.")
704 self.
speech = [
"com_tutorial_oswald/oswald_spec_10.ogg",
""]
705 self.player.commAnimation(
"com_tutorial_oswald.ani")
707 self.
objective = VS.addObjective(
"Stop your ship")
709 self.
timer = VS.GetGameTime()+10
714 velocity =
Vector.Mag(self.player.GetVelocity())
719 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Now dock to the planet, go to the mission computer, and save your game.")
720 VS.IOmessage (5,
"Oswald",
"Privateer",self.
msgColor+
"Then get yourself a Jump Drive and an Overdrive and come back for more tutoring if you wish.")
721 VS.IOmessage (10,
"Oswald",
"Privateer",self.
msgColor+
"To dock, turn towards the planet and press the docking clearance request key #9999FFD"+self.
msgColor+
". A green docking frame will appear.")
722 VS.IOmessage (17,
"Oswald",
"Privateer",self.
msgColor+
"You may still enable the SPEC drive until you close up on the planet and your velocity matches the set velocity.")
723 VS.IOmessage (24,
"Oswald",
"Privateer",self.
msgColor+
"When you are within range, press again the #9999FFD"+self.
msgColor+
" key to dock. The docking distance will depend on the planet or station size that you are docking to.")
724 VS.IOmessage (33,
"Oswald",
"Privateer",self.
msgColor+
"The larger the object the further away you can dock.")
725 VS.IOmessage (36,
"Oswald",
"Privateer",self.
msgColor+
"For Atlantis the docking distance is roughly about 990 kilometers.")
727 self.
sequence = [[0,5,0],[5,5,0],[10,7,0],[17,6,0],[24,6,0],[33,3,0],[36,5,0]]
728 self.
speech = [
"com_tutorial_oswald/oswald_spec_11.ogg",
"",
"",
"",
"com_tutorial_oswald/oswald_spec_12.ogg",
"",
""]
730 self.
timer = VS.GetGameTime()+42
733 for index
in range (len(self.
sequence)):
739 self.
anitime = VS.GetGameTime()+2
742 if (self.
practice==18
and self.destination.isDocked(self.
player)):
743 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"That concludes the navigation part of the tutorial.")
744 self.
speech = [
"com_tutorial_oswald/oswald_spec_13.ogg"]
745 self.player.commAnimation(
"com_tutorial_oswald.ani")
747 self.
timer = VS.GetGameTime()+3
752 self.
stage = COMPLETE_TUTORIAL4
762 VS.IOmessage (0,
"Oswald",
"Privateer",
"#FF0000"+
"So you want to learn how to dodge lasers, eh?")
763 VS.IOmessage (3,
"Oswald",
"Privateer",
"#FF0000"+
"You aren't the first newbie I've had to put down, and you won't be the last!")
766 self.
speech = [
"com_tutorial_oswald/oswald_intermezzo_01.ogg",
""]
768 self.
timer = VS.GetGameTime()+10
771 VS.IOmessage (0,
"Oswald",
"Privateer",
"#FF0000"+
"That's over the border, boy!")
772 VS.IOmessage (2,
"Oswald",
"Privateer",
"#FF0000"+
"May God have mercy upon my enemies, because I won't!")
773 self.
speech = [
"com_tutorial_oswald/oswald_intermezzo_02.ogg",
""]
777 self.
timer = VS.GetGameTime()+5
780 for index
in range (len(self.
sequence)):
786 self.
anitime = VS.GetGameTime()+2
790 self.drone.SetTarget(VS.Unit())
791 VS.AdjustRelation(self.drone.getFactionName(),self.player.getFactionName(),99,10)
792 VS.AdjustRelation(self.player.getFactionName(),self.drone.getFactionName(),99,10)
793 self.drone.LoadAIScript(
"sitting_duck")
794 self.drone.PrimeOrders()
797 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Enough of this!")
798 VS.IOmessage (1,
"Oswald",
"Privateer",self.
msgColor+
"I hope you've learned something.")
799 VS.IOmessage (3,
"Oswald",
"Privateer",self.
msgColor+
"Pirates won't be so forgiving.")
800 VS.IOmessage (5,
"Oswald",
"Privateer",self.
msgColor+
"And neither will I if you ever play tricks on me again!")
803 self.
speech = [
"com_tutorial_oswald/oswald_intermezzo_03.ogg",
"",
"",
""]
805 self.
timer = VS.GetGameTime()+8
808 for index
in range (len(self.
sequence)):
814 self.
anitime = VS.GetGameTime()+2
818 VS.IOmessage (0,
"Oswald",
"Privateer",self.
msgColor+
"Now let's get back to business, hotshot.")
819 self.
speech = [
"com_tutorial_oswald/oswald_intermezzo_04.ogg"]
820 self.player.commAnimation(
"com_tutorial_oswald.ani")
822 self.
timer = VS.GetGameTime()+3
836 if (self.
stage==STAGE_DOCKED):
840 text =
"CEPHID SECURITY INITIATIVE GIVES TRAINING FOR FLIGHT SAFETY\\\The Cephid Security Initiative (CSI) is offering training for pilots with the purpose of enhancing flight safety in and out of the system. "
841 text +=
"A representative said, this training is sponsored by volunteer contributors and open for pilots of all vessel classes. "
842 text +=
"No matter if you're a greenhorn in space faring or a long-time pilot you may meet one of the volunteers when leaving from a planet or station into space and participate in the training or refresher."
851 if (
not self.player.isNull()):
853 if (self.
stage==STAGE_AWAY
and VS.GetGameTime()>self.
timer):
857 if (self.
stage==2
and VS.GetGameTime()<self.
timer and VS.GetGameTime()>=self.
anitime):
858 for index
in range (len(self.
sequence)):
864 self.
anitime = VS.GetGameTime()+2
865 if (self.
stage==2
and VS.GetGameTime()>=self.
timer):
868 if (
not self.player.isNull()
and not self.drone.isNull()):
873 if (self.
stage<90
and not VS.getSystemName()==self.
system):
876 if (self.
stage<90
and self.
stage!=COMPLETE_TUTORIAL3
and self.
stage!=COMPLETE_TUTORIAL4):
882 if (self.
stage==STAGE_ACCEPT):
884 if (self.
stage==COMPLETE_TUTORIAL1):
886 if (self.
stage==COMPLETE_TUTORIAL2):
888 if (self.
stage==COMPLETE_TUTORIAL3):
892 if (self.
stage==COMPLETE_TUTORIAL4
and VS.GetGameTime()>self.
timer):
893 VS.IOmessage (0,
"Oswald",
"player",self.
msgColor+
"Oops. Sorry, pal. My boss at the Cephid Safety Initiative has an emergency situation I must handle now. I apologize.")
894 VS.IOmessage (9,
"Oswald",
"player",self.
msgColor+
"Have a nice journey. And come back for more.")
896 self.
speech = [
"com_tutorial_oswald/oswald_cancel.ogg",
""]
898 self.
timer = VS.GetGameTime()+12
901 if (self.
stage==9
and VS.GetGameTime()<self.
timer and VS.GetGameTime()>=self.
anitime):
902 for index
in range (len(self.
sequence)):
908 self.
anitime = VS.GetGameTime()+2
909 if (self.
stage==9
and VS.GetGameTime()>=self.
timer):
915 if (self.
stage==97
and VS.GetGameTime()>self.
timer):
916 VS.IOmessage (0,
"Oswald",
"player",self.
msgColor+
"Hey! Where are you heading? Come back for more anytime.")
917 VS.IOmessage (4,
"Oswald",
"player",self.
msgColor+
"Have a good flight and don't break the hull.")
918 self.
speech = [
"com_tutorial_oswald/oswald_runoff_01.ogg"]
920 self.player.commAnimation(
"com_tutorial_oswald.ani")
921 self.player.commAnimation(
"com_tutorial_oswald.ani")
922 self.player.commAnimation(
"com_tutorial_oswald.ani")
923 self.
timer = VS.GetGameTime()+6
926 if (self.
stage==98
and VS.GetGameTime()>self.
timer):
927 self.drone.SetVelocity((2000,0,0))
928 self.
timer = VS.GetGameTime()+10
930 print "Tutorial quest finished"
933 if (self.
stage==99
and VS.GetGameTime()>self.
timer):
934 self.drone.PrimeOrders()
946 quest.quest_factory.__init__ (self,
"quest_tutorial")
955 Director.Mission.__init__(self)