Jump to content

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


nightingale

Recommended Posts

Big update with lots of additions and fixes. Download it now!

Contract Configurator 1.1.0

  • Lots of support in expression language for science stuff (big thanks to xEvilReeperx and DMagic for support and sample code)
    • Added Biome as a valid expression class.
    • Added ScienceExperiment as a valid expression class.
    • Added ScienceSubject as a valid expression class.
    • Added new method for getting all biomes of a celestial body.
    • Tracking of difficult biome/situation combinations (eg. Splashed down in the mountains).

    [*]Reduce amount of Contract Configurator contracts offered so to not overwhelm stock contracts quite so much.

    [*]Added HasAstronaut contract parameter.

    [*]Renamed HasCrew requirement to HasAstronaut.

    [*]Improvements to vessel tracking for TargetDestroyed (thanks chlue).

    [*]Lots of fixes/improvements to CollectScience parameter.

    [*]Orbital scanning

    • Added PerformOrbitalSurvey parameter.
    • Added PerformOrbitalSurvey requirement.
    • Added IsOrbitalSurvey() method for CelestialBody.

    [*]Misc expression changes

    • Added Exclude method for List.
    • Added Latitude and Longitude methods for Waypoint.
    • Added ResourceCapacity method for Vessel.
    • DATA nodes can now use the shorthand type (eg. int) instead of the full system types (eg. Int32).
    • DATA nodes support the uniqueValue attribute to prevent duplicate values/contracts.
    • Fixes to WaypointGenerator and SpawnKerbal to improve expression support (thanks AlphaAsh).
    • Fixed a bug in the expression parser that caused issues with some ternary statements.
    • Support for quoted strings in expression parser.
    • Various expression parser bug fixes.

    [*]Fixed issue with TargetDestroyed state getting reset (thanks Niarro).

    [*]Fixed issue where dynamic parameter text in the stock window sometimes gets leftover characters from the previous value - most noticeable when using roman numerals (thanks Munitions).

    [*]Fixed issue with vessel tracking where a tracked vessel isn't disassociated properly causing major problems in the RemoteTech contract pack (thanks TheDog, Munitions and marioluigi653).

Link to comment
Share on other sites

Just a heads up, I think your documentation is slightly wrong:

the "uniqueValue" flag says that correct syntax is "requireUnique" on the wiki, but that fails validation. uniqueValue works however

Thanks, fixed the wiki.

Link to comment
Share on other sites

FYI, TestFlight 1.3 now supports ContractConfigurator and adds a new contract goal for gathering test data for a part.

http://forum.kerbalspaceprogram.com/threads/109901-1-0-2-TestFlight-v1-3-1-17-May-2015-Bring-Flight-Testing-to-KSP%21

Very cool! Any plans on your part to have either out of the box contracts for Test Flight or to create a separate contract pack?

Link to comment
Share on other sites

Very cool! Any plans on your part to have either out of the box contracts for Test Flight or to create a separate contract pack?

Eventually yes, but this release was so huge I just didn't get that far :) So support is there, actual contracts that use it coming soon unless someone beats me to it (I can dream can't I?) :)

Link to comment
Share on other sites

Version 1.0 of Kerbin-SideJobs is now available from KerbalStuff.

ksidejobsbanner.jpg

The contracts included will have you transporting kerbals to and between bases on Kerbin, often with a stop-off innnnn space!

There's also the first few missions of a 'campaign' involving ancient anomalies on Kerbin, with espionage and intrigue innnnn space!

