nightingale

Nightingale Softworks Development Thread

Recommended Posts

Hi, I'm nightingale.  Some of you may know me (I make a couple of mods...).  If you don't, then there's a good chance that means you don't play career in KSP - which is what most of my mods deal with.  I started modding back in 0.24 because career mode just wasn't quite what I wanted it to be and creating contracts was way more difficult that I thought it should be (hence the creation of Contract Configurator).

I've always had lots and lots of plans for what I want to do mod into KSP, most of which just bounce around in my head.  I wanted a place to document and share some of those plans with you (and in some cases, give you guys the chance to influence the direction of stuff).  Sort of along the same lines as what I was doing while Strategia was in development, but on a bigger scale.

First, a Word From Our Sponsors

Before I get into the fun stuff, I need to talk a little bit about Patreon.  I'm on Patron!  Really, there isn't much to say about that isn't already said on my Patreon page, so go visit there, and have a read through it (even if you're not interested in contributing):

qfbT6JO.png

Planned Modding Work

So here's my current high level plan for what I'm going to build in order of priority.  Of course, these priorities will change at a whim.

  1. Contract Configurator: Contract Generation & Mission Control overhaul
  2. Currently Secret Contract Pack
  3. Science System Overhaul Mod
  4. Story Based Contract Pack
  5. Kerbal Golf

That's all for now!  Make sure to follow this thread, as I'll be providing updates to the items above as I'm working on them.

Edited by nightingale

Share this post


Link to post
Share on other sites

Contract Configurator: Contract Generation & Mission Control Overhaul

I've had this one on the back-burner for a little while, and it's finally getting close to being completed.  Probably the most frequent support question I get is "why am I not getting offered <insert contract name here>?".  This is painful, because half the time it's just that the RNG hasn't decided the player will get that contract, and the other half is that the contract requirements (pre-requisites) haven't been met (and the player has no idea what those pre-requisites are).

