# Copyright (c) 2015 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "First Contact: Hai"
	landing
	source
		government "Hai"
		not attributes "uninhabited"
	on offer
		conversation
			branch unfettered
				has "First Contact: Unfettered: offered"
			branch news1
				has "hr: heard the news"
			`This planet is populated by an alien species that resemble giant, intelligent squirrels. However, the most surprising aspect of the spaceport is not the aliens, but the fact that human merchants and other civilians are walking among them and are clearly at home here. Would you like to find someone who can tell you what is going on here?`
			choice
				`	(Sure.)`
					goto sure1
				`	(Not right now.)`
					defer
			
			label news1
			`This planet is populated by an alien species that resemble giant, intelligent squirrels. Their ships look exactly like the ones that you saw on the news. But despite the violence that Campbell spoke of, there are human merchants and other civilians walking among them that are clearly at home here.`
			
			label sure1
			`	You walk up to a human merchant who is busy haggling with one of the aliens. They interrupt their conversation when they see you approaching, and the human gestures for you to join them. "You look totally lost," he says. "First time down the rabbit hole?"`
			`	You nod. The alien reaches out a paw to shake hands with you. "Welcome to Hai space," they say. "We are people of peace, and you are free to visit us or even live among us. Our worlds provide enough bounty for all."`
				goto next
			
			label unfettered
			branch news2
				has "hr: heard the news"
			`The Hai here seem more friendly and approachable than those you met earlier. Even more surprising though is the fact that human merchants and other civilians are walking among them and are clearly at home here. Would you like to find someone who can tell you what is going on here?`
			choice
				`	(Sure.)`
					goto sure2
				`	(Not right now.)`
					defer
			
			label news2
			`The Hai here seem more friendly and approachable than those you met earlier. Surprisingly, there are human merchants and other civilians walking among them that are clearly at home here, in stark contrast to the other Hai and the violence that Campbell spoke of.`
			
			label sure2
			`	You walk up to a human merchant who is busy haggling with one of the Hai. They interrupt their conversation when they see you approaching, and the human gestures for you to join them. "You look lost," he says. "First time down the rabbit hole?"`
			`	"No, I've actually met with the Hai up north," you respond. The merchant looks slightly concerned with this, but the Hai only seems to sigh.`
			`	"Ah, you have met our wayward sisters and brothers. I hope that they did not cause you too much trouble, for they are misled in their ways," they say. "Welcome to Hai space. Unlike those that you met before, the rest of us are a people of peace, and you are free to visit us or even live among us. Our worlds provide enough bounty for all."`
			
			label next
			`	You glance quickly at the human merchant to see his expression, wondering if these aliens can indeed be so benign, but his expression is calm and untroubled. "It's true," he says, "look around you. These buildings have stood for thousands of years. Hai society is so advanced, they need almost no resources to maintain it."`
			branch skip
				not "hr: heard the news"
			choice
				`	"Campbell didn't mention anything about humans living here on the news."`
				`	"This place looks a lot calmer than it did on the news."`
			branch reached
				has "main plot completed date"
				"days since start" - "main plot completed date" > 260
			`	"The news?" the merchant asks while raising an eyebrow? "What do you mean 'on the news'?" You explain the situation with Campbell's video of Hai ships in combat and how it was all over the news back in human space. "Ah, I see. Well there's a lot of stuff that this 'Campbell' left out," the merchant says while looking very disappointed. "Please, judge the Hai for yourself."`
				goto skip
			label reached
			`	"Ah, yes. Well there's a lot of stuff that Campbell left out with that little stunt of his," the merchant says while looking very disappointed. "I'm just hoping that life here stays quiet. And please, judge the Hai for yourself."`
			label skip
			branch wormhole
				has "wormhole alpha found"
			choice
				`	"How did humanity reach this place? Did they use jump drives?"`
			`	The human merchant raises an eyebrow. "Can't say I'm familiar with what a jump drive is. In case you aren't in the know, though, there's a wormhole in Hai space that connects back to a secluded part of human space. Don't bother trying to figure out why and how it's there, because not even the Hai know."`
			label wormhole
			choice
				`	"Why do you allow humans to settle here?"`
				`	"What do you ask for in return for letting humans settle here?"`
			
			`	"Humans are a young species," the Hai says, "full of energy, full of new ideas. And the Hai are old, and everything we do is what we have done before. When humans go on vacation, they travel to a world with perfect weather, sunny every day. When Hai go on vacation, we visit the stormiest world, to find unpredictability and change. Humans are so strange, that to speak with a human is like a small vacation." They smile, and you catch a glimpse of its massive incisors. Based on your knowledge of xenobiology you would guess that the Hai are herbivores, but you can't be certain.`
			branch hostile
				has "First Contact: Unfettered: offered"
			choice
				`	"So I'm allowed to travel throughout your territory if I want?"`
					goto travel
				`	"How come people back in human space don't know that you are here?"`
					goto human
			
			label hostile
			choice
				`	"If your people are peaceful then why are the Hai from the north so hostile?"`
					goto why
				`	"How come people back in human space don't know that you are here?"`
			
			label human
			`	The human merchant laughs. "Probably because most of us came here to escape from the chaos and fighting in human space. The last thing we want is for it to follow us here. Not that I'm saying you can't tell anyone about the wormhole, but if I were you I wouldn't go spreading the news too widely either. And take a look around Hai space before you leave; you'll find that we could learn a lot from them."`
			branch question
				has "First Contact: Unfettered: offered"
			`	"So I can travel anywhere I want in your territory?" you ask the Hai.`
			
			label travel
			`	"Yes," they say, "but be careful. The north is the territory of some renegade Hai who are misled in their ways: bandits and pirates, living off what they steal from the rest of us. If you travel among them, you will not be safe."`
			`	"Also," the human adds, "I've heard rumors that the 'Unfettered' Hai are trying to get human captains who land on their worlds to do some tasks for them. I'm not particularly interested in finding out what those tasks are, but if you see something suspicious happening, that might be it."`
				goto end
			
			label question
			`	"If your people are peaceful then why are the Hai from the north so hostile?" you ask the Hai.`
			
			label why
			`	"I am young, and the origins of our 'Unfettered' brethren are before my time," they respond. "If you want to know more, it might be wise to find someone much older than myself to ask."`
			
			label end
			`	You talk for a while longer, but do not gain much additional information except that several of their worlds are willing to sell Hai technology even to human beings. You thank them both for stopping to talk with you, and the Hai responds, "We are always glad to welcome new friends. May peace dwell in your heart until we meet again."`
				decline
	on decline
		log "Factions" "Hai" `The Hai are a species of giant, intelligent rodents, who live to the north of human space. They allow any humans who discover their territory to live alongside them, and to trade with them and purchase their technology.`

mission "Discovered Hai Space"
	landing
	invisible
	source
		government "Hai" "Hai (Unfettered)"
	on offer
		event "label hai space"
		fail

event "label hai space"
	galaxy "label hai"
		sprite "label/hai"

mission "Discovered Wormhole Alpha"
	landing
	invisible
	to complete
		never
	on enter "Ultima Thule"
		set "wormhole alpha found"
		fail



mission "Assisting Hai"
	assisting
	repeat
	to offer
		random < 19
	source
		government "Hai" "Hai Merchant" "Hai Merchant (Human)"
		not attributes "automaton"
	on offer
		payment 30000
		conversation "assisting merchant hazardous"
	destination "Hai-home"



mission "Ask the Hai about the Unfettered"
	landing
	source
		government "Hai"
		not attributes "uninhabited"
	to offer
		has "First Contact: Hai: offered"
		has "First Contact: Unfettered: offered"
	on offer
		conversation
			`The Unfettered Hai say that they are the "true Hai," and seem to think that the other Hai are oppressing them, but another Hai that you spoke to said that the Unfettered Hai are simply misled. Would you like to look for someone here who can tell you more of the story?`
			choice
				`	(Yes.)`
				`	(No.)`
					decline
			`	You find an elderly-looking Hai who is sitting on a bench watching the starships land and take off. As you approach, he says, "Hello human."`
			choice
				`	"Hello. I've met some of the Unfettered Hai. What can you tell me about them?"`
				`	"Hello. Can you tell me why you are at war with the other Hai who live to the north?"`
					goto war
			`	He says, "Ah, our wayward sisters and brothers to the north. You have surely seen what our society is like: safe, stable, predictable, deliberate. It suits most of us well. But there are those..."`
				goto raids
			label war
			`	He says, "I would not call it war. We launch no raids on them. We only defend when they attack. And, we supply them with food and other things needful for life. They are not our enemies, they are just those who do not fit in. You have surely seen what our society is like: safe, stable, predictable, deliberate. It suits most of us well. But there are those..."`
			label raids
			`	He pauses. "No, I am telling this unfairly. I will start again. Hundreds of years ago, when I was young, our territory was raided by aliens from the east, who came in massive warships and plundered our worlds. In those days there were some Hai who were brave enough to risk their lives to defend us. The raids lasted for decades, then abruptly stopped.`
			`	"Most of those who had fought the invaders were glad to return to ordinary life, but there were some for whom life now seemed bland and meaningless without the excitement and chaos of war. They started colonies in the systems to the north, and fought amongst themselves, and mismanaged the land, and grew in numbers. And now their worlds cannot feed them all, and they invade us and tell stories to put blame on us for their failures."`
			choice
				`	"Shouldn't they be treated with gratitude for defending you against the raiders?"`
				`	"They said the Drak altered the Hai to make them less aggressive. Is that true?"`
					goto drak
				`	"That's all I wanted to know. Thanks."`
					decline
			`	"They were, and still should be. There will always be times when our society needs them. Only at this time, the need is not so great. There is no new frontier for them to explore, no worthy challenges for them to face. And we fear what would happen if they ventured south and gained access to the wormhole, so we must force them to stay where they are."`
			choice
				`	"They said the Drak altered the Hai to make them less aggressive. Is that true?"`
				`	"That's all I wanted to know. Thanks."`
					decline
			label drak
			`	"No," he says, "it is a story they invented, that the Hai were destined to be masters of the galaxy but the Drak and the Quarg prevented us. The story is not true. Our civilization beyond the wormhole was brought down by infighting and unwise governance. Amid the wreckage we studied and thought and argued and came to believe that we could rule a small territory with stability and peace, or hold more worlds but with constant turmoil. We chose stability, and relinquished those worlds."`
			choice
				`	"So you don't think the Drak are keeping us all in cages?"`
				`	"That's all I wanted to know. Thanks."`
					decline
			`	He thinks about the question for a while, then says, "Sometimes we make a fire for cooking food. The fire consumes much wood, and the flames are tall, too wild and hot to cook food well. Then the wood becomes coals that burn slowly with no flames or smoke, and when you gather them they are good for roasting meat or even baking bread. Perhaps each species must consume many worlds and many resources before learning to burn slowly, and the wisdom of the Drak is to allow them to do so. But when they find balance, as we did, they no longer need so much space."`
			`	You thank him for taking time to speak with you, and say goodbye.`
				decline



