Jump to content

[WEB APP] KSP Campaign Manager 1.6 (Updated May 2nd)


Recommended Posts

Note: If you encounter any bugs, post here or send me a PM. I'll try and take care of any problems as fast as possible.

What does it look like?

ONjHYhR.png

Here, all active missions are expanded, with the default state being collapsed. Hovering over the balance gives a detailed breakdown over income and expenses.

What do you mean by “Campaign Manager�

Basically, it’s a web app that allows you to create and keep track of your own campaign. I started working on this when I tried to use [LordStimpy’s Campaign ruleset](“forum.kerbalspaceprogram.com/showthread.php/11778-Stimpy-s-Campaign-Mode-Budget-Rulesâ€Â) (more up-to date thread lost in forum crash). I really liked the idea of keeping track of money and trying to build the cheapest rockets possible to achieve a goal. However, I did not want to keep track of it all on a sheet of paper, some means to keep track of it digitally (and I do not mean Word or Excel) was needed.

What can I do with it?

At the moment, It allows you to either start a new mission on your own with an OK mission reward, but no penalties on failure. Alternatively you can request 3rd Party contracts. Third parties have modifiers to reward, time limit, advance and penalties on failure that are applied to missions belonging to those parties. Usually that means a bigger reward for completing a mission, but less time to do so and a penalty should you abort the mission. Once you’ve created a mission you can assign Flights (for lack of a better word. Launches? Rockets? Attempts?) to them. Those have a cost (building a rocket obviously costs money) and can either succeed or fail. A successful flight automatically completes the mission, but if you fail with a flight you can try again. You can also specifiy the amount of kerbals that died on a flight and the amount of debries dropped on those poor kerbals below for added penalties. To give you a bit more control over how much a mission pays, you can specify a custom amount of money you wish to receive or loose at the end of each flight.

How does it integrate into the game?

It does not. You create a campaign, missions and flights ond the website, then go into KSP and try to fullfill whatever goals you have set. Once your launch was succesfull or failed horribly, you go back to the website and enter your results. Writing a plugin that does all that for you would be somewhat out of my league - or would at the very least require way more time than what I have ony my hands right now.

Do I need mods/plugins for it to work?

See above. Nonetheless either MechJeb, Kerbal Engineer Redux, or some other plugin that can calculate your ship’s cost is highly recommended.

Will I be able to create my own missions?

Yes, you can create your own missions and use them in your campaigns or use mission packs that others have made public.

What use is this if practically no mod I use has balanced prices for its parts?

Here you go

Any planned features?

