Plot 0
	name <PLOT: Tutorial>

	% Element 1 is Quentin
	Element1 <Character>
	Stat 1 4

	% Element 2 is the Mecha Sporch manager
	Element2 <Character>
	Stat 2 5

	% V1 = Phase Counter/Combat Indicator

	% After combat, V1 will be 3 in victory or 4 in defeat
	nu1 <if= V1 2 if= T1 0 V= 1 4>
	nu2 <if= V1 2 if= T2 0 V= 1 3 Time 3600 XPV 100 Reputation 6 1>


	% The only way for this plot to end before the tutorial
	% has been completed is for Quentin or the manager to die.
	Init_Start <ifNPCOK E1 else GoDelete ifNPCOK E2 else GoDelete>
	start <ifNPCOK E1 else GoDelete ifNPCOK E2 else GoDelete>
	GoDelete <AdvancePlot 0>

sub
	Persona 1
	% V1 = Phase Counter
	% V2 = Miscellaneous Counter
	% V3 = Anti-Cheating counter

	% greeting <NewChat if= V1 0 else GoFirstTrial EndChat Say 1 AddChat 1 AddChat 2>
	greeting <NewChat if= V1 0 else GoFirstTrial EndChat Say 1 AddChat 1 AddChat 2 ifG V2 2 AddChat 3>
	result1 <V+ 2 1 SayAnything ifG V2 2 else GoR1NotThereYet if= V2 3 AddChat 3>
	GoR1NotThereYet <AddReact d8>
	result2 <ifG 3 V2 else result3 Say 2>
	result3 <NewChat Say 3 V= 1 1 History 4 AddChat 4>
	result4 <NewChat Goto GoFirstTrial>
	% Msg1 <Megi said that you needed some guidance. Well, if there's one thing I pride myself on, it's my helpfulness. Before we get down to business, though, I'd like to chat for a short while. Just to get to know each other better, you know.>
	Msg1 <ƳƤۤ餷ʡMegi ʹƤ衣ơˤʤˤؤΤȤ顢Ϥοڿˡ餫̤äȤߤΤȤΤʤ>
	% Msg2 <Don't go yet! Just chat with me for a bit more. It'll be worth your time, believe me.>
	Msg2 <ޤԤʡ⤦ää򤷤Ƥλ̵֤̤ˤϤʤ>
	% Msg3 <Chatting may seem useless but it's actually very important. It will improve your relations with other people, and sometimes will let you hear about important rumors.>
	Msg3 <̤ϰ츫̵̤Τ褦¤ϤȤƤפ¾ͤȤδط򿼤ʤޤ˽פʱʹ뤫ʡ>
	% Msg4 <You did the tutorial.>
	Msg4 <塼ȥꥢ򤳤ʤ>
	% Prompt1 <[Chat]>
	Prompt1 < []>
	% Prompt2 <[Goodbye]>
	Prompt2 < [̤]>
	% Prompt3 <What are you talking about!?>
	Prompt3 <ʤá>
	% Prompt4 <Uh-huh. Let's move on to something else.>
	Prompt4 <ʤۤɡ˹Ԥ>

	GoFirstTrial <if= V1 1 else GoSecondTrial Say 101 AddChat 101 AddChat 102 AddChat 103>
	result101 <NewChat Say 102 AddChat 102 AddChat 103>
	result102 <NewChat Say 103 AddChat 101 AddChat 103>
	result103 <NewChat Say 104 Shop .wares Say 105 AddChat 104 AddChat 105 AddChat 106>
	.wares <4 11>
	result104 <NewChat Say 106 AddChat 107>
	result105 <NewChat Say 107 AddChat 107>
	result106 <NewChat Say 108 GrabNPC E1 GSetNAtt NAG_Personal 3 0 GSetNAtt NAG_Personal 4 0 Shop .wares Say 105 AddChat 104 AddChat 105 AddChat 106>
	result107 <NewChat V= 1 2 Goto GoSecondTrial>
	% Msg101 <The Federated Territories is a pretty safe place to live. Well, safe compared to the dead zone anyways... You'll still need to defend yourself from time to time. Having the right equipment will help.>
	Msg101 <\NAME The_Federated_TerritoriesƤˤϤʤʾ䡢Ȥˤ\NAME the_dead_zone٤аʾġǤ⼫ʬοȤʤФʤʤʤ뤳Ȥ롣ʻˤŬڤΩġ>
	% Msg102 <You'll need at least one weapon. Don't worry too much about what kind just yet... Just pick something you can afford. Armor is also important. Try to get coverage for all six body areas- your head, your torso, both arms and both legs.>
	Msg102 <ޤϺǤĤ郎ɬפμϤޤޤ굤ˤʤƤġ㤨٤ʪ١ɶפΤϻʬĤޤƬƹΡξӡξ­ʤ褦ˤ>
	% Msg103 <Items have to be equipped before they can be used. Just between you and me, that can be done using the "i" key. Oh, here's another piece of advice- press "h" for the help menu.>
	Msg103 <ƥϤޤʤȻȤʤä"i"򲡤Ȥ뤳ȤǤ롣⤦ġ"h"򲡤Хإץ˥塼⸫롣>
	% Msg104 <Great. Right now you should pick some basic adventuring gear- a weapon and some armor. If you can't find what you're looking for I'll see if I have anything else in stock.>
	Msg104 <褷ŪѶ񡢤ĤޤɶǤ餦⤷õƤΤĤʤʤ顢߸ˤ¾Τ̵ƤƤ>
	% Msg105 <There. Remember to equip those items after you're finished here. Did you get everything you need?>
	Msg105 <ޤޤäѤƤ衣פΤϤ>
	% Msg106 <Good. Next, I've got a job for you. This will help teach you the basics of combat and let you earn a few dollars at the same time.>
	Msg106 <Ǥϼ˻ŻѰդƤäĤ򤳤ʤдŪƮΤؤ٤ơƱˤ餫⤬>
	% Msg107 <That's a common complaint of adventurers. If you'd like to earn some money, I have a job available. This will also teach you the basics of combat.>
	Msg107 <ĤԤ褯ԤʡԤʤ顢Ż롣򤳤ʤƮδܤ狼>
	% Msg108 <Take another look through the store. Maybe I can find something that you'll like.>
	Msg108 <ŹʤɤƤߤʡꤽʤΤäƤäƤ⤤>
	% Prompt101 <How will I know what to buy?>
	Prompt101 <㤨Ф>
	% Prompt102 <What do I do after I buy things?>
	Prompt102 <äϤɤС>
	% Prompt103 <Let's go shopping!>
	Prompt103 <㤤ʪ褦>
	% Prompt104 <I think so.>
	Prompt104 <¿ʬ>
	% Prompt105 <No, but I'm out of money.>
	Prompt105 <䡢Ǥ⤬Ԥ>
	% Prompt106 <No, I didn't.>
	Prompt106 <䡢ޤ衣>
	% Prompt107 <Tell me about it.>
	Prompt107 <Ƥۤ>

	GoSecondTrial <Say 201 memo 202 if= V3 0 V= 3 1 P= 1 1>

	% Msg201 <\PERSONA E2 of Mecha Sporch has been having a problem with rats. Equip your weapons and armor, then go talk with him. The Mecha Sporch building is that one over there with the wooden floor.>
	Msg201 <\NAME Mecha_Sporch  \PERSONA E2 ͥߤΤȤǺäƤ롣ɶơäˤȤ\NAME Mecha_Sporch Ϥˤڤξηʪ>
	% Msg202 <\PERSONA E1 asked you to speak with \PERSONA E2 about some rats.>
	Msg202 <\PERSONA E1  \PERSONA E2 ȥͥߤΤȤä򤹤褦줿>


	Persona 2
	greeting <NewChat if= P1 0 else GoFirstTrial SayAnything>
	GoFirstTrial <if= P1 1 else GoSecondTrial Say 101 AddChat 101 AddChat 102>
	result101 <NewChat Say 102 AddChat 103 AddChat 104>
	result102 <NewChat Say 103 AddChat 103 AddChat 104>
	result103 <EndChat Say 105 P= 1 2 SavePos NewD 0 ComposeD NU1 .nu1 ComposeD NU2 .nu2 GNewPart .rat DynaGG 2 SetMapType -16>
	% .rat <RAT>
	.rat <ͥ>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Return>
	result104 <NewChat Say 104 AddChat 103>
	% Msg101 <It's horrible! Our locker room has been infested with giant rats. I told those mechajocks to wash their towels more often... Can you help me get rid of them?>
	Msg101 <ѤǤå롼बͥߤ˹Ӥ餵Ƥޤåã˥äˤ褦˸äƤСġͥ༣Ƥޤ󤫡>
	% Msg102 <Thank you! You're very heroic. The rat is just down these stairs... Are you ready to go now, or do you need some time to prepare?>
	Msg102 <꤬ȤޤʤϱͺͥߤϤγʤ򲼤ꤿȤˤޤ˹ԤޤȤ֤ɬפǤ>
	% Msg103 <I can give you $1000 for the job. I certainly hope that's enough... Are you ready to go now, or do you need some time to prepare?>
	Msg103 <꤯ä $1000 ʧޤǽʬȻפޤ ˹ԤäƤޤȤ֤ɬפǤ>
	% Msg104 <Kill it, of course. Those things are deadly vicious. If you have a gun you can shoot it by pressing 'a'... Otherwise you're going to have to get close to the rat and engage it in melee.>
	%% Msg104 <󡢷Υͥߤ򻦤ƤιԤϻͤޤ⤷ƤäƤʤ 'a' 򲡤ȤǼͷ⤹뤳ȤޤäƤʤСͥߤ˶ŤƤ֤Ĥ뤳ȤǳƮ뤳ȤǤޤ>
	Msg104 <󡢷Υͥߤ򻦤ƤĤ˴Ǥ⤷ƤäƤʤ 'a' 򲡤ȤǼͷǤޤʳˤϥͥߤ˶ŤƶĩޤʤФʤޤ>
	% Msg105 <Good luck down there. Come talk to me when you've finished the job... if you survive.>
	Msg105 <򵧤ޤŻ򽪤äݤƤĤ⤷ƤС>
	% Prompt101 <Gladly!>
	Prompt101 <>
	% Prompt102 <How much are you willing to pay me?>
	Prompt102 <ʧ>
	% Prompt103 <All ready to go.>
	Prompt103 <ϤǤƤ롣>
	% Prompt104 <What should I do when I see the rat?>
	Prompt104 <ͥߤ˽вäɤС>

	GoSecondTrial <if= P1 3 else GoCheckLoss P= 1 5 Say 201 CashPrize 1000 MechaPrize .goodmek AdvancePlot 1>
	.goodmek <Corsair.txt>
	GoCheckLoss <if= P1 4 else GoCheckEnd P= 1 5 Say 202 MechaPrize .badmek AdvancePlot 1>
	.badmek <Badger.txt>
	% Msg201 <Great! The locker room is safe for our arena pilots once again. Still, I don't think I'll be able to convince the cleaning staff to go down there... As a reward here's a spare mecha that we had. Quentin will show you how to use it.>
	Msg201 <餷å롼ƮˤȤäƤޤʾˤʤޤݷǼƲ˹ߤꤵΤ̵Ǥ礦͡ġ󽷤ȤƲ桹ΥڥΥå򺹤夲ޤQuentin Ȥ򶵤ƤϤǤ>
	% Msg202 <How'd you get out of there without killing the rat!? Something's strange... anyhow, you didn't do what I asked, so I can't give you a reward. But, here's a mecha, since you're gonna need it. Quentin will show you how to use it.>
	Msg202 <ɤƥͥߤ򻦤˽ФƤǤ̯Ǥ͡ġȤˤʤϰ̤ޤǤ顢󽷤Ϻ夲ޤ󡣤ʤˤɬפˤʤǤ礦顢å򺹤夲ޤ礦Quentin Ȥ򶵤ƤϤǤ>

	Plot 1
		% The continuation of the tutorial.
		% The only way for this plot to end before the tutorial
		% has been completed is for Quentin to die.
		Init_Start <ifNPCOK E1 else GoDelete>
		start <ifNPCOK E1 else GoDelete>
		GoDelete <AdvancePlot 0>
	sub
		Persona 1
		greeting <NewChat if= V1 0 else GoFirstTrial Say 1 AddChat 1 AddChat 2 AddChat 3>

		result1 <NewChat Say 2 Shop .wares Say 3 AddChat 2 AddChat 3>
		.wares <4 11>
		result2 <NewChat V= 1 1 Goto GoFirstTrial>
		result3 <NewChat Say 4 AddChat 4 AddChat 5>
		result4 <NewChat Say 5 AdvancePlot 0>
		result5 <Goto result2>
		% Msg1 <Congradulations on completing your first mission. Keep this up and you'll be an ace in no time. If you check the "C"haracter display you'll see your new mecha listed there. Next you could use some piloting lessons. How about it?>
		Msg1 <ޤϺǽΥߥåǤȤ³ƤФޤ"C" 򲡤ƥ饯ǥץ쥤򸫤СΥå˺ܤäƤϤĤΥåɤ>
		% Msg2 <Have a look through the shop, then. When you're finished we'll start with the mecha tutorial.>
		Msg2 <Ź򸫤Ƥ졣꼡åηϤ뤫ʡ>
		% Msg3 <Hopefully you got everything you need. I'll tell you now the basics of mecha control.>
		Msg3 <֤ɬפʤΤäǤϤ줫顢åĤδä򶵤롣>
		% Msg4 <Are you certain? Piloting a mecha is much different from just walking about on foot, you know. Even if you've already nabbed a few amulets and killed a couple of balrogs this information could be useful.>
		Msg4 <ܵΤäƤΤȤꡢåĤϤ⤭ΤȤϤ櫓㤦 Ȥ󤬴褱򤤤ĤҤääư򣲡ɤݤƤԤȤƤ⡢ξΩĤϤ>
		% Msg5 <In that case, this is the end of your training. Good luck.>
		Msg5 <ʤ顢ǷϽλʡãԤǤʡ>
		% prompt1 <First, I need to buy something.>
		prompt1 <ޤ㤤>
		% prompt2 <Let's get started.>
		prompt2 <Ϥ褦>
		% prompt3 <Nah, I don't need no lessons.>
		prompt3 <⤦åϤʤ>
		% prompt4 <I'll figure it out on my own.>
		prompt4 <ʬٶƤߤ衣>
		% prompt5 <You could be right... go on.>
		prompt5 <󤿤³ߤ>

		% Explanation of mecha terms.
		GoFirstTrial <if= V1 1 else GoSecondTrial Say 101 AddChat 101 AddChat 102 AddChat 103 AddChat 104>
		result101 <NewChat Say 102 AddChat 102 AddChat 103 AddChat 104>
		result102 <NewChat Say 103 AddChat 101 AddChat 103 AddChat 104>
		result103 <NewChat Say 104 AddChat 101 AddChat 102 AddChat 104>
		result104 <NewChat Say 105 AddChat 105>
		result105 <NewChat V= 1 2 Goto GoSecondTrial>
		% Msg101 <The first thing you'll need to know is how to read your mecha's statistics. Just as every character is described by stats, so is every mecha.>
		Msg101 <ޤΤʤʤΤϡåοͤɤˡ٤ƤΥ饯ϥǥեᤵ줿ɽ뤬Ϥ٤ƤΥåƱ>
		% Msg102 <Most folks assume that mass is very important. A big mecha looks far more dangerous than a light one, but often it isn't. The Claymore is big, but its technology is old. The Kojedo is much smaller but also much deadlier.>
		Msg102 <ΥĤϽ̤ȤƤפȻפǤ롣緿ǽŤåϾǷڤå⤺äȶ¤ϰ㤦äƤΤϤ褯롣Claymore ϥǥѤϵ켰Kojedo ϤꤺäȾäȶ⤢롣>
		% Msg103 <MV is Maneuverability. TR is Targeting Rating. SE is Sensor class. While performing actions with your mecha, these ratings get added to your skill rank. The higher the better. Your Corsair has MV:-2, TR:-2, and SE:+1.>
		Msg103 <MV ϵưTR ϥåƥǽϡSE ϥ󥵡Υ٥åǹưƤ֤ϡͤΥ˾褻롣⤱й⤤ۤɤλäƤ Corsair  MV-2, TR -2SE +1ʡ>
		% Msg104 <PV is the cost of your mecha in tactical threat points. It's a better measure of combat worth than mass, MV, or TR alone. Conveniently, PV is also the market price of your mecha in credits.>
		Msg104 <PV ϥåƮǽͤɽ̤MV, TR οͤƮ̤βͤ򼨤ɤˤʤ롣ԹΤȤˡPV ϥåλԾʤǤ⤢롣>
		% Msg105 <Good. If you have questions later, consult the help files. Now it's time for some practical experience.>
		Msg105 <褷⤷ʤˤǵ˻פä顢إפɤ褦ˡ򤷤褦>
		% prompt101 <I want to know about mass.>
		prompt101 <̤ˤĤΤꤿ>
		% prompt102 <Tell me about MV/TR/SE.>
		prompt102 <MVTRSE ˤĤƶߤ>
		% prompt103 <Tell me about PV.>
		prompt103 <PVäơ>
		% prompt104 <That's probably all I need to know.>
		prompt104 <Τɬפ뤳ȤϤ>
		% prompt105 <All right!>
		prompt105 <λ>

		GoSecondTrial <if= V1 2 else GoThirdTrial Say 201 AddChat 201>
		result201 <EndCHat Say 202 V= 1 3 SavePos LoadD .tutormap>
		.tutormap <TS_SCENE_Tutorial.txt>
		% Msg201 <I've arranged for you to practice driving in the Mecha Sporch arena grounds. Would you like to go there now?>
		Msg201 < \NAME Mecha_Sporch ƮΥ饦ɤĤԤ褦ۤƤԤ>
		% Msg202 <Get into your mecha and head to the arena. I'll stay in contact with you over the radio and provide instructions.>
		Msg202 <å˾Ʈؤ̵ϢȤĤĻƳ褦>
		% prompt201 <Yes, I would.>
		prompt201 <褷Ԥ>

		GoThirdTrial <Say 301 AdvancePlot 0>
		% Msg301 <There. Now you should be ready to face the world! There's an old abandoned mine here in town, if you'd like some more experience fighting monsters. Otherwise you can head to Snake Lake to look for a job.>
		Msg301 <褷ǤرФϴλ⤷ʪäƤߤʤ顢γˤĺ줿Ťۻ뤫ԤäƤߤȤʤʤ顢\NAME Snake_Lake ظŻõȤ>
	end

end