mission "Hai Sympathizer Warning"
	invisible
	source
		government "Hai"
		not attributes "uninhabited" "retirement"
	to offer
		"reputation: Hai Merchant (Sympathizers)" < 0
		not "warned about hai merchant politics"
	on offer
		log `Got spoken to by a Hai merchant at a spaceport bar after a firefight. Was warned about the factions among Hai merchants and the danger of getting in trouble if sympathizers to the Unfettered get caught in the cross-fire when fighting the Unfettered themselves. Learned that, as an outsider, "self-defense" is not an adequate argument where the deaths of Hai citizens are involved.`
		set "warned about hai merchant politics"
		conversation
			`As you sit in a spaceport bar waiting for the food that you've ordered, a Hai unceremoniously pulls up a chair opposite you and takes a seat. He looks to be a merchant, and one who has seen more than a few things besides. He squints at you before speaking, "You are Captain <last>, are you not?"`
			choice
				`	"That would be me."`
					goto acknowledge
				`	"I think you have the wrong captain."`
			`	He slaps a device on the table, and a small holographic projection of your face springs up and begins rotating around. "No, I think not."`
			label acknowledge
			`	He heaves a sigh. "You've been fighting the Unfettered, you see, and there are some Hai that don't take too kindly to that. They view you as an outsider sticking your nose into Hai internal politics. Some of those are what we merchants like to call Sympathizers, and they can get a little carried away with themselves and fire off a few shots if they see someone like yourself getting a little too gun-happy where the Unfettered are concerned."`
			`	With a wave of his hand he indicates the spaceport around you. "You might have potentially noticed some difficulty landing. You see, because there are lots of people who don't like outsiders putting their noses in where they're not wanted, if you happen to shoot back and accidentally destroy a Sympathizer's ship, the authorities don't much care who shot first. There are enough of those opinions to ensure that if you shoot down a Sympathizer, it is treated no differently than if you shot down any other Hai merchant. The security forces will treat it the same.`
			`	"Now the merchants, we're a different matter. It is a topic of great and ongoing debate among us, and some people are less offended when you shoot down someone they've been arguing with. Everyone has friends on all sides though, so you should watch yourself nonetheless. Sympathizers may become upset enough to shoot at you anywhere they see you, but the simple fact of the matter is that, if you retaliate against a Hai, any Hai, it'll upset someone and count against you. Even if that Hai was a Sympathizer, and even if they shot first."`
			`	He looks at you very seriously to make sure what he's said has sunk in.`
			branch "low reputation"
				"reputation: Hai" < 1
			choice
				`	"I understand, thank you for warning me."`
					goto end
				`	"Why should I get in trouble for defending myself against Sympathizers?"`
					goto defending
			label "low reputation"
			choice
				`	"I understand that I've stepped on some toes."`
					goto trouble
				`	"How could I be in trouble for defending myself against Sympathizers?"`
			label defending
			action
				set "hai symp warn: explained trouble"
			`	He shrugs. "You should try not to impart human ethical standards onto Hai. The simple fact of the matter is that they are citizens, and you are not.`
			`	"When a report is made that you have destroyed the vessel of a Hai citizen, it is up to the local security staff to verify the chain of events. If they report it was your fault, then it was your fault, unless you can challenge that in a court. However, you are not a citizen, so the security apparatus can simply brand you as a pirate and prevent you from ever gaining access to a court to challenge it in the first place. Even if you managed to do so, you're a captain; your business is in space. You would be grounded for months to work through the court proceedings to challenge it.`
			`	"Whether you believe it is right or not, it is simply the reality of the situation. You must manage your guns and your reputation carefully where interactions with the Unfettered are concerned."`
			
			label trouble
			branch "less trouble"
				"reputation: Hai" >= 1
				"reputation: Hai (Wormhole Access)" >= 1
				"reputation: Hai Merchant" >= 1
				"reputation: Hai Merchant (Human)" >= 1
			# At least one other group besides the Sympathizers are upset.
			branch "explained trouble"
				has "hai symp warn: explained trouble"
			`	"You have gotten yourself in trouble, Captain."`
			label "explained trouble"
			action
				"reputation: Hai" >?= 1
				"reputation: Hai (Wormhole Access)" = "reputation: Hai"
				"reputation: Hai Merchant" >?= 1
				"reputation: Hai Merchant (Human)" >?= 1
			`	He slides a data stick across to you. "Fortunately for you, in this case, I happened to see the event, and have argued that you did not know what you were getting into. This stick contains the security report file which indicates that you have been given a warning... keep this for your records; Hai Security certainly will. There will not be future warnings."`
				goto end
			label "less trouble"
			# Only the Sympathizers are upset.
			`	"So far, you have been lucky. Hai Security has taken your history into account, and decided your recent activities are within the tolerable range of responses to the hostile situations you have got yourself into..." He slides a data stick across to you. "Nevertheless, this is a copy of the file on you that states you have now been advised of the situation. If you now proceed to upset Hai Security, they will not provide you with a warning."`
			
			label end
			`	The waitress arrives with your food, and the merchant stands up. "Good luck, Captain. If you get into trouble, I recommend picking up some jobs to take aid supplies to the Unfettered, if you can manage that without shooting anyone..."`
			`	With a nod, he leaves you to your meal.`
				decline
	on decline
		clear "hai symp warn: explained trouble"



mission "Returning Home"
	description "Bring Elliot home to his family on <destination>. Elliot ran away from his family as a teenager and hasn't seen them in almost six years."
	minor
	source
		government "Hai"
		not planet "Allhome"
		not attributes "station"
	destination
		attributes "dirt belt"
		attributes "farming"
	passengers 1
	to offer
		random < 40
	on offer
		conversation
			`You are stopped by a human in the <origin> marketplace. He takes off his hat and asks, "You're from the outside, aren't you?"`
			choice
				`	"Yes, I am."`
					goto outsider
				`	"What do you mean 'the outside?'"`
			
			`	"Outside of Hai space. You don't look quite like most humans who live here, unless there's some new fashion trend going on that I don't know about."`
			choice
				`	"Oh, yes. I do come from outside."`
			
			label outsider
			`	"Good. My name is Elliot." You introduce yourself to Elliot and shake hands.`
			`	"Can you take me to <destination>?" Elliot asks.`
			`	"That's all the way in the Dirt Belt," you say. "Why do you want to go that far?"`
			`	Elliot looks down at the ground for a second and takes a deep breath while gripping his hat in his hands. "You see, I haven't lived here all my life. I was born on <planet> to a poor farming family. Most of my days were spent working on the farm, which I hated with a passion. One day I just got fed up with things and I ran away.`
			`	"I ran away from home to the spaceport city and snuck my way into the cargo hold of a freighter. The captain didn't open the cargo hold for three weeks while I stayed in it. Lucky for me the freighter was transporting food, so I had plenty to eat.`
			`	"When the cargo hold doors finally opened, I ran out as fast as I could, only to run back in at the sight of a group of Hai. I had no idea where I was at the time, but I've been living here ever since. That was when I was thirteen, nearly five years ago now."`
			`	Elliot looks down at the ground again and wipes a tear from the corner of his eye.`
			choice
				`	"Alright, I'll take you to <planet>."`
					goto accept
				`	"And you finally want to go back home?"`
				`	"Sorry, but I'm not able to take you that far."`
					goto decline
			
			`	"Yes. I've thought a lot about it lately. I want to see my family again."`
			choice
				`	"Alright, I'll take you to <planet>."`
					goto accept
				`	"Sorry, but I'm not able to take you that far."`
			
			label decline
			`	"I understand," Elliot says. "I'll just try and find someone else to help me. Goodbye, <first>."`
				decline
			
			label accept
			`	You lead Elliot to your ship and show him to a bunk room. After leaving Elliot there, you wonder if his family is still even on <planet> anymore.`
				accept
			
	on visit
		dialog `You look for Elliot, but realize that he took a ride on one of your escorts! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 45000
		conversation
			`Elliot thanks you for bringing him to <planet> and hands you <payment>. He flags down a taxi just outside the spaceport, but before entering the taxi he turns back to you.`
			`	"Do you want to come with me? I'd love for you to meet my family. They'll want to meet you when I tell them how I got back."`
			choice
				`	"Sorry, I have other places to be. Good luck."`
				`	"Sure. I've come with you this far."`
					goto sure
			
			`	"I understand. Thanks again, <first>. I'll always owe you."`
			`	Elliot gets into the taxi, which drives off toward the seemingly endless farmlands outside of the spaceport city.`
				decline
			
			label sure
			`	The view for nearly the entire three hour drive is of hills and farmland with the occasional building or wild animal. Elliot shakes as the taxi approaches the house from the driveway. "I'm wondering if they still even live here," he says nervously.`
			`	No one comes out of the house when the taxi stops. You walk up to the front door with Elliot and a middle-aged woman answers the door with a mug of coffee and a bewildered look on her face.`
			`	"Can I help you?" the woman asks.`
			`	Elliot looks over at you with a big smile on his face. "Yes you can, mom," he says to her. The woman's face lights up with joy and she begins jumping up and down, spilling coffee from her mug.`
			`	"Oh Elliot, I can't believe it!" Elliot's mom puts down her mug and leaps out the door to hug him. "Jackson! Sarah! Abby! Sean! Victor! Elliot is here!" Elliot's entire family comes out from the house and greets him, asking dozens of questions about where and how he's been and why he left.`
			`	Elliot introduces you to his family, who thank you for bringing Elliot home. Victor, who was only seven years old when Elliot left and is now twelve, asks you question after question about being a pilot, sometimes asking new questions before you can even answer the old one.`
			`	"Are you going back to the spaceport, <first>?" the taxi driver yells from the driveway. "I need to get back to the city as soon as I can."`
			`	You say goodbye to Elliot and to his family. "Thanks again, <first>," Elliot says. "I'll always owe you."`



mission "Unwanted Cargo Trigger"
	invisible
	landing
	source
		government "Hai"
		not attributes "uninhabited"
	to offer
		random < 1
		"cargo space" > 0
		not "hr: secret leaks"
	on offer
		event "hai in cargo" 14
		fail

event "hai in cargo"

mission "Unwanted Cargo"
	minor
	landing
	description "Bring a Hai child who hid in your cargo hold back to <destination>."
	source
		not government "Hai" "Hai (Unfettered)"
		not near "Heia Due" 0 100
	destination "Allhome"
	to offer
		has "event: hai in cargo"
		not "hr: secret leaks"
	on offer
		conversation
			`The "Check Cargo" light for your ship begins blinking when you land, meaning that a cargo crate may have come loose in flight. You shut off the ship's engines and walk to the cargo hold.`
			`	You check every cargo crate in the hold, but can't find anything wrong. Right as you decide to leave, one of the smaller crates begins rocking back and forth.`
			branch translator
				has "language: Hai"
				
			`	You hear a voice come from the crate, but it is not a language you understand. The voice continues to speak, and you recognize it as the Hai language.`
			choice
				`	(Open the crate.)`
			`	You open the crate and are met face to face with a Hai child. You aren't sure how old they are, but they look to be about the size of a one-year-old human child. They try to communicate with you, but begins to cry when they see the confused look on your face.`
			choice
				`	"Don't cry, little guy."`
					goto cry
				`	(Pick up the Hai.)`
				
			`	The child waves its hands around when you try to pick them up, making it impossible to grab on to. After waiting for a few minutes, the child finally calms down, eventually going to sleep in the crate.`
				goto end
			
			label cry
			`	The child begins to cry even louder than before. After waiting for a few minutes, the child finally calms down, eventually going to sleep in the crate.`
				goto end
			
			label translator
			`	You hear a voice come from the crate, and surprisingly your Hai translator begins speaking. "Let me out! I want to go home!"`
			choice
				`	(Open the crate.)`
			`	You open the crate and are met eye to eye with a Hai child. You aren't sure how old they are, but it looks to be about the size of a one-year-old human child. "I want my mommy!" they say as its eyes begin to tear up.`
			choice
				`	"Where's your mommy?"`
				`	"Don't cry, little guy."`
			`	The child looks surprised when your translation device speaks to them in Hai. "Take me home!" they yell back at you. You attempt to find out where the child's home is, but they continue to cry for its mother without giving any important information.`
			
			label end
			`	This child must have somehow gotten into your cargo hold while you were in Hai space. Leaving a Hai child on this world would be an extremely bad idea. Perhaps someone on <destination> will be able to bring the child back to its family.`
				accept
			
	on complete
		payment 50000
		dialog `You contact the spaceport authorities of <planet> and ask them if they are looking for a lost Hai child. It turns out that the family was so worried that they put up a <payment> reward for finding their son. A Hai spaceport worker takes the child from your ship and thanks you for finding him for the family.`



mission "Expanding Business [1]"
	name "An Interesting Proposition"
	description "Travel with businessman David Turner to <destination> where a convoy of freighters are awaiting escort."
	minor
	source "Greenwater"
	destination "Allhome"
	to offer
		has "event: hai-human resolution announced"
	on offer
		conversation
			`Walking through the <origin> spaceport, you notice that almost half of the people you see are humans, unlike other Hai worlds where the Hai outnumber humans by a sizable degree. A human dressed in a business suit shouts your name from across the street and approaches you.`
			`	"Captain <last>, fantastic to see you again! I noticed you right away when I laid my eyes upon you and I must say, I'd like to thank you again for what you've done."`
			`	The man is David Turner, who was involved in the movie production during the Hai crisis. Almost reflexively he goes to grab a business card from his pocket but then seems to remember and puts it back away. Seems to be exactly the same card as last time though.`
			`	"Now Captain, if you have a moment, I'd like to make a proposition to you." Turner turns around and waves his arm across the crowd of people in the spaceport. "You see all the humans here? About one out of every four of these people only arrived here after war broke out through the wormhole. Captains who knew of the Hai came flocking here in droves after the Navy entered Kornephoros, hoping to avoid any troubles that the war would bring. Some captains returned after the war ended, but most stayed, and I see a massive market opportunity in that."`
			branch rich
				"net worth" >= 4000000000
			
			choice
				`	"What kind of market opportunity?"`
					goto opportunity
				`	"Sorry, but I don't have the time to talk about this."`
					goto walk
			
			label rich
			choice
				`	"What kind of market opportunity?"`
					goto opportunity
				`	"You're only worth three billion credits? Why shouldn't I pursue your opportunity on my own?"`
				`	"Sorry, but I don't have the time to talk about this."`
					goto walk
			
			`	"Of course you're worth more than me, Captain <last>, but you are no business owner. I have the connections and skills, but a name like yours will always help.`
				goto opportunity
			
			label walk
			`	You try to walk away, but Turner stops you by grabbing your arm and continues to talk.`
			
			label opportunity
			`	"Allow me to explain. The journey to the Hai can be a dangerous one, even with the new commitment to safety made by both governments. I heard many stories during the war of merchants trying to reach the Hai, but thanks to the Navy being distracted, those merchants fell victim to pirates patrolling the systems of the Far North. Even now, those pirates roam almost unchallenged, and many merchants are trapped here without the means to safely return. They expended most, if not all, of their ammunition trying to get here, and now they have none to defend them on their way back. Human ammunition has become a scarce commodity among human captains in this region of space, leaving open a market that's just waiting to be cornered.`
			`	"I'd like you, Captain <last>, hero of humanity, to help me set up an outfitter here on <origin>, an outfitter that would supply these desperate merchants with relief by supplying them with the ammunition they need, along with outfits they might want to buy for their old ships. I've already received approval from the Hai government for the construction of an outfitter, and with a name like yours backing up this business, the profits are sure to be phenomenal, profits that you would be sharing in by being a founding member of this outfitter."`
			label choices
			choice
				`	"This sounds like a good idea to me. What do you need me to do?"`
					goto interested
				`	"Sorry, but I'm not interested in your proposition."`
			
			`	"Nonsense, Captain! All you'd need to do is help escort a few freighters from <planet> to Follower and back to here, and for so simple a job you could be receiving enough money to not work another day in your life, or perhaps even support a massive fleet."`
			choice
				`	"Again, I'm not interested. Goodbye."`
				`	"Alright, you have my attention."`
					goto interested
			
			`	"Well, I tried, Captain," Turner says with a smirk. "I'll just have to travel back to the Paradise Worlds and make my money in other areas of business, then." He hands you another business card and winks. "Goodbye, Captain <last>. You should know where to find me if you need me. Perhaps we can pursue this venture together in the future."`
				decline
			
			label interested
			`	"Excellent, Captain! I'll be making myself comfy on my own ship. A convoy of freighters is waiting for us on <destination>. From there, we're off to Follower to pick up supplies."`
				accept
				
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
	
	on visit
		dialog `You've reached <planet>, but you've left Turner behind. Wait for Turner's ship to arrive before landing.`
	
	on complete
		dialog `The freighters are ready to launch by the time you get to <planet>. "Now we just need to escort these freighters to Follower in the Alphard system and back in one piece," Turner exclaims, hopping back on to his Star Queen.`



