Plot 0
	name <Combat Template>
	% v1.1 :  Added memo
	% v1.2 :  Bug fixed: Third option added to GoNoAutomatic

	% This is a skeleton for a generic combat mission.
	% You can make it into a complete combat mission just
	% by filling in the blanks in the MESSAGE BLOCKs below.


	% **********************
	% *** ELEMENTS BLOCK ***
	% **********************
	% E1 is the faction behind the story
	Element1 <Grab 2>

	% E2 is the NPC who will give the PC the mission.
	% Right now it will just be a member of E1.
	Element2 <Character !Comrade 1>


	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	% V1 = Time Limit
	% V2 = Combat Indicator, if V2=1 combat has been entered
	% V3 = Email sent indicator.

	% On a cleanup request, delete this plot unless combat has been
	% entered.
	cleanup <if= V2 0 AdvancePlot 0>

	% Time limit. This plot will conclude in one day, or immediately
	% if NPC E2 is killed.
	start <ifPersona E2 else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400>
	GoCheckTime <if= V2 0 ifG ComTime V1 if= d2 1 else GoDelete S+ 102 1 AdvancePlot 0>
	GoDelete <AdvancePlot 0>

	% 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.
	% Finally, if the player won, the calling story's faction victory
	% count (by default now story variable 101) will be increased.
	nu1 <if= T1 0 if= V2 1  V= 2 2  Reputation 6 -7>
	nu2 <if= T2 0 if= V2 1  V= 2 3  Reputation 6  1  XPV 50  S+ 102 1>

	% Email check. If the PC belongs to the same faction as the NPC,
	% he may recieve an email about the mission. Make a check every
	% 5 minutes.
	5Min <if= d50 23 if= V3 0 if= PCFac E1 V= 3 1 Email d5>
	% Alternate Version: send email if PC is well-liked, regardless
	% of faction affiliation.
	% 5Min <if= d50 23 if= V3 0 ifG RReact E2 d70 V= 3 1 Email d5>


	% *********************
	% *** MESSAGE BLOCK ***
	% *********************

	% 01 - 05 :  Email Messages.
	%  The NPC is offering the PC a mission via email.
	Msg1 <\PERSONA E2 @ \SCENE EScene 2 :// We stand ready to attack \NARRATIVE 3 . Come here for mission details.>
	Msg2 <\PERSONA E2 @ \SCENE EScene 2 :// Our forces are ready to take \NARRATIVE 3 . Come here for mission details.>
	Msg3 <\PERSONA E2 @ \SCENE EScene 2 :// There's a mission for you in \SCENE EScene 2 . Return quickly.>
	Msg4 <\PERSONA E2 @ \SCENE EScene 2 :// Preparations are underway for FedTer invasion. Come here to recieve mission orders.>
	Msg5 <\PERSONA E2 @ \SCENE EScene 2 :// I have a job for you. Come here quickly.>