Lots

  • Time management (time advances when you complete flights or missions (or manually).
  • Mission rewards dependant on time.
  • Linked Missions. Make missions require the successful completion of other missions as a prerequisite.
  • More premade missions.
  • Reputation for 3rd parties, influencing rewards, advance %, time limit and penalty on failure.

You're only doing this to sell my mail adress or steal mail/password combinations

Don't use a valid email or use a junk mail if you don't trust me. And don't use the same mail/password combination everywhere, it's as simple as that.

There is NO email verification required. A valid email is only needed to reset your password.

Also, Passwords are saved using BCrypt, which puts your password through an enormous amount of hash cycles to make reverse-engineering even stolen password hashes practically impossible. You can check all this in the sourcecode if you are familiar with ruby on rails.

If you are really distrustful, just host the app yourself.

Give me technical details

The web app is written in Ruby on Rails 4.0.0beta1, uses devise for user authentication and cancan for user authorisation. The design is powered by Twitters Bootstrap. Most links and forms on the page use ajax to update the site, so disabling JS will most likely break it.

If you want you can visit the project over on Github. It’s licensed under the MIT License, so feel free to do with it whatever you want. I’m not going into how to host your own rails app here, there are plenty of guides on the internet as to how to do it.

Last but not least, I’d like to thank my brother for helping me out with the design, JS, any tougher programming/rails questions I had and for pushing me to write cleaner code (for what it’s worth. At some point I kinda threw that over board I’m afraid)

Changelog

1.6:

  • Mission Packs from other users are now displayed below your own packs
  • Click on importable mission packs to see a list of missions they add
  • To use them in your own campaigns, first add them to your pool by clicking on the checkmark
  • Only mission packs in your pack pool can be added to your campaigns
  • Fixed an issue with long mod lists that used to destroy the layout
  • Fixed empty mission packs from showing up for anyone but the author

Edited by MaliciousMuffin
Migrated server
Link to comment
Share on other sites

I would be very interested in that. As I understand it, you'd be willing to write a desktop application that either integrates into the game or checks savegame data and communicates with the website. Or are you talking about fully converting it to a desktop client-server app?

In the first case I can start working on an API fairly soon.

Link to comment
Share on other sites

I would be very interested in that. As I understand it, you'd be willing to write a desktop application that either integrates into the game or checks savegame data and communicates with the website. Or are you talking about fully converting it to a desktop client-server app?

In the first case I can start working on an API fairly soon.

I can actually make it to do both, but I could go either way. The standalone application would be easier, but I like a challenge :cool:

Link to comment
Share on other sites

I have an idea. You should be asked at the start which mods you have. Depending on the mods, you can get different missions (e.g. Kethane -> Scan kerbin for a kethane deposit, etc.)

EDIT: Also, make debris penalties less harsh. Maybe do it per mass of debris, rather than per piece?

EDIT2: Make a distinction between manned and unmanned flights in the contracts. I'm not sure whether the KSA wants me to put a probe into orbit or a kerb. Maybe some kind of minimum crew thing?

Edited by Holo
Link to comment
Share on other sites

I have an idea. You should be asked at the start which mods you have. Depending on the mods, you can get different missions (e.g. Kethane -> Scan kerbin for a kethane deposit, etc.)

EDIT: Also, make debris penalties less harsh. Maybe do it per mass of debris, rather than per piece?

EDIT2: Make a distinction between manned and unmanned flights in the contracts. I'm not sure whether the KSA wants me to put a probe into orbit or a kerb. Maybe some kind of minimum crew thing?

Penalties for crew death and falling debries are indeed very harsh compared to current mission rewards.

Missions as a whole are not in the least balanced right now and serve a pure placeholder function.

I'm currently working on expanding the mission logic (adding victory conditions thus allowing missions to take multiple flights to complete, showing a mission description, creating your own missions, all that stuff)

Doing debries penalty per mass can be tricky from an end user standpoint, but I should be able to make either an option for those willing to keep an eye on their dropped stages.

Minimum crew for contracts could be tricky. When adding mission descriptions, having randomly generated crew requirements could make it contradict the mission description. I'd rather have multiple missions that are marked as either manned or unmanned.

What could be randomly genereted however are orbit parameters like inclination, long/lat of geostationary sattelites etc.

I have an idea. You should be asked at the start which mods you have. Depending on the mods, you can get different missions (e.g. Kethane -> Scan kerbin for a kethane deposit, etc.)
This sounds like a great idea for mod creators to make expansions for this.

I'll plan to handle this with mission packs. You'll be able to select from a list of mission packs that are either premade, user generated or created by yourself. If mod authors are indeed interested in creating their own missions, I'd gladly code in an indicator that shows if a mission pack is made by the official mod author or someone else.

Asking for mods at the start of a campaign can be problematic simply because of the sheer volume of mods that come out almost daily, but I think my solution can be almost as good.

Link to comment
Share on other sites

Minimum crew for contracts could be tricky. When adding mission descriptions, having randomly generated crew requirements could make it contradict the mission description. I'd rather have multiple missions that are marked as either manned or unmanned.

What could be randomly genereted however are orbit parameters like inclination, long/lat of geostationary sattelites etc.

What I mean by random crew amounts is if it's a Moon landing, it would pick randomly whether you need 1, 2 or 3 crewmembers for example. Large operation could even demand 4 or more crew members, requiring multiple launches.

Link to comment
Share on other sites

Asking for mods at the start of a campaign can be problematic simply because of the sheer volume of mods that come out almost daily, but I think my solution can be almost as good.

I can intergrate this with my application Carbon to automatically recognize mods and what they do (ie. if they contain resources, if they are an engine). Speaking of Carbon, I can make a ship database with this so you can see all your ships side-by-side, and see which ones will be most suited to a mission.

Link to comment
Share on other sites

I can intergrate this with my application Carbon to automatically recognize mods and what they do (ie. if they contain resources, if they are an engine). Speaking of Carbon, I can make a ship database with this so you can see all your ships side-by-side, and see which ones will be most suited to a mission.

To be honest, I've not paid much attention to carbon up until now. However, it looks like It would work very well with this app. Carbon can already be used to pick the cheapest craft for a mission, expanding on that would be great. You did some really nice work with the tools you've written so far.

An unrelated question: Would you be interested in writing an app that balances prices of modded parts based on their statistics? I've got some formulas I'm quite happy with for engines and resource tanks, but I wrote my version in ruby which makes it a pain for any non-dev to actually use.

What I mean by random crew amounts is if it's a Moon landing, it would pick randomly whether you need 1, 2 or 3 crewmembers for example. Large operation could even demand 4 or more crew members, requiring multiple launches.

That would be possible, but balancing the mission reward based on the crew requirement can be quite tricky. I might do random crew requirements later on, but not as a priority. For now all those would need to be seperate missions. Thanks for the suggestion, though.

Edited by MaliciousMuffin
Link to comment
Share on other sites

An unrelated question: Would you be interested in writing an app that balances prices of modded parts based on their statistics? I've got some formulas I'm quite happy with for engines and resource tanks, but I wrote my version in ruby which makes it a pain for any non-dev to actually use.

Sure, algoritims are fun. Do you care to share your ruby script so I can look at it?

Link to comment
Share on other sites

Looking at the command pods, I've got the equation:

Cost = 475 + 125*Crew^2.

The only outliers are the aircraft pods, but they are so oddly priced that there's no way I could make an equation to accommodate them.

Link to comment
Share on other sites

Okay, here is the equation:

((mass−drymass)∗dpkg∗ucost) + (drymass ∗mcost)

dpkg = density of unit per kg (ie. liquid fuel is 92 units per kg)

ucost = cost of resource per unit, this is a variable to account for changes in kerbal stocks

mcost = same as above, but for steel/metal

Link to comment
Share on other sites

Okay, here is the equation:

((mass−drymass)∗dpkg∗ucost) + (drymass ∗mcost)

dpkg = density of unit per kg (ie. liquid fuel is 92 units per kg)

ucost = cost of resource per unit, this is a variable to account for changes in kerbal stocks

mcost = same as above, but for steel/metal

Thanks for taking the time working on this. An sorry for what a mess that ruby script was, it was only ever intended as a quick hack to get somewhat balanced prices into my game.

I reposted a more up to date version of stimpys grand campaign.

NICE, thanks. I'll have a look and see what ideas I can implement from that thread.

Regarding the campaign manager: In the past few hours I've been working on user-created missions and some performance improvements which will be deployed tomorrow.

Those improvements combined with hosting it on a decent server should vastly improve responsiveness.

That means that all campaigns created so far will be lost, though (not like there is much content to play around with right now anyways).

Link to comment
Share on other sites

I am trying to install some mods but I don’t know how to do so. The way I pot the mods in the md folder is in a folder. When I hit update mods nothing happens. What am I to do to install mods with KSP mod manager?

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