mission "Expanding Business [2]"
	landing
	name "An Interesting Proposition"
	description "Escort the freighters to <destination> where they will pick up supplies for the Greenwater outfitter."
	destination "Follower"
	to offer
		has "Expanding Business [1]: done"
	
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
	npc accompany save
		personality escort
		government "Merchant"
		fleet
			names "civilian"
			variant
				"Bulk Freighter (Hai)" 3
	
	npc
		personality staying
		government "Pirate"
		system "Ultima Thule"
		fleet "Small Northern Pirates"
	npc
		personality staying
		government "Pirate"
		system "Rajak"
		fleet "Large Northern Pirates"
	npc
		personality staying
		government "Pirate"
		system destination
		fleet "Large Northern Pirates"
	
	on visit
		dialog `You've reached <planet>, but you've left one of the ships you're supposed to be escorting behind. Wait for Turner's ship and all the Bulk Freighters to arrive before landing.`



mission "Expanding Business [3]"
	landing
	name "An Interesting Proposition"
	description "Escort Turner's ship to <destination> so that he can speak with an old friend."
	destination "Rust"
	to offer
		has "Expanding Business [2]: done"
	on offer
		conversation
			`Turner jumps off of his Star Queen before the boarding ramp fully reaches the ground, clearly eager to get moving with this project.`
			`	Turner swears under his breath when he walks up to you. "Low life pirates giving us trouble on the way here. That's the kind of trouble I'm talking about that an outfitter in Hai space would help with. There's no telling what would have happened had my Bulk Freighters not had their missiles. Or if you were not there to protect them, of course."`
			`	Turner has a talk with the spaceport authorities, and within a short amount of time the necessary cargo is loaded on to the freighters. When the freighters are fully loaded, they take off without even giving you time to get to your ship.`
			`	"With their ammunition restocked they can get back to Greenwater on their own," Turner says from behind you as you watch the freighters fly off. "I told them to leave as soon as they could. As for you and me, I need an escort to <destination>. I received a message from an old friend there who would like to have a chat with me."`
				accept
				
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
		
	on visit
		dialog `You've reached <planet>, but you've left Turner behind. Wait for Turner's ship to arrive before landing.`



mission "Expanding Business [4]"
	landing
	name "An Interesting Proposition"
	description "Escort Turner back to <destination> to oversee the construction of the outfitter."
	destination "Greenwater"
	to offer
		has "Expanding Business [3]: done"
	on offer
		conversation
			`Turner lands his ship outside of the Kraz Cybernetics building. "Wait here while I have a talk with my friend, Edward. This should only take a few minutes."`
			`	A few hours later, Turner returns carrying a black suitcase. "Sorry, that took longer than I expected. Now, let's get back to <destination>."`
				accept
	
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
	
	on visit
		dialog `You've reached <planet>, but you've left Turner behind. Wait for Turner's ship to arrive before landing.`
	
	on complete
		event "outfitter on greenwater" 95
		log "People" "David Turner" `Now apparently a frequenter of Hai space, he was instrumental in the creation of a human outfitter in Hai space, allowing merchants to arm themselves for the dangerous trip back to human space.`
		conversation
			`By the time you finally reach <planet>, construction on the outfitter is already underway. The construction workers have laid the foundation of the outfitter close to the spaceport, taking up a good portion of a park.`
			`	"I had to pay a pretty penny to get the outfitter this close to the spaceport," Turner says to you, "but it'll all be worth it in the end. The outfitter should be done in three months or so. You'll know it's done once you find an extra two thousand credits in your pocket every day."`
			`	Turner pats you on the back. "Have fun until then, Captain <last>. Keep yourself busy saving the galaxy."`

event "outfitter on greenwater"
	planet "Greenwater"
		outfitter "Basic Outfits"
		outfitter "Ammo North"
		outfitter "Ammo South"

mission "Expanding Business: outfitter complete"
	landing
	invisible
	to offer
		has "event: outfitter on greenwater"
	on offer
		"salary: Turner Incorporated" = 2000
		event "request for a shipyard" 270
		fail

event "request for a shipyard"



mission "Expanding Business [5]"
	landing
	name "A New Proposition"
	description "Meet with David Turner on <destination> to talk about a new proposition."
	source
		government "Hai"
	destination "Greenwater"
	to offer
		has "event: request for a shipyard"
	on offer
		dialog `You receive a message from David Turner when you land. "Hello, Captain. I hope you've been enjoying your share in the outfitter. I have a new proposition for you, as I've bought out the rest of the park around the outfitter. Meet me on <destination> if you'd like to hear about it."`



mission "Expanding Business [6]"
	landing
	name "A New Proposition"
	description "Escort the freighters to <destination> in order to pick up the supplies for the shipyard."
	destination "Sunracer"
	to offer
		has "Expanding Business [5]: done"
	on offer
		conversation
			`Turner meets you in a high-end human-owned restaurant in the richer part of the city, very much reminiscent of something you would find on a Paradise Planet. "It's been quite some time since we last spoke, Captain <last>. Over a year now," he says. "Have you been enjoying the extra cash in your pocket every day, Captain <last>?"`
			choice
				`	"Yes. It's been a huge help paying crew salaries."`
					goto salaries
				`	"Two thousand credits each day isn't much for me."`
			
			`	"I suppose two thousand credits every day wouldn't be much to a hero such as yourself. Spaceships are expensive, after all. How does four thousand credits every day sound to you?"`
				goto choice
			
			label salaries
			`	"I'm glad to hear that, Captain <last>. I spent my early years as a captain myself, and I didn't much enjoy having to worry about crew salaries every day. Perhaps doubling that amount will help even more."`
			
			label choice
			choice
				`	"Am I getting a raise?"`
				`	"Is this part of your new proposition?"`
					goto proposition
			
			`	"You could call it that," Turner says after sipping from his glass of wine.`
			
			label proposition
			`	"Building an outfitter selling human goods here on <origin> has had to be the best idea I've ever had, Captain <last>, but recently I thought of an even better idea. You see, most of the humans you see flying around in Hai space are flying decades-old ships. Hai ships are prohibitively expensive for humans. The Hai sell the Aphid for nearly one and a half million credits! This means that demand for ships is extremely high among humans, Captain <last>. Do you see where I'm going with this? You look at something we humans sell like a Star Barge, which is hardly worse than an Aphid for only a quarter of the price, and you start to see the problem."`
			choice
				`	"You need me to help you escort freighters again?"`
				`	"Do you want to build a shipyard selling human ships?"`
			
			`	"Yes, Captain. Right now, the only realistic way that a human born here can get a ship is if they know a captain willing to retire. Even then, prices for a human ship can be more than twice what they are across the wormhole. You'd think they could just get passage and buy a human ship over there, but those banks just don't recognize credit histories from this side. It's preposterous, Captain <last>!`
			`	"I've already made arrangements with the local Hai government. The rest of the park next to the outfitter is now my property, and I intend to use it to build the shipyard. I've also contacted Megaparsec and bought a license to build their ships and some of the outfits they sell on <planet>. My freighters are at the ready in the spaceport right now. All I need you to do is escort them to <destination> and back, and in six to seven months' time when the shipyard is done, you'll reap the rewards. What do you say, Captain <last>? Do you want to be a hero to millions once again?"`
			choice
				`	"Sure, this sounds like a great idea."`
					goto accept
				`	"I'm not interested in working with you anymore, Turner."`
			
			`	Turner smirks at your response. "Understood, Captain <last>. I'll just save myself two thousand credits a day from now on by rescinding your salary. I'll be seeing myself out now."`
			choice
				`	"Goodbye."`
					decline
				`	"Wait! I changed my mind. I'll help you."`
			
			label accept
			`	"Excellent decision, Captain <last>. I'll meet you outside to send the ships off."`
				accept
			
	on decline
		clear "salary: Turner Incorporated"
	
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
	npc accompany save
		personality escort
		government "Merchant"
		fleet
			names "civilian"
			variant
				"Bulk Freighter (Hai)" 3
	
	npc
		personality staying
		government "Pirate"
		system "Ultima Thule"
		fleet "Small Northern Pirates"
	npc
		personality staying
		government "Pirate"
		system "Rajak"
		fleet "Large Northern Pirates"
	npc
		personality staying
		government "Pirate"
		system destination
		fleet "Large Northern Pirates"
		
	on visit
		dialog `You've reached <planet>, but you've left one of the ships you're supposed to be escorting behind. Wait for Turner's ship and all the Bulk Freighters to arrive before landing.`

	on complete
		dialog `The Bulk Freighters are loaded with supplies without any problem. When one of the spaceport workers asks Turner where the supplies are going, he replies, "These are just to expand a business venture of mine on, uh, Glory."`



mission "Expanding Business [7]"
	landing
	name "A New Proposition"
	description "Escort the freighters back to <destination> to begin construction on the shipyard."
	destination "Greenwater"
	to offer
		has "Expanding Business [6]: done"
	
	npc accompany save
		personality escort
		government "Merchant"
		ship "Star Queen (Hai)" "Chryso Vasilia"
	npc accompany save
		personality escort
		government "Merchant"
		fleet
			names "civilian"
			variant
				"Bulk Freighter (Hai)" 3
	
	npc
		personality staying
		government "Pirate"
		system "Cardax"
		fleet "Small Northern Pirates"
	npc
		personality staying
		government "Pirate"
		system "Rajak"
		fleet "Large Northern Pirates"
		
	on visit
		dialog `You've reached <planet>, but you've left one of the ships you're supposed to be escorting behind. Wait for Turner's ship and all the Bulk Freighters to arrive before landing.`

	on complete
		event "shipyard on greenwater" 180
		conversation
			`	Construction on the shipyard begins almost immediately after the supplies are unloaded from the freighters, starting with the demolition of the rest of the park. A downtrodden-looking crowd gathers to watch the demolition, but Turner assures you that there are plenty of other parks in the city for them to go to.`
			`	"Something big is going to come of this, Captain <last>," Turner says. "Just know that you were all part of it. You'll know the shipyard is done when you find an extra four thousand credits in your pocket each day. Goodbye until then, Captain <last>."`

event "shipyard on greenwater"
	planet "Greenwater"
		shipyard "Basic Ships"
		shipyard "Syndicate Basics"
		shipyard "Megaparsec Basics"
		shipyard "Megaparsec Advanced"
		outfitter "Common Outfits"
		outfitter "Syndicate Advanced"
		outfitter "Lovelace Basics"
	fleet "Small Human Merchants (Hai)"
		add variant 20
			"Sparrow"
		add variant 20
			"Star Barge"
		add variant 20
			"Shuttle"
		add variant 5
			"Freighter"
			"Wasp" 2
		add variant 10
			"Freighter"
			"Shuttle" 2
			"Quicksilver"
		add variant 15
			"Bounder"
			"Wasp" 2
		add variant 5
			"Manta"
		add variant 5
			"Freighter" 2
			"Manta"
	fleet "Large Human Merchants (Hai)"
		add variant 6
			"Freighter (Proton)" 2
			"Quicksilver" 2
		add variant 6
			"Freighter" 4
			"Quicksilver" 2
			"Splinter" 1
		add variant 3
			"Freighter" 4
			"Quicksilver" 2
			"Splinter (Laser)" 1
		add variant 3
			"Freighter" 4
			"Quicksilver" 2
			"Splinter (Proton)" 1

mission "Expanding Business: shipyard complete"
	landing
	invisible
	to offer
		has "event: shipyard on greenwater"
	on offer
		"salary: Turner Incorporated" = 4000
		dialog "On receipt of a new and unexpected deposit, you realize that the shipyard on Greenwater must now be operational."
		fail