sub
	% This next bit is the conversation which will happen when the
	% PC speaks to E2.
	Persona 2

	% Fill in something for the rumor string, so the PC will know who
	% has a job to offer. !2 will add the name of the NPC, while !1
	% will add the name of the faction.
	rumor <!2 is coordinating an attack against the FedTer.>


	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	% If you're feeling faint of heart, just skip this
	% and jump straight to the messages block below.
	% Here are the variables used in this conversation:
	%  V1 = Job offer counter, V1=1 is job offered, V1=-1 if job denied
	%  V2 = Message Randomizer
	%  V3 = Threat value of enemy mecha
	%  V4 = Reward offered to PC for the mission
	% At startup, first check to see whether the PC has already
	% completed the mission or not.
	Greeting <NewChat if= P2 3 else GoCheckLoss Say d5 CashPrize V4 AdvancePlot 0>
	GoCheckLoss <if= P2 2 else GoCheckJob V= 2 5 V+ 2 d5 Say V2 AdvancePlot 0>
	GoCheckJob <if= V1 1 else GoCheckFirst Say 101 Goto GoAddComOps>

	% The first time the PC meets the NPC, the PC will be given the
	% mission automatically if he's part of the same faction, or if
	% he is a friend of the NPC, or if he's already been sent email.
	GoCheckFirst <if= V1 0 else GoDenied V= 1 -1 V= 3 Threat FacVar E1 1000 110 V= 4 Reward V3 150 if= PCFac E1 else GoCheckEmail V= 2 10 V+ 2 d5 Say V2 Goto GoAddComOps>
	GoCheckEmail <if= P3 1 else GoCheckFriend V= 2 10 V+ 2 d5 Say V2 Goto GoAddComOps>
	% If the reaction score is greater than 40, PC will automatically
	% be offered the job, but unlike above will not be automatically
	% expected to accept it,
	GoCheckFriend <if# PCFac N1 else GoDenied ifG 1 S5 else GoDenied ifG React 50 else GoNoAutomatic V= 2 15 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>
	% If the PC is not automatically offered the job, there's still
	% a chance to get the job... as long as the NPC doesn't hate him.
	GoNoAutomatic <ifG React d30 else GoDenied V= 2 20 V+ 2 d5 Say V2 V= 2 10 V+ 2 d3 AddChat V2 V= 2 13 V+ 2 d3 AddChat V2 V= 2 16 V+ 2 d3 AddChat V2>
	GoDenied <V= 1 -1 SayAnything>

	GoAddComOps <V= 1 1 AddChat d2 V= 2 2 V+ 2 d2 AddChat V2 V= 2 4 V+ 2 d2 AddChat V2 Memo 107>

	% The PC will enter combat here.
	result1 <EndChat V= 2 35 V+ 2 d5 Say V2 SavePos P= 2 1 Dynamic 2 V3 .nu1 .nu2 S+ 5 -1 Encounter 25 25 .edesc>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Return>
	.edesc <!M \VAL N1>
	result2 <Goto Result1>

	% The PC needs some time to get ready.
	result3 <NewChat Say 103>
	result4 <Goto Result3>

	% The PC will be told the enemy's point value.
	result5 <NewChat V= 2 25 V+ 2 d5 Say V2 AddChat 1 AddChat 3>
	result6 <Goto result5>

	% The PC accepts the job offer.
	result7 <NewChat V= 2 10 V+ 2 d5 Say V2 Goto GoAddComOps>
	result8 <Goto result7>

	% The PC refuses the job offer.
	result9 <NewChat Say 102 V= 1 -1>
	result10 <Goto result9>

	% The PC tries to get the job via "PLAN A"- be forceful and
	% convincing. This plan uses Intimidation skill in order to
	% succeed. If you want to change it, some alternate "PLAN A"
	% types are presented... uncomment the one you like.
	result11 <NewChat ifG Intimidation 10 else GoR11Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	% The PC will impress the NPC with LAWFUL reputation...
	% result11 <NewChat ifG PCRep 2 30 else GoR11Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	% The PC will impress the NPC with HEROIC reputation...
	% result11 <NewChat ifG PCRep 1 30 else GoR11Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	result12 <Goto result11>
	result13 <Goto result11>

	% PLAN "A", whatever it was, has failed...
	GoR11Lose <NewChat Say 104 V= 1 -1>


	% The PC tries to get the job via "PLAN A"- be friendly.
	% This is done with the Conversation skill.
	result14 <NewChat ifG Conversation 15 else GoR14Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	% The PC will impress the NPC with RENOWNED reputation...
	% result14 <NewChat ifG PCRep 6 FacVar E1 1000 else GoR14Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	% The PC will impress the NPC with HEROIC reputation...
	% result14 <NewChat ifG PCRep 1 30 else GoR14Lose V= 2 30 V+ 2 d5 Say V2 V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2>

	result15 <Goto result14>
	result16 <Goto result14>

	% PLAN "B", whatever it was, has failed...
	GoR14Lose <NewChat Say 105 V= 1 -1>

	% The player doesn't want this stinkin' job.
	result17 <NewChat Say 106 V= 1 -1>
	result18 <Goto result17>
	result19 <Goto result17>


	% *********************
	% *** MESSAGE BLOCK ***
	% *********************

	% 01 - 05 :  Player has won the battle and is being paid.
	Msg1 <Good job. This world shall be ours!>
	Msg2 <You did well out there. Here's your pay.>
	Msg3 <Congratulations, you did it. Here's your pay.>
	Msg4 <Here's your pay for a job well done.>
	Msg5 <Here's your pay.>

	% 06 - 10 :  Player has lost the battle.
	Msg6 <You lost.>
	Msg7 <The mission was a failure.>
	Msg8 <You have failed us.>
	Msg9 <Hopefully the rest of the campaign will go better than that last mission.>
	Msg10 <The mission was a complete disaster.>

	% 11 - 15 :  Description of mission.
	Msg11 <We need someone to eliminate their western garrison. You'll get $ \VAL V4 for the mission.>
	Msg12 <You must destroy the enemy's secondary strike force. I can offer you $ \VAL V4 for the job.>
	Msg13 <I want you to destroy their long range patrol squad, so our recon units can get closer to the city. You'll get $ \VAL V4 upon successfully completing the mission.>
	Msg14 <Eliminate the mecha guarding the eastern pass into town. Pay for this mission is $ \VAL V4 .>
	Msg15 <Destroy the mecha squad currently stationed at these coordinates. The reward for this mission is $ \VAL V4 , payable upon completion.>

	% 16 - 20 :  Player is asked if he is looking for a job.
	Msg16 <Are you looking for a job? If you'd like to work for \ELEMENT 1 , I have a job you might be able to do.>
	Msg17 <We are mobilizing troops to move into \NARRATIVE 3 . I have a combat mission avaliable, if you'd like to take part.>
	Msg18 <Soon \ELEMENT 1 will be taking over \NARRATIVE 3 . I have a combat mission coming up, if you'd like to take part.>
	Msg19 <If you're looking for work, \ELEMENT 1 needs some mercenary pilots for our invasion of \NARRATIVE 3 .>
	Msg20 <If you want a job, \ELEMENT 1 needs some more pilots to help with our invasion of \NARRATIVE 3 .>

	% 21 - 25 :  NPC implies job, PC might have chance to get it.
	Msg21 <Currently \ELEMENT 1 is invading \NARRATIVE 3 .>
	Msg22 <Our side is expanding... \NARRATIVE 3 will soon belong to \ELEMENT 1 !>
	Msg23 <We're expanding our borders. Soon \NARRATIVE 3 will be under the control of \ELEMENT 1 .>
	Msg24 <Someday \ELEMENT 1 will be the dominant power on Earth.>
	Msg25 <You should know that \ELEMENT 1 needs resources, and the Federated Territories is the best place to get them.>

	% 26 - 30 :  PC will be told exact enemy point value.
	%  use "\VAL V3 " to insert the value.
	Msg26 <Our reports indicate that you'll be up against \VAL V3 threat points worth of enemy hardware. Do you feel up to the challenge?>
	Msg27 <They have \val v3 tactical points of mecha.>
	Msg28 <You will be facing \VAL V3 points worth of mecha.>
	Msg29 <You'll have to defeat around \VAL V3 points of mecha.>
	Msg30 <They have at least \VAL V3 points worth of mecha guardinag their base.>

	% 31 - 35 :  "PLAN A" or "PLAN B" worked... the PC is offered
	%  a job and may choose either prompt7/8 to accept or prompt9/10
	%  to reject it.
	Msg31 <Maybe you could be of use to us. How would you like to run a mission for \ELEMENT 1 ?>
	Msg32 <If you're looking for work, we have lots of jobs avalaible for mercenary pilots. What do you say?>
	Msg33 <I may have a job for you, as long as you don't mind fighting \NARRATIVE 1 . How about it?>
	Msg34 <How would you like to work for \ELEMENT 1 ? I have a combat mission right now, if you're up for it.>
	Msg35 <I've got a combat mission against \NARRATIVE 1 , if you'd like to work for \ELEMENT 1 .>

	% 36 - 40 :  Combat is starting.
	Msg36 <Destroy them all. Return here afterwards and I'll give you your pay.>
	Msg37 <Come back here after you're finished and I'll give you your pay.>
	Msg38 <I'll upload the mission coordinates to your mecha's navcomp. Good luck.>
	Msg39 <Good luck.>
	Msg40 <Here are the coordinates. Come back once you've finished and I'll pay you then.>


	% 101 :  Player accepted job, then left to get ready.
	Msg101 <Are you ready to start the mission?>
	% 102 :  Player has refused to take job; answer to prompts 9-10.
	Msg102 <That's too bad.>
	% 103 :  Player has asked for some time to get ready.
	Msg103 <Okay. Hurry back once your equipment is in shape and we can start the mission then.>
	% 104 :  "PLAN A" has failed, and the PC is not offered a job.
	Msg104 <I don't think so.>
	% 105 :  "PLAN B" has failed, and the PC is not offered a job.
	Msg105 <We have all the pilots we need.>
	% 106 :  Player doesn't want job; answer to prompts 17-19.
	msg106 <I am far too  busy to chat. Goodbye.>
	% 107 :  Memo
	msg107 <\ELEMENT 2 in \SCENE EScene 2 offered you a combat mission against \NARRATIVE 1.>

	% 01 - 02 :  Ready to start the mission
	Prompt1 <I'm ready to go.>
	Prompt2 <All ready to move out.>

	% 03 - 04 :  Need time to get ready first.
	Prompt3 <Give me some time to get ready.>
	Prompt4 <I need to repair my mek first.>

	% 05 - 06 :  What is the enemy point value?
	Prompt5 <What am I up against out there?>
	Prompt6 <What will I be facing?>

	% 07 - 08 :  After being asked if he wants a job, PC says yes.
	Prompt7 <Give me the specifics.>
	Prompt8 <I'd like that.>

	% 09 - 10 :  After being asked if he wants a job, PC says no.
	Prompt9 <No thanks.>
	Prompt10 <This isn't my kind of job.>

	% 11 - 13 : Player tries to get job using PLAN "A".
	%   By default, PLAN "A" is to sound tough and experienced.
	Prompt11 <I'm the greatest pilot. You need me.>
	Prompt12 <Need an ace on your team?>
	Prompt13 <I could join you, for a price...>

	% 14 - 16 : Player tries to get job using PLAN "B".
	%   By default, PLAN "B" is to be friendly and personable.
	Prompt14 <Maybe I could help you with that.>
	Prompt15 <Have any jobs avaliable?>
	Prompt16 <I'm looking for a job.>

	% 17 - 19 : Player doesn't much care for the job.
	Prompt17 <I don't want to get involved.>
	Prompt18 <Your fight doesn't concern me.>
	Prompt19 <Big deal.>


end

