Jump to content

[0.20.2] Mission Controller v0.10 (06/24/2013) [ALPHA]


nobody44

Recommended Posts

Like I've said earlier, according to the latest article about 0.21, there are no plans for missions yet. Average update cycle for KSP is about 1.5 months, so unless something will change, we're at least 3 months away from the stock implementation of the missions in career mode. So why not to have fun until then?

I'm definitely not suggesting that people shouldn't have fun; I was simply explaining one possible cause behind the lack of activity in the thread that the person was referring to.

Link to comment
Share on other sites

I'm still thinking about an aviation milestones mission chain... would it be possible to add goals like min/max altitude, speed over ground, and total mission time? Ideally, I'd like to start with a mission to simply get an unmanned probe up to 1000m and back, then work up to manned high altitude flights before actually trying for a manned space mission.

Link to comment
Share on other sites

I'm definitely not suggesting that people shouldn't have fun; I was simply explaining one possible cause behind the lack of activity in the thread that the person was referring to.

I am fully aware of Squad planning a career mode. I was just kind of bored and wanted to try something new :). Didn't use C# in a while and never even tried Unity.

I'm still thinking about an aviation milestones mission chain... would it be possible to add goals like min/max altitude, speed over ground, and total mission time? Ideally, I'd like to start with a mission to simply get an unmanned probe up to 1000m and back, then work up to manned high altitude flights before actually trying for a manned space mission.

min max Altitude are kind of orbit elements, so I will pack them there, if thats ok with you ;), same goes for speed over ground.

BTW: There is a new feature for mission chains (When does the narwhal bacon??), a new field: requiresMission. You can specify another mission that has to be finished.

Edited by nobody44
Link to comment
Share on other sites

Great update! Even better would be to create "roleplay goals" such that the player can write down whatever goal he wishes, and can press a button to say it's successful or otherwise. I understand this could be interpreted as cheap, but it would solve being able to do almost any mission.

My only request of this otherwise amazing mod so far.

Link to comment
Share on other sites

Here are my first two missions, and they seem to work okay. :)

Mission
{
name = Wings 01 Slip the Surly Bonds
description = Fly an unmanned aircraft between 1000m and 1500m altitude for one minute.
reward = 5000

OrbitGoal
{
body = Kerbin
minAltitude = 1000
maxAltitude = 1500

minSeconds = TIME(60s)

throttleDown = false
}
}

Mission
{
name = Wings 02 The Wright Stuff
description = Fly a manned aircraft between 1000m and 1500m altitude for one minute, and return.
reward = 7500
requiresMission = Wings 01 Slip the Surly Bonds

OrbitGoal
{
body = Kerbin
minAltitude = 1000
maxAltitude = 1500

minSeconds = TIME(60s)

throttleDown = false
}

LandingGoal
{
crewCount = 1
body = Kerbin
}
}

I also found a gameplay bug. If you launch an aircraft but do not activate the first stage, you can recycle the vehicle without first paying the build cost. Free money, if you're a cheater. :P

Edit: My mission 3 isn't working, and I don't know why. When I doubleclick on the mission, the mission selection window closes, but the mission details do not appear in the main Mission Controller window.

Mission
{
name = Wings 03 High Altitude Research
description = Fly an unmanned aircraft between 10000m and 11000m altitude for one minute. The UAV must carry a barometer and a thermometer.
reward = 10000
requiresMission = Wings 01 Slip the Surly Bonds

OrbitGoal
{
body = Kerbin
minAltitude = 10000
maxAltitude = 11000

minSeconds = TIME(60s)

throttleDown = false
}

PartGoal
{
partName = sensorBarometer
partCount = 1

partName = sensorThermometer
partCount = 1
}
}

If I delete the PartGoal section, it works just fine.

Edited by White Owl
Link to comment
Share on other sites

I also found a gameplay bug. If you launch an aircraft but do not activate the first stage, you can recycle the vehicle without first paying the build cost. Free money, if you're a cheater. :P

Edit: My mission 3 isn't working, and I don't know why. When I doubleclick on the mission, the mission selection window closes, but the mission details do not appear in the main Mission Controller window.