So the solution is do a couple things:

  1. Show all contracts that are offered, as well as all contracts that could be offered (and what's stopping them from being offered)
  2. Ignore contract limits.  If a contract can be offered, offer it.

That's the basic idea.  Of course, doing this has a bunch of impacts:

  1. The Mission Control UI needs a complete overhaul
  2. Contract generation needs a complete overhaul
  3. New limits need to be added to account for the fact that reputation no longer affects which contracts are offered

Here's a preview of where the Mission Control UI is at:

rx87BPY.png

Each group is expandable/collapsible, and clicking on an unavailable contract will tell the player what the pre-requisites are for being offered that contract (information that previously was inaccessible to the player).  There's still a little bit of polish needed, such as adding summary information to the group lines - this way a player has some idea of what's being offered without having to go hunting for stuff.

Contract authors will have control over what's displayed here in the pre-requisites, so if they want them to be spoiler free or otherwise obfuscated, they have that flexibility.  Overall, the changes do mean that contract authors may have to do some re-work to get things to display the way they want it, but the overhaul is completely backwards compatible - it won't break any existing contract packs.

Lastly, there's another huge upside to all this work - there's been a massive performance improvement in the contract generation.  This is mostly due to the fact that I'm no longer at the whim of the stock system that continuously tries to ask if a contract can be generated.  The other reason is because of the way all contracts are generated up-front, I can get away with not generating contracts at all while in the flight scene (when performance really counts).

Share this post


Link to post
Share on other sites

I'm excited to utilize this new awesome feature! Thanks for all of your career improvement mods! 

Share this post


Link to post
Share on other sites

This sounds amazing, I love your approach. Career just isn't as fun without the wide variety of contracts your mods facilitate, so I'm stoked to see what you come up with here!

Share this post


Link to post
Share on other sites
1 hour ago, nightingale said:

Ignore contract limits.  If a contract can be offered, offer it.

Sorry, can you clarify this. Are you saying that the player will be able to pick and choose what contracts they want, and the RNG will be gone? Is there any randomisation at all? - What about procedurally generated contracts, like B&S - how does it know what body I want a station around? Or will I just be offered contracts for all available bodies?

Edit; I'm not knocking it, it looks very cool, I like the randomness of the contract system a little though. Although, It would be nice not to be waiting, and waiting for RemoteTech 4 CommSat contract to come up.

Edited by severedsolo

Share this post


Link to post
Share on other sites
Just now, severedsolo said:

Sorry, can you clarify this. Are you saying that the player will be able to pick and choose what contracts they want, and the RNG will be gone? Is there any randomisation at all? - What about procedurally generated contracts, like B&S - how does it know what body I want a station around? Or will I just be offered contracts for all available bodies?

So when I say "ignore contract limits", I'm talking about the stock limit of 10 offered contracts, and the reputation-based limits (where at low rep I only see one or two 3-star contracts).

There's definitely still randomization.  The maxSimultaneous will become more important, as that's the real mechanism to limit how many contracts of a given type you'll see (as such the default value will be changing from unlimited to four).  I also want to provide an alternative to this paradigm:

DATA
{
    type = Vessel

    uniquenessCheck = CONTRACT_ACTIVE
    theVessel = AllVessels().Where(<some criteria>).Random()
}

The way that works right now is it will make a random selection, then do the uniqueness check, possibly preventing the contract from generating if the uniqueness check fails.  What I want to do is reverse the order (do the uniqueness check, then make a random selection) to prevent cases where the contract generation has to just keep trying to get a unique value.  Syntactically, I'm thinking something like this:

DATA
{
    type = Vessel

    theVessel = AllVessels().Where(<some criteria>).SelectUnique(CONTRACT_ACTIVE)
}

I also want the above to be able to trigger generating multiple contract all at once (eg. generate a contact for each valid vessel, up to the maximum defined by maxSimultaneous/maxCompletions).  I haven't yet figured out how exactly I will approach that.

So to answer your question, in the case of B&S, you could potentially make it offer the initial contract for all available bodies, if that's how you want it to behave.  Or you could keep it offering randomly up to a max.  Keep in mind that the decline system is unchanged, but if a player declines a B&S station and you're only allowing a certain number of them, CC will immediately try to generate another contract to fill the gap.

Share this post


Link to post
Share on other sites

That actually sounds really good. I often feel like B&S gets the bum end of the deal from contract generation (probably because of the Uniqueness Checks like you said).

My next question: How does it handle stock contracts? Your screenshot doesn't show any (I'm assuming because you turned them off for testing).

With no upper limit on contracts, how are you going to stop Stock contracts from overwhelming the system? Or will they be bound by the "maxSimultaneous = 4" rule too?

Edited by severedsolo

Share this post


Link to post
Share on other sites
6 minutes ago, severedsolo said:

That actually sounds really good. I often feel like B&S gets the bum end of the deal from contract generation (probably because of the Uniqueness Checks like you said).

My next question: How does it handle stock contracts? Your screenshot doesn't show any (I'm assuming because you turned them off for testing).

With no upper limit on contracts, how are you going to stop Stock contracts from overwhelming the system? Or will they be bound by the "maxSimultaneous = 4" rule too?