mission "Hiding in Plain Sight"
	description "Bring Arthur and his Hai friend Kiru to <destination> for a gaming convention by <date>."
	minor
	source
		government "Hai"
		not attributes "station"
	destination "Vinci"
	passengers 2
	deadline 30
	to offer
		random < 30
		has "First Contact: Hai: offered"
		or
			not "hr: secret leaks"
			has "event: hai-human resolution announced"
	on offer
		conversation
			`While eating in a spaceport cafeteria that serves both Hai and human cuisine, you are approached by a teenage human and Hai. "Hello. Do you know how to get to <destination>?" the Hai asks.`
			choice
				`	"I do. Why do you want to go there?"`
				`	"I don't. You'll have to ask someone else."`
					decline
			branch public
				has "event: hai-human resolution announced"
			`	The human responds, "There's a massive convention on <planet> for a game called 'Boundless Frontiers.' The convention has a huge cosplaying scene, and I think Kiru would fit right in."`
				goto return
			label public
			`	The human responds, "There's a massive convention on <planet> for a game called 'Boundless Frontiers.' Now that Kiru doesn't have to worry about pretending to be a cosplayer the whole time, we're really keen to go."`
			label return
			`	"Arthur and I have <payment> to give you if you bring us to the <planet>," Kiru says. "We can find our own way back to the Hai space, as well."`
			choice
				`	"Alright, I can take you there."`
					accept
				`	"Sorry, you'll have to find someone else to bring you."`
					decline
					
	on visit
		dialog `You look for Arthur and Kiru, but realize that they took a ride on one of your escorts! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 75000
		dialog `Arthur and Kiru pay you <payment> before running off to the convention center. As they run away, you notice that Kiru is drawing a number of eyes from the crowd, but no one seems to suspect that he is an actual alien.`
		log "Minor People" "Arthur and Kiru" `Human and Hai respectively, both attended the Vinci cosplay convention without a costume, gaining much attention.`



mission "Hai Honeymoon"
	description "Bring Anaya and Touhar to <destination> for their honeymoon."
	minor
	source "Skyfarm"
	destination "Featherweight"
	passengers 2
	to offer
		random < 60
		has "First Contact: Hai: offered"
	on offer
		conversation
			`You hop around the spaceport of <origin>, trying to adjust to the low gravity of this moon, when you are approached by a toweringly tall human woman and an equally tall Hai male who are clearly having no trouble with <origin>'s gravity.`
			`	"You look like you need help there, Captain," the woman says with a chuckle.`
			choice
				`	"Don't worry. I almost have the hang of it."`
				`	"Maybe a little bit."`
			`	"It's always fun watching captains when they step off the comfort of their ship," the Hai says.`
			`	"At least they're trying, Touhar," the woman says.`
			choice
				`	"Can I help you two with something?"`
				`	"Is there something I can help you with, or are you just going to watch me?"`
			`	"Actually, there is something," the woman says. "My name is Anaya, and this is my husband, Touhar. And you are?"`
			choice
				`	"My name is <first> <last>."`
				`	"Wait, your husband?"`
					goto husband
			
			`	"Very nice to meet you, Captain <last>," Touhar says to you.`
				goto next
			
			label husband
			`	"What, you've never seen an interspecies couple before?" Touhar asks with a hint of sarcasm in his voice.`
			
			label next
			branch public
				has "event: hai-human resolution announced"
			`	"We got married last week, and we were hoping to travel to <destination> for our honeymoon. I know it's risky to bring Touhar into human space, but <planet> is a sparsely inhabited world, and I have a friend who owns a house in the mountains far from anyone who could see him."`
				goto return
			label public
			`	"We got married last week, and we were hoping to travel to <destination> for our honeymoon. Some people still tell us it's risky to bring Touhar into human space, especially to such a sparsely inhabited world as <planet>, but I have a friend who owns a house in the mountains, and it just seems like everything is working out so well right now."`
			label return
			`	"Said friend will be able to arrange for our return to <origin> as well," Touhar adds. "Will you take us?"`
			choice
				`	"Sure."`
					accept
				`	"Sorry, I can't travel that far from here."`
					decline
					
	on visit
		dialog `You look for Anaya and Touhar, but realize that they took a ride on one of your escorts! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 100000
		dialog `Instead of landing in the spaceport where they can be seen, you drop Anaya and Touhar off as close as you can to where they will be staying. The house is a few kilometers away, but they assure you that they can make it on their own. They pay you <payment> and thank you for bringing them this far.`
		log "Minor People" "Anaya and Touhar" `A Hai-human interspecies couple that you transported to their secluded honeymoon on Featherweight in human space.`



mission "Nanachi 1"
	name "Escort Nanachi to <planet>"
	description "Help Nanachi, a Hai who just bought her first ship, make a simple delivery to <destination> by <date>."
	minor
	source "Giverstone"
	destination "Cloudfire"
	deadline 2 1
	to offer
		random < 15
		"net worth" > 20000000
		"combat rating" > 1200
		has "First Contact: Hai: offered"
		or
			not "hr: secret leaks"
			has "event: hai-human resolution announced"
	on offer
		conversation
			`As you are making your way through the spaceport you notice a worried-looking Hai staring at the local job board and back at some sort of document they are holding.`
			choice
				`	(Approach the Hai.)`
				`	(Leave them alone.)`
					decline
			`	The Hai is a bit startled, but quickly calms down. "Sorry, you caught me by surprise. I've just bought my first ship and need to find some jobs to do, but nobody I've talked to wants to trust a beginner captain. I just don't know what to do anymore, I've been working for so long to qualify for this loan, but I'm running out of time and I'll never be able to pay it like this."`
			`	Turns out the documents she is holding are the bank papers for the loan, somewhat similar to the one you took when you bought your first ship. You've come a long way since your days as a beginner, and know how hard it is to be starting out as a starship captain; you could probably convince someone here to offer a simple cargo job to this young Hai.`
			choice
				`	"If you're interested, I could try to help you find a job."`
					goto "positive1"
				`	"I've been there before; trust me, it gets better. I wish you the best of luck on finding a job."`
			`	She nods in sad understanding, and continues to swap focus from the job board to the papers in her hand.`
			choice
				`	(Help her out anyway.)`
					goto "positive1"
				`	(Leave her alone and continue on.)`
					decline
			label "positive1"
			`	Her ears twitch a bit, and her previously crestfallen eyes light up as she nearly jumps in joy at your offer. "Thank you so much Captain! My name is Nanachi, I promise I won't cause any trouble at all, just a few quick jobs and I'm sure I'll be fine by myself!"`
			`	You introduce yourself to Nanachi and shake her paw. "Can you show me your ship so I can look for jobs it's best suited for?" you ask.`
			`	She hesitates a bit, but leads you to her ship. You were expecting a small Hai ship, but to your surprise she shows you a rather beat-up Heavy Shuttle docked near your own ship.`
			`	"You took a loan to buy a human ship?" you ask.`
			`	She looks at the ground, as if ashamed of it. "It'd take way too long for me to qualify for a loan for even an Aphid, but I recently met a human merchant who wanted to sell his old ship; it was difficult, but I managed to convince him to sell it to me instead of going to the shipyard office. I paid him its full price, but even for this one I had to take out the biggest loan I could. Its cargo hold isn't very impressive but it has more bunks than our smallest ships, if that helps."`
			choice
				`	"Let's see if anyone in the spaceport needs a lift off the planet."`
				`	"Let's take another look at the job board, maybe a smaller job will pop up."`
			`	Turns out this isn't as easy as you thought it'd be. The spaceport is almost empty, save for the occasional worker or drunken crew member, and the job board is filled with massive hauls of minerals, aside from a few small but dangerous jobs to human space. Eventually, as you two begin scouting the edge of the docking area, you spot a troubled human merchant near several crates. You approach him and he explains that his ship had some malfunctions and he cannot deliver his cargo of advanced surgical equipment to <destination>. "This is the worst! One jump away from the planet and the navigation system suddenly decides to go on strike! There's no way I can make it before the deadline!"`
			`	"My friend Nanachi here could deliver it for you. We were heading there anyway; a few extra crates won't make a difference," you say, trying to sound as convincing as possible.`
			`	At first, he seems delighted that you two want to help him, but when Nanachi mentions that she's flying a Heavy Shuttle, he frowns, and looks back at the cargo. "Unfettered attacks make it so they need tons of medical supplies on <planet>, and quite frankly I'm not comfortable letting such a fragile ship go into dangerous territory carrying this equipment when it could be blasted to bits in an instant," he says. The captain glances around the deserted spaceport for a while, as if trying to find some other captain, before finally turning to Nanachi and saying, "but I guess beggars can't be choosers. Fine, I'll let you take the cargo there, but please be very careful."`
				accept
	npc accompany save
		personality escort timid
		government "Hai"
		ship "Heavy Shuttle" "Acorn Chaser"
	on visit
		dialog `You have reached <planet>, but you left Nanachi's ship behind! Better depart and wait for her to arrive in this star system.`
	on complete
		conversation
			`Shortly after her ship lands, you meet up with Nanachi, who is doing her best to hide her excitement at being on another planet for the first time, and is gawking at some Hai military ships in particular. "So, how did you like your first time doing a hyperspace jump?" you ask, to try and snap her out of it.`
			`	"Oh um, I don't think I'll get used to the feeling anytime soon. I threw up a lot so I'm glad this wasn't a job with passengers. I've always dreamt of being on other worlds, exploring and learning everything about them. I'm glad I'm finally able to do it."`
			`	You help her get the crates out of the cargo hold and contact the client. Nanachi's share of the payment is small, as the client transfers most of the money to the merchant she got the job from, but that doesn't make her any less excited about getting her first paycheck.`
			`	"So, want to go to the spaceport and try to get a job on your own? I'll help you again in case you can't do it yet." you say.`
			`	"Just give me an hour or two to explore. Back home our shipyard is kind of small. I've never really gotten a chance to see a Shield Beetle up close, and there are many undergoing repairs here. I'll just go get a better look at them, I swear I'll be quick."`
			`	You two agree to meet in the spaceport in a few hours; maybe this time she will do fine on her own.`



mission "Nanachi 2"
	name "Escort Nanachi to <planet>"
	description "Bring Nanachi and her passengers to <destination>."
	source "Cloudfire"
	destination "Hai-home"
	clearance
	to offer
		has "Nanachi 1: done"
	on offer
		conversation
			`You meet up with Nanachi in the spaceport, give her some tips to try and persuade someone into hiring her, and tell her you'll be nearby if she still has trouble getting a job. You watch her go around the spaceport and approach some groups of humans and even other Hai to no avail. Maybe since this is a world seeing combat often, they're too busy with military related activities to help a new pilot. She manages to grab the attention of a Hai family leaving a restaurant carrying way too much luggage, most likely tourists looking for a ride back home. Everything seems to be going well until the parents start to look worried. It seems as if they might go away if you don't step in.`
			`	You walk over to the group to help her, and get a better look at the family: a Hai couple carrying a baby, and three older children who aren't doing much to help their father carry their ludicrous number of bags.`
			choice
				`	"Hey, what's going on?"`
				`	"Can I be of assistance?"`
			`	You introduce yourself and the parents tell you that they've been on vacation here and need transport back to <destination>. "Don't take this the wrong way, but Captain Nanachi told us her ship is one of your human ships, a Heavy Shuttle was it? It has enough bunks for us but our sons already caused a ruckus on the way here in a Hai ship, we're worried that since they aren't used to the accommodations, they might end up giving her too much trouble."`
			`	You reassure them that the trip will be very quick, and that the ship's interior is somewhat similar to that of Hai ships, until they finally agree on traveling with her. They settle on the pay and the two of you help the Hai get their baggage to Nanachi's ship. When the family is focused on a conversation, you quietly ask Nanachi what the issue she was having with the other people she encountered.`
			`	"They all seemed willing to give me a job, but I ended up blowing it when I asked for more money. I just really need to get out of debt so I guess I went a bit overboard." She tries to play it cool, but it's clear that she is embarrassed about losing so many potential jobs. When you reach her ship, you take a look at the prices for commodities in <system>. You decide to tell Nanachi to stock up on heavy metals to sell there, to help her make a bit more profit.`
				accept
	npc accompany save
		personality escort timid
		government "Hai"
		ship "Heavy Shuttle" "Acorn Chaser"
	on visit
		dialog `You have reached <planet>, but you left Nanachi's ship behind! Better depart and wait for her to arrive in this star system.`
	on complete
		conversation
			`You help the family gather all their luggage and bid them farewell, but right as they disappear into a hallway Nanachi lets out a heavy sigh. "I bit off more than I could chew. Those kids kept wanting to play with the ship's controls, and one of them tried to go up the air vent in a game of hide-and-seek. I couldn't get any rest since I had to keep making sure they weren't about to dump their own bags into the void by accident."`
			`	"Do you want to get some sleep before trying to find another mission?" you ask, hoping she won't try to overwork herself.`
			`	"Yes, I could really use that. Sorry to make you wait again Captain <last>. I'll rest a bit, see if I can't find a spot nearby to relax, and meet up with you in the spaceport after a while."`



