Jump to content

Kerbal Space Program Mission Generator


CoriW

Recommended Posts


Kerbal Space Program Mission Generator


Has there ever been a day when you couldn't think of anything to do in KSP? Just sitting there endlessly staring at the Space Center or VAB? Well look no further because with the KSP Mission Generator you'll never be out of things to do!

The KSP Mission Generator is a website that will create a completely random (but still structured) mission for you to play out in KSP, whether it be simply orbiting a planet with an unmanned probe, or going on an all out grand tour. The mission generator will give you missions varying in difficulty while at the same time making sure to never give you an impossible or implausible mission, and if you ever see a mission you wouldn't like to do it's as simple at pressing the "Generate New Mission" button.


Link: Kerbal Space Program Mission Generator

(Change Log)


Current Features


[table=width: 100%, align: center]

[tr]

[td]Ship Types[/td]

[td]Mission Destinations[/td]

[td]Objectives[/td]

[td]Conditions[/td]

[/tr]

[tr]

[td]Orbital Probe (Unmanned)[/td]

[td]Moho[/td]

[td]Equatorial Orbit(s)[/td]

[td]Time Limit of X Days[/td]

[/tr]

[tr]

[td]Orbital Ship (Manned)[/td]

[td]Eve[/td]

[td]Polar Orbit(s)[/td]

[td]No Docking[/td]

[/tr]

[tr]

[td]Lander Probe (Unmanned)[/td]

[td]Gilly[/td]

[td]Equatorial Landing(s)[/td]

[td]No Nuclear Engines[/td]

[/tr]

[tr]

[td]Lander (Manned)[/td]

[td]Kerbin[/td]

[td]Polar Landing(s)[/td]

[td]No Debris[/td]

[/tr]

[tr]

[td]Rover (Unmanned)[/td]

[td]Mun[/td]

[td]Atmospheric Equatorial Flight(s)[/td]

[td]No Fuel Lines[/td]

[/tr]

[tr]

[td]Rover (Manned)[/td]

[td]Minmus[/td]

[td]Atmospheric Polar Flight(s)[/td]

[td][/td]

[/tr]

[tr]

[td]Spaceplane (Unmanned)[/td]

[td]Duna[/td]

[td]Atmospheric Equatorial Landing(s)[/td]

[td][/td]

[/tr]

[tr]

[td]Spaceplane (Manned)[/td]

[td]Ike[/td]

[td]Atmospheric Polar Landing(s)[/td]

[td][/td]

[/tr]

[tr]

[td]Space Station[/td]

[td]Dres[/td]

[td]Study the Planet(s) with Scientific Equipment[/td]

[td][/td]

[/tr]

[tr]

[td]Immobile Ground Base[/td]

[td]Jool[/td]

[td]Locate an Anomaly[/td]

[td][/td]

[/tr]

[tr]

[td]Interplanetary Mothership[/td]

[td]Laythe[/td]