Contract Configurator contracts will exist outside the stock system (I can get away with this because I'm also re-writing the UI).  So stock contracts will still continue to generate as normal.  I haven't written the code to put them back into the UI, which is why you don't see them.  The plan will be to give them groups by type (so all Part Test contracts get grouped together, all Survey contracts will be grouped together, etc.).

Right now the CC contracts will go into the stock list, but it's transparent to the user.  I only do that to preserve backwards compatibility with CapCom (but @DMagic is willing to make changes to support this), and to leave the option open of turning "off" the new-style Mission Control (so far only positive reactions, but could be different when it gets into the hands of the masses).  I may also decide to remove the CC contracts from that list to allow for more stock contracts to be generated.

Share this post


Link to post
Share on other sites

@nightingale in regards to "Science System Overhaul Mod"... I have been working on such a thing for a long while now, called RealScience.  Would you be interested in collaborating?  There is one part of it that deals with experiment conditions that would be right up your alley as it is very similar to the various contract requirements systems you have built for CC.

https://github.com/jwvanderbeck/RealScience/

and

https://github.com/jwvanderbeck/RealScience/wiki/Refactor-Design

Share this post


Link to post
Share on other sites

OMG thank you so much, this is the kind of contract mod that I've been hoping someone would write.

As far as randomization goes, I'd really like to see dramatically less randomization.

When I'd like to see for bases and stations is that as soon as you unlock the prereqs (achieve orbit/land around the body or whatever) then you get the initial base/station contract.  The initial contract should have a high payout.  Then you should immediately get a contract to build another base/station but the costs should adjust downwards to only offset the costs of launching a new station.  Resupply and crew rotation missions should similarly always be offered but have low payoffs that mostly compensate for mission costs.    It should be pretty "grindy" to continually build bases/stations and supply / rotate them in order to try to get ahead in cash -- but if you want to build eight stations around Kerbin for your own reasons, then you should be able to get enough cash to compensate for the launches.  Ideally I'd like to turn the randomization in these contract rewards down to zero as well, I really find contract reward randomization pointless and I never pay attention to it and it just annoys me that its there and someone thought it added to gameplay.

Where I think there should be randomization is over stuff like the something-broke-on-a-station contracts.  Those could be special events, with randomization over the severity and payoff, etc.   Its possible that ISRU return contracts and such should also be randomized.  Maybe only allow a few ISRU contracts total at a time, randomize the bodies and the payouts.  If base-building is kind of nerf'd the way I just described so that once you've built a collection of bases and stations around the bodies, then you still should have a way to get ahead, and it makes sense to structure that around having a space-economy.

Share this post


Link to post
Share on other sites
36 minutes ago, Agathorn said:

@nightingale in regards to "Science System Overhaul Mod"... I have been working on such a thing for a long while now, called RealScience.  Would you be interested in collaborating?  There is one part of it that deals with experiment conditions that would be right up your alley as it is very similar to the various contract requirements systems you have built for CC.

https://github.com/jwvanderbeck/RealScience/

and

https://github.com/jwvanderbeck/RealScience/wiki/Refactor-Design

Awesome!  I was under the impression that RealScience was somewhat in hibernation, but it seems a lot more active than I'd thought!  I'm definitely interested in a collaboration, but would need to clear other KSP commitments out of the way first (ie. finish the MC overhaul discussed above, and complete the "secret" contract pack mentioned above, which is actually a different collaboration).

I think we have some of the same reasons for wanting a science overhaul, so I could definitely see myself collaborating rather than trying to make something from scratch.  The other thing I'd like to see is exploration/discovery being a key part - I know @JPLRepo has mentioned an API for ResearchBodies before - maybe RealScience/ResearchBodies integration could be in the cards in the future too?

3 minutes ago, NathanKell said:

@nightingale RP-0 is gonna _love_ this. All of this. :)

Especially Kerbal Golf?

19 minutes ago, Jim DiGriz said:

OMG thank you so much, this is the kind of contract mod that I've been hoping someone would write.

Thanks!

19 minutes ago, Jim DiGriz said:

As far as randomization goes, I'd really like to see dramatically less randomization.

When I'd like to see for bases and stations is that as soon as you unlock the prereqs (achieve orbit/land around the body or whatever) then you get the initial base/station contract.  The initial contract should have a high payout.  Then you should immediately get a contract to build another base/station but the costs should adjust downwards to only offset the costs of launching a new station.  Resupply and crew rotation missions should similarly always be offered but have low payoffs that mostly compensate for mission costs.    It should be pretty "grindy" to continually build bases/stations and supply / rotate them in order to try to get ahead in cash -- but if you want to build eight stations around Kerbin for your own reasons, then you should be able to get enough cash to compensate for the launches.  Ideally I'd like to turn the randomization in these contract rewards down to zero as well, I really find contract reward randomization pointless and I never pay attention to it and it just annoys me that its there and someone thought it added to gameplay.