It's highly recommended to also have KerbinSide installed otherwise the contracts of this pack will be utilising places on Kerbin that don't actually exist. Which would make you sad :(

Link to comment
Share on other sites

When we update the base contract configurator mod, do we also need to reinstall the contract packs? I'm using the anomaly surveyor, and tourism + packs [yours] and since I updated to the version previously, and now this version, I haven't gotten any contracts from those packs. I've been hesitant to reinstall those packs, because I'm afraid it might reset my progress, but after a good week of play and no anomaly contracts beyond island runway and desert pyramids, and no tourism contracts at all, I'm out of ideas. I thought maybe those contracts were just taking a while to cycle in, but this has gone beyond a ridiculous amount of time to wait.

Link to comment
Share on other sites

When we update the base contract configurator mod, do we also need to reinstall the contract packs? I'm using the anomaly surveyor, and tourism + packs [yours] and since I updated to the version previously, and now this version, I haven't gotten any contracts from those packs. I've been hesitant to reinstall those packs, because I'm afraid it might reset my progress, but after a good week of play and no anomaly contracts beyond island runway and desert pyramids, and no tourism contracts at all, I'm out of ideas. I thought maybe those contracts were just taking a while to cycle in, but this has gone beyond a ridiculous amount of time to wait.

You shouldn't need to reinstall anything (and reinstalling them shouldn't affect your progress). There was a change that somewhat reduced the chances of a Contract Configurator (vs. stock) contract was offered, but it shouldn't have affected things as drastically as you've described. Could you try cancelling a few of the other offered contracts and see if that makes the ones you want to see show up? If that doesn't do anything, can you provide a log file?

Version 1.0 of Kerbin-SideJobs is now available from KerbalStuff.

http://www.kashcorp.co.uk/ksidejobsbanner.jpg

The contracts included will have you transporting kerbals to and between bases on Kerbin, often with a stop-off innnnn space!

There's also the first few missions of a 'campaign' involving ancient anomalies on Kerbin, with espionage and intrigue innnnn space!

It's highly recommended to also have KerbinSide installed otherwise the contracts of this pack will be utilising places on Kerbin that don't actually exist. Which would make you sad :(

Awesome, can't wait to try this one out - I'll update the first post with this later today.

Link to comment
Share on other sites

You shouldn't need to reinstall anything (and reinstalling them shouldn't affect your progress). There was a change that somewhat reduced the chances of a Contract Configurator (vs. stock) contract was offered, but it shouldn't have affected things as drastically as you've described. Could you try cancelling a few of the other offered contracts and see if that makes the ones you want to see show up? If that doesn't do anything, can you provide a log file?

Yeah I frequently cancel contracts to get ones that I want, and its been a week real time, and almost 2 kerbin years since I've seen a contract configurator contract pack contract. [ :huh: holy cow, that's a mouthful just typing it] My PC is rendering a youtube vid right now, but as soon as its finished, I'll get you a output log.

Edit: https://www.dropbox.com/sh/qht61snw6efgwh6/AABBJlQMxtQOl5TfPlNLMDw8a?dl=0

Here is output log, persistence file, and the settings from my anomaly and tourism contract packs, I'd already made modifications to their settings to have only 3 max at a time, so maybe I screwed something up in those that killed them?

Edited by vardicd
Link to comment
Share on other sites

Yeah I frequently cancel contracts to get ones that I want, and its been a week real time, and almost 2 kerbin years since I've seen a contract configurator contract pack contract. [ :huh: holy cow, that's a mouthful just typing it] My PC is rendering a youtube vid right now, but as soon as its finished, I'll get you a output log.

Edit: https://www.dropbox.com/sh/qht61snw6efgwh6/AABBJlQMxtQOl5TfPlNLMDw8a?dl=0Here is output log, persistence file, and the settings from my anomaly and tourism contract packs, I'd already made modifications to their settings to have only 3 max at a time, so maybe I screwed something up in those that killed them?

Well, nothing out of the ordinary, and your changes seem fine. I'm at a loss, so can you try the following:

  1. In the Contract Configurator debug menu (hit alt-f10 to get there) hit the "Force Check Requirements" button. Then expand some stuff and see if you can find any contracts that have only green REQUIREMENT lines (those are the ones that should generate. Take a couple screenshots.
  2. In the ContractConfigurator directory, find the ContractConfigurator.cfg.default file and copy it to ContractConfigurator.cfg. In the file, change the INFO debug setting to read as DEBUG. Provide a new log file - it should have a little bit more information for me about when the contracts are trying to generate. Don't set it to verbose or it'll tell significantly longer for KSP to start up. :)

Link to comment
Share on other sites

Well, nothing out of the ordinary, and your changes seem fine. I'm at a loss, so can you try the following:

  1. In the Contract Configurator debug menu (hit alt-f10 to get there) hit the "Force Check Requirements" button. Then expand some stuff and see if you can find any contracts that have only green REQUIREMENT lines (those are the ones that should generate. Take a couple screenshots.
  2. In the ContractConfigurator directory, find the ContractConfigurator.cfg.default file and copy it to ContractConfigurator.cfg. In the file, change the INFO debug setting to read as DEBUG. Provide a new log file - it should have a little bit more information for me about when the contracts are trying to generate. Don't set it to verbose or it'll tell significantly longer for KSP to start up. :)

