%%
%% There are three types of components here. The first merely links to some other 
%% subplot, such as GiveMission or Conversation. The second is the Lookfer, in which
%% the PC looks for the target when the scene involved is unknown. The third type
%% actually counts as bona fide adventure content on its own, so I've labeled that
%% bit "content positive".
%%


Plot
	name <Basic Challenge>
	desc <You're going to challenge some guy.>
	requires <#A +Tgt +Fch T:++ S:++ Common>

	% E1 is the scene where the meeting will take place.
	% E2 is the friend being met.
	% E3 is a location for the duel.
	Element1 <Grab 6>
	Element2 <Grab 5>
	Place2 <1 (Citizens) pass>
	Element3 <Scene Environs !Near -7>

	% SubPlot1 is the duel itself
	% SubPlot2 is the path if the PC wins the duel
	% SubPlot3 is the path if the PC loses the duel
	SubPlot1 <*CS_Duel 2 1 3>
	SubPlot2 <*CS_WinDuelVs 2>
	SubPlot3 <*CS_LoseDuelVs 2>

	% As long as we're still at the first phase, the NPC's death will end the plot.
	start <if= PlotStatus %plotid% 0 ifNPCDead %2% LoseComp 0 .changes>
	.changes <+T-- +F-->

	% V1 = Initialization Counter
	update <if= v1 0 V= 1 1 NPCLevel %2% StoryDL>

	% Branch activators
	.%id1%_%plotid%_GoWin <ifNPCOK %2% else GoE2Died SMemo 1 SetPlotStatus %plotid% %id2%>
	.%id1%_%plotid%_GoLose <SMemo 2 SetPlotStatus %plotid% %id3%>
	GoE2Died <SMemo 0 WinComp 0 .changes>

	Msg1 <You bested %name2% in a duel; \SPR %2% is waiting for you at %name1%.>
	Msg2 <You were defeated by %name2% in a duel; \SPR %2% is waiting for you at %name1%.>

	sub
		Persona 2
		greeting <if= PlotStatus %plotid% 0 else GoChat Goto GoFirstTime>
		*GoChat <*MISC_CHATTER>
		*GoFirstTime <*PCChallengeNPC GoMakeChallenge GoWussOut>
		GoMakeChallenge <StoryNote 1 SetPlotStatus %plotid% %id1% Goto GoAcceptChallenge>
		*GoAcceptChallenge <*IAcceptYourChallenge %3%>
		*GoWussOut <*GodImBored>
		Msg1 <You challenged %name2% to a duel in %name3%.>

		STC MS_CAFE
		SetID 1
	end

Plot
	name <Phone Job Offer: Allied Building>
	desc <The PC has to see someone about a job; here it is!>
	requires <#A +Tgt +Fmi S:-- Common>

	% E1 is a scene for this job offer
	% E2 is the NPC that the PC will speak with
	element1 <Scene Building Public !Near -7 !Ally -5>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the mission subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the mission to be offered
	SubPlot1 <*CS_GiveMission 2>

Plot
	name <Phone Job Offer>
	desc <The PC has to see someone about a job; here it is!>
	requires <#A +Tgt +Fmi S:-- Common>

	% E1 is a scene for this job offer
	% E2 is the NPC that the PC will speak with
	element1 <Scene Building Public !Near -7 !Okay -5>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the mission subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the mission to be offered
	SubPlot1 <*CS_GiveMission 2>

Plot
	name <Basic Job Offer>
	desc <The PC has to see someone about a job; here it is!>
	requires <#A +Tgt +Fmi S:++ Common>

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Grab 6>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the mission subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the mission to be offered
	SubPlot1 <*CS_GiveMission 2>

	sub
		STC MS_OFFICE
		SetID 1
	end

Plot
	name <Incidental Phone Job Offer>
	desc <The PC has to talk with someone; here it is!>
	requires <#A +Tgt (+F--|+Fmi) T:PCFAC S:-->

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Scene Building Public !Near -7 !Okay -5>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the conversation subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the mission to be had
	SubPlot1 <*CS_GiveMission 2>

Plot
	name <Incidental Job Offer>
	desc <The PC is going to see someone for no particular reason, and they have a mission.>
	requires <#A +Tgt +F-- T:PCFAC S:++>

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Grab 6>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the mission subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the mission to be offered
	SubPlot1 <*CS_GiveMission 2>

	sub
		STC MS_OFFICE
		SetID 1
	end