Mission
{
name = Wings 03 High Altitude Research
description = Fly an unmanned aircraft between 10000m and 11000m altitude for one minute. The UAV must carry a barometer and a thermometer.
reward = 10000
requiresMission = Wings 01 Slip the Surly Bonds

OrbitGoal
{
body = Kerbin
minAltitude = 10000
maxAltitude = 11000

minSeconds = TIME(60s)

throttleDown = false
}

PartGoal
{
partName = sensorBarometer
partCount = 1

partName = sensorThermometer
partCount = 1
}
}

If I delete the PartGoal section, it works just fine.

I know about this bug. You can also manually activate the engines and you won't pay for the vessel. I don't know why the event is not fired (its from KSP side, not mine), but I could change it...

I fixed the behaviour (it will load the mission), but: PartGoal is used to identify *one* part. If you want two parts on the vessel you will need two PartGoal (*or* a SubMissionGoal with two parts):


Mission
{
name = Wings 03 High Altitude Research
description = Fly an unmanned aircraft between 10000m and 11000m altitude for one minute. The UAV must carry a barometer and a thermometer.
reward = 10000

#requiresMission = Wings 01 Slip the Surly Bonds

OrbitGoal
{
body = Kerbin
minAltitude = 10000
maxAltitude = 11000

minSeconds = TIME(60s)

throttleDown = false
}

PartGoal
{
partName = sensorBarometer
partCount = 1

#### This field is necesssary currently, the default field value for PartGoal will be false in the next release
throttleDown = false
}

PartGoal
{
partName = sensorThermometer
partCount = 1

#### This field is necesssary currently, the default field value for PartGoal will be false in the next release
throttleDown = false
}
}

So I thought about another feature:

A mission browser. Some have suggested to create subdirectories where all mission files are, but this is currently not possible with the restrictive KSP.IO API, so there are two other ways:

1. A mission package with one mission package description file, with a small description about the mission package and a list of all included missionfiles, and of course the mission files itself. The directory will still have a huge amount of mission files though. But it would be easier to browse them.

2. A mission package is a huge file, where all included missions are. This results in lesser files (one file per mission package) but one big file for each mission package.

Here is a quick mockup:

VjTwXAq.png

The downside of the mission browser would be, that the user has to select twice: first the mission package (would look like the current window where you select the mission, can't change that) and then the mission inside the mission browser.

For the user and the mission designer I think number two is the better solution. What do you think? The user needs to update only one single file, the mission designer has to upload one single file (no package) but has to manage the big file :-/...

Edited by nobody44
Link to comment
Share on other sites

I strongly prefer your option number two. Imagine just a short time from now, there will be as many different mission packs as there are parts packs; more organization is better! It isn't really all that much more work for the mission designer, anyway. Just some copy and paste to keep straight.

Link to comment
Share on other sites

Is there a way to "reset" the MC mod? Also, after updating all my missions disappeared.

And... the answer is midnight.

Would you mind explaining this issue?

Before we start a similar discussion like the "End Flight" button: Delete the spaceProgram.sp file if you want to reset the space program.

I feel like a button to reset the plugin would be... dangerous.

Link to comment
Share on other sites

Give me a hand here... after pulling code, and getting references right, when compiling i get 2 errors in MissionControllerCalc.cs.

/Users/vaughner/Coding/KSPMissionController/src/MissionControllerCalc.cs(45,45): Error CS0584: Internal compiler error: Cannot import field `EditorLogic.partPanelBtn' referenced in assembly `Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0584) (MissionController)

/Users/vaughner/Coding/KSPMissionController/src/MissionControllerCalc.cs(31,31): Error CS0266: Cannot implicitly convert type `object' to `System.Collections.Generic.List<Part>'. An explicit conversion exists (are you missing a cast?) (CS0266) (MissionController)

I've got my references in correct but I keep getting this error on compile. FYI, this has happened with each pushed revision for the last 36 hours... so I know it's not the codebase, it's something with my Xamarin install or something. :(

Link to comment
Share on other sites

Give me a hand here... after pulling code, and getting references right, when compiling i get 2 errors in MissionControllerCalc.cs.

