plot 0
	name <PLOT: Ancestral Home>

	% - Edited to v0.901 "light" standard

	% E1 is the scene for the current episode.
	% E2 is the character who will give the PC a mission.
	% E3 is the scene to be used in the next episode.
	% E4 is the NPC who the PC must battle
	Element1 <Grab 3>
	Element2 <Prefab>
	Element3 <Scene Town Target !Far 1>
	Element4 <Prefab>

	% P1 = Conversation Counter
	% P2 = Combat Counter
	% P3 = Conversation with E4
	%     if P3=2, PC has resolved the matter peacefully

	% On a cleanup request just delete this plot.
	cleanup <AdvancePlot 0>

	% If Persona E2 dies, load a new plot.
	% Upon entering combat, force a conversation with the supposed enemy.
	% Init_Start <ifNPCOK E2 else GoDelete if= V1 0 if= SceneID E1 ifNPCInPlay E2 NPCGoPC E2>
	% start <ifNPCOK E2 else GoDelete if= V1 0 if= SceneID E1 ifNPCInPlay E2 NPCGoPC E2>
	Init_Start <ifNPCOK E2 else GoDelete ifNPCOK E4 else GoDelete if= V1 0 if= SceneID E1 ifNPCInPlay E2 NPCGoPC E2>
	start <ifNPCOK E2 else GoDelete ifNPCOK E4 else GoDelete if= V1 0 if= SceneID E1 ifNPCInPlay E2 NPCGoPC E2>
	GoDelete <S= 101 1 N= 3 E3 S= 105 -1  AdvancePlot 0>

	TM1 <if= SceneID E1 ifNPCinPlay E2 if= V1 0 ifG 6 Range PCUID NPCUID E2  Print 1 ForceChat E2>
	% Msg1 <\ELEMENT 2 strikes up a conversation with you.>
	Msg1 <\ELEMENT 2 äƤ>


	% Combat check. If combat has been entered, V2=1.
	% Combat ends in victory if the number of active masters on
	% team two drops to zero, or ends in defeat is the number of
	% active masters on team one drops to zero. After combat, V2=3
	% if the player was victorious or V2=2 is the player lost.
	nu1 <if= T1 0 if= V2 1  V= 2 2  LoseRenown>
	nu2 <if= T2 0 if= V2 1  V= 2 3  Reputation 6  1  if# P3 2 XPV 100>