Screenshots here: https://www.dropbox.com/sh/rx0btngr83wa2z8/AAC4xfEMuGv_NzTUNXPBH1c1a?dl=0

everything looks green, but I'm still not getting any custom contracts, I even went and reinstalled the main mod and the mod packs, still nothing. I'll try and figure out the cfg default file in a bit and get a log to you from that.

Edit: output log now included in the link above, Restarted KSP and just spent several minutes canceling contracts, finally got one from the tourism pack... to rescue a stranded kerbal.

Edited by vardicd
Link to comment
Share on other sites

Screenshots here: https://www.dropbox.com/sh/rx0btngr83wa2z8/AAC4xfEMuGv_NzTUNXPBH1c1a?dl=0

everything looks green, but I'm still not getting any custom contracts, I even went and reinstalled the main mod and the mod packs, still nothing. I'll try and figure out the cfg default file in a bit and get a log to you from that.

Edit: output log now included in the link above, Restarted KSP and just spent several minutes canceling contracts, finally got one from the tourism pack... to rescue a stranded kerbal.

Yeah, that's junk (KSP will reuse the Agents for random contracts, that'll actually be fixed in the next release.

Looks like it didn't pick up the logging change - you need to make sure to rename it from xxx.cfg.default to xxx.cfg (it's done that way so a new release won't overwrite customized logging config).

Meanwhile, other things you can check:

- In the main debug menu go to Contracts => Add. Can you confirm that at the bottom of the list there are a bunch of ConfiguredContract entries? How many?

- In the contract configurator debug, expand the Tourism => Tourism_FirstTourist node. Hit the force check requirements button. Are the requirement nodes green, yellow, or something else.

Hopefully the above plus the log with debug on will get to the bottom of this one...

Link to comment
Share on other sites

Yeah, that's junk (KSP will reuse the Agents for random contracts, that'll actually be fixed in the next release.

Looks like it didn't pick up the logging change - you need to make sure to rename it from xxx.cfg.default to xxx.cfg (it's done that way so a new release won't overwrite customized logging config).

Meanwhile, other things you can check:

- In the main debug menu go to Contracts => Add. Can you confirm that at the bottom of the list there are a bunch of ConfiguredContract entries? How many?

- In the contract configurator debug, expand the Tourism => Tourism_FirstTourist node. Hit the force check requirements button. Are the requirement nodes green, yellow, or something else.

Hopefully the above plus the log with debug on will get to the bottom of this one...

Odd, I did change and rename like you said... hm.. maybe I changed it in the wrong place?

g2vpPLn.png

vndJzAi.png

2zD7GJu.png

Did I do it wrong? Should it be changed in the second place, or the first, or elsewhere?

Edited by vardicd
Link to comment
Share on other sites

[...]

When you say missions - then no, there's nothing out there in the wild using asteroids (well, I suppose there some minor stuff in Tourism Plus). If the goal is to grapple it with the claw, then it's fairly easy, you can just do a PartValidation that checks for the Asteroid module (this is done here as an example).

If you want to have a contract that says "rendezvous with any asteroid", then I think I may have a solution. Have a rendezvous with a "named" vessel, and have another parameter that sets the named vessel as any asteroid (it'll get set to the first asteroid the player rendezvous with anyway). Untested, but try this:

[...]

Thank you very much!

I decided to use the simple asteroid part way, since that does not lock the asteroid to be the one encountered first by the player (in case the first mission crashed into the asteroid, the player can pick a different one for the nex try).

I ll probably try out the other way as well at some point.

Link to comment
Share on other sites

Sorry, to say, but the debug still isn't showing up, I still see this in your log:

ContractConfigurator.LoggingUtil: No debugging config found! LogLevel set to INFO

Anyway, notepad isn't liking the unix-formatted file. Instead create a .cfg file (anywhere in GameData, with any name) and put this in it:

CC_DEBUGGING
{
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = DEBUG

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ContractConfigurator
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ContractType
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ConfiguredContract
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}
}