Plot
	name <Phone Conversation: Meeting Place>
	desc <The PC has to talk with someone; this component will happen at a good spot for a meeting.>
	requires <#A +Tgt (+F--|+Fin) S:-- Common ~T:FRIEND ~T:LOVER>

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Scene Meeting Public !Near -7 !Okay -5>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the conversation subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the conversation to be had
	SubPlot1 <*CS_Conversation 2>

Plot
	name <Phone Conversation>
	desc <The PC has to talk with someone; here it is!>
	requires <#A +Tgt (+F--|+Fin) S:-- Common>

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Scene Building Public !Near -7 !Okay -5>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the conversation subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the conversation to be had
	SubPlot1 <*CS_Conversation 2>

Plot
	name <Basic Conversation>
	desc <The PC has to talk with someone; here it is!>
	requires <#A +Tgt (+F--|+Fin) S:++ Common>

	% E1 is the scene where this component will take place
	% E2 is the NPC that the PC will speak with
	element1 <Grab 6>
	element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All this plot does is move the NPC and activate the conversation subplot
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	%% SubPlot1 is the conversation to be had
	SubPlot1 <*CS_Conversation 2>

	sub
		STC MS_CAFE
		SetID 1
	end

Plot
	name <Rescue Reward>
	desc <The PC has to speak to a person he just rescued.>
	requires <#A +Tgt +Frt S:++>
	Size 1

	% E1 is the scene where the meeting will take place.
	% E2 is the person who was rescued.
	Element1 <Grab 6>
	Element2 <Grab 5>
	Place2 <1 (Citizens) pass>

	% All the update does is start the rescue reward going...
	update <if= PlotStatus %plotid% 0 SetPlotStatus %plotid% %id1%>

	% The subplot contains the reaction/reward.
	SubPlot1 <*CS_ThanksForRescue 2>

	sub
		STC MS_CAFE
		SetID 1
	end

%%  ********************
%%  ***   LOOKFERS   ***
%%  ********************

Plot
	name <Locate Target NPC: Perm>
	desc <The PC needs to find an NPC for some reason, but no scene exists.>
	requires <#A +Tgt +Fpr S:-->
	Size 2

	% E1 is the character being sought.
	% E2 is the character who knows where E1 is.
	% E3 is a scene for the meeting
	Element1 <Grab 5>
	Place1 </>
	Element2 <Character !Near -7 !Okay 1>
	Element3 <Scene !Near -7 Building Public !Okay 1>

	start <if= PlotStatus %plotid% 0 ifNPCDead %2% NegateComp 0 na>

	sub
		Persona 2
		rumor <%name2% has seen %name1%.>
		*greeting <*LookingForNPC %1% GoSuccess GoFailure>
		GoSuccess <NewChat Say 1 SMemo 2 WinComp %3% .win>
		.win <>
		*GoFailure <*BrushOff&Questioning>
		Msg1 <As far as I know, %name1% is now at %name3%. I hope \SPR %1% isn't in any trouble.>
		Msg2 <%name2% told you that %name1% was at %name3%.>
	end

Plot
	name <Locate Target NPC: Meta>
	desc <The PC needs to find an NPC for some reason, but no scene exists.>
	requires <#A +Tgt +Fpr S:-->
	Size 2

	% E1 is the character being sought.
	% E2 is the character who knows where E1 is.
	% E3 is a scene for the meeting
	Element1 <Grab 5>
	Place1 </>
	Element2 <Character !Near -7 !Okay 1>
	Element3 <MetaScene !Near -7 *Building NeverFail>

	start <if= PlotStatus %plotid% 0 ifNPCDead %2% NegateComp 0 na>

	sub
		Persona 2
		rumor <%name2% has seen %name1%.>
		*greeting <*LookingForNPC %1% GoSuccess GoFailure>
		GoSuccess <NewChat Say 1 SMemo 2 WinComp %3% .win>
		.win <>
		*GoFailure <*BrushOff&Questioning>
		Msg1 <As far as I know, %name1% is now at %name3%. I hope \SPR %1% isn't in any trouble.>
		Msg2 <%name2% told you that %name1% was at %name3%.>
	end


