Jump to content

[1.10.1+] Contract Configurator [v1.30.5] [2020-10-05]


nightingale

Recommended Posts

I was able to get my contract to mine a new resource and return to Kerbin working, took all day though lol, I uploaded the file if anyone wants to take a look at it as another example. http://s000.tinyupload.com/?file_id=33277116876579487797

Nice, keep it up!

Is there a way to force a contract to always appear if available? Been playing with weight but even with highish values (100) it doesn't seem to be a sure thing.

I was thinking that I need to put this in the documentation, since this comes up often. Here's a post about "why doesn't my contract show up", which isn't quite what you're asking, but part of it is relevant.

I'll probably have to put this in the documentation at some point, so I'll try and write this up as cleanly as possible. :)

Requirements

The first thing to check for is that all requirements are being met. In the Contract Configurator debug menu, press the "force check requirements" button to force all requirements to be checked (otherwise there's short-circuiting for performance, and you may not be able to tell if a requirement is succeeding or not). For a contract to be offered, all requirements should show as green. For debugging purposes, requirements can be temporarily removed by unchecking them to force a contract to be offered.

DATA Node Expressions

DATA nodes by default indicate required values. If the data node resolves to null, the contract will not be offered. To check this, view the output of the expressions on the right hand side of the debug window.

Contract Weights

When choosing a contract to offer, the system will do a weighted selection between all contracts within the same group. So a contract with a weight of 2.0 will be twice as likely as a contract with a weight of 1.0 to be selected.

Additionally, if you're not using a contract group yet, probably best to introduce one. In addition to what I mentioned above, there's logic for fairness between groups. It'll try to select equally between the groups, so there is no preference between Tourism, Anomaly Surveyor, KSS, etc. The exception is tjsnh's advanced progression contracts, because he doesn't use contract groups and set the weights on everything to 99.0 (I told him to change it, but it fell on deaf ears). Anyway, this is only and issue for you if you have that installed and are not using contract groups.

If none of this helps, then post up your contract config details and I'll take a look... maybe there's something else going on that I can help with.

So, things to keep in mind based on the above:

  1. Even with a very large weight, that'll only increase the likelihood of being selected within your contract group. This is by design to prevent one contract pack from pushing another one out of contention.
  2. If it's a 3-star contract, it may not show up at all at the beginning of the game when the player has low prestige. If it absolutely must show up, better to use a lower prestige to make it more likely.
  3. Make sure you're not hitting a generation failure due to a REQUIREMENT node. I don't think this is the case based on your other questions, but I'll throw it in for completeness. For example, if you had targetBody = AllBodies().Random, and then had a REQUIREMENT that says the player must've orbited the body, then most of the time it'll pick a body the player hasn't orbited, and the contract won't generate. Of course, you most likely know this already, which is why you're asking for the expressions for flyby, etc.

The other thing to check - what's the composition of contracts look like? Is it mostly other Contract Configurator ones, or lots of stock ones? I have some logic for determining the Contract Configurator vs. stock logic and if it makes sense I can nudge the weighting a bit back towards Contract Configurator (I was thinking about doing that in 1.6.0 anyway).

Link to comment
Share on other sites

Hmm, ok. I guess the weight isn't going to really help me then.

Basically I'm trying to replace the stock starting contracts with a set of 9 custom ones. Starts with a simple reach x altitude and ends with escaping Kerbin's SOI.

Ideally these are treated as first contracts and when one is done you get the next one(or set).

What I'm running into is after I get to space the contracts are all part test junk. If I reload the contracts a few times I usually get them.

I'm going to try setting them to trivial (they were significant) and see if that helps.

For my test the only of contracts installed is your Tourism one.

Link to comment
Share on other sites

Hmm, ok. I guess the weight isn't going to really help me then.

Basically I'm trying to replace the stock starting contracts with a set of 9 custom ones. Starts with a simple reach x altitude and ends with escaping Kerbin's SOI.

Ideally these are treated as first contracts and when one is done you get the next one(or set).

What I'm running into is after I get to space the contracts are all part test junk. If I reload the contracts a few times I usually get them.

I'm going to try setting them to trivial (they were significant) and see if that helps.

For my test the only of contracts installed is your Tourism one.

You could use the Contract Configurator Node to disable types of stock contracts if that helps

Link to comment
Share on other sites

Hmm, ok. I guess the weight isn't going to really help me then.

Basically I'm trying to replace the stock starting contracts with a set of 9 custom ones. Starts with a simple reach x altitude and ends with escaping Kerbin's SOI.

Ideally these are treated as first contracts and when one is done you get the next one(or set).

What I'm running into is after I get to space the contracts are all part test junk. If I reload the contracts a few times I usually get them.

I'm going to try setting them to trivial (they were significant) and see if that helps.

For my test the only of contracts installed is your Tourism one.

Do me a favour and check the stock alt-f12 debug menu. Somewhere under contracts there's a tab with a list of contract types with a bunch of buttons ("E", "M", "H"). Can you tell me how many entries are in there for ConfiguredContract? Also, if you can get me a rough count of the number of CONTRACT_TYPE and CONTRACT_GROUP entries in the Contract Configurator alt-f10 debug menu, that would help too.

- - - Updated - - -

You could use the Contract Configurator Node to disable types of stock contracts if that helps

I don't think the issue is that they aren't showing up for his testing, but he wants to make sure they will show up consistently for the player who eventually uses it - so disabling stock contract types wouldn't help much then. :)

Link to comment
Share on other sites

I am actually disabling RecordTrackContract and WorldFirstContract.

There are two for ConfiguredContract

With tourism there are two groups. Mine and yours. 23 contract types.

Link to comment
Share on other sites

I am actually disabling RecordTrackContract and WorldFirstContract.

There are two for ConfiguredContract

With tourism there are two groups. Mine and yours. 23 contract types.

Okay, I've tweaked the logic just a little bit for the next release. For those numbers you'd now end up with 3 entries instead. If you want to simulate it you can add another empty CONTRACT_GROUP. If you do, let me know if that feels a little bit more balanced. Because the way the stock contract generation works, odds are you'll never get it to *always* show up.... but you shouldn't have to cycle too much to get it in. If it still seems a bit low I can tweak it up a bit more still.

Link to comment
Share on other sites

I got two more contracts working today and am almost done with a forth, but I would like to add a parameter to perform an asteroid analysis with the surface scanner, docked to a generated asteroid but I can't seem to find the command to run an asteroid analysis(or regular analysis) with the surface scanner. Any help would be greatly appreciated.

Link to comment
Share on other sites

I got two more contracts working today and am almost done with a forth, but I would like to add a parameter to perform an asteroid analysis with the surface scanner, docked to a generated asteroid but I can't seem to find the command to run an asteroid analysis(or regular analysis) with the surface scanner. Any help would be greatly appreciated.

I haven't played with it myself, but my understanding is that you don't need to scan asteroids. As soon as you grapple it, you should be able to see the ore concentration.

Link to comment
Share on other sites

I haven't played with it myself, but my understanding is that you don't need to scan asteroids. As soon as you grapple it, you should be able to see the ore concentration.

I see, just sent up a lab with a surface scanner to my "Micro Mun" asteroid in lko in career mode to show you what I mean but you were right, it was already scanned(as you can see, I hadn't played with it myself either), however it only showed how much ore was in it, not any of the resource from my mod, maybe its because the asteroid is older than the mod or I need to tweak the surface scanner some more, anyways thanks for the reply. I wanted to use the surface scanner because I'm making a mission to explore and conduct science on a generated asteroid, much like the stock contracts to explore another planet.

Link to comment
Share on other sites

Been playing with my contracts on a New Horizon game and adding my contracts into their own group seems to have helped a lot with them showing up.

Couple questions though. I have all of your contract packs installed and the anomaly pack requires the First Launch contract before the Island one shows up. I disabled WorldFirstContract and so that contract doesn't show up.

Is there anyway to simulate that contract being completed (without going into the CC alt+f10 menu)?

I've played the current game up till manned orbit (next step is escaping Kerbin orbit), but for whatever reason I'm not getting 3 star contracts. None of mine, yours or even stock show up. I doubt this is a issue with your mod, more probably New Horizon (though he doesn't alter contracts).

Do you know what might cause that or even what is the requirement for 3 star contracts to show up?

~edit - hmm, just tested by cheating a couple hundred rep and 3 stars all of a sudden showed up. You need something like 25-50 rep huh? Interesting.

Link to comment
Share on other sites

Been playing with my contracts on a New Horizon game and adding my contracts into their own group seems to have helped a lot with them showing up.

Couple questions though. I have all of your contract packs installed and the anomaly pack requires the First Launch contract before the Island one shows up. I disabled WorldFirstContract and so that contract doesn't show up.

Is there anyway to simulate that contract being completed (without going into the CC alt+f10 menu)?

This is actually incorrect - it doesn't depend on that contract, just doing your first launch. If you're like me though, you're using HyperEdit like crazy for testing, and I bet you haven't actually launched anything (HyperEdit doesn't count, you need to have an engine that'll ignite and hit spacebar...).

Arguably it's a bug in HyperEdit, but not one that I've gone to the trouble of reporting...

I've played the current game up till manned orbit (next step is escaping Kerbin orbit), but for whatever reason I'm not getting 3 star contracts. None of mine, yours or even stock show up. I doubt this is a issue with your mod, more probably New Horizon (though he doesn't alter contracts).

Do you know what might cause that or even what is the requirement for 3 star contracts to show up?

~edit - hmm, just tested by cheating a couple hundred rep and 3 stars all of a sudden showed up. You need something like 25-50 rep huh? Interesting.

Yeah, that sounds about right... doing the stock world firsts contracts is usually enough to get them up. So if you're looking to replace them with your own contracts, make sure it feeds enough rep into the system. :)

Link to comment
Share on other sites

This is actually incorrect - it doesn't depend on that contract, just doing your first launch. If you're like me though, you're using HyperEdit like crazy for testing, and I bet you haven't actually launched anything (HyperEdit doesn't count, you need to have an engine that'll ignite and hit spacebar...).

Arguably it's a bug in HyperEdit, but not one that I've gone to the trouble of reporting...

Hmm, odd. I'm actually using KCT to do simulations (uses some of hyperedits code though). However, I have actually launched a few rockets, but it didn't tick the first launch for the island contract. I ended up using the CC menu to force the requirement.

Interesting, I just loaded in and checked it again and now it is showing up. I'm gonna just put that off as some weird fluke then, especially since you explained that is doesn't need the first launch contract.

Yeah, that sounds about right... doing the stock world firsts contracts is usually enough to get them up. So if you're looking to replace them with your own contracts, make sure it feeds enough rep into the system. :)

Ugh... This whole contract rewards based off of science multiplier is frusterating. I mean it makes sense, but i wish there was a reward multiplier as well. I suppose the issue is because New Horizon has halved the multiplier for Kerbin, but still. :)

I've now changed rep to have:

 / @targetBody.Multiplier()

So now assuming all my contracts (9) are completed, 275ish rep will be gained.

Link to comment
Share on other sites

So now assuming all my contracts (9) are completed, 275ish rep will be gained.

Which will give the player something like 250 rep total (more or less, don't know the actual formula). Seriously, there's a diminishing returns thing built in to rep. At zero rep you get 100% of the rep you're supposed to get. At 99% rep you get significantly less (like less than 1%). You can never reach max rep (1000), as the closer you get to it, the less rep you can actually receive.

Link to comment
Share on other sites

Is there a way to get in space high, or high atmosphere as a parameter so I don't need to hardcode altitude?

You already asked:

I'm looking at CelestialBody Type and I don't see any method that returns the space high border. Is there a way to retrieve that that I am missing?

And I answered:

Don't have it, I'll add in 1.6.0 - [#280].

You may want to put a watch on issues of interest on GitHub. :)

Anyway, the code is done and will be released with 1.6.0 in the next couple days.

Link to comment
Share on other sites

Ugh, sorry. I forgot I asked that one. Don't get enough sleep these days.

Funny thing is I had even been looking at open issues right before I posted.

Anyway, I was just looking at contracts again doing another pass and changing requirements and I thought about it again. :P

Link to comment
Share on other sites

Ugh, sorry. I forgot I asked that one. Don't get enough sleep these days.

Funny thing is I had even been looking at open issues right before I posted.

Anyway, I was just looking at contracts again doing another pass and changing requirements and I thought about it again. :P

No worries - because the issue was completed I closed it, so you wouldn't have seen it anyway. ;)

Link to comment
Share on other sites

New release out! Lots of little changes for modders, and one big one for players. There is now a settings window (only available via the space centre) that allows disabling contract groups (ie. contract packs) and stock contracts on a per-save basis. Download now!

Contract Configurator 1.6.0

  • New settings window (only available in space center) that allows contract packs to be enabled/disabled per save. Also supports disabling of stock contract types.
  • Support for DATA nodes within CONTRACT_GROUP (allows defining an expression once and using it in multiple contracts).
  • Added displayName to CONTRACT_GROUP.
  • Added new extended mode to HasResource parameter.
  • New AwardExperience behaviour for giving extra experience to crew.
  • FlyingAltitudeThreshold and SpaceAltitudeThreshold methods added to CelestialBody.
  • Tweak weighting between stock contracts and Contract Configurator contracts towards Contract Configurator.
  • Duration portion of VesselParameterGroup parameters is now displayed as a child parameter (makes it harder to miss).
  • Added attributes to VesselParameterGroup to allow vessel definitions to elapse on contract completion/failure.
  • New CelestialBody methods for progression attributes (whether the player has reached, orbited, landed, escaped and returned from the body).
  • Added Tech class to expressions.

Link to comment
Share on other sites

CKan update pls.

Also please make impossible contracts impossible ... I dunno from what mod I got it (so I don't know where to to complain)... but I got a contract to splash down on the grassland biome and do science there... splash down only works on water. On grassland you can only land. All water is never the grassland biome. Or am I missing something?

If not make sure that you can't make conditions in contracts that contradict each other.

Link to comment
Share on other sites

Also please make impossible contracts impossible ... I dunno from what mod I got it (so I don't know where to to complain)... but I got a contract to splash down on the grassland biome and do science there... splash down only works on water. On grassland you can only land. All water is never the grassland biome. Or am I missing something?

You are missing something. Not every inland lake is a "water" biome. The contract pack you are talking about specifically put those in there on purpose.

Link to comment
Share on other sites

CKan update pls.

Also please make impossible contracts impossible ... I dunno from what mod I got it (so I don't know where to to complain)... but I got a contract to splash down on the grassland biome and do science there... splash down only works on water. On grassland you can only land. All water is never the grassland biome. Or am I missing something?

If not make sure that you can't make conditions in contracts that contradict each other.

You really should figure out what mod that was. Could have been stock or DMagic, neither of which Contract Configurator will be able to help you with (unless the contracts are redone that is).

Also, not sure that mod authors do the CKan stuff. Pretty sure it is usually automatic but takes some time.

Link to comment
Share on other sites

You really should figure out what mod that was.[...]

Pretty sure it wasn't stock (because of the icon used) and ScanSat doesn't come with contracts ... it has some optional contracts that uses this mod, though. (which I have installed)

And aside from that I only have the Portrait Stats from DMagic installed ... so no messing with contracts there.

I more or less wanted to suggest a plausibility check for the contracts. But as the 5thHorseman pointed out I was just plain stupid (my words not his)... anyway I wouldn't had the means to get this done anyway and since I was sure this was a mistake I already had edited the save file to landed. ... still didn't told me which mod it was from.

Maybe that is a good idea, too. To add the information to the contracts which contract pack it actually was from.... (automatically by this mod, just to the bottom of the description) .. so that if you have a problem you know who do you have to ask.

Also, not sure that mod authors do the CKan stuff. Pretty sure it is usually automatic but takes some time.

Not really, (as I heard) the mod author has to give it a push. I think that is that way because of the interaction between several mods.

If not it will eventually updated by the CKAN authors. But they can't keep an eye on every mod in the system (currently 885 says my version).

Edited by Bizz Keryear
forgot stuff
Link to comment
Share on other sites

hey. i just updated the mod through ckan and now everything was fine till i went to go check my available contracts, when i tried to back out to the SC the game partially updated the scene but left the mission control on the screen with the SC menu bar at the bottom. i wasnt even able to go back to the main menu, had to force close. i'm also running nearly 90 mods, only 8 of them are contract mods.

*update: I havent been able to recreate the bug even after leaving and re-entering the mission control many times, but some timed missions that count how long i have been i.e in orbit dont count down though they do complete if you accomplish the requirement, leave to SC, then reload the craft.

Edited by run1235
Link to comment
Share on other sites

New release out! Lots of little changes for modders, and one big one for players. There is now a settings window (only available via the space centre) that allows disabling contract groups (ie. contract packs) and stock contracts on a per-save basis. Download now!

Contract Configurator 1.6.0

  • New settings window (only available in space center) that allows contract packs to be enabled/disabled per save. Also supports disabling of stock contract types.
  • Support for DATA nodes within CONTRACT_GROUP (allows defining an expression once and using it in multiple contracts).
  • Added displayName to CONTRACT_GROUP.
  • Added new extended mode to HasResource parameter.
  • New AwardExperience behaviour for giving extra experience to crew.
  • FlyingAltitudeThreshold and SpaceAltitudeThreshold methods added to CelestialBody.
  • Tweak weighting between stock contracts and Contract Configurator contracts towards Contract Configurator.
  • Duration portion of VesselParameterGroup parameters is now displayed as a child parameter (makes it harder to miss).
  • Added attributes to VesselParameterGroup to allow vessel definitions to elapse on contract completion/failure.
  • New CelestialBody methods for progression attributes (whether the player has reached, orbited, landed, escaped and returned from the body).
  • Added Tech class to expressions.

Awesome! Looks like you got everything in here. :)

Link to comment
Share on other sites

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