Hopefully that should be enough. Also, I want to see this screen, and confirm that there are ConfiguredContract entries:

H6SLmkP.png

Best I can tell, there's some odd mod incompatibility going on, but there's nothing that's strongly pointing to that in the log.

Link to comment
Share on other sites

Sorry, to say, but the debug still isn't showing up, I still see this in your log:

ContractConfigurator.LoggingUtil: No debugging config found! LogLevel set to INFO

Anyway, notepad isn't liking the unix-formatted file. Instead create a .cfg file (anywhere in GameData, with any name) and put this in it:

CC_DEBUGGING
{
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = DEBUG

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ContractConfigurator
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ContractType
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}

ADD_LOGLEVEL_EXCEPTION
{
// Type name
type = ConfiguredContract
// Possible LogLevel: VERBOSE, DEBUG, INFO, WARNING, ERROR
logLevel = VERBOSE
}
}

Hopefully that should be enough. Also, I want to see this screen, and confirm that there are ConfiguredContract entries:

http://i.imgur.com/H6SLmkP.png

Best I can tell, there's some odd mod incompatibility going on, but there's nothing that's strongly pointing to that in the log.

Okay, screenshots and output log with the new config setup you asked for. https://www.dropbox.com/sh/mmjdvpcwwlw0hvt/AAAdBU0cvMmfF2aTm_ug851Ua?dl=0

Link to comment
Share on other sites

Nightingale! Long time no talk to :)

Had a quick question for ya.

Is it possible to suppress stock contracts? Or potentially hook into them? Am wanting to have the rescue contracts pull names from a Twitch user base instead of the random pool KSP has.

So thinking options are either replace the name list with a temporary one pulled from Twitch at time of playing, if that can be hooked into. Or creating a new contract pack which will pull those names from Twitch, but suppress the stock rescue contracts so no random names are pulled.

Link to comment
Share on other sites

Okay, screenshots and output log with the new config setup you asked for. https://www.dropbox.com/sh/mmjdvpcwwlw0hvt/AAAdBU0cvMmfF2aTm_ug851Ua?dl=0

Okay, everything there looks kosher. I'm working on a new theory - that everything is (mostly) fine. For the Anomaly Surveyor ones (other than the two you've completed), you need to do a SCANsat scan of the planet to get the contracts - so that could be what's happening there.

For the tourism ones, you should be getting the "Kick off space tourism" one as long as you've reached orbit (and it certainly seems like you have). So perhaps there's an issue there, although I know it's working in my save. Can you do the following:

- In the contract configurator debug, expand the Tourism => Tourism_FirstTourist node. Hit the force check requirements button. Are the requirement nodes green, yellow, or something else (actually a screenshot here would probably help).

Thanks for bearing with me on this one!

Nightingale! Long time no talk to :)

Had a quick question for ya.

Is it possible to suppress stock contracts? Or potentially hook into them? Am wanting to have the rescue contracts pull names from a Twitch user base instead of the random pool KSP has.

So thinking options are either replace the name list with a temporary one pulled from Twitch at time of playing, if that can be hooked into. Or creating a new contract pack which will pull those names from Twitch, but suppress the stock rescue contracts so no random names are pulled.

A name I haven't seen in some time! In case you weren't aware of it, there is Draft Twitch Users. It doesn't do exactly what you're asking, but a good chunk of it. So IRnifty may be a good person to contact. Anyway, on to your actual questions:

It is possible to suppress stock contracts, but overriding their behaviour is outside the scope of Contract Configurator. It's easy to rename a Kerbal in the crew roster, but just took a peek in the stock contracts and the only way I could see to override it would be hacking it in the save file (bad idea).

So replacing it with a stock-alike Contract Configurator one would probably be your best bet. Not sure if Draft Twitch Users has any kind of API, but perhaps I could build optional integration into it and have some of that stuff "just work" if it's installed (maybe).

Link to comment
Share on other sites

Ahhhh, vardicd, it finally came to me. I double checked your persistence file and you have TANKED your reputation (it's sitting at -670). Even Kerbal tourists aren't brave enough to fly on one of your rockets.

The problem is that the "Kick off Space Tourism" contract is a 2-star one, and I'm guessing you either aren't offered any at all, or the one slot that is available is locked up by some stock "Explore Duna" or other unrejectable contract.

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