[td]Colonization[/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Vall[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Tylo[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Bop[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Pol[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Eeloo[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td][/td]

[td]Grand Tour[/td]

[td][/td]

[td][/td]

[/tr]

[/table]


Original Thread

Hello everybody, recently I've seen a few threads relating to "missions" for KSP, which is pretty much just taking a chart with some numbers and instructions on it, rolling some dice, and depending on what numbers you get, you can piece together a mission to play out in KSP, it's actually pretty entertaining. My initial interest sparked when I seen this thread, and my interest was even further peaked when I seen this thread.

Now, in both of those threads there was some talk about ways to either get a website up that could do the dice rolling for you, or a plugin that could come up with missions in this way in game, however although there was a lot of talk about it, nobody actually seemed to step up and do anything about it. After awhile of reading these threads and waiting to see if anybody would actually step up to the plate, I realized something... I have some basic knowledge of HTML and Java and have absolutely nothing productive to do with my time! So with that I got to work on a "Mission Generator" for KSP using the same methods discussed in the two threads linked above.

I've been working on the website and mission generator script for about 9 hours straight now, and I feel like I finally have something that is actually worth posting a thread about. Keep in mind that it is still in early development, so there may be a bug or two and there are more features I would like to add to it, but for now I think it's good enough to show you all what I've been working on.

Kerbal Space Program Mission Generator

Edited by CoriW
Link to comment
Share on other sites

Gave it a few tries and bookmarked the site. Very well done allround, I have no criticism whatsoever.

Top notch work.

Thanks! And it should get even better over time, I've been working on it for the last 9 or so hours straight to get it to this point, and I don't intend on stopping until it's perfect. (Well I mean, I'll stop to sleep and work, but all my spare time for the moment is going to be working on this.) :wink:

Link to comment
Share on other sites

I tired it out and it's pretty neat! Though it can give you some serious WTF missions:

3TpsM.png

Oh man that gave me a good laugh, yeah like I said in OP there may be a bug or two. That "Time Limit" thing has been giving me a really hard time, primarily because I can't seem to find anywhere that says how long it takes roughly to get from planet A to planet B in KSP, if anybody knows where I could possibly get that information I would really appreciate it.

Link to comment
Share on other sites

Very impressive. Simple and efficient. My only suggestion would be to code the generator to prevent some options from displaying together. For example, IF MisDest != GranTor, THEN cond3 = 3daylimit. Or something like that.

Link to comment
Share on other sites

Very impressive. Simple and efficient. My only suggestion would be to code the generator to prevent some options from displaying together. For example, IF MisDest != GranTor, THEN cond3 = 3daylimit. Or something like that.

Yeah I'm probably going to put in some temporary fixes until I can get a permanent solution together.

Link to comment
Share on other sites

Oi, just because we don't have anything up in a day or two doesn't mean we aren't working on it. Some of us have jobs. Give it a few days and I'll have something up to experiment with. :P

Edit: Also I suggest using 'arrays' with 'case' statements, it'll cut down on those 'if' statements.

Edited by Egon
Link to comment
Share on other sites

Ship Type: Orbital Probe (Unmanned)

Mission Destination: Dres

Condition 1: Secondary Destination: Laythe

Condition 2: Equatorial Orbit

Condition 3: Time Limit of 343 Days

Okay now that seems like a fun mission to plan. I think I'll make it a 2-probe deal, that drops the first probe off while letting the second go to Jool.

Link to comment
Share on other sites

Oi, just because we don't have anything up in a day or two doesn't mean we aren't working on it. Some of us have jobs. Give it a few days and I'll have something up to experiment with. :P

Edit: Also I suggest using arrays, it'll cut down on those if statements.

Oh yeah I know, but you did help inspire this by the way and I'm very happy I decided to take a go at it. (P.S ~ I have a job too, and I'll probably be very tired at work today. xD)

And thanks for the tip, I'll look into the arrays... Those 'if' statements are starting to get to me.

Okay now that seems like a fun mission to plan. I think I'll make it a 2-probe deal, that drops the first probe off while letting the second go to Jool.

Sounds good, have fun! :)

P.S ~ I just added a "Landing" condition for the Lander Probe (Unmanned), Lander (Manned), Rover (Unmanned), Rover (Manned), and Base ship types.

Edited by CoriW
Link to comment
Share on other sites

Oh yeah I know, but you did help inspire this by the way and I'm very happy I decided to take a go at it. (P.S ~ I have a job too, and I'll probably be very tired at work today. xD)

And thanks for the tip, I'll look into the arrays... Those 'if' statements are starting to get to me.

var bodies = ["Kerbol", "Moho", "Eve", "Eve's satellite Gilly", "Kerbin", "Kerbin's satellite Mun", "Kerbin's satellite Minmus", "Duna", "Duna's satellite Ike", "Dres", "Jool", "Jool's satellite Laythe", "Jool's satellite Vall", "Jool's satellite Tylo", "Jool's satellite Bop", "Jool's satellite Pol", "Eeloo"]

var orbittype = ["Equatorial", "Polar"]

var landingarea = ["North Pole", "Equator", "South Pole"]

For a Duna equatorial orbit all i have to do is call

document.write(bodies[7] + " orbit type: " + orbittype[0]);

Muuuuch easier.

Link to comment
Share on other sites

Oh man that gave me a good laugh, yeah like I said in OP there may be a bug or two. That "Time Limit" thing has been giving me a really hard time, primarily because I can't seem to find anywhere that says how long it takes roughly to get from planet A to planet B in KSP, if anybody knows where I could possibly get that information I would really appreciate it.

I think you can divide the distance of the planet by the required ejection velocity to get an ETA.

Link to comment
Share on other sites

var bodies = ["Kerbol", "Moho", "Eve", "Eve's satellite Gilly", "Kerbin", "Kerbin's satellite Mun", "Kerbin's satellite Minmus", "Duna", "Duna's satellite Ike", "Dres", "Jool", "Jool's satellite Laythe", "Jool's satellite Vall", "Jool's satellite Tylo", "Jool's satellite Bop", "Jool's satellite Pol", "Eeloo"]

var orbittype = ["Equatorial", "Polar"]

var landingarea = ["North Pole", "Equator", "South Pole"]

For a Duna equatorial orbit all i have to do is call

document.write(bodies[7] + " orbit type: " + orbittype[0]);

Muuuuch easier.

Oh yeah, that's a lot easier on the eyes as well. All though in my code there are parts where I have to check multiple different variables before I can actually call the mission details, to prevent from impossible missions and such, can that be done with the arrays? An example from my code, I need to check what type of ship they'll be flying before I can call for an equatorial orbit, since rovers and bases and such aren't really things that are thought to "orbit".

randCond1 is "Random Condition 1", randType pretty much is what type of ship they'll be in, and displayCond1 is the text that will be displayed for the mission info.

if (randCond1 == 1 && randType != 3 && randType != 4 && randType != 5 && randType != 6 && randType != 9)

{

displayCond1 = '<p>Equatorial Orbit</p>';

}

Link to comment
Share on other sites

In essence arrays are vars that can hold multipal vars within them. To make sure you don't get an impossible mission you'll still have to use 'if' statements.

So in other words most of my code will have to stay the same as it is, since about 95% of my code is 'if', 'else', and 'while' statements in order to prevent impossible missions. lol

That's alright though, at least it works.

I think you can divide the distance of the planet by the required ejection velocity to get an ETA.

You mean the distance between the planets Semi-Major axis?

Edited by CoriW
Link to comment
Share on other sites

Your easy missions should be limited to Kerbin/Mun/Minmus and your normal missons should include Duna/Eve (but not moons). Also, when you say space station, you should describe what that is. A crew of at least 2 with one or more docking port?

Nice work.

Link to comment
Share on other sites

Your easy missions should be limited to Kerbin/Mun/Minmus and your normal missons should include Duna/Eve (but not moons). Also, when you say space station, you should describe what that is. A crew of at least 2 with one or more docking port?

Nice work.

Thanks for the feedback, I was also thinking easy would remain within the Kerbin/Mun/Minmus system, the normal ones I wasn't so sure about though since Eve is a very terrible place. Although I think I might have normal do some orbital stuff around Eve (no landing on Eve), then also include Gilly, Duna, Ike, and Dres. Since there are only 3 levels of difficulty for the moment and the first remains close to home that seems like a reasonable gap between normal and hard.

Easy - Kerbin, Mun, Minmus

Normal - Eve, Gilly, Duna, Ike, Dres

Hard - Moho, Jool, Laythe, Vall, Tylo, Bop, Pol, Eeloo

Hmm... Maybe I should also do Very Easy and Very Hard modes as well... Then I can spread it out a bit more.

Edited by CoriW
Link to comment
Share on other sites

Just a suggestion, but the difficulty of a mission isn't necessarily determined by the distance, more the combination of conditions.

Putting a probe in a polar orbit around eeloo is probably easier than constructing a space station around Vall with no debris.

Neat idea, though. I like it.

Link to comment
Share on other sites

Just a suggestion, but the difficulty of a mission isn't necessarily determined by the distance, more the combination of conditions.

Putting a probe in a polar orbit around eeloo is probably easier than constructing a space station around Vall with no debris.

Neat idea, though. I like it.

Yeah don't worry, I've been working out how I'm going to do it and conditions will likely vary with difficulty as well. Although good idea about the "constructing a space station around Vall" I think I may just add orbital construction to my generator.

Alright, this thread seems as it would now fit more in the Tools and Applications forum, moving it there.

I'll be watching this, interesting stuff going on :)

Thanks, to be honest I didn't even know there was a "Tools and Applications" forum, probably didn't find it since it's a sub forum of a sub forum, otherwise I would of put it in there to begin with. :)

Link to comment
Share on other sites

Hey everybody so I've updated this quite a bit now, there is a changelog on the website but I figured I would go ahead and post it here as well.

(On a side note... I've been working on this thing for 17 hours today... I've put about 41 hours into this thing in the last 3 days. O.o)

P.S ~ I'm aware this is a double post, but I figured a changelog was worth it's own post, and it's been 2 days.

Version 0.2 (05/08/2013, 12:00PM)

(This is everything between the start of development to the time of this changelog, since before I had not been tracking changes.)

Additions

- Added crew capacity requirement (4 - 16) to "Immobile Ground Base" and "Space Station" ship types

- Added condition: "Equatorial Landing(s)"

- Added condition: "Polar Landing(s)"

Changes

- Changed Ship Type: "Spaceplane" to "Spaceplane (Manned)"

- Changed Ship Type: "Base" to "Immobile Ground Base"

- Changed Ship Type: "Station" to "Space Station"

- Changed Condition: "Equatorial Orbit" to "Equatorial Orbit(s)"

- Changed Condition: "Polar Orbit" to "Polar Orbit(s)"

Removals

- Removed Mission and Secondary Destination: "The Sun"

- Removed conditions "Equatorial Landing(s)" and "Polar Landing(s)" if your Mission Destination or Secondary Destination is "Kerbin", or "Jool"

- Removed conditions "Equatorial Orbit(s)" and "Polar Orbit(s)" if your Ship Type is "Lander Probe (Unmanned)", "Lander (Manned", "Rover (Unmanned)", "Rover (Manned)", or "Immobile Ground Base"

- Removed condition "No Docking" if your Ship Type is "Space Station", or "Immobile Ground Base"

- Removed condition "Return to Kerbin" if your Mission or Secondary Destination is "Kerbin"

- Removed condition "Secondary Destination" if your Mission Destination is "Grand Tour"

- Removed conditions "Return to Kerbin" and "Secondary Destination" if your Ship Type is "Rover (Unmanned)", "Rover (Manned)", or "Immobile Ground Base"

Miscellaneous

- Secondary Destination can no longer be the same as the Mission Destination

- Ship Type can no longer be "Lander Probe (Unmanned)", "Lander (Manned)", "Rover (Unmanned)", "Rover (Manned)", or "Immobile Ground Base" if your Mission Destination is "Kerbin", or "Jool"

- Ship Type can no longer be "Rover (Unmanned)", "Rover (Manned)", or "Immobile Ground Base" if your Mission Destination is "Grand Tour"

- Ship Type can only be "Spaceplane (Manned)" if your Mission Destination or Secondary Destination is "Eve", "Kerbin", "Duna", "Jool", or "Laythe"

- Changed Ship Type "Your Choice (...)" to limit available Ship Types depending on if your Mission Destination is "Kerbin", "Jool", or "Grand Tour"

- When Ship Type is "Lander Probe (Unmanned)", "Lander (Manned)", "Rover (Unmanned)", "Rover (Manned)", or "Immobile Ground Base" the first condition will be forced to be "Equatorial Landing(s)", or "Polar Landing(s)"

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...