sub
	Persona 2
	% rumor <!2 has been researching the families that lived in this area many years ago.>
	rumor <!2 ϤϰνǤ²ˤĤĴ٤Ƥ>
	% V1 = Have been offered mission

	% greeting <NewChat if= P2 3 else GoCheckLoss Say 19 AdvancePlot 1 if= P3 2 else GoNoP3 MoveChar E4 E1>
	greeting <ifNPCOK E4 else GoDelete NewChat if= P2 3 else GoCheckLoss Say 19 AdvancePlot 1 if= P3 2 else GoNoP3 MoveChar E4 E1>
	GoNoP3 <History 20 DeleteChar E4>
	GoCheckLoss <if# P2 0 else GoCheckMission Say 16 V= 2 ComTime V+ 2 80000 P= 2 0>
	GoCheckMission <ifG ComTime V2 else GoRecharge if= V1 1 else GoNoMission Say 14 AddChat 13 AddChat 6 AddChat 14>
	GoNoMission <if= P1 1 else GoFirstTime Say 2 AddChat 2 AddChat 3>
	GoFirstTime <P= 1 1 Say 1 AddChat 1 AddChat 2>
	GoRecharge <Say 15>
	GoDelete <S= 101 1 N= 3 E3 S= 105 -1 AdvancePlot 0>

	result1 <NewChat Say 3 V= 1 1 Memo 7 AddChat 4>
	result2 <NewChat Say 4 Reputation 3 -d8>
	result3 <NewChat Say 5 V= 1 1 Memo 7 AddChat 4>
	result4 <NewChat Say 6 AddChat 5 AddChat 6 AddChat 7>
	result5 <NewChat Say 8 addCHAT 8 AddChat 9 AddChat 10>
	result6 <NewChat Say 9 AddChat 11 AddChat 12 AddChat 10>
	result7 <NewChat Say 10 Reputation 5 -d4>
	% result8 <EndChat Say 17 SavePos P= 2 1  Dynamic 2 Threat S103 150 .nu1 .nu2 if= d3 1 if= P3 0 DynaNPC E4 2 NPCLevel E4 S103 ComposeD START .start PassVar 1 E4>
	result8 <EndChat Say 17 SavePos P= 2 1  Dynamic 2 Threat S103 150 .nu1 .nu2 ForceExit 0 if= d3 1 if= P3 0 DynaNPC E4 2 NPCLevel E4 S103 ComposeD START .start PassVar 1 E4>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Return>
	.start <if# L1 0 ForceChat L1 L= 1 0>
	result9 <NewChat Say 11 AddChat 8 AddChat 10>
	result10 <NewChat Say 12>
	% result11 <EndChat Say 18 Reputation 1 1 SavePos P= 2 1 Dynamic 0 Threat S103 3 .nu1 .nu2 if= P3 0 DynaNPC E4 2 NPCLevel E4 S103 ComposeD START .start PassVar 1 E4>
	result11 <EndChat Say 18 Reputation 1 1 SavePos P= 2 1 Dynamic 0 Threat S103 3 .nu1 .nu2 ForceExit 0 if= P3 0 DynaNPC E4 2 NPCLevel E4 S103 ComposeD START .start PassVar 1 E4>
	result12 <NewChat Say 13 AddChat 5 AddChat 7>
	result13 <Goto result8>
	result14 <NewChat Say 12>

	% Msg1 <Excuse me, are you \PC ? I've been looking for someone of that name... I have an important message.>
	Msg1 <ߤޤ \PC ǤϤ̾οͤõƤޤġڤΤǤ>
	% Msg2 <I'm looking for someone named \PC . I've heard that they're visiting town, but I can't find them... You wouldn't know where they are, would you?>
	Msg2 < \PC Ȥ̾οʪõƤޤĮƤ餷ΤǤĤޤġɤˤ뤫Τޤ󤫡>
	% Msg3 <I've been researching your family. Many years ago during the Age of Superpowers your ancestors were quite influential, and they used to live in this area. I've discovered a ruin that once was their home, but have been unable to examine it.>
	Msg3 <Ϥʤΰ²ˤĤĴ٤ƤޤΡĶ夢ʤϤʤϤƤꡢϰ˽ǤޤϤĤƤΰ²νǤפȯޤĴޤǤϤǤƤޤ>
	% Msg4 <That's too bad. Well, I'll have to keep looking.>
	Msg4 <ǰǤޤõ³ޤ>
	% Msg5 <Really? I thought I asked you that earlier... I must have been mistaken. Anyhow, many years ago your ancestors were very influential in this region. I've discovered an old house of theirs that I'm hoping to study, but haven't been able to yet.>
	Msg5 <Ǥޤää᤯ʤ˿ҤͤФ褫äġȤ⤫ΤʤϤϰͥǤϤΰ²򸦵椷ȻפθŤȯޤޤǤƤޤ>
	% Msg6 <There's a ravager tribe living on the land. I've tried to get permission to enter, but they're quite unfriendly to outsiders.>
	Msg6 <ϤˤάåԤǤΤǤϤϤĤ褦ȤޤĤϤ褽ΤФŨդभФˤƤޤ>
	% Msg7 <\ELEMENT 2 in \ELEMENT 1 has been researching the home of your ancestors.>
	Msg7 <\ELEMENT 1  \ELEMENT 2  \PC νĴ٤Ƥ롣>
	% Msg8 <That would be a great help! Are you prepared to head out now, or do you need to get ready?>
	Msg8 <ϤȤƤޤȯνϤ⤦ǤƤޤȤɬפǤ>
	% Msg9 <I'm not sure that's a good idea. As I mentioned, they're not very friendly to outsiders. You'd probably be attacked as soon as you got near their camp. Do you really think you have a chance of reasoning with them?>
	Msg9 <ϸʹͤȤϻפޤ󡣸ä褦ˡĤϤ褽ΤФŨդभФˤƤΤǤ衣ʤĤ¼˶Ť䤤ʤ䡢ĤϤ餯ʤ˽Ǥ礦ĤǤ˻פޤ>
	% Msg10 <I was afraid of that.>
	Msg10 <⤷ޤ͡>
	% Msg11 <I'm not in the mecha business so I can't say for certain. From what I've heard you should be able to take them, I'm certain.>
	Msg11 <ϥåǿ٤Ƥ櫓ǤϤʤΤΤʤȤϸޤʹä黡ˤĤϤϤʤˤǤ뤯餤Ȼפޤ>
	% Msg12 <Alright. Whenever you're ready we can start then.>
	Msg12 <ʬޤʤνѤ餤ĤǤȯǤޤ衣>
	% Msg13 <I don't think it is... There must be a safer way to handle the problem...>
	Msg13 <ΤȤġäȰ褹ˡϤǤġ>
	% Msg14 <I'm waiting to investigate your family home, but the ravagers still won't let me in. Think you can help me?>
	Msg14 <Ϥʤΰ²νĴ٤ȻפäƤΤǤޤάåԤ褦Ȥޤ󡣽Ƥޤ>
	% Msg15 <Come back tomorrow and we can try to engage the ravagers again.>
	Msg15 <ۤޤάåԤȸ路ޤ礦>
	% Msg16 <You didn't manage to drive them off... Come back tomorrow and we can try again.>
	Msg16 <ĤɤʧȤϤǤޤǤġۤĩ路ޤ礦>
	% Msg17 <Here are the coordinates you'll have to examine. Come back here when you're done and let me know how it went.>
	Msg17 <ʤĴ٤ǤĴѤ餳صäƤơ˷̤Τ餻Ƥ>
	% Msg18 <You're very brave, I'll say that much... Here are the coordinates of the ruin. If you can get close to the camp, you'll probably be brought to speak with their leader.>
	Msg18 <ͦʿͤǤ͡ˤϤ줷ޤġפΰ֤Ǥ¼˶ŤȤǤʤ顢餯ĹäƤǤ礦>
	% Msg19 <You cleared out the ravagers! Now I'll be able to start my explorations... Come back tomorrow or sometime; I may have some interesting finds.>
	Msg19 <άåԤɤʧäƤޤäõ򳫻ϤǤޤġʹߤˤ̣ۤȯ뤫⤷ޤ>
	% Msg20 <You reclaimed your ancestral home.>
	Msg20 <νᤷ>

	% Prompt1 <I'm \PC . What do you want?>
	Prompt1 <%JF \PC Ѥ>
	% Prompt2 <I don't know who you're looking for...>
	Prompt2 <%JSõƤʪΤʤ%JGġ>
	% Prompt3 <Actually, I'm \PC .>
	Prompt3 <¤ϡ%JF \PC >
	% Prompt4 <Why not?>
	Prompt4 <ɤơ>
	% Prompt5 <I can remove them for you.>
	Prompt5 <%JFĤष褦>
	% Prompt6 <Let me speak with them.>
	Prompt6 <ä򤵤Ƥ졣>
	CPrompt6 <if= P3 0 Accept>
	% Prompt7 <I guess there's nothing we can do.>
	Prompt7 <ɤ褦ʤ͡>
	% Prompt8 <I'm ready to go now.>
	Prompt8 <Ϥ⤦ǤƤ%JG>
	% Prompt9 <How many mecha do they have?>
	Prompt9 <ۤϤɤ줯餤ΥåäƤ롩>
	% Prompt10 <Give me some time to prepare first.>
	Prompt10 <ޤϽ֤򤯤졣>
	% Prompt11 <I'll go speak with them now.>
	Prompt11 <ä礤˹ԤäƤ롣>
	% Prompt12 <Maybe this isn't a good idea...>
	Prompt12 <⤷褤ͤȤϸʤΤġ>
	% Prompt13 <All ready to drive out the ravagers...>
	Prompt13 <άåԤɤʧϤǤ%JGġ>
	% Prompt14 <I'll be back later.>
	Prompt14 <äƤ롣>


	Persona 4
	% The leader of the ravagers...
	greeting <NewChat P= 3 1 Say 1 AddChat 1 AddChat 2 AddChat 3>

	result1 <NewChat ifG PCRep 6 S103 else GoR1Fail Say 2 AddChat 4 AddChat 5>
	GoR1Fail <EndChat Say 4>
	result2 <NewChat ifG PCRep 2 d30 else GoR2Fail Say 3 AddChat 6 AddChat 7>
	GoR2Fail <EndChat Say 5>
	result3 <NewChat ifG PCRep 1 d10 else GoR3Fail Say 6 AddChat 4 AddChat 5>
	GoR3Fail <EndChat Say 17>
	result4 <NewChat ifG PCRep 3 0 else GoR4Fail Say 7 P= 3 2 XPV 150 Retreat 2 History 9 History 16 PCFamily E4>
	GoR4Fail <EndChat Say 8>
	result5 <NewChat ifG 0 PCRep 3 else GoR5Fail Say 10 P= 3 2 XPV 150 Retreat 2 History 9 History 16 PCFamily E4>
	GoR5Fail <EndChat Say 11>
	result6 <NewChat ifG PC$ Threat S103 10 else GoR6Fail Say 12 Retreat 2 Cash+ -Threat S103 10>
	GoR6Fail <EndChat Say 13>
	result7 <NewChat ifG React d60 else GoR7Fail Say 15 AddChat 4 AddChat 5>
	GoR7Fail <EndChat Say 14>

	% Msg1 <This is the land of my tribe. We will destroy any who come here without permission. State your purpose here, stranger.>
	Msg1 <ϲ椬²Ϥ桹ϵĤʤ­ƧԤïǤäƤʴդ롣褽Ԥ衢褿Ū>
	% Msg2 <This is your land? Who are you to make such an outrageous claim!?>
	Msg2 <ϤϤȡʤ󤳤Ȥĥ뤪ï>
	% Msg3 <Negotiate? There was another recently who wanted to visit our land... If it is so important for you to enter here, you will agree to the small price of $ \VAL Threat S103 10 .>
	Msg3 <ġ桹ϤꤿȤĤǶ⤦ͤʡġ뤳ȤˤȤäƤۤʤȤʤСä $ \VAL Threat S103 10 ǤʧäƤ餪>
	% Msg4 <Don't make me laugh. You've lived a soft life in the greenzone; I can tell just by looking at you. You have no place here... you will die!>
	Msg4 <Ф碌ʡФϤǤʤޤ̤뤤äƤΤʬ롣ˤϤϤʤġ͡>
	% Msg5 <No, you're here to steal from us... I know your kind. We won't permit you to do that!>
	Msg5 <䡢ϤߤƯˤġΤ褦ʤĤϤ褯ΤϤ뤫>
	% Msg6 <Talk? Who are you to think you can simply walk in here and expect to walk out alive again!?>
	Msg6 <áäƤƤޤƽФȻפäƤʤơϲԤ>
	% Msg7 <\PC ? Why, of course we know you! You are of the same blood as our tribe. This is our land... Put down your arms, you are welcome here.>
	Msg7 <\PC ʤȡΤäƤ뤾ϲ桹ƱƤΤϤޤ᤿桹Ϥġ衣ޤ褦>
	% Msg8 <Nope, never heard of you. Now you die!!!>
	Msg8 <䡢̾ʤʹȤϤʤ͡>
	% Msg9 <You reclaimed your ancestral home, and met some distant relatives.>
	Msg9 <Ϥᤷˤ̤˽вä>
	% Msg10 <Ah, very mysterious... You must be \PC . Your adventures are known to us... In fact, you are of the same blood as our tribe! Put down your arms, you are welcome in our camp.>
	Msg10 <ʤԻ׵ĤʤȤġ \PC ˰㤤ʤ̤ϲ桹ΤäƤ뤾ġ¤ϡϲ桹ƱƤΤΤ¼Ǥϴޤ褦>
	% Msg11 <How can we trust you if you don't even give your name!? You have no honor! You will die here!>
	Msg11 <̼̾̾ԤɤѤȤΤΤ餺ᡪǲ̤Ƥ뤬褤>
	% Msg12 <Ah, money opens all doors. You are now free to explore our land... our tribe will be moving on soon anyhow.>
	Msg12 <褷Ϲκ⼡פǤϲ桹Ϥͳ⤭ġȤˤ桹Ϥ˰ư褦>
	% Msg13 <You don't have that kind of money! Now you will pay for wasting our time and making us disappointed!>
	Msg13 <ˤϤʶʤΤʤв桹λ̵֤̤ˤ桹򤬤äꤵƤ줿ʧäƤ餪>
	% Msg14 <If you aren't willing to pay, then you aren't welcome here!>
	Msg14 <ʧʤΤʤ顢Ǥϴޤ󤾡>
	% Msg15 <You aren't willing to pay? Who do you think you are that you can just come here and expect us to let you pass freely!?>
	Msg15 <ʧʤȡäƤƲ桹̵̤餻ƤȻפäƤʤơϲԤ>
	% Msg16 <\ELEMENT 4 the ravager chieftan is related to you.>
	Msg16 <άåԤĹ \ELEMENT 4 ̤˻äƤ롣>
	% Msg17 <Why should I believe that? You've only come to take what's ours! And now you will die for trespassing where you don't belong!>
	Msg17 <ɤƤ롩ϲ桹ʪå褿ʤ¾Ϥ˿ǻ෺>

	% Prompt1 <This is my land, and I will take it!>
	Prompt1 <%JFϤ%JFĺ>
	% Prompt2 <I am here to negotiate.>
	Prompt2 <Ĥ褿%JG>
	% Prompt3 <Don't shoot, I just want to talk.>
	Prompt3 <⤿ʤǤ졣ä򤷤ʤ>
	% Prompt4 <Surely you've heard of \PC !>
	Prompt4 <\PC ̾ʹȤϤ>
	% Prompt5 <My name isn't important.>
	Prompt5 <%JF̾ϤɤǤ⤤>
	% Prompt6 <Alright, I can give you that.>
	Prompt6 <ʬäʧ衣>
	% Prompt7 <That's too much money!>
	Prompt7 <ʤʧʤ衪>


	Plot 1
	% P1 = Initialization Counter
	Init_Start <ifNPCOK E2 else GoDelete if= V1 0 Memo 1 V= 1 1>
	start <ifNPCOK E2 else GoDelete if= V1 0 Memo 1 V= 1 1>
	GoDelete <S= 101 1 N= 3 E3 S= 105 -1 AdvancePlot 0>
	cleanup <AdvancePlot 0>
	% Msg1 <\ELEMENT 2 in \ELEMENT 1 has some information about your family history.>
	Msg1 <\ELEMENT 1  \ELEMENT 2  \PC ΰ²ˤˤĤΤäƤ롣>

	sub

	Persona 2
	greeting <NewChat Say 1 AddChat 1 AddChat 2>

	result1 <NewChat if= d2 1 else GoR1_2 XRMystery NAV_XRMResolved V= 2 10 V+ 2 d3 Say V2 V+ 2 5 History V2 Goto GoEndPlot>
	GoR1_2 <if# d3 1 else GoR1_3 XRMystery NAV_XRMItem V= 2 20 V+ 2 d2 sAY V2 V+ 2 5 History V2 Goto GoEndPlot>
	GoR1_3 <Say 31 History 36 Goto GoEndPlot>
	GoEndPlot <S= 101 1 S+ 102 1 N= 3 E3 S= 105 -1  AdvancePlot 0>

	result2 <NewChat Say 2>

	% Msg1 <My research at your ancestral home has finally turned up some interesting results... Would you like to hear about it?>
	Msg1 <ʤνĴ٤̣̤Ĥ˽ФޤġʹǤ>
	% Msg2 <Come back when you're less busy and I can explain it all to you then.>
	Msg2 <⤦֤ΤȤƤĴ̤ޤ礦>

	% Msg11 <Long ago, your family was a powerful ninja clan... but they were almost entirely wiped out by a rival clan. It's possible that the rival clan still exists, and they may not even have forgotten of this centuries-old conflict.>
	Msg11 <Ρʤΰ²϶ǦԤΰǤġŨФˤۤ˴ƤޤޤŨ礬ޤ¸³ƤǽϤޤĤϤβˤ錄褤ΤȤ˺Ƥʤ⤷ޤ>
	% Msg12 <You come from a noble line. During the Age of Superpowers your ancestors ruled this area. The site I investigated was a factory to produce "Cyclops" biosoldiers. Your family must have been very powerful. They probably had a lot of enemies...>
	Msg12 <ʤ̾ȤηƤޤĶλˤʤϤϰۤΤǤ䤬ĴϡCyclopsפȤХʼΤǤʤΰ²ϤȤƤ⶯äˤޤ󡣤餯Ũ¿äǤ礦ġ>
	% Msg13 <Your ancestors practiced an ancient form of martial arts. However, they were destroyed by a rival clan and scattered across the world. It's possible that this rival clan still exists.>
	Msg13 <ʤϤѤƤޤŨФˤ˴˻ФޤŨ礬̤¸³ƤǽϤޤ>

	% Msg16 <Your ancestors were ninjas whose enemies still exist today.>
	Msg16 <ʬǦ԰ǡΰ²ǤܤŨϸߤޤ¸³Ƥ롣>
	% Msg17 <Your ancestors were a noble house from the Age of Superpowers.>
	Msg17 <ʬĶλ夫³̾Ȥ>
	% Msg18 <Your ancestors were martial artists whose enemies still exist.>
	Msg18 <ʬѲȰǡΰ²ǤܤŨϸߤޤ¸³Ƥ롣>

	% Msg21 <Your ancestors came from a noble house of the Age of Superpowers. Many of them were high placed officers in the army. It's possible that your family heirlooms hold much information about this period.>
	Msg21 <ʤĶ̾ȽпȤǤ¿Ϸ׿˽Ƥޤʤΰ²βϤλ˴ؤˤ⤷ޤ>
	% Msg22 <In PreZero times, your ancestors were laborers. The site used to be a factory for "Cyclops" biosoldiers. One peasant stole something from the factory and the nobles burnt down the entire village, scattering your family across the globe.>
	Msg22 <쵪λ塢ʤϫƯԤǤξϡCyclopsפȤʪʼΤιäΤǤ̱ιߤäᡢ²¼ƤԤޤǤʤΰ²˻ФäΤǤ>

	% Msg26 <Your ancestors were nobles, who held items of great importance.>
	Msg26 <ʬ̾Ȥǡ˽פʪͭƤ>
	% Msg27 <You discovered that an ancestor stole something of great value.>
	Msg27 <ʬĤ˲ͤΤΤȤʬä>

	% Msg31 <Ever hear of "Idealist"? This was a genetic engineering project during the Age of Superpowers, seeking to create a better human being. Your ancestors were "Idealists", you perhaps contain some of their modified genes.>
	Msg31 <ۿפˤĤʹȤϤޤ󤫡Ķΰҹطײǡͥ줿ҥȤϤȤߤǤʤϤΡۿפäΤǤʤ餬ͭƤѤߤΰҤäƤ뤫⤷ޤ>
	% Msg36 <Your ancestors were genetically enhanced "Idealists".>
	Msg36 <ʬϰŪ˶줿ۿפ>

	% Prompt1 <Tell me what you've found.>
	Prompt1 <ʬäȤ򶵤Ƥ졣>
	% Prompt2 <I'll listen some other time.>
	Prompt2 <̤εʹƤ졣>


	Persona 4
	greeting <NewChat Say 1>
	% Msg1 <Well met, cousin! I hope we can fight alongside one another some day.>
	Msg1 <褦椬²衪Ĥ廊Ȥʡ>

	end

end
inv
	NPC Professor
	job <Archaeologist>
	Place <1 Ally Pass>

	NPC Mercenary
	job <Chieftan>
	teamdata <SD Ally>
	EquipChar 10000
	Mecha <Kojedo.txt>

end