Plot
	name <Degenerate Lookfer: Perm>
	desc <The PC needs to find an NPC for some reason. After speaking with an NPC, the search changes to +Tgt.>
	requires <#A +Tgt S:-->
	Size 2

	% E1 is the character being sought.
	% E2 is a public scene in the city, needed for NeverFail
	% E3 is the character who knows where E1 is.
	% E4 is a scene for the meeting
	Element1 <Grab 5>
	Place1 </>
	Element2 <Scene Public !Near -7 !Okay 1>
	Element3 <Character !Near -7 !Okay 1>
	Element4 <Scene !Near -7 Building Public !Okay 1>

	start <if= PlotStatus %plotid% 0 ifNPCDead %3% NegateComp 0 na>

	sub
		Persona 3
		rumor <%name3% knows where %name1% is.>
		*greeting <*LookingForNPC %1% GoSuccess GoFailure>
		GoSuccess <NewChat Say 1 SMemo 2 WinComp %4% .win>
		.win <>
		*GoFailure <*BrushOff&Questioning>
		Msg1 <The last time I saw \OPR %1% , %name1% was going to %name4%. That's where you should probably check.>
		Msg2 <%name3% told you that %name1% was at %name4%.>
	end

Plot
	name <Degenerate Lookfer: Meta>
	desc <The PC needs to find an NPC for some reason. After speaking with an NPC, the search changes to +Tgt.>
	requires <#A +Tgt S:-->
	Size 2

	% E1 is the character being sought.
	% E2 is a public scene in the city, needed for NeverFail
	% E3 is the character who knows where E1 is.
	% E4 is a scene for the meeting
	Element1 <Grab 5>
	Place1 </>
	Element2 <Scene Public !Near -7 !Okay 1>
	Element3 <Character !Near 2 !Okay 1 NeverFail>
	NeverFail3 <Citizen>
	Element4 <MetaScene !Near -7 *Building NeverFail>

	start <if= PlotStatus %plotid% 0 ifNPCDead %3% NegateComp 0 na>

	sub
		Persona 3
		rumor <%name3% knows where %name1% is.>
		*greeting <*LookingForNPC %1% GoSuccess GoFailure>
		GoSuccess <NewChat Say 1 SMemo 2 WinComp %4% .win>
		.win <>
		*GoFailure <*BrushOff&Questioning>
		Msg1 <The last time I saw \OPR %1% , %name1% was going to %name4%. That's where you should probably check.>
		Msg2 <%name3% told you that %name1% was at %name4%.>
	end

%%  *****************************
%%  ***   CONTENT  POSITIVE   ***
%%  *****************************

Plot
	name <Enemy is after me>
	desc <The target will tell you that the Enemy is after them.>
	requires <#A +Tgt +Fin T:++ S:META -T:FRIEND -T:FAMILY -T:ALLY -T:LOVER ~T:ENEMY E:++ (T:THIEF|T:ADVEN)>
	Size 1

	% E1 is the NPC being sought
	% E2 is his scene
	% E3 is the enemy
	Element1 <Grab 5>
	Place1 <2 (Citizens) Pass>
	Element2 <Grab 6>
	Element3 <Grab 1>

	start <if= PlotStatus %plotid% 0  ifNPCDead %1% LoseComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	.%id1%_%plotid1%_GoWin <SetPlotStatus %plotid2% %id2%     SMemo %id%01>
	.%id1%_%plotid1%_GoLoss <SMemo 0   History %id%02   DeleteNPC %1%   LoseComp 0 .%id%_loss>

	Msg%id%01 <You stopped %name3%'s plan. You should go tell %name1% at %name2%.>
	Msg%id%02 <%name1% was killed by %name3%.>

	% SubPlot1 is the enemy mission
	% SubPlot2 is the win task
	SubPlot1 <*:CS_StopNPCMission&IsEnemyNPC 3>
	SubPlot2 <*CS_WinTask 1>

	sub
		Persona 1
		special <UNLISTED>
		greeting <if= PlotStatus %plotid% %id% else .%id%_GoGreet   NewChat Say %id%01>
		*.%id%_GoGreet <*IHaveInformation&AboutNPC .%id%_GoTell %3%>
		.%id%_GoTell <NewChat Say %id%01 SMemo %id%02 History %id%03 SetPlotStatus %plotid% %id% SetPlotStatus %plotid1% %id1%>
		Msg%id%01 <%name3% is in town on some kind of mission. I don't know exactly what it is, since I'm hiding from \OPR %3% until it's finished... If \SPR %3% finds out I'm here, I'm as good as dead.>
		Msg%id%02 <You learned from %name1% that %name3% is in town on some kind of mission.>
		Msg%id%03 <You learned from %name1% that %name3% was in town.>

		STC MS_EmptyBuilding
		SetID 2
	end