Where I think there should be randomization is over stuff like the something-broke-on-a-station contracts.  Those could be special events, with randomization over the severity and payoff, etc.   Its possible that ISRU return contracts and such should also be randomized.  Maybe only allow a few ISRU contracts total at a time, randomize the bodies and the payouts.  If base-building is kind of nerf'd the way I just described so that once you've built a collection of bases and stations around the bodies, then you still should have a way to get ahead, and it makes sense to structure that around having a space-economy.

I'll leave that to @severedsolo to address, but I suspect once 1.15.x is out with these changes you'll be pleased with the results for Bases & Stations.

Share this post


Link to post
Share on other sites
23 minutes ago, Jim DiGriz said:

When I'd like to see for bases and stations is that as soon as you unlock the prereqs (achieve orbit/land around the body or whatever) then you get the initial base/station contract.  The initial contract should have a high payout.  Then you should immediately get a contract to build another base/station but the costs should adjust downwards to only offset the costs of launching a new station.

I don't want to clog up nightingale's thread too much - if you'd like to discuss it further come over to the B&S thread, but this is pretty much the antithesis of the design philosophy behind B&S. The whole point was to do away with the endless "Deploy a station around xyz" contracts. So you get one station, and if you want more, you launch them for free. Of course you still get paid for Crew Rotations and such.

Actually, the point of the maintenance missions was to pretty much only just give you your launch costs (plus a tiny profit margin) back, but I could probably do with another balancing pass. (Next update is going to be huge apparently)

By the way nightingale, I say this in the nicest possible way, but I really hate you sometimes. :wink: jk.

XWbhbF1.png

 

Share this post


Link to post
Share on other sites

Great idea!

One suggestion:

For practical reasons, a view mode which shows only available contracts would be great.

Basically what is visible in stock at the moment, but without the rng deciding which you see. Otherwise the user has to decide between clicking a lot to open the packs or scrolling a lot to get past the not ones not offered at the moment. Kind of a default view for mission control, all packs open but only showing the available ones. And perhaps a button to return to that default view at any time.

Share this post


Link to post
Share on other sites
1 hour ago, nightingale said:

Awesome!  I was under the impression that RealScience was somewhat in hibernation, but it seems a lot more active than I'd thought!  I'm definitely interested in a collaboration, but would need to clear other KSP commitments out of the way first (ie. finish the MC overhaul discussed above, and complete the "secret" contract pack mentioned above, which is actually a different collaboration).

I think we have some of the same reasons for wanting a science overhaul, so I could definitely see myself collaborating rather than trying to make something from scratch.  The other thing I'd like to see is exploration/discovery being a key part - I know @JPLRepo has mentioned an API for ResearchBodies before - maybe RealScience/ResearchBodies integration could be in the cards in the future too?

 

Not dead, just not at the top of my list but i've been chipping away at things.  This would leave me free to focus on the core and be content knowing that the complex system of research requirements can be handled by your amazing code, so that would be awesome.

Share this post


Link to post
Share on other sites
1 hour ago, severedsolo said:

I don't want to clog up nightingale's thread too much - if you'd like to discuss it further come over to the B&S thread, but this is pretty much the antithesis of the design philosophy behind B&S. The whole point was to do away with the endless "Deploy a station around xyz" contracts. So you get one station, and if you want more, you launch them for free. Of course you still get paid for Crew Rotations and such.

That's mostly what I said?  I just replaced "free" with only enough costs to offset the launch some to keep on treading water.

I've been playing RP0 quite a bit lately and this is the way the "Sounding Rocket Medium/High" contracts typically work.  They pay off a few $1000s and that offsets the cost of the $6-10k launch vehicle some and that's about it.  They're useless for doing multiple launches and gaining any funds.  That's sort of the way I'd see it working with contracts for second bases.  The first base contact might give you $100k-$1M of payout since it represents novel progression but anything after that would be $10k kind of range for each base / station.