mission "Nanachi 3"
	name "Deliver spices with Nanachi"
	description "Accompany Nanachi to <stopovers> to pick up some Quarg spices for a festival on <destination> by <date>."
	source "Hai-home"
	stopover "Alta Hai"
	destination "Allhome"
	deadline 14
	to offer
		has "Nanachi 2: done"
	on offer
		conversation
			`You send a message to Nanachi and you two meet up in the spaceport. You're still walking toward the job board, when she asks: "Back home I heard stories about how humans have a much larger population than the Hai, and that their home planet has even more people than Hai-home. Is it true that there are many other human worlds with spaceports this large?" You name her a few human planets that are extremely populous, and how even some planets with fewer people than this world have incredibly large spaceports.`
			branch public
				has "event: hai-human resolution announced"
			`	While you tell her stories of many different planets you've visited, she seems to be particularly interested in Earth. "I've seen a bit of human architecture in videos of planets like Allhome, but I can't even imagine what your capital must look like. Tens of thousands of years of another species' history, it sounds even more exciting than what I heard about our landmarks on Hai-home. Captain, do you think that someday, when we no longer need to be kept hidden from humanity, that I'll be able to visit Earth, and see the beauty of your capital?" Seeing how little she knows about humanity, it's not surprising that she is unaware of the state that Earth is in.`
				goto return
			label public
			`	While you tell her stories of many different planets you've visited, she seems to be particularly interested in Earth. "I've seen a bit of human architecture in videos of planets like Allhome, but I can't even imagine what your capital must look like. Tens of thousands of years of another species' history, it sounds even more exciting than what I heard about our landmarks on Hai-home. Captain, do you think that someday, when I have a bigger ship or when the routes are safer, that I'll be able to visit Earth, and see the beauty of your capital?" Seeing how little she knows about humanity, it's not surprising that she is unaware of the state that Earth is in.`
			label return
			choice
				`	"I've never actually been to Earth before, so I couldn't tell you what it's like."`
					goto avoid
				`	"Earth is a beautiful place, so it would be nice if you could see it."`
					goto fake
				`	"Earth isn't actually that great a place to visit. Most of its inhabitants would take any chance they're given to leave it."`
					goto truth
			label avoid
			`	"Oh, sorry about that, shouldn't have assumed you knew everything, you're a starship captain after all, not a historian, I'll just ask someone else when I get the chance," says Nanachi.`
				goto board
			label fake
			branch public2
				has "event: hai-human resolution announced"
			`	You start making up stories about how beautiful the skies of Earth are. You describe forests teeming with life, and do your best to remember ancient civilizations and their monuments. From the looks of it she believes you, and your lie seems to have sated her curiosity for now. If the day where the Hai are allowed to move around human space ever comes, though, she will no doubt be extremely disappointed.`
				goto board
			label public2
			`	You start making up stories about how beautiful the skies of Earth are. You describe forests teeming with life, and do your best to remember ancient civilizations and their monuments. From the looks of it she believes you, and your lie seems to have sated her curiosity for now. If she does manage to be successful enough to fly to Earth one day, though, she will no doubt be extremely disappointed.`
				goto board
			label truth
			`	She looks at you in confusion, as if trying to understand what you mean, so you explain it to her. "Despite how much humanity has advanced in the past centuries, Earth has been largely neglected. Most of the land has been turned into cities, which have over the years decayed into slums. If you ever managed to visit you'd be better off going to museums or monuments, but even then there are many thieves roaming the streets and it is very dangerous to be out at night. Lots of folks born there just think about how to get out."`
			`	You keep telling her about the issues facing humanity's birthplace, and her previous eagerness to learn about the planet fades. "How could your ancestors let their own home become like this?"`
			branch unfettered
				has "Ask the Hai about the Unfettered: offered"
			choice
				`	"Long-term planning has never been a strong trait of humanity as a whole."`
					goto end
			
			label unfettered
			choice
				`	"I guess it isn't too unlike how the Unfettered have treated their worlds."`
			`	Nanachi looks confused, so you continue to elaborate on that idea. "They're expecting to be able to have new worlds soon, so they consider the decay of their current ones as acceptable losses. Humans have also had issues with long-term planning and preparing for adverse events."`
				goto end
			label end
			`	"I see..." She says. "I just thought it would be fun to hear about another large planet like Hai-Home. Sorry for asking about it, Captain, I'm sure having to speak of it wasn't a pleasant feeling."`
			`	Although you're sure that even in Hai space there is social inequality, she probably can't fathom that the home planet of a species could be in such bad shape, considering the Hai even go as far as to send aid to the Unfettered on a regular basis.`
				goto board
			label board
			`	You two reach the job board and decide to start looking for jobs suited for Nanachi's ship.`
			choice
				`	"So, do you mind if I help out? I know the job board can be confusing the first few times you check it."`
				`	"Do you think you need me to help out this time?"`
			`	"Thanks, but I have to do this on my own. I promise I won't mess this up by getting greedy again," She approaches the board on her own, and it becomes clear that it's much easier to get a job here; she's barely started talking to one of the desk workers before receiving a long list of jobs for smaller ships. She is certainly still very tired, but this seems to have cheered her up a bit; it is the first time she can get a job without your help after all.`
			`	While you thought she would've picked one or two jobs quickly and headed back to her ship, she keeps going through them and double checking the information for each one, as if something about them bothers her.`
			`	"What's wrong? Are you struggling to pick between two different jobs?" you ask.`
			`	"These all seem very easy and I could even accept many at a time, but the problem is their pay isn't very good." She grabs some worn papers from her pocket, and shows it to you: they're the documents for her loan. "The bank back home would only give me enough for the ship if I agreed on a short-term loan. I lost two days before you came along to help me, and if I don't get some better paying job soon, I won't even be able to pay the interest."`
			`	As you're trying to figure out a way to get the most out of the available missions, you feel a tap on your shoulder, and turn to see a Hai standing beside a human couple. The couple introduce themselves as Xavier and Vanessa, who are here with their Hai friend Narancia. "We overheard your conversation and are willing to pay a little extra for a job. We're part of a group organizing a big festival in Allhome to celebrate the friendship between humans and Hai, and we just got a last-minute idea: we'd like to get our hands on some Quarg spices."`
			`	Nanachi perks up during their conversation. "I'm sure I can get the spices to <planet> within two weeks. I won't let you down!"`
			`	"That's wonderful," Narancia says. They tell Nanachi that they won't be going along; they already have a transport to Allhome, and will stay here a bit longer to try and advertise the event. "Just come to Allhome after you've picked up the spices. Safe travels!"`
				accept
	on stopover
		dialog
			`A spaceport worker contacted Nanachi shortly before you two landed and made sure the spices were ready to be loaded in her ship. You help the workers and Nanachi make sure everything is in order, and prepare for your trip to Allhome.`
	npc accompany save
		personality escort timid
		government "Hai"
		ship "Heavy Shuttle" "Acorn Chaser"
	on visit
		dialog `You have reached <planet>, but you haven't finished the mission yet! Either you left Nanachi's ship behind or you haven't visited <stopovers>.`
	on complete
		conversation
			`Allhome's docking area shows much more traffic than usual. Many captains here are helping workers open cargo containers full of food, clothes, books, movies and even some mounted animals from human space. You finally meet up with the festival's organizers, who seem very excited to have acquired the exotic condiments, and have invited you two to a bar in the spaceport for a drink.`



mission "Nanachi 4"
	name "Protect Nanachi"
	description "Bring Nanachi's ship to <stopovers>, keeping her safe from a pirate fleet that attacked a convoy heading to Hai space, then head back to <destination> by <date>."
	source "Allhome"
	stopover "Prime"
	deadline 17
	to offer
		has "Nanachi 3: done"
	on offer
		conversation
			`The bar is just as busy as the docks. Many captains here must have transported something for the festival. "Captain <last>, Captain Nanachi!" shouts Narancia, beckoning the two of you to join her and the others at their table. You learn that they were inspired by the Hai's own March festival, and wanted to bring small parts of human culture to Hai space.`
			branch public
				has "event: hai-human resolution announced"
			`	"They can't go to our planets and experience it for themselves yet, so we thought about bringing it to them!" Vanessa says.`
				goto return
			label public
			`	"It's still quite an expensive ordeal to go to our planets and experience it for themselves, so we thought about bringing it to them!" Vanessa says.`
			label return
			`	"It was very hard to get enough sponsors for this, but after years of hard work we even managed to have famous art pieces be brought here, some of which date back to the European Renaissance!" Xavier adds.`
			`	Afterwards the conversation topic shifts to you as a captain, as you describe your journey after buying your first ship, and how you met Nanachi. You're about to order another drink for the group when a grizzled old man barges into the bar, and starts shouting: "The art convoy has been attacked! The freighter managed to escape but they're stranded on Prime now, and the pirates are still out there, patrolling the route to the wormhole!"`
			`	Xavier stands up with a shocked expression. "How? We had a Leviathan escorting them!"`
			`	After catching his breath, the man at the door responds. "The pirates must have been stealing Hai tech from ships going back home. The freighter's captain said they shredded the escort!" Chaos spreads amongst the other captains, and the group sitting with you is in anguish.`
			choice
				`	"Are those art pieces really that valuable?"`
				`	"Can't you just postpone the festival until the pirates are taken care of?"`
			branch public2
				has "event: hai-human resolution announced"
			`	Xavier collapses back to the table, holding his head in both hands. "Those paintings and sculptures were our main attraction! They're worth tens of billions! It'll take months before the Navy ever notices the pirates there and makes it safe for the convoy to come here. The art exhibition is scheduled three weeks from now!"`
			`	As they try to figure out what to do, Nanachi speaks up. "I'll go there. I pilot a human ship and if we just need to transfer cargo from one ship to the other, I could get out of there quickly. Nobody would notice that a Hai ever went there."`
				goto return2
			label public2
			`	Xavier collapses back to the table, holding his head in both hands. "Those paintings and sculptures were our main attraction! They're worth tens of billions! Even if we contact the Navy it will take weeks before they can mobilize to hunt them down and guarantee that they've made it safe for the convoy to come here, and the hazard pay to request a carrier escort is frankly ridiculous. The art exhibition is scheduled for only three weeks from now!"`
			`	Some of them eye you as they try to figure out what to do, but Nanachi speaks up before any well-formed ideas are reached, "I'll go there. I pilot a human ship and if we just need to transfer cargo from one ship to the other, I could get out of there quickly. It's not an impressive ship either, so it's much more likely to go unnoticed or uncared for."`
			label return2
			`	"Are you insane?" Vanessa says, "If they managed to take down that Leviathan, you wouldn't last a second! Besides, our convoy was extremely fast. If even they were caught, your chances of outrunning the pirates are next to nothing!"`
			`	"Captain <last>," Nanachi turns to you. "I know you already helped me way more than anyone would ever be willing to, and I'm really grateful for that, but would you be willing to help me one last time, to get to that planet, and travel back here?"`
			`	It's certain that for a pirate fleet to take down a Leviathan so easily they must be incredibly powerful, and this could be extremely dangerous. You're sure that if Nanachi tries to get to Prime by herself she'll just get herself killed.`
			choice
				`	"Alright, I'll make sure we reach Prime and get back here safely."`
				`	"No, I agreed to help you find and deal with some simple jobs, but I can't risk fighting such a fleet by myself."`
					decline
			`	She thanks you profusely, and promises that she'll pay you for everything as soon as she can. The organizers are a bit hesitant, but seeing as no other captain here has decided to offer them help, they agree to let the two of you go to Prime and retrieve the cargo.`
			`	Vanessa grabs ahold of Nanachi's arm before she can run off to the spaceport. "Just remember, if you can't get back here by <day>, don't worry about it; we'll understand. I'm sure we can come up with some alternative to have the festival without our main attractions."`
			branch public3
				has "event: hai-human resolution announced"
			`	As you're leaving the bar, Xavier pulls you aside, speaking very quietly, "<last>, I know you're just trying to help this girl, but don't get killed over this. If you run into those pirates don't try to fight them, just rush to Prime."`
				accept
			label public3
			`	As you're leaving the bar, Xavier pulls you aside, speaking very quietly. "<last>, I know you're no stranger to combat and danger, but don't get killed over this. The girl won't know what's sensible for her if it gets hairy, and she shouldn't have to get killed over this. If you run into those pirates don't try to fight them, just rush her through. I have faith in a person such as yourself."`
				accept
	npc
		personality nemesis waiting
		government "Pirate"
		system "Betelgeuse"
		ship "Marauder Firebird (Hai)" "Nut King Call"
		ship "Marauder Splinter (Hai)" "The Nutcracker"
		ship "Marauder Quicksilver (Hai)" "Hazelnut's Bane"
		ship "Marauder Bounder (Hai)" "Rodent Hunter"
	npc accompany save
		personality escort timid
		government "Hai (Wormhole Access)"
		ship "Heavy Shuttle" "Acorn Chaser"
	on visit
		dialog `You have reached <planet>, but you haven't finished the mission yet! Either you left Nanachi's ship behind or you haven't visited <stopovers>.`
	on stopover
		conversation
			`The convoy's captain messaged you as you entered the system and told you to land on a remote, hidden area of Prime, where they have already prepared for all the cargo to be transferred. They refuel your ships and urge you two to go back. "Captain Nanachi can stay hidden with us here if you need supplies or anything from the outfitter, but please don't take too long."`
	on complete
		event "Nanachi: payment" 180
		log "Minor People" "Nanachi" `A young Hai merchant captain who struggled in the beginning of her career. Her fortune turned when she was able, against difficult circumstances, to deliver a valuable collection of human arts on time to the organizers of a Hai festival.`
		conversation
			`Landing back on Allhome, the festival group gives you and Nanachi a warm hug. "We sold tens of thousands of tickets for the festival by promising to host a great art exhibition with pieces from all over human space. Without them it'd be a complete failure, and we'd be in serious trouble with our sponsors," Narancia explains.`
			`	As the cargo is rushed to the exhibition site, Nanachi shows you the chip she got as payment, and the balance of her bank account: this last payment allowed her to fully pay off her loan. "Captain," she speaks with some difficulty, and tries to hide her face, as if to wipe away some tears. "I'll never be able to thank you properly, if not for you I'd still be lost in that spaceport, and would eventually have to go back to my mining job. I'll work hard now; I'll save up and pay you for everything!" She hugs you and bows to you in a way you'd see in movies, as if trying to imitate the gesture. You two finally say goodbye, and head back to your ships.`

event "Nanachi: payment"



mission "Nanachi: Payment"
	landing
	source
		government "Hai"
		not planet "Darkwaste"
	to offer
		has "event: Nanachi: payment"
	on offer
		payment 700000
		event "Nanachi: Update" 720
		conversation
			`Shortly after you land, you get a message from Nanachi, the young Hai pilot who you helped start out. "Dear Captain <last>, I hope you're doing well! As I promised, ever since we parted ways, I've been working towards getting enough money to pay you for being so kind to help me. I've sent you <payment>. I'm deeply grateful to you for helping make my dream come true."`
				decline

event "Nanachi: Update"