Plot
	name <Parking Ticket Blues>
	desc <The PC's friend needs to pay off some fines.>
	requires <#A +Tgt S:-- T:THIEF T:FRIEND>
	Size 3

	% E1 is the character being sought.
	% E2 is the police officer who's looking for him.
	% E3 is a scene for the meeting
	Element1 <Grab 5>
	Place1 </>
	Element2 <Character !Near -7 POLIC>
	Element3 <Scene !Near -7 Building Public !Okay 1>

	start <if= PlotStatus %plotid% 0 ifNPCDead %3% NegateComp 0 na>

	sub
		Persona 2
		rumor <%name2% has been looking for %name1%.>
		% V1 = Fine Counter
		greeting <if= V1 0 else GoTell Goto GoCheckFirst>
		GoCheckFirst <*LookingForNPC&NoFailure %1% GoTell GoTell>
		GoTell <V= 1 Threat StoryDL 5 NewChat Say 1 StoryNote 2 AddChat 1 AddChat 2 AddChat 3 AddChat 4>
		GoReveal <StoryNote 10 WinComp %3% na>
		result1 <NewChat Say 3 AddChat 5 AddChat 4>
		result2 <ifConversation SkillTar StoryDL else GoR2Fail NewChat Say 4 Goto GoReveal>
		GoR2Fail <NewChat Say 5 AddChat 1 AddChat 3 AddChat 4>
		result3 <AddHeroic -1 NewChat Say 6 StoryNote 7 &SetTargetNPC 0 NegateComp %3% .negate>
		.negate <+Tgs +Fmi>
		result4 <NewChat Say 8>
		result5 <NewChat Say 9 Cash+ -V1 Goto GoReveal>
		Msg1 <%name1% is in hiding. I know this because I'm the one looking for \OPR %1% ; \SPR %1% 's got $ \VAL v1 worth of unpaid fines, and if I don't get that money then \SPR %1% 's going straight to the lockup.>
		Msg2 <You learned from %name2% that %name1% has many unpaid fines.>
		Msg3 <It would be kind of unorthodox, but as long as the fines get paid it's not my business to judge. That's be the judges.>
		Msg4 <Well, if you say it's important, I'll give %name1% some more time to raise the money... as long as \SPR %1% doesn't do anything illegal to raise it. Now that the heat is off you'll probably be able to find \OPR %1% at %name3% again.>
		Msg5 <Nothing is more important than upholding the law. I'm afraid I can't let up one bit.>
		Msg6 <Nope. I can't say that I do... though you might want to check at %name3%. I hear there's a lot going on over there.>
		Msg7 <After abandoning %name1%, %name2% suggested you find a job at %name3%.>
		Msg8 <Maybe while you're gone, %name1% will come back and pay the fines... I doubt it though.>
		Msg9 <There we go. Now that the fines are paid I expect you'll be able to find %name1% at %name3% again.>
		Msg10 <%name2% told you that %name1% could likely be found at %name3%.>
		Prompt1 <What about if I paid the fines?>
		CPrompt1 <ifG PC$ V1 Accept>
		Prompt2 <Look, could you cut \OPR %1% a little slack? It's important.>
		CPrompt2 <ifChatNPCAlly Accept>
		Prompt3 <Forget about %name1%, then. Do you know any job leads?>
		Prompt4 <I'll be back later.>
		Prompt5 <Here you go. [Give Money]>
	end