/Users/vaughner/Coding/KSPMissionController/src/MissionControllerCalc.cs(45,45): Error CS0584: Internal compiler error: Cannot import field `EditorLogic.partPanelBtn' referenced in assembly `Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0584) (MissionController)

/Users/vaughner/Coding/KSPMissionController/src/MissionControllerCalc.cs(31,31): Error CS0266: Cannot implicitly convert type `object' to `System.Collections.Generic.List<Part>'. An explicit conversion exists (are you missing a cast?) (CS0266) (MissionController)

I've got my references in correct but I keep getting this error on compile. FYI, this has happened with each pushed revision for the last 36 hours... so I know it's not the codebase, it's something with my Xamarin install or something. :(

Are you referencing the newest dll versions?

I will setup a VS environment and see if I get the same issues...

/edit:

The VS environment works fine :/... do you have Visual Studio? The free Express version might do the job, as far as I remember...

It's not nice to work with VS in a virtual machine, because you have to copy the dll everytime you change something :/... but better than nothing.

Edited by nobody44
Link to comment
Share on other sites

Not using VStudio, I am using MonoDevelop/Xamarin. If I don't correct the references I get tons of compile errors, so I know they are referenced correctly. I'm referencing the newest (.20.2) dll's. Do I have to reference to them with them in the KSP install? Or can I copy those references out to the src directory?

I may give VStudio in a VM a shot, but I really don't want a Win7 VM. All of my VM's I use are still XP so they are quite small and lightweight. But VStudio won't run on XP anymore.

Link to comment
Share on other sites

Not using VStudio, I am using MonoDevelop/Xamarin. If I don't correct the references I get tons of compile errors, so I know they are referenced correctly. I'm referencing the newest (.20.2) dll's. Do I have to reference to them with them in the KSP install? Or can I copy those references out to the src directory?

I may give VStudio in a VM a shot, but I really don't want a Win7 VM. All of my VM's I use are still XP so they are quite small and lightweight. But VStudio won't run on XP anymore.

It shouldn't matter. Which version of MonoDevelop/Xamarin do you use? I use MonoDevelop 4.0.8 and it works. Strange.

Here is a screenshot from the current mission package browser:

TsRzshP.png

What do you guys think so far? Once you select a mission it behaves like before.

Link to comment
Share on other sites

Xamarin 4.0.8 build 2. Currently, I am copying the resources to my src directory due to KSP being a "package". But I will try to reference it in that package incase it is referencing something else in there.

As for the mission browser, it looks great! Love that. Wish I hadn't ended up driving 16 hours yesterday cause I have missed so much development already. :/

Link to comment
Share on other sites

You might also want to check the Target Framework. Some parameters have default settings, which isn't allowed under .NET 3.5; Right click on the project name, select Options. Under Build, General; select Mono/.NET 4.0.

Once I did that, it built perfectly :)

Link to comment
Share on other sites

Okay, it's figured out.

You "have" to reference the .dll's while they are in the KSP directory. I guess you could move them all to the same place and it would still work but I can not compile a build. All I had to do was reference them where KSP installs them. :D

Whoot. Now I can play with the code. Finally! Well, now I have to see all the changes you made in the last 36 hours, then I can play with the code. :D

Thanks everyone!

Link to comment
Share on other sites

And KSP loads a Mono/.NET 4.0 library? Thought it wouldn't load it.

My plugin is built with this setting, and loads fine. Also, unless I changed this setting, I was unable to compile Mission Controller, because of what I said previously.

Not seen VS, but maybe that just picks the latest .NET available?

Link to comment
Share on other sites

Is there a way to "reset" the MC mod? Also, after updating all my missions disappeared.