mission "Nanachi Meeting"
	landing
	source
		government "Hai"
		not planet "Darkwaste"
	to offer
		has "event: Nanachi: Update"
		random > 30
	on offer
		outfit "Shield Beetle Pendant"
		conversation
			`After you leave your ship and start making your way through the docking area, you notice a Hai running towards you and waving. As they get closer, you realize that it's Nanachi, the Hai pilot who you helped out years ago.`
			`	"I was just about to go back to my crew when I saw you coming out of your ship. I know a nice snack bar here, let's go there!" Before you can even say hello, she's dragged you to the bar, and ordered some drinks for the two of you. She tells you about her last few years as a captain. She has long since sold her old ship, and now pilots a Geocoris, transporting large amounts of cargo across Hai space. You also tell her about how your life has been ever since you last met, of your adventures and how far you've come. You keep swapping stories for hours, until the bar is ready to close.`
			`	You thank her for the drinks, and get ready to say your goodbyes.`
			`	"Oh wait, before you go Captain, let me give you something," she says, right as you're about to head to your ship. She grabs a small pendant from her pocket.`
			scene `outfit/crystal pendant`
			`	"Back home in Giverstone, when I had some free time from the mining works, I took a hobby of sculpting some small stones into ship miniatures. I thought it'd be nice to make one for you, in case I ever saw you again. I made it from the same stones we use as good luck charms on our ships." She gives you the pendant, which has been sculpted into a Hai Shield Beetle. It is extremely well made, with different surface textures representing the different parts of the Shield Beetle. "I wanted it to be something to make your travels easier, the way you helped with starting mine. Thanks again, Captain!" You two part ways, and head back to your ships.`
				decline



mission "Strider Alt Start"
	landing
	name "New Unfettered ships"
	description "Ambassador Sayari has informed the council of elders of the development of the Solifuge. The council is interested in meeting with you on <destination> to hear more."
	source
		government "Hai"
		not planet "Hai-home"
		not attributes "uninhabited" "station"
	destination "Hai-home"
	clearance
	to offer
		has "Wanderers Evacuation 1: offered"
		not "Wanderers Solifuge Recon 3: offered"
		or
			has "Wanderers Solifuge Recon 2: done"
			has "Wanderers Pond Strider Recon 2: done"
	on offer
		dialog `After you finish landing, you're approached by a Hai in a formal uniform. "Greetings, Captain <last>. Ambassador Sayari has sent word to the council of elders that our Unfettered brethren have created a new ship of great strength. The council has requested your presence on <planet>; Sayari said you have been in combat with these ships, and the elders are interested in your expertise."`
	on complete
		conversation "solifuge conversation"



mission "Strider 0"
	landing
	name "Hull Repair Technology"
	description "The Hai are working on a drone carrier to counter the Unfettered Solifuge, but the creator of the ship is still developing hull repair to make it more effective in combat. Visit <planet> to help the Hai with this technology when you are able."
	destination "Hai-home"
	clearance
	to offer
		or
			has "Wanderers Solifuge Recon 3: done"
			has "Strider Alt Start: done"
	to fail
		has "Strider 1: offered"
	to complete
		never



mission "Strider 1"
	landing
	name "Hull Repair Technology"
	description "The Hai are working on a drone carrier to counter the Unfettered Solifuge, but the creator of the ship is still developing hull repair to make it more effective in combat. Travel to <planet> to meet the delegation tasked with negotiating for this technology."
	source "Hai-home"
	destination "Allhome"
	to offer
		has "Strider 0: active"
	on offer
		conversation
			branch "know both"
				has "license: Remnant"
				has "license: Coalition"
			
			branch "know coalition"
				has "license: Coalition"
			
			branch "know remnant"
				has "license: Remnant"
			
			`You've returned to <origin>, but you don't have access to any hull repair technology. Explore the galaxy and earn the trust of an alien faction that has hull repair technology before returning.`
				defer
			
			label "know both"
			`You've returned to <origin> to help the Hai develop hull repair technology. Osen's father asked if you knew of any aliens with hull repair technology, and you have met the Coalition, who have outfits capable of repairing hulls, and the Remnant, who have ships that repair themselves. Would you like to tell the elders about one of these groups?`
			choice
				`	(Yes.)`
					goto start
				`	(Not right now.)`
					defer
			
			label "know coalition"
			`You've returned to <origin> to help the Hai develop hull repair technology. Osen's father asked if you knew of any aliens with hull repair technology, and you have met the Coalition, who have outfits capable of repairing hulls. Would you like to tell the elders about the Coalition?`
			choice
				`	(Yes.)`
					goto start
				`	(Not right now.)`
					defer
			
			label "know remnant"
			`You've returned to <origin> to help the Hai develop hull repair technology. Osen's father asked if you knew of any aliens with hull repair technology, and you have met the Remnant, who have ships that repair themselves. Would you like to tell the elders about the Remnant?`
			choice
				`	(Yes.)`
				`	(Not right now.)`
					defer
			
			label start
			`	You inform the elders that you have discovered a group that could help them with creating hull repair technology, and they invite you to the council chamber. "Greetings, Captain <last>," one of the elders says to you upon entering the chamber. "What news do you have to bring us on your search for hull repair technology?"`
			branch "tell both"
				has "license: Remnant"
				has "license: Coalition"
			
			branch "tell remnant"
				has "license: Remnant"
			
			branch "tell coalition"
				has "license: Coalition"
			
			label "tell both"
			choice
				`	"There is a group of three alien species far from here known as the Coalition that have outfits able to repair a ship in flight."`
					goto coalition
				`	"There is a group of humans far from here known as the Remnant who have ships that can repair themselves."`
					goto remnant
			
			label "tell remnant"
			choice
				`	"There is a group of humans far from here known as the Remnant who have ships that can repair themselves."`
					goto remnant
			
			label "tell coalition"
			choice
				`	"There is a group of three alien species far from here known as the Coalition that have outfits able to repair a ship in flight."`
					goto coalition
			
			label remnant
			action
				set "strider: remnant"
			`	"A group of humans with hull repair technology?" one of the elders asks with a puzzled look. "I am surprised that we have not heard of these humans before. Are they well known among the Republic?"`
			`	"No," you explain. "They are a reclusive group unknown to most of humanity. They likely wouldn't take kindly to being visited by aliens."`
				goto end
			
			label coalition
			action
				set "strider: coalition"
			`	"A group of three aliens?" one of the elders asks with a puzzled look. "It is not often in the galaxy that such groups appear."`
			
			label end
			`	"We will put together a delegation for you to transport to these people you mention. They will be waiting for you on <destination>," another elder says. "You may lead them to make contact with this group how you see fit. We trust that you will be capable in doing so."`
				accept



mission "Strider: Remnant 1"
	landing
	name "Contact the Remnant"
	description "Take a message from the Hai to <stopovers> to set up a meeting between the Remnant and the Hai, then return to <destination>."
	source "Allhome"
	stopover "Viminal"
	to offer
		has "strider: remnant"
	on offer
		conversation
			`You find the Hai delegation meant to travel to the Remnant to negotiate for the hull repair technology waiting for you in the spaceport. The leader of the delegation introduces herself as Ambassador Yashili. "I heard that we will be traveling a great distance across the galaxy. May we have a safe journey."`
			`	The delegation begins making their way to your ship, but you stop them.`
			choice
				`	"Wait a minute! This group doesn't react well to strangers. How about I set up a meeting first?"`
				`	"Not so fast. The Remnant value their secrecy, and I haven't spoken to them about this situation. Let me set up a meeting first."`
			`	The Hai look at each other and chatter quietly among themselves, then Ambassador Yashili speaks up. "You know this group, and how to make the best impression on them." She pauses to whisper to another Hai, who runs off. The Ambassador turns back to you. "I will provide you with a letter that will include a brief introduction of the Hai, an explanation of why we would like to meet them, and an invitation to establish diplomatic relations."`
			`	Moments later, the Hai who ran off returns carrying a sealed envelope and hands it to the Ambassador. She turns to you. "Here it is. Please take this to these reclusive humans for us. We will be waiting here for your return."`
			`	"Will do," you respond after taking the envelope. The delegation says its goodbyes, wishing you safe travels, before leaving.`
				accept
	on stopover
		conversation
			`Looking around the spaceport, you are not sure who to talk to about such a diplomatic request. Eventually, you go to the starport information desk to ask them. You hand the letter to the person at the desk, and after reading it, they invite you to wait in the cafeteria while they look for someone who can fulfill the request from the Hai.`
			`	After an hour of watching Remnant eating and gesturing to each other, an androgynous Remnant approaches your table. You try to guess what age they are, but while they do not seem young, neither do they seem particularly old.`
			`	"Greetings, Captain <first>," The stranger signs. "My name is Rayn, and my colleague said you had a request from another faction. It is my understanding that they desire the means to repair the hull of a ship in flight. Is this correct?"`
			choice
				`	"Yes. The Hai are hoping to be able to improve a new carrier they are developing to repair its drones."`
				`	"Yes. The Hai want to be able to repair the hulls of their ships to gain an edge against their enemies."`
			`	"So the Hai want to improve their military technology? I presume this is in response to their long-standing war against the Unfettered?"`
			choice
				`	"Yes, although they don't think of it as such."`
				`	"It isn't a war; it's a defensive action."`
			`	Rayn looks amused. "It does not matter what they call it. A war by any name is just as bloody. But that aside, how do they know about us to make such a request?"`
			choice
				`	"They were looking for someone who had repair technology, and I said I could find someone."`
				`	"They asked if I knew anyone who had in-flight repair technology, and I said I knew a group of human researchers."`
			`	"So they do not actually know about us. That is good." Rayn looks thoughtful and closes their eyes for a moment, then continues. "Pick up the Hai diplomats, but do not tell them where you are going. Take them to these coordinates on Covert in the Gienah system. It is a location in an uninhabited area where we will be able to talk. We will be waiting with something that might be able to help them - if they can meet our price."`



mission "Strider: Remnant 2"
	landing
	name "Meet with the Remnant"
	description "Transport Ambassador Yashili and her delegation to <destination> to attempt to obtain hull repair technology from the Remnant."
	source "Allhome"
	destination "Covert"
	infiltrating
	passengers 3
	blocked "The Hai delegation to meet the Remnant requires 3 bunks for the trip, but you don't have enough available space! Return when you have room for the delegation."
	to offer
		has "Strider: Remnant 1: done"
	on offer
		conversation
			`You message Ambassador Yashili and tell her that you have arranged a meeting with the Remnant. "This is good news. We will be meeting with you in the spaceport shortly."`
			`	Some time later the delegation arrives at your ship. "Before we leave, is there anything we need to know about this group before we meet them?" Yashili asks.`
			choice
				`	"The Remnant are a group of humans, so there isn't anything special you should need to know."`
					goto end
				`	"The Remnant agreed to meet you on <planet>, a dangerous pirate world, so don't stray too far from the ship."`
			`	"Oh," Yashili exclaims with a surprised look. "Are these Remnant also dangerous people?"`
			`	"No, they're friendly people," you reassure her. "They just don't want to meet in their own territory."`
			label end
			`	The delegation thanks you for this information and boards your ship. You plot a course for <destination>. Hopefully, the Remnant will be willing to share with an alien species they just met.`
				accept
	on visit
		dialog `It appears that the delegation is bunked on escorts that have not arrived in this system yet. Take off and wait for them.`