Plot
	name <They Say You're Tough>
	Size 1
	desc <You will be challenged to a duel.>
	requires <#A +Tgt (+F--|+Fch) (T:ADVEN|T:PDASS) (C:ADVEN|P:PDASS) -1:FRIEND -1:LOVER -1:FAMILY ~+Gpo ~+Gfa>

	% E1 is the scene where the meeting will take place.
	% E2 is the pilot being met.
	% E3 is a location for the duel.
	Element1 <Grab 6>
	Element2 <Grab 5>
	Place2 <1 (Citizens) pass>
	Element3 <Scene Environs !Near -7>

	% SubPlot1 is the duel itself
	% SubPlot2 is the path if the PC wins the duel
	% SubPlot3 is the path if the PC loses the duel
	SubPlot1 <*CS_Duel 2 1 3>
	SubPlot2 <*CS_WinDuelVs 2>
	SubPlot3 <*CS_LoseDuelVs 2>

	% V1 = Initialization Counter
	update <if= v1 0 V= 1 1 NPCLevel %2% StoryDL>

	% As long as we're still at the first phase, the NPC's death will end the plot.
	start <if= PlotStatus %plotid% 0 ifNPCDead %2% LoseComp 0 .changes>
	.changes <+T-- +F-->

	.%id1%_%plotid%_GoWin <ifNPCOK %2% else GoE2Died SMemo 1 SetPlotStatus %plotid% %id2%>
	.%id1%_%plotid%_GoLose <SMemo 2 SetPlotStatus %plotid% %id3%>
	GoE2Died <SMemo 0 WinComp 0 .changes>

	Msg1 <You bested %name2% in a duel; \SPR %2% is waiting for you at %name1%.>
	Msg2 <You were defeated by %name2% in a duel; \SPR %2% is waiting for you at %name1%.>

	sub
		Persona 2
		greeting <if= PlotStatus %plotid% 0 else GoChat Goto GoGreet>
		GoChat <NewChat SayAnything>
		*GoGreet <*TheySayYoureTough GoChallenge>
		GoChallenge <NewChat Say 1 AddChat 1 AddChat 2>
		result1 <EndCHat Say 2 History 3 SMemo 4 SetPlotStatus %plotid1% %id1%>
		result2 <NewChat Say 5 AddRenown -10  History 6 SMemo 0 LoseComp 0 .loss>
		.loss <+T-- +F-->
		Msg1 <I'd like to find out for myself. I challenge you to a duel- what do you say, me and you in %name3% right now?>
		Msg1_1 <>
		CMsg1_1 <ifNPCSociable Accept>
		Msg1_2 <>
		CMsg1_2 <ifNPCShy Accept>
		Msg1_3 <>
		CMsg1_3 <ifNPCEasygoing Accept>
		Msg1_4 <>
		CMsg1_4 <ifNPCPassionate Accept>
		Msg1_5 <>
		CMsg1_5 <ifNPCCheerful Accept>
		Msg1_6 <>
		CMsg1_6 <ifNPCMelancholy Accept>
		Msg2 <Cool. Meet me in %name3% whenever you're ready.>
		Msg3 <%name2% challenged you to a mecha duel.>
		Msg4 <%name2% challenged you to a mecha duel. You should go meet \OPR %2% in %name3% when you're ready.>
		Msg5 <You're chickening out? That's not cool at all.>
		Msg6 <%name2% challenged you to a mecha duel, but you refused.>
		Prompt1 <You're on. Let's do it.>
		Prompt2 <Sorry, but I've got more important things to do.>

		STC MS_CAFE
		SetID 1
	end

Plot
	name <Protect me from Enemy!>
	desc <The target will tell you that the Enemy is doing something.>
	requires <#A +Tgt +Fpr T:++ E:++ S:++>

	% E1 is the NPC being sought
	% E2 is his scene
	% E3 is the enemy
	Element1 <Grab 5>
	Place1 <2 (Citizens) Pass>
	Element2 <Grab 6>
	Element3 <Grab 1>

	start <if= PlotStatus %plotid% 0  ifNPCDead %1% LoseComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	.%id1%_%plotid1%_GoWin <SetPlotStatus %plotid2% %id2%     SMemo %id%01>
	.%id1%_%plotid1%_GoLoss <SMemo 0   History %id%02   DeleteNPC %1%   LoseComp 0 .%id%_loss>

	Msg%id%01 <You stopped %name3%'s plan. You should go tell %name1% at %name2%.>
	Msg%id%02 <%name1% was killed by %name3%.>

	% SubPlot1 is the enemy mission
	% SubPlot2 is the win task
	SubPlot1 <*:CS_StopNPCMission&IsEnemyNPC 3>
	SubPlot2 <*CS_WinTask&Protection 1>

	sub
		Persona 1
		special <UNLISTED>
		greeting <if# PlotStatus %plotid1% 0 else .%id%_GoGreet NewCHat Say %id%01>
		*.%id%_GoGreet <*ProtectCheckIn .%id%_GoTell>
		.%id%_GoTell <NewChat Say %id%02 SMemo %id%03 History %id%04 SetPlotStatus %plotid% %id% SetPlotStatus %plotid1% %id1% AddChat %id%01>
		result%id%01 <NewChat Say %id%05>
		Msg%id%01 <%name3% is still out there, somewhere...>
		Msg%id%02 <Thank goodness! %name3% is in town on some kind of mission; if \SPR %3% finds out where I am, I'm as good as dead.>
		Msg%id%03 <You learned from %name1% that %name3% is in town on some kind of mission.>
		Msg%id%04 <You learned from %name1% that %name3% was in town.>
		Msg%id%05 <I believe you can. Come back here and let me know if you succeed; it'd be really nice to walk outside again.>
		Prompt%id%01 <Don't worry. I plan to reach %name3% first.>

		STC MS_EmptyBuilding
		SetID 2
	end