For 0.3 and earlier, when Missioncontroller is run the first time it creates a file called spaceProgram.sp in the same place as the mission files. (Gamedata\missioncontroller\plugindata\missioncontroller\). This is the file that acts like a saved game for missioncontroller. You can backup this file somewhere and copy and overwrite the one that exists after you have played a while to replace it with a previous backup, or delete it to have the plugin make a new one (edit : just read nobody44's post)

The way missioncontroller handles this in future versions could change. I don't know exactly why your missions disappeared but might have something to do with changes between new versions. You could try to manually merge your old save file with a blank one by text editing it but it may not work unless you can know what changes between versions and possibly manually repair a new save to match what you're done already. I wouldn't sweat it though, there are plenty of good missions to choose from and it's a work in progress so this kind of thing happens. Nobody44 already has good ideas for the next version, things are looking very good!

Cool missions, white owl. I'll try them.

Edited by localSol
Link to comment
Share on other sites

You deserve serious respect for cooking this up, nobody44. This plugin has a lot of potential. With a few more features, it could be the perfect community content patch for Career Mode. Exactly what we need until Squad's Career Mode is more complete. Seriously dude, well done.

I've got a few ideas that would up the immersion factor considerably:

  • Research/Manufacturing Penalties: Mission costs are affected by how quickly you're launching rockets of different make and model. Two large, dissimilar rockets will need to be launched a few weeks apart to avoid inflicting serious cost and manufacturing penalties. Vehicles with higher part similarity (e.g. Satellite launch vehicles whose only differences are payload contents) require less time. Launching a fleet of rockets quickly without insane cost overruns will require pre-assembling your vehicles. The Apollo program's fleet of Saturn V rockets comes to mind.
  • Safety Margins: Manufacturing penalties not only raise the cost of the mission, they also make it more likely to end in a catastrophic explosion. The higher the manufacturing penalty for a vehicle is, the lower its safety margin will be. Safety margins dictate the chance of the vehicle exploding either on the pad or shortly after launch.
  • Vehicle Preassembly: Pre-build saved .craft files and add them to a list of assembled vessels. Cost Penalties and Safety Margins still apply. Fuel Costs are not calculated until the vessel is actually placed on the launch pad.
  • Passive Missions: You need something to do while waiting between vessel construction right? Vessels can generate cash for your space program by performing passive missions. These earn a small but constant stream of cash, even when the vessel isn't loaded. Passive missions can be started and ended at will.
  • Client Control: Payloads that are placed in orbit on behalf of a client (e.g. a private communication satellite) cannot be controlled after the mission to place them there has finished. Destroying or damaging this vessel afterwards will inflict a heavy cash penalty.
  • Mission Timeframes: Missions can have time-sensitive penalties and bonuses to encourage timely completion and discourage taking dozens of missions at once. Example: A 2 week timeframe to launch a satellite into keosynchronous orbit. 25% bonus/penalty for each week early/late. Mission failure past a set time.
  • Hardcore Mode: Quicksaving/loading adds a cost penalty every time you use it. Live life on the edge.

Edited by BaphClass
Link to comment
Share on other sites

This mod has serious potential. I've been playing around with the various goals in an attempt to replicate historic missions. There are some deficiencies. I'd most like to see a min vehicle mass goal. This would simulate the goal of most space launches: deliver a specific package to a specific place.

I'm putting together a series of probe-based science missions. Here is a typical example.

Mission

{

name = Duna Weather Reporting

description = We need seasonal weather reports from Duna. Land a sustainable weather station somewhere between 30* and 45* lattitude.

reward = 200000

SubMissionGoal

{

LandingGoal

{

body = Duna

minLatitude = 30

maxLatitude = 45

minSeconds = TIME(10d)

}

PartGoal

{

partName = commDish

partCount = 1

}

PartGoal

{

partName = sensorBarometer

partCount = 1

}

PartGoal

{

partName = sensorThermometer

partCount = 1

}

ResourceGoal

{

name = ElectricCharge

minAmount = 70

}

}

}

Would anyone be interested in seeing a pack of these? I am also working on missions integrating IonCross and/or Kethane. The following mission requires the IonCross Crew Support mod, or at least any other mod using "Oxygen".

Mission

{

name = MunBase Construction I

description = The bearded billionare has presold condos on Mun. So he needs us to land hitchhicker storage containers at a very specific location. Don't forget to bring along some Oxygen and enough solar panels to charge all those eye-phones.

reward = 250000

repeatable = true

SubMissionGoal

{

LandingGoal

{

body = Mun

minLatitude = 7

maxLatitude = 8

minLongitude = -173

maxLongitude = -172

}

PartGoal

{

partName = crewCabin

partCount = 1

}

PartGoal

{

partName = solarPanels1

partCount = 2

}

ResourceGoal

{

name = ElectricCharge

minAmount = 1000

}

ResourceGoal

{

name = Oxygen

minAmount = 9000

}

}

}

Edited by Sandworm
Link to comment
Share on other sites

You deserve serious respect for cooking this up, nobody44. This plugin has a lot of potential. With a few more features, it could be the perfect community content patch for Career Mode. Exactly what we need until Squad's Career Mode is more complete. Seriously dude, well done.

The best part (in my opinion) isn't even done yet: the mission browser :). Thanks, I am flattered.

I've got a few ideas that would up the immersion factor considerably:

Research/Manufacturing Penalties: Mission costs are affected by how quickly you're launching rockets of different make and model. Two large, dissimilar rockets will need to be launched a few weeks apart to avoid inflicting serious cost and manufacturing penalties. Vehicles with higher part similarity (e.g. Satellite launch vehicles whose only differences are payload contents) require less time. Launching a fleet of rockets quickly without insane cost overruns will require pre-assembling your vehicles. The Apollo program's fleet of Saturn V rockets comes to mind.

Let's see if I understand you correctly: Say we have launched a rocket with a communication satellite on it. We have presaved this rocket with its payload and we never change it for the randomized missions (e.g. the comsat contracts). Now, after a week or so we have to finish a Mun orbiter mission, and our presaved rocket won't do it. So the plugin needs to find a number that represents the similarity between those two vessels, like 50% similarity (could be done part wise, just count them and compare them, or mass wise). The lower this number is, the higher the manufacturing penalty is. Do I understand your suggestion correctly?

[*]Safety Margins: Manufacturing penalties not only raise the cost of the mission, they also make it more likely to end in a catastrophic explosion. The higher the manufacturing penalty for a vehicle is, the lower its safety margin will be. Safety margins dictate the chance of the vehicle exploding either on the pad or shortly after launch.

So... it's possible that our vehicle will explode right on the launchpad or some time after it? Kinda harsh :), especially when I am going to implement a hard penalty on death kerbonauts. Also the user could just use timewarp to skip those two weeks.

[*] Vehicle Preassembly: Pre-build saved .craft files and add them to a list of assembled vessels. Cost Penalties and Safety Margins still apply. Fuel Costs are not calculated until the vessel is actually placed on the launch pad.

Elaborate please. I don't understand what you mean, sorry :(.

[*]Passive Missions: You need something to do while waiting between vessel construction right? Vessels can generate cash for your space program by performing passive missions. These earn a small but constant stream of cash, even when the vessel isn't loaded. Passive missions can be started and ended at will.

[*]Client Control: Payloads that are placed in orbit on behalf of a client (e.g. a private communication satellite) cannot be controlled after the mission to place them there has finished. Destroying or damaging this vessel afterwards will inflict a heavy cash penalty.

I like both ideas. Especially the passive mission. Better with a timeframe, say 5 years. "Launch a vessel into *that* orbit and we will give you 500 krones every day". Client control: I will have to dig through remote tech to see how to "deactivate" a vessel, also I need to see which vessels have been destroyed. But so far: Feasible.

But actually I would combine them. A client controlled mission generates money in the background.

[*]Mission Timeframes: Missions can have time-sensitive penalties and bonuses to encourage timely completion and discourage taking dozens of missions at once. Example: A 2 week timeframe to launch a satellite into keosynchronous orbit. 25% bonus/penalty for each week early/late. Mission failure past a set time.

You mean something like "you have 2 years from now to finish the trip to Duna", There is one huge problem with this approach (a design problem): The controller handles only the currently selected mission. There is no mission generation process in the background, that generates a mission that pops up for the user. I will have to think about that...

[*]Hardcore Mode: Quicksaving/loading adds a cost penalty every time you use it. Live life on the edge.

Was suggested by a redditor, and I will see what I can do :). I have to see if I can listen to those events.

Thank you very much for your reply. BTW: Development will slow down on the weekend ;)... the notebook I use on weekends is not able to start KSP so I can't test anything.

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...