Share this post


Link to post
Share on other sites
1 hour ago, Yemo said:

Great idea!

One suggestion:

For practical reasons, a view mode which shows only available contracts would be great.

Basically what is visible in stock at the moment, but without the rng deciding which you see. Otherwise the user has to decide between clicking a lot to open the packs or scrolling a lot to get past the not ones not offered at the moment. Kind of a default view for mission control, all packs open but only showing the available ones. And perhaps a button to return to that default view at any time.

Yup...  a flat view is something under consideration (I'd change the new view an "All" tab, and leave the "Available" tab alone).  The list would be potentially very big though.

Share this post


Link to post
Share on other sites

Contract Configurator 1.15.3 is out!

The release of Contract Configurator 1.15.x bring the biggest change since I introduced the expression system way back in 0.7.0 - the Mission Control and contract generation overhaul!  If you've been following this thread or the Contract Configurator one, you'll know what this is all about, but now it's time to introduce this feature in more detail.  First off, here's the new mission control:

RTxg3AA.png

The main premise behind the overhaul is to reduce the randomness of contract offerings, and put the control in the players hands.  You choose which contracts you want when.  Don't like surveys?  Don't even look at them.  Really want to do the late game tourism contracts?  Look ahead to see what you need to do to unlock them.

The Contract Configurator contract generation has been effectively decoupled from the stock generation - so stock limits no longer apply to Contract Configurator.  The contracts are only limited by what contract packs you have installed (so if you enjoy @Whitecat106's Historic Missions, be prepared to see a lot of contracts offered).

t49XRWS.png

Groups of contracts can be expanded and collapsed at the click of a button.  You can also see the number of contracts offered in the group line, giving you some indication as to whether there's anything to see in there.

EdkWVwl.png

You can also see "unread" contracts in bold.  An unread contract is any contract that has been offered since the last time you expanded the group.  Clicking on the contract itself will mark it as read, but if you open the group and skim the subjects, they'll be automatically marked as read when you exit Mission Control.  The group line also shows as bolded if there are unread contracts within.  These two features should help you find the new contracts very quickly.

8Dxreh1.png

Since offering all the contracts at once effectively breaks reputation based offer limits (since Contract Configurator will now offer you all the 3-star contracts it can), the limits now move to active contracts.  So the number of 1, 2 or 3 star contracts is now limited by both the Mission Control levels (unchanged from stock) and the reputation level.

tCXF37w.png

Lastly, we have the contract pre-requisites.  If a Contract Configurator contract isn't currently available... we'll tell you why!  No more guesswork!

Some of the new features required some tweaks in contract packs to work correctly - Contract Authors have had a pre-release for a couple weeks, so updates to contract packs should be coming in fairly quickly.  So go enjoy the new features, and let me know what you think!  As always, if you enjoy my mods, consider donating through PayPal, or sponsoring me on Patreon!

Share this post


Link to post
Share on other sites

@nightingale I hate to ask this, but I've been buried in 1.2land. Is there a summary on how to upgrade existing contracts to the new system? From the post and what I recall when you last described this, other than controlling the rep limits RP-0 should upgrade just fine?

Share this post


Link to post
Share on other sites
10 minutes ago, NathanKell said:

@nightingale I hate to ask this, but I've been buried in 1.2land. Is there a summary on how to upgrade existing contracts to the new system? From the post and what I recall when you last described this, other than controlling the rep limits RP-0 should upgrade just fine?

Everything is backwards compatible (so a player upgrading to Contract Configurator 1.15..3 won't have anything in RP-0 break, it just won't be the ideal user experience.  If you do nothing you may get:

  • Incomplete/odd titles on contracts that aren't yet offered (if they use expressions, and the expressions aren't deterministic)
  • Poorly worded requirements on contracts that aren't yet offered (if you use the expression requirement or DATA nodes with a required value)
  • Contracts shown in the group in a non-ideal order (the default is alphabetical by title, in a logical "progression" order makes more natural sense)

For the most part, those are the only real issues.  You may want to revisit maxSimultaneous values if you used them to limit offered contracts of a given type to sane values.

As far as upgrading, the easiest way is to set minVersion in the ContractGroup to 1.15.3, and fix the errors (most will be present but only as warnings if you don't set the minVersion).  The main new stuff is:

Almost all of the above is tied to warnings/errors if you don't use them and Contract Configurator thinks you should (with the exception of the sortKey).

Share this post


Link to post
Share on other sites

Mods I Never Finished (and never may)

I don't have much that I can report on in terms of what I'm currently working on (one project that is still under wraps, and a lot of bug fixes and boring stuff).  But I do have a lot of stuff that has never been seen or talked about on these forums.  So for today, I present to you nightingale's never-finished mods.  These are mods that I had planned on doing, and in some cases even gotten a fair bit of work into, but never actually completed for various reasons.

Full Contract

This was the original "contract pack", before that term had even come around.  This was the mod that I wanted to build when I started making Contract Configurator.  The plan was that when Contract Configurator was complete, I would do the actual contract mod.  It was intended to give a full KSP story/progression within career mode.  There wasn't a ton of original ideas (analogs for today's space agencies, every word starting with "K").  The only thing that ever got done was this list of agencies.  One neat thing that I was planning was to have 3 main agencies, and when you take the starter contract for one agency it locks you out of the others (giving 3 ways to play it).

All in all, it aimed to do stuff that has since been done many times by other authors.  So I'm unlikely to pick this one back up.

Contract Pack: Space Objects

This was intended to by my fourth contract pack after Tourism Plus.  The idea would be to expand on the stock generated asteroids.  I wanted to do generated comets (and I wanted to make them look nice) using a similar system.  Killer asteroid redirect contracts would be a must.  In the end though, I couldn't think of many more ideas, and hit technical difficulties on the asteroid stuff.  I never made much headway, so I switched over to Field Research and never looked back.

Contract Pack: The Joolean Encounter

This is the only one on this list that has a chance of ever seeing the light.  The idea is that this would be a sort of Anomaly Surveyor 2 (where the original has some 2001 tie-ins, this one would have 2010 tie-ins).  It was intended to be more of a story based contract pack, and I'd spent a fair bit of time mapping out the story and working on some of the effects for the cut-scenes (yes, cut-scenes!).  Of course the key moment of 2010 is when the monolith-builders compress Jupiter to start nuclear fusion.  So naturally, I had to reproduce that in KSP:

IhyqCbN.gif

I also put some work into my holo-transmitter:

ypWZMy6.png

All in all, it's hard to know what's going to click with the KSP playerbase.  Although I do make mods for myself - I also want them to be successful.  So it's hard to tell what level of interest there is in a story based contract pack (there doesn't actually seem to be that much, from what I've observed).  So this one will likely stay on the backburner for some time yet.

Anyway, as always if you like what you see, make sure to head on over to my Patreon page and check it out.

Edited by nightingale

Share this post


Link to post
Share on other sites

I'm having a problem.   Contracts that I've completed, or declined, keep repapering.  Is there someway to make them stay gone from the list?

Share this post


Link to post
Share on other sites
11 hours ago, Ford6 said:

I'm having a problem.   Contracts that I've completed, or declined, keep repapering.  Is there someway to make them stay gone from the list?

Nope.  Depending on the contract, you can talk to the contract pack author - but some are simply meant to be repeatable and will reappear.

Share this post


Link to post
Share on other sites

* Just a bit of feedback- the story mode for career could be a fun idea, giving a purpose and progression to career mode. I think your initial idea was a bit large to start though, having multiple agencies adds 3X the work- I think starting off with a short-ish progression, say 10-20 steps to complete the storyline, would be a better start. If it is fun and people like it a lot then you can add the next chapter, agency, whatever.

 

 

Share this post


Link to post
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.