mission "Strider: Remnant 3"
	landing
	name "Technology Obtained"
	description "The delegation has successfully obtained hull repair technology from the Remnant. Return to <destination> so that the Hai can begin developing this technology for their new ship."
	source "Covert"
	destination "Hai-home"
	clearance
	passengers 3
	cargo "repair technology" 12
	blocked "You need <capacity> in order to return the Hai delegation and the repair technology back to <planet>."
	to offer
		has "Strider: Remnant 2: done"
	on offer
		log `Helped the Hai get in contact with the Remnant in order to learn how to create in-flight hull repair technology. The Hai obtained a copy of the Remnant's research on Korath systems cores, along with a number of samples.`
		conversation
			`At the designated coordinates, there is a small encampment set up that looks vaguely reminiscent of a desert trader outpost. Aside from a few camels tied near a water trough, the place looks abandoned. When you touch down next to it, the delegation steps out cautiously. "Is this the right place?" one of the Hai asks somewhat worriedly.`
			`	Before you can answer, a number of Remnant emerge from the tents, and you notice that Rayn is among them. "Welcome to our encampment, representatives," Rayn chants. "Captain <first> brought us your missive, and we asked them to bring you here. Would you care to come inside?" They gesture toward the largest of the tents. While obviously surprised, Ambassador Yashili acquiesces, and the Hai step inside. Rayn gestures for you to follow. The remaining Remnant begin patrolling around the camp.`
			`	Rayn offers food and water to the Hai and then takes a seat on a cushion on the ground. The Hai politely refuse the food before joining Rayn on the cushions. Ambassador Yashili begins. "We come representing the Hai people, who live far from here. Some of our brothers and sisters have turned violent toward us, and have recently created a new ship that may cause us trouble. We have created a ship of our own in retaliation, but we are still in need of technology capable of repairing the hull of a ship while in flight so that we may have an advantage. Captain <last> has told us that you have such technology, with ship hulls that repair themselves."`
			`	"It is true that our ships self repair," Rayn responds. "But this is not technology that we are able to share. The property is intrinsic to the metals that we build our ships with - metals which are in low supply." Yashili looks concerned with this development; perhaps this journey was a worthless one.`
			choice
				`	"So is there no way that you can help them?"`
				`	"There must be something we could do."`
			`	"Do not fear, for we have something else. For many decades, we have been fighting and plundering Korath raiders from the Core. Their ships contain outfits capable of hull repair through the use of small robots. We have been unable to reproduce these robots with ease, but we may be able to provide for you our research and a number of samples that you may use."`
			`	"We too have encountered these Korath," Yashili says in response. "Although, we had not taken their technology. This may be of great use to us."`
			`	"We would like to ask something in trade, however: a copy of your astronomical records. The history of the galaxy itself is a mystery to us, and we would like to learn more about it."`
			`	Ambassador Yashili looks thoughtful, then nods. "Historical astronomical data is scientifically valuable, as is learning how to repair our ships in flight. This seems a fair trade. We should be able to have the data for you shortly. We only need use of Captain <first>'s ship to access the hyperspace communication relays." Yashili nods to another member of the delegation, who then scurries off to your ship.`
			`	"I imagine there will be a large amount of data to transfer," Rayn says. "Let us pass the time."`
			`	Ambassador Yashili and Rayn settle into diplomatic small talk. The conversational dance between a group of professional diplomats and a secretive group that are currently playing the role of nomadic desert traders is an odd one.`
			`	"While we wait, I am curious how you met these Remnant, Captain," Yashili says.`
			choice
				`	"I spend much of my time exploring the galaxy. Sometimes you stumble upon interesting things."`
				`	"Well, the same way I'd imagine most people found you - by just wandering aimlessly."`
			`	Yashili nods. "This is an understandable situation."`
			``
			`	An hour of conversation later, the Ambassador's assistant returns with a large data drive and hands it to her. The Remnant pull out a data chip of their own, and the two groups formally exchange the data. In response to an unseen signal, another Remnant pulls back one side of the tent, and a team carries in a segment from a systems core with several of the small robots. "There are more of these waiting outside, but here is a sample for you to inspect. Using the instructions we have provided, you should have no problem making use of this technology." They poke at the console, and the robots promptly spring to life and assemble a small pile of parts into a model ship.`
			`	"Thank you for doing business with us," says Ambassador Yashili. "You have a friend in the Hai." She bows and the Remnant return the bow with fluid grace before quickly shouldering the Korath equipment. They load everything onto the <ship> as the delegation boards, and you set out to return to <planet>.`
			`	As you take off, a final glance at your exterior cameras shows the Remnant have already almost finished packing up their encampment onto the camels. As one tent comes down, it reveals an anti-aircraft artillery cannon installed on a sled. Despite the rustic appearance they portrayed, the Remnant certainly took their security seriously. There is still no ship visible, but you suspect that a Starling or Gull is undoubtedly hiding nearby.`
				accept



mission "Strider: Coalition 1"
	landing
	name "Contact the Coalition"
	description "Transport Ambassador Yashili and her delegation to <destination> to attempt to obtain hull repair technology from the Coalition."
	source "Allhome"
	destination "Ring of Friendship"
	passengers 3
	blocked "The Hai delegation to meet the Coalition requires 3 bunks for the trip, but you don't have enough available space! Return when you have room for the delegation."
	to offer
		has "strider: coalition"
	on offer
		conversation
			`You find the Hai delegation meant to travel to the Coalition to negotiate for the hull repair technology waiting for you in the spaceport. The leader of the delegation introduces herself as Ambassador Yashili. "I heard that we will be traveling a great distance across the galaxy. May we have a safe journey."`
			`	"Is there anything that we should know about this Coalition before meeting them?" another member of the delegation asks.`
			choice
				`	"The Coalition are a group of three species that live in harmony, just like the humans and Hai here. They should enjoy meeting new aliens."`
					goto normal
				`	"The Coalition hate the Quarg and went to war with them many millennia ago in order to drive them out of their space."`
			`	"That is most concerning," Yashili says with nods of agreement from the other two members of the delegation. "Hopefully the presence of the Quarg in Hai space will be of no issue to them." Yashili thinks for a moment. "Or perhaps we could use this information to our advantage."`
			label normal
			`	The delegation gathers their things and boards your ship, and you plot a course for <destination>. Hopefully the Coalition will be willing to share with an alien species they just met.`
				accept
	on visit
		dialog `It appears that the delegation is bunked on escorts that have not arrived in this system yet. Take off and wait for them.`



mission "Strider: Coalition 2"
	landing
	name "Technology Obtained"
	description "The delegation has successfully obtained hull repair technology from the Coalition. Return to <destination> so that the Hai can begin developing this technology for their new ship."
	source "Ring of Friendship"
	destination "Hai-home"
	clearance
	passengers 3
	cargo "repair technology" 12
	blocked "You need <capacity> in order to return the Hai delegation and the repair technology back to <planet>."
	to offer
		has "Strider: Coalition 1: done"
	on offer
		log `Helped the Hai get in contact with the Coalition in order to learn how to create in-flight hull repair technology. The Hai obtained a schematic of the Coalition's repair modules, along with a number of samples.`
		conversation
			`Before landing, you notify the Heliarch that you're bringing alien ambassadors to meet with them, and sure enough a Heliarch delegation is waiting for you when you land. They briefly salute you, but appear to be much more interested in the strange new beings you've brought to their center of government.`
			`	The Hai delegation is momentarily confused by the unusual speech pattern the Coalition species have, but snap out of it shortly. The Heliarch then start explaining their story to the Hai, the same they told you when you first met them, including their warning about the Quarg. While both delegations are engaged in conversation, a Heliarch agent approaches you, asking, "To this precious encounter, with what purpose have you brought these people, Captain?"`
			choice
				`	"They're in need of your help."`
				`	"They come seeking technology."`
			`	You start talking to them about the Hai and their conflict with the Unfettered, but as you're explaining you hear a loud collective gasp coming from the Heliarchs that are conversing with the Hai. A member of the Heliarch delegation approaches you. "Captain <last>, kindly telling us about their territory and society, your friend Yashili has. Truthful, is it, that close to the Hai planets, a ringworld the Quarg have constructed?"`
			`	The others seem to be in an excited conversation of their own, after changing their translation devices to no longer speak human. Yashili and the other Hai also turn to you, looking somewhat confused, waiting for you to respond for them.`
			choice
				`	"The Quarg are indeed there, but they stay out of Hai business, and the Hai stay out of theirs."`
					goto business
				`	"Yes, the Quarg have a single system there with a complete ringworld, where many Hai and even some humans also live."`
			`	The Heliarchs speak among themselves at a rapid pace, and before you know it several dozen other agents are around. One of them, an older Saryd with a golden circlet, says, "Tell us more about this ringworld, you must, Hai friends. Accompany us, would you?"`
			`	Without waiting for the Hai delegation to answer, they practically drag them to a restricted section of the ringworld without you. About an hour later, the Hai are brought back, most with tired expressions.`
			`	"Had I known we would be interrogated on the engineering aspects and the inner workings of a ringworld, I would have had an engineer come with us," Yashili whispers to you.`
			
			label business
			`	The Heliarchs once again warn the Hai to be careful with the Quarg before finally letting the Hai explain the reason for their trip here.`
			`	The delegation still looks a bit overwhelmed, as if still processing all the history the Heliarch just told them, but Yashili has kept her composure and begins speaking. "We come representing the Hai people, who live far from here. Some of our brothers and sisters have turned violent toward us, and have recently created a new ship that may cause us trouble. We have created a ship of our own in retaliation, but we are still in need of technology capable of repairing the hull of a ship while in flight so that we may have an advantage. Captain <last> has told us that you possess such technology."`
			`	"Developed such technology, indeed we have," an Arach agent responds. "Composed of several dozens of small repair bots, and their center of command, such outfits are."`
			choice
				`	"So are you willing to give or sell one of those outfits to the Hai?"`
				`	"Would you share the way of mass-producing those outfits with the Hai?"`
			`	"Much involved in projecting our repair modules, House Chamgar is," the same Arach says. "Contact their representatives in this ring, we will."`
			`	"Do you desire anything in return?" Yashili asks the agent.`
			`	"In return, we ask nothing. Helping you extend beyond the limits placed upon you by the Quarg, enough of a reward is," the Arach responds. Yashili looks somewhat puzzled, but does not press the issue any further.`
			`	A short time later, a group of Arachi representing House Chamgar arrive. They have the Hai describe their ships, using this information to optimize the repair module for Hai ships. They then prepare a copy of the blueprints, handing a data chip containing the schematics for the hull repair modules and their hull-walking robots to the Hai. Some workers then load a crate with two small modules onto your ship for the Hai to use as examples. Yashili thanks the Coalition for their generosity and boards your ship, ready to return to <destination>.`
				accept


# For compatibility
event "pond strider mass production"

# The mission to ensure the Pond Strider is properly added to the new Hai shipyards.
mission "Pond Strider Patch for v2"
	landing
	invisible
	to offer
		has "event: pond strider mass production"
	on offer
		event "pond strider mass production v2"
		fail


event "pond strider mass production v2"
	shipyard "Mon Ki i'Hiya Basics"
		add "Flea"
	shipyard "Mon Ki i'Hiya Advanced"
		add "Pond Strider"
	outfitter "Hai Basics"
		"Railgun Slug"
	outfitter "Hai Intermediate"
		"Railgun"
		"Railgun Slug"
		"Railgun Slug Rack"
		`"Baellie" Atomic Engines`
	outfitter "Hai Advanced"
		"Railgun"
		"Railgun Slug"
		"Railgun Slug Rack"
		`"Baellie" Atomic Engines`
	fleet "Large Hai"
		add variant 1
			"Geocoris"
			"Pond Strider (Tracker)"
			"Pond Strider (Railgun)"
			"Flea" 16
		add variant 1
			"Shield Beetle (Tracker)"
			"Pond Strider (Tracker)"
			"Flea" 8
			"Lightning Bug" 2
		add variant 1
			"Pond Strider"
			"Flea (Pulse)" 8
			"Lightning Bug" 2
			"Water Bug" 2
		add variant 2
			"Pond Strider (Ion)" 2
			"Flea" 16
		add variant 2
			"Pond Strider"
			"Flea" 8
			"Centipede" 2
		add variant 3
			"Shield Beetle (Pulse)"
			"Pond Strider (Pulse)"
			"Flea (Pulse)" 8

mission "Strider 3"
	landing
	source "Hai-home"
	to offer
		or
			has "Strider: Coalition 2: done"
			has "Strider: Remnant 3: done"
	on offer
		event "pond strider mass production v2" 30 90
		conversation
			`Yashili contacts the elders as you land, informing them that you have obtained the hull repair technology. They agree to meet you in the spaceport along with Osen. A group of spaceport workers begins unloading the samples from your cargo bay after you land.`
			`	As you depart your ship, you spot the Hai elders and Osen approaching. Ambassador Yashili and the Hai delegation step forward to meet them.`
			branch coalition
				has "Strider: Coalition 2: done"
			
			`	"I hope the Remnant treated you well," one of the elders says.`
			`	"They were an interesting group. Very reclusive, and not willing to share much of their people, but they were more than willing to help after we provided them with a copy of our historical astronomical data."`
				goto next
			
			label coalition
			`	"I hope the Coalition treated you well," one of the elders says.`
			`	"They were an interesting group. Very enthusiastic about meeting new people, although very touchy on the subject of the Quarg."`
			
			label next
			`	Yashili then hands the copy of the data to Osen. "You'll be needing this," she says.`
			`	"And I'll certainly love it," Osen responds. "The spaceport workers have already sent the cargo en route to my shipyard. I'll begin working on implementing it into the Pond Strider immediately."`
			choice
				`	"Pond Strider?"`
				`	"I hope you have fun with that."`
					goto fun
			
			`	"Yes. That is the name that we settled on for the ship, and its drones will be named the Flea."`
			`	"I'm getting itchy just thinking about it," one of the elders jokes.`
				goto end
			
			label fun
			`	"It's hard not to have fun when you love doing your job."`
			
			label end
			`	Osen is about to run off, but one of the elders stops him. "Can you give us any estimate on how long it will take to make use of this data?"`
			`	"Oh, yes," Osen says. "It may take us a few months to get everything working. A single month at the least if we are lucky."`
			`	"This is good to know. The sooner we have these ships functional, the better."`
			`	Osen once again gets ready to run off, but this time stops himself and turns to you. "Thank you Captain. Without this information, it could have taken me years to finish this project." You nod in response, and Osen finally runs off to his shipyard.`
			`	"I would like to thank you as well," Yashili says. "It has been some time since I have had the chance to leave our space. It is always exciting to go to new places and meet new people." Yashili bows to you, and you return a bow of your own.`
			`	"And we also need to express our gratitude," one of the elders says. "It is good to have you as a friend of the Hai. We shall keep you no longer, though. May you stay safe on your adventures."`
				decline



mission "Strider notification"
	invisible
	landing
	source
		government "Hai"
	to offer
		has "event: pond strider mass production"
	on offer
		conversation
			scene `thumbnail/hai pond strider`
			`Upon landing on <planet>, you receive a message from Osen. "Hello Captain <last>! I hope this message finds you well. I would like to once again thank you for your help on the Pond Strider, and would like to inform you that we have finished implementing the hull repair technology that you have provided us into the Pond Strider design and have now begun producing the ship on a mass scale. You'll also be interested to find that we have developed new weaponry for the Pond Strider's drone, the Flea. I won't spoil the surprise for you though. Check the shipyard on Hai-home the next time you stop by to take a look at it."`
				decline