Plot
	name <Protect Me For Info>
	desc <The person you sought seeks protection from your enemy.>
	requires <#A +Tgt +Fin -T:ENEMY -T:FRIEND -T:ALLY -T:LOVER -T:FAMILY F:++ T:NOFAC T:A.--- S:++ S:META R:-->
	Size 2

	% Element1 is the hideout
	% Element2 is the NPC
	% Element3 is the enemy faction
	% Element4 is a public scene, in case the PC rejects E2's offer
	Element1 <Grab 6>
	Element2 <Grab 5>
	Place2 <1 (Citizens) pass>
	Element3 <Grab 2>
	Element4 <Scene Public !Near -7>

	%% P1 = Initialization Counter

	% If the NPC dies, this plot counts as a loss.
	start <ifNPCDead %2% History 1 LoseComp 0 .loss>
	.loss <+T-- +F-->

	update <if= P1 0 P= 1 1 NPCLevel %2% StoryDL  SetXXRAttitude %2% XXR_A_HasSecret>

	Msg1 <%name2% died before you could learn anything.>

	sub
		Persona 2
		special <UNLISTED>
		*greeting <*WhatDoYouWantWithMe&Information GoCheckAlignment>
		% Please forgive the messy numbering here. As a root plot, the messages and prompts don't
		% strictly need the %id% in front, but I have a cold and am confused in the head so the
		% messages use 1-99 and the prompts use %id%01-%id%99.
		GoCheckAlignment <if= v1 0 else GoMakeOffer NewChat Say 1 AddChat %id%01 AddChat %id%02 AddChat %id%03 AddChat %id%04>
		GoMakeOffer <V= 1 1 NewChat Say 2 AddChat %id%05 AddCHat %id%06>
		GoJoinLance <&SetPartnerNPC %2% &AddPartnerToLance &SetTargetNPC 0 WinComp %4% .next>
		.next <+Tgs +Fin>
		result%id%01 <AddSociable   d6   Goto GoMakeOffer>
		result%id%02 <Goto GoMakeOffer>
		result%id%03 <AddLawful 1        Goto GoMakeOffer>
		result%id%04 <AddSociable -d10   Goto GoMakeOffer>
		result%id%05 <NewCHat Say 3 SMemo 4 History 5 Goto GoJoinLance>
		result%id%06 <NewChat Say 6 AddChat %id%07 AddChat %id%08>
		result%id%07 <NewChat Say 7 SMemo 4 History 8 Goto GoJoinLance>
		result%id%08 <NewChat Say 9 StoryNote 4 WinComp %4% .next>
		Msg1 <So you're looking for information, huh? How do I know you're not with %name3%?>
		Msg2 <Fair enough. Look, I'm sure there's some reason why %name3% is after me, but I don't know anything. At least I don't think I do.>
		Msg3 <You know, I'm not entirely defenseless by myself... but I suppose that I could use some help. Alright then, let's go together! I hear that there's something interesting going on at %name4%; maybe we could learn something.>
		Msg4 <%name2% suggested that you might learn something at %name4%.>
		Msg5 <%name2% joined your lance for protection from %name3%.>
		Msg6 <What's that supposed to mean!? I've held my own against %name3%, haven't I?>
		Msg7 <I will! That'll show you! I can even prove that I know something you don't- some members of %name3% have been seen at %name4% recently. If we go there, maybe we can learn something.>
		Msg8 <%name2% joined your lance to help fight %name3%.>
		Msg9 <I know that some of them have recently been seen at %name4%. Maybe if you head over there right away you can get rid of some of that ignorance!>
		Prompt%id%01 <If I was with %name3% you'd already be dead.>
		CPrompt%id%01 <if# PCFac %3% Accept>
		Prompt%id%02 <Relax, I'm fighting against %name3%.>
		Prompt%id%03 <Actually, I am with %name3%, but I'm a good one.>
		CPrompt%id%03 <if= PCFac %3% Accept>
		Prompt%id%04 <You don't know that.>
		Prompt%id%05 <I could protect you from them.>
		Prompt%id%06 <You're useless.>
		Prompt%id%07 <Want to prove it? Join me, let's fight them together.>
		Prompt%id%08 <You don't know anything about %name3%.>

		STC MS_EmptyBuilding
		SetID 1
	end