mission "Hai Film Crew 1"
	minor
	name "Hai film crew to <planet>"
	description "Bring a film crew from <origin> to <destination>, so that they can shoot a horror film there. Payment is <payment>."
	cargo "film equipment" 50
	passengers 80
	source
		attributes hai
		attributes urban
		not attributes "uninhabited" "station"
	destination "Darkrest"
	to offer
		random < 30
		has "First Contact: Hai: offered"
	on offer
		conversation
			`A rapid tapping on your shoulder dissipates any intentions you might have had about touring this spaceport in peace. You turn around to find a Hai, short even by their standards, looking up at you.`
			`	"You're a ship captain, yes? Would you like to be part of cinema history?" she asks.`
			choice
				`	"I'm not much of a movie buff. I'll pass."`
					decline
				`	"Sure, what do you need me to do?"`
				`	"What do you mean?"`
			`	"My name is Likeet, and I'm the director of an independent film production. We need you to bring <bunks> crew members and <tons> of film equipment to <planet>, then bring us back after about a month. We can pay you <payment>, but the immaterial rewards of being involved in an ambitious project such as this will be priceless."`
			choice
				`	"Why would you want to film in <planet>? Isn't that an abandoned station?"`
					to display
						has "visited planet: Darkrest"
				`	"What's so special about <planet> for filming?"`
					to display
						not "visited planet: Darkrest"
				`	"Sure, I can take you there."`
					goto accept
				`	"I'm not going that way. You'll need to find some other captain."`
					decline
			`	"Ah, you must not know about <planet>. There are many tales which swirl around the station, chief among them being the existence of ghosts and monsters haunting its corridors. We'd like to take advantage of the popular image of <planet> in the creation of our horror film by using it as a backdrop. It's sort of the human equivalent of setting your film in a 'haunted' forest. Don't worry, we'll bring enough food to last us for the month."`
			choice
				`	"Why do people think it's haunted?"`
				`	"Alright then, I can take you there."`
					goto accept
				`	"I'm not going that way. You'll need to find some other captain."`
					decline
			`	"Back when the station was still in use, there was a mysterious malfunction in one of the hatches which released oxygen out the airlock. Hundreds on board suffocated to death. To this day, no one knows what caused it, and legends have grown out of the event."`
			choice
				`	"What makes you think I'm parking my ship at a haunted station?"`
				`	"Alright then, I can take you there."`
					goto accept
				`	"I'm not going that way. You'll need to find some other captain."`
					decline
			`	Likeet gives a laugh. "It's not actually haunted, of course. Those are just stories. Do you think I'd send an entire film crew and all their expensive equipment to a place that was actually dangerous?"`
			choice
				`	"Alright then, I can take you there."`
				`	"I'm not going that way. You'll need to find some other captain."`
					decline
			label accept
			`	"Excellent! I'll let the crew know where to find you."`
				accept
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		event "hai film crew" 30
		payment 100000 50
		conversation
			`You help your passengers unload all of their film equipment once you arrive on <planet>. The props seem to get more and more elaborate as they are unpacked from your ship; you note the presence of countless rubber limbs, mechanical monsters, and cans of fake blood being carried onto the set. Once you are finished, Likeet approaches you.`
			choice
				`	"What's your movie about, anyways?"`
				`	"I better get going, then."`
					goto going
			`	"I don't want to spoil anything, but it's a psychological horror film that explores the nature of isolation, and the shadow that our own mortality casts over our lives." She continues to elaborate on more philosophical themes that seemingly have less and less to do with the actual film, until she notices that your eyes have long since glazed over.`
			`	"Well, anyways, thanks for your help, Captain. I'll contact you in a month once we're finished filming," says Likeet.`
				accept
			label going
			`	"Thanks for your help, Captain. I'll contact you in a month once we're finished," says Likeet.`



event "hai film crew"



mission "Hai Film Crew 2"
	landing
	name "Pick up Hai film crew on <planet>"
	description "Go to <destination> to pick up the film crew you transported there."
	source
		near "Ya Hai" 0 100
	destination "Darkrest"
	to offer
		has "event: hai film crew"
	on offer
		dialog
			`Upon landing your ship you receive a voice call. Although the sender didn't bother to identify themselves, you soon recognize it as the voice of Likeet, the movie director that you brought to Darkrest a month ago.`
			`	"Captain <last>! Good to see you again! We've finished filming here and need a ride off this place. I'll see you soon." Before you can say anything, she hangs up.`



mission "Hai Film Crew 3"
	landing
	name "Hai film crew to <planet>"
	description "Take Likeet's film crew home to their studio on <destination>, so that they can process the film they shot on <origin>. Payment is <payment>."
	cargo "film equipment" 30
	passengers 80
	source "Darkrest"
	destination
		attributes hai
		attributes urban
	to offer
		has "Hai Film Crew 2: done"
	on offer
		conversation
			`The first thing you notice when you land on Darkrest is the mess. It looks as if a tornado has touched down on the set, and you don't remember Likeet talking about natural disasters when she described the movie.`
			`	"Controlled chaos, I call it," says Likeet, who has somehow materialized beside you. "We're just clearing everything out right now, making sure we didn't forget anything, the usual."`
			`	It takes a few hours to load everything onto your ship. Once you're finished, the only sign that anyone was here is that the station's surfaces are free of dust.`
			`	"Alright, Captain. We'll need to get to <planet> so that we can edit the raw footage in our studio. Gonna be nice to finally be back on a planet instead of this tin can." She pauses, as if she's trying to remember a line. "Oh yeah, I'll pay you <payment> once we've arrived. Let's get out of here."`
				accept
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment 100000 50
		conversation
			`When you land on <planet>, you are approached by Likeet, who is carrying a large can of fake blood. "Thanks for the ride, Captain. Keep a lookout for my film in theaters. You'll know it when you see it." Once the cargo has been unloaded, she almost sprints away in excitement, no doubt trying to make it to her studio as quickly as possible. You notice that <payment> have been deposited into your account.`



mission "Station Exploration 1"
	minor
	name "Bring students to <planet>"
	description "Bring a group of Hai and human students to <destination> to explore the abandoned station. They promise to pay you <payment>."
	passengers 5
	"apparent payment" 8000
	source "Greenwater"
	destination "Darkrest"
	to offer
		random < 30
		has "First Contact: Hai: offered"
	on offer
		conversation
			`It is a sunny afternoon as you idly walk through the spaceport alone, until you somehow find yourself surrounded by a group of young humans and Hai.`
			`	"You're a spaceship captain, right? Could you take us to <planet>?" says one of the Hai, as if he had practiced this line for a while now.`
			`	The human next to him gives him a nudge. "Don't forget to ask for a trip back, Tagreep, unless you want to be stranded there."`
			choice
				`	"What would you want to do on <planet>? Isn't that an abandoned station?"`
					goto question
					to display
						has "visited planet: Darkrest"
				`	"Why do you want to go to <planet>?"`
					goto "question 1"
					to display
						not "visited planet: Darkrest"
				`	"Sure, I can take you there and back."`
					goto accept
				`	"How much can you pay me?"`
				`	"Sorry, I'm busy right now. Go ask some other captain."`
					decline
			`	The group starts to shuffle around with a nervous air. "Well, we're still in school, so money's kind of tight right now... But we can pay you!" Tagreep pauses to glance at his friends and, in almost a whisper, says, "Is <payment> okay?"`
			choice
				`	"Why would you want to pay money to go to <planet>, anyhow? Isn't that an abandoned station?"`
					to display
						has "visited planet: Darkrest"
				`	"Why do you want to go to <planet>?"`
					goto "question 1"
					to display
						not "visited planet: Darkrest"
				`	"Sure, I'm not hurting for cash right now."`
					goto accept
				`	"No way, that's too low. Find someone else."`
					decline
			label question
			`	"Well, that's kind of why we want to go there," says another one of the Hai. "Some guy in our dorm told us that there's ghosts haunting <planet>, and we wanted to call his bluff."`
				goto continue
			label "question 1"
			`	"Some guy in our dorm told us that there's ghosts haunting <planet>," says another one of the Hai, "and we wanted to call his bluff."`
			label continue
			`	"We're planning to look around for an afternoon, see what we can find," one of the human students says, grinning. "Once we're done we'll let you know, and then we can leave."`
			`	One of the shorter Hai in the back pipes up. "I brought cameras for the trip!" He is ignored by the rest of the group.`
			choice
				`	"Is this legal?"`
				`	"Not my business where you spend your vacations. Come aboard."`
					goto accept
			`	The students look at each other, considering this question for what is apparently the first time. "We've heard of other people going there with no problems, as long as they were... discreet about it," says one of the students, trying to assure both you and their fellow classmates. Another mentions having heard something about needing a permit to enter, but he is quickly shushed by the rest of the group.`
			choice
				`	"I'm not about to risk getting in trouble for this. Find someone else."`
					decline
				`	"If anyone asks, I'll say I didn't know a permit was needed. Come aboard."`
			label accept
			`	The students race onboard your ship. As they settle into their bunks, you can hear them speculating about what they will find on <planet>.`
				accept
	on visit
		dialog `You look for the group of students you were transporting, but realize that they took a ride on one of your escorts! Better depart and wait for your escorts to arrive in this star system.`



mission "Station Exploration 2"
	landing
	name "Bring students home to <planet>"
	description "Bring a group of Hai and human classmates back home to <destination>."
	passengers 5
	source "Darkrest"
	destination "Greenwater"
	to offer
		has "Station Exploration 1: done"
	on offer
		payment 8000
		conversation
			`Your passengers' journey mainly consisted of trying to scare each other by telling ghost stories and jumping out of dimly-lit corners of your ship. Despite these annoyances, you land at the station with no issues. Your passengers practically jump off your ship after hastily paying you <payment>.`
			`	After passing the time in your ship for a few hours, you are startled by a loudspeaker sternly pronouncing something in Hai. You then notice your passengers rushing towards your ship with a panicked look in their eyes. You imagine that they want to take advantage of that return trip you promised as soon as possible; however, disassociating yourself from them may save you some trouble with law enforcement.`
			choice
				`	(Wait for your passengers.)`
					goto wait
				`	(Bail.)`
			`	You take off just before your passengers are able to reach your ship. Their wailing is quickly drowned out by the sound of your engines as you maneuver out of the station.`
				flee
			label wait
			`	The station is bathed in a garish orange light and the booming voice continues to play. Your red-faced passengers rush back onto your ship shouting at each other in a mixture of languages, and once they're through the airlock you take off before something worse happens.`
				launch
	on visit
		dialog `You look for the group of students you were transporting, but realize that they took a ride on one of your escorts! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		conversation
			`Upon landing, you are accosted by the local police on <planet>.`
			`	"Captain <last>?" says a Hai officer. "Could you come with me for a moment?"`
			choice
				`	"Am I in trouble?"`
					goto normal
				`	"I'm innocent!"`
					goto normal
				`	(Run away.)`
			`	Almost as soon as you turn around to run you feel a sharp pain in your side as your consciousness fades away.`
			`	You look up, lying in the spot you just stood. Above you is the same officer which asked you to follow him, waving off another officer with a Pulse Rifle. Apparently you were not out for long.`
			label normal
			`	"We just want to let you know what happened," the officer says. He leads you away from your passengers, who are currently being examined by a medic for any potential injuries, and sits you down at a table nearby.`
			`	"I think you can tell by now that your passengers weren't exactly 'sanctioned visitors' to Darkrest. However, they didn't break anything - that announcement you heard was just a warning to refrain from touching a computer system without proper training, but it apparently spooked your passengers enough that they made a run for it. They're not in trouble, as there's no law against just wandering around a station as long as you're not destructive, but typically people who do so get permission first." He give a wry smile. "Saves us from having to deal with false alarms like this."`
			choice
				`	"So, am I in trouble or not?"`
					goto trouble
				`	"Are my passengers going to be okay?"`
			`	"Yeah, they're fine. We're basically just here to make sure they didn't injure themselves. Don't imagine that their parents are going to be too thrilled with them, though.`
			label trouble
			`	"Simply bringing a paying passenger somewhere they requested to go isn't illegal. Your passengers were of age and knew what they were getting into, and you weren't deliberately enabling them to break the law. You're fine."`
			`	The officer gets up. "Next time though, you should probably think twice before bringing some college kids somewhere to go 'ghost-hunting.'" He chuckles as he leaves.`



mission "Station Exploration Abandon Ship"
	invisible
	landing
	source
		attributes "hai"
		not attributes "uninhabited"
	to offer
		has "Station Exploration 2: declined"
	on offer
		fine 70000
		conversation
			`Upon landing, you are accosted by the local police on <origin>. Behind your ship, you see your passengers disembarking from another Hai ship. Some of them are red-faced and crying, but they appear uninjured.`
			`	"Captain <last>?" says a Hai officer. "Could you come with me for a moment?"`
			choice
				`	"Am I in trouble?"`
					goto questions
				`	"I'm innocent!"`
					goto normal
				`	(Run away.)`
			`	Almost as soon as you turn around to run you feel a sharp pain in your side as your consciousness fades away.`
			`	You look up, lying in the spot you just stood. Above you is the same officer which asked you to follow him, waving off another officer with a Pulse Rifle. Apparently you were not out for long.`
				goto normal
			label questions
			`	You can clearly tell that the officer has little patience for your questions. He leads you away from your passengers, who are currently being examined by a medic for any potential injuries.`
				goto fine
			label normal
			`	You can clearly tell that the officer has little patience for your antics. He leads you away from your passengers, who are currently being examined by a medic for any potential injuries.`
			label fine
			`	"You are being fined <fine> for abandoning your passengers without warning. You're lucky you didn't end up with a more serious punishment." After further chewing you out for endangering your passengers' safety, he walks away from you in a huff.`

