Jump to content

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


nightingale

Recommended Posts

I am never know what am I thinking about :D

Maybe. (I thought of a contract to shift/exchange a given ship's current crew to another crew. (Not to mention something like the crew might consist available (or maybe not available) named members. So as a part of this mission you must take someone home first)

(Something like: "Send up a ship capable of transfering at least 3 kerbals. Dock with XY station and let Jebediah go home to his!/her? family, This time Bob Kerman will pilot that monstrocity regardless of he is not a pilot. Do it the Kerbal way... also change the two other poor fellow. They are surely getting ill staying there for ages..." )

So tracking for crew means something similar :D Good work :D HasPassengers is a good start for it I guess. to name them or at least the possibility to count a team on the vessel and track it for contracts.

maybe you mean something to allow something like this? http://en.wikipedia.org/wiki/List_of_human_spaceflights_to_Salyut_space_stations

like, you get 3 contracts for long expeditions at the same time, each being a mission with 2 crew, then you launch "EO-1" with Jeb and Bill, before you finish the EO-1 deadline you send EO-2 with, say, Bob and a random kerbal as part of the second contract, dock to the station, keep the station with 4 kerbals at the same time and as soon as you complete the EO-1 contract, you return them and leave EO-2 at the station for their mission, and you do the same when you send EO-3 with other two random kerbals

in other words, even though the contract says nothing about names, just random kerbals, it records their names and keep tracking their time at the station

is something like that that you were thinking? if so that's also the idea i had for item 6 :P

Link to comment
Share on other sites

"The BoardAnyVessel parameter is met when the named Kerbal boards a vessel (this one is from the Squad "rescue" contracts and is a little bit less useful on its own."

Yeeeehaaaa I think I can use this. for crew swapping at least the named kerbal parts of it.

Link to comment
Share on other sites

i have the feeling that this can be used for tourists, the rescue mission spawns kerbals in orbit and when you bring them back they go home, maybe something can be made to spawn it for your flight (like, if you send a ship with 3 seats you must make sure there is one empty seat for the tourist to spawn), then you send it to meet the criteria (orbit or send to a station) and return him home safely

Link to comment
Share on other sites

is something like that that you were thinking? if so that's also the idea i had for item 6 :P

Not this complex but basically yes.

As I wrote If we can configure this thing this much, We even can came up complete story throught a linked "campaing" based on contracts.

I am not into that much in real life space programs as you do (in fact I don't (didn't know of what a "soyuz" is... It is a shame as we are almost neighbours :D).

So sure your ideas must be more complex. But as far as I dig into this "modulemanager" for contracts. I am sure you can achive what you want with it.

Just keep in mind not every player is a Rocketry Enthusiast. I 'd like to give a simple "advice" If I may: "Keep it simple" the individual contracts should be easy steps and make em linked to each other. "lots of small steps will take you where you wanted to go".

Just looking into the documentation found on the other end of the link Jeremie provided. It has lots more than I expected at the first glance. Again I can just congratulate him on this piece of amazing work.

Link to comment
Share on other sites

Maybe. (I thought of a contract to shift/exchange a given ship's current crew to another crew. (Not to mention something like the crew might consist available (or maybe not available) named members. So as a part of this mission you must take someone home first)

(Something like: "Send up a ship capable of transfering at least 3 kerbals. Dock with XY station and let Jebediah go home to his!/her? family, This time Bob Kerman will pilot that monstrocity regardless of he is not a pilot. Do it the Kerbal way... also change the two other poor fellow. They are surely getting ill staying there for ages..." )

So tracking for crew means something similar :D Good work :D HasPassengers is a good start for it I guess. to name them or at least the possibility to count a team on the vessel and track it for contracts.

"The BoardAnyVessel parameter is met when the named Kerbal boards a vessel (this one is from the Squad "rescue" contracts and is a little bit less useful on its own."

Yeeeehaaaa I think I can use this. for crew swapping at least the named kerbal parts of it.

Yup, just be careful with those, there's limitations:

  • HasPassengers - these are meant to be "disposable"... when you recover them they won't be in your list in the Astronaut Complex. For KSP 1.0, Squad will introduce space tourism contracts, which hopefully means a "Tourist" trait. Anyway, just expect this parameter to potential change in KSP 1.0.
  • BoardAnyVessel - Can either be a named Kerbal, or one spawned by SpawnKerbal (which can't spawn them in the Astronaut Complex) or SpawnVessel. More than likely in 0.7.0 there will be the ability to "select" a random Kerbal that is waiting... I'll have to think about this.

Link to comment
Share on other sites

Yup, just be careful with those, there's limitations:


  • BoardAnyVessel - Can either be a named Kerbal, or one spawned by SpawnKerbal (which can't spawn them in the Astronaut Complex) or SpawnVessel. More than likely in 0.7.0 there will be the ability to "select" a random Kerbal that is waiting... I'll have to think about this.

I understand the first one. Thank you.

I think that's a good idea to thinker with it a bit. It opens up a lot more possibility if named "selections" can be checked for/ or better created.

That spawnVessel thing is another interesting one where can I found something on that? (didn't have time to read throught all the stuff in your page yet.)

And as I am not a programmer (at least not a c++ expert) I am not really know every time are you speeking about "your functions/classes" or about attachment points inside the KSP API?

But this one is particulary interesting. I wonder if KSP stock engine has the ability to "Spawn ships" (and it has for example on the launchpad) why are Squad turns back on offplanet: orbital or on another celestial body ship building so hard?

Link to comment
Share on other sites

I understand the first one. Thank you.

I think that's a good idea to thinker with it a bit. It opens up a lot more possibility if named "selections" can be checked for/ or better created.

That spawnVessel thing is another interesting one where can I found something on that? (didn't have time to read throught all the stuff in your page yet.)

And as I am not a programmer (at least not a c++ expert) I am not really know every time are you speeking about "your functions/classes" or about attachment points inside the KSP API?

But this one is particulary interesting. I wonder if KSP stock engine has the ability to "Spawn ships" (and it has for example on the launchpad) why are Squad turns back on offplanet: orbital or on another celestial body ship building so hard?

Everything you need is in the wiki. SpawnVessel is on the Behaviours page. It does exactly what you described - spawns a ship wherever you specify (although I haven't done much on-land testing... pretty sure that will can cause rotation issues).

KSP is simultaneously extremely moddable and extremely... not. There is no real "API" - modders access to any class in the KSP code base (so it's quite easy to "bolt stuff on"). On the other hand, said code base is not public (so you only get a black box view into it), and there is no Squad provided documentation (only what the community has figured out). There's also limited ability to change how things work - in some cases Squad have made things very modder friendly (especially when it's exposed via config files), in other cases it's extremely rigid - things like the magic generation/selection of traits via a seed (... Squad!).

Anyway, in short, with Contract Configurator I use every technique available to me to poke/prod/extend the stock KSP stuff to expose it via configuration files. In some places that's quite easy, others its nearly impossible.

Link to comment
Share on other sites

Does anybody having problem with missing contracts of orbital station, bases and rescue mission?

Contract Configurator gives the ability to disable those (or any contracts), but I'm unaware of any packs/mods that delete any of those those specific contracts. Can't say much more for sure without a log file.

Link to comment
Share on other sites

Contract Configurator gives the ability to disable those (or any contracts), but I'm unaware of any packs/mods that delete any of those those specific contracts. Can't say much more for sure without a log file.

I just have SCANSat that ask me for install the ContractConfiturator. I also have Contract Science Modifier, but it just reduce the amount of science that came from contracts. Is the only two mod that I have that work with contracts.

Where can I find this log?

Link to comment
Share on other sites

I just have SCANSat that ask me for install the ContractConfiturator. I also have Contract Science Modifier, but it just reduce the amount of science that came from contracts. Is the only two mod that I have that work with contracts.

Where can I find this log?

ksp.log in the main KSP directory, or KSP_Data/output_log.txt

Link to comment
Share on other sites

Well, let's see:

  1. It looks like you uninstalled Contract Configurator for that run - it's not one of the loaded mods.
  2. The line "[ERR 18:18:21.173] Contract of type 'StationContract' was not be generated." basically means that you do not meet the criteria for a station contract to be generated (not sure on what the exact criteria is, offhand).

So I can't see anything wrong in that log, although there was some odd stuff from TAC-LS (but it didn't seem fatal).

Link to comment
Share on other sites

Well, let's see:

  1. It looks like you uninstalled Contract Configurator for that run - it's not one of the loaded mods.
  2. The line "[ERR 18:18:21.173] Contract of type 'StationContract' was not be generated." basically means that you do not meet the criteria for a station contract to be generated (not sure on what the exact criteria is, offhand).

So I can't see anything wrong in that log, although there was some odd stuff from TAC-LS (but it didn't seem fatal).

Propably this log was generated when I unistalled Contract Configurator to test if was that the problem. But I could not figure out because I needed accomplish a lot of another contracts, so I came here to ask for help.

Well.... if is the "2", I will keep playing... Perhaps these contracts show up. Thanks, anyway.

Link to comment
Share on other sites

(although I haven't done much on-land testing... pretty sure that will can cause rotation issues).

Yup :) If you specify in the contract that you want to spawn a vessel (landed one) and be able to control it then when you jump to that vessel it makes the vessel jump 40-50 meters into the air. Tested with mountains region. Quite funny actually :)

Link to comment
Share on other sites

Yup :) If you specify in the contract that you want to spawn a vessel (landed one) and be able to control it then when you jump to that vessel it makes the vessel jump 40-50 meters into the air. Tested with mountains region. Quite funny actually :)

Working as designed. :D

Let me know if this is a high priority for you and I'll try to get it fixed... otherwise I may just wait until 1.0 - as there may be KSP bugs that prevent me from doing it, and if they plan on having landed ships for rescue missions, then surely it'll work right in 1.0.

Link to comment
Share on other sites

I think a few of you may get pretty excited about this one, since it's a pretty powerful system... but it's pretty technical in the details. Anyway, the major new feature for the next version is support for expressions on pretty much any attribute within a contract definition. The expression language has been seriously beefed up, and now supports:

  • Referencing other attributes within the contract (@targetBody)
  • Functions (HomeWorld()) - this one returns "Kerbin" (or "Earth" in RSS ;))
  • Method calls (@targetBody.Radius())
  • Ternary statements (@targetBody.IsMoon() ? 100.0 : 50.0)
  • Randomization (rewardFunds = Random(100.0, 1000.0)
  • Lists ([Mun, Minmus].Random())
  • C# style list filtering (AllBodies().Where(x => x.IsMoon() && x.Parent() != Kerbin).Random()) - select a random moon that doesn't orbit Kerbin

The system is pretty much done, but there's lots and lots of breadth to be added, stuff like randomly selecting a vessel/station and applying filters to it to select it as the contract target. This is going to allow things like resupply contracts, contracts for station upgrading, etc.

And since "no pics, no clicks", the debug window has also been upgraded to show the values after expressions have been executed:

kXIJQTU.png

Edited by nightingale
Link to comment
Share on other sites

Brackets in the targetBody field? I don't know C# syntax, but Kerbin certainly isn't a moon, so you've goofed somewhere there.

Hey, that's two guesses! But yeah, I messed up the IsMoon() function and hadn't noticed until i took that screenshot. The brackets in the targetBody field are just a side effect of the way stuff gets printed out there.

Link to comment
Share on other sites

I have a question which I'm not sure fits in here but I don't know where to put it so I'll throw it out and see if you can answer it nightingale :)

I _hate_ survey missions with a passion and therefor I plan to change .../GameData/Squad/Contracts/Contracts.cfg

Survey    {
MaximumAvailable = 4
MaximumActive = 8
TrivialWaypoints = 1
SignificantWaypoints = 2
ExceptionalWaypoints = 3
TrivialHomeNearbyChance = 70
SignificantHomeNearbyChance = 35
ExceptionalHomeNearbyChance = 0
TrivialHomeNearbyRange = 2000
SignificantHomeNearbyRange = 4000
ExceptionalHomeNearbyRange = 6000
TrivialRange = 2000
SignificantRange = 4000
ExceptionalRange = 6000
MinimumTriggerRange = 500
MaximumTriggerRange = 15000
MinimumThreshold = 1400
MaximumThreshold = 30000
ThresholdDeviancy = 10
FacilityProgressionFactor = 0.2
Expiration

and set maximumavailable to 0. I assume this will make them never appear, anyway that's not my question. By doing this will I in some way ruin anything that contract configurator does or will it and the contract packs keep working normally? Having already corrupted a save earlier by changing stuff I shouldn't have I prefer asking before mucking about to much.

Link to comment
Share on other sites

I have a question which I'm not sure fits in here but I don't know where to put it so I'll throw it out and see if you can answer it nightingale :)

I _hate_ survey missions with a passion and therefor I plan to change .../GameData/Squad/Contracts/Contracts.cfg

Survey    {
MaximumAvailable = 4
MaximumActive = 8
TrivialWaypoints = 1
SignificantWaypoints = 2
ExceptionalWaypoints = 3
TrivialHomeNearbyChance = 70
SignificantHomeNearbyChance = 35
ExceptionalHomeNearbyChance = 0
TrivialHomeNearbyRange = 2000
SignificantHomeNearbyRange = 4000
ExceptionalHomeNearbyRange = 6000
TrivialRange = 2000
SignificantRange = 4000
ExceptionalRange = 6000
MinimumTriggerRange = 500
MaximumTriggerRange = 15000
MinimumThreshold = 1400
MaximumThreshold = 30000
ThresholdDeviancy = 10
FacilityProgressionFactor = 0.2
Expiration

and set maximumavailable to 0. I assume this will make them never appear, anyway that's not my question. By doing this will I in some way ruin anything that contract configurator does or will it and the contract packs keep working normally? Having already corrupted a save earlier by changing stuff I shouldn't have I prefer asking before mucking about to much.

Hard to say. As a general rule, if anything in the contract system fails (throws an exception), it'll prevent anything else from loading, and cause tons of problems. However, I would *guess* that in this case it would be okay. Only one way to find out for sure. ;)

Link to comment
Share on other sites

Help!! I have been trying to figure out what is going on with my game for weeks now and I am rapidly going bald as I pull my hair out trying to fathom what is going on!

Basically in a new save the part test contracts aren't showing up, so I guess the first question would be what are the requirements for these contracts to start showing up? Am I a dunce and miss remembering and you have to have the R&D building upgraded once in order to start getting them?

They are a fantastic source of funds and science, some may consider it cheaty, however I am using CTT which adds a lot more nodes and needs a lot more science to unlock, and I am running a scaled up kerbol system so rockets need to be larger and therefore more expensive. Plus I am not a huge fan of the visual survey contracts, while I enjoy occasionally flying planes around if I have to land them somewhere other than the runway that is just a recipe for disaster, they take a decent chunk of time to complete, and I would much rather be launching space station modules and Mun bases than flying planes most of the time. Also once I complete those first initial contracts I prefer to do mostly unmanned launches for the majority of the early game, I do my own little roleplay realism thing and I think it is absolutely ridiculous to launch a single man in a tiny can to the Mun, I don't start doing manned missions until way down the line, unfortunately a large number of the parts I need to send probes and "realistic" manned missions are way down the tech tree, so having the part test contracts to build up funds and science to get to those things works fantastically for my roleplay.

Here is basically what happened and what is now going on.

I had a good career game going, lots of part testing contracts, I had established a RT comms network and sent probes to the Mun, however memory usage was quite high and I was getting a little tired of crashing every hour or so. I had already pruned a number of my mods and some of the stock squad and NASA stuff. So I decided to prune further and remove a majority of the stock squad lifter and upper stage engines, I pretty much never used them since I have KW installed and use those instead.

At the same time that I removed the squad engines I also updated MKS/OKS to 0.22.8 from 0.22.6 and MCM from 0.4.4 to 0.4.5 I also updated this to 0.6.6 around the same time, although I think I did it before hand. These are the only significant changes I made to my game that I can remember at the moment, and this is when everything went to hell.

When I reloaded my save after updating the above mods and removing the stock parts all of the buildings at the space center were max level, also I had no active contracts, I went and took a quick look into my save file to see if there was anything obvious, first thing I saw was that in the save file it stilled showed the appropriate upgrade level for all the buildings, but no matter how many times I loaded my save they all showed up as fully upgraded. I declared that save to be dead, deleted it and went ahead and started a new game, I assumed one of the parts I had removed was needed for an active contract and my removing it corrupted my save.

However in the new save I wasn't getting any parts request contracts at all. I decided maybe something in my install got corrupt, so I reinstalled KSP and then moved the majority of my mod folders over from my old game. I didn't move anything that to my knowledge involved the contract system, like this mod, contracts window+ etc. those I did a fresh install of.

Yet in this new game I am still not receiving any part test contracts :( other seemingly weird things that are happening:

I keep getting launch a new vessel contracts, Iv'e completed that one like 8 times now just cuz.

I only get like the same 5-6 contracts offered. Two one star perform visual surveys contracts, a one or two star position a satellite contract, a two star rescue from kerbin orbit mission, and the three star explore the Mun contract. no matter how many times I hit the decline button, the contract doesn't go away just changes agencies.

When I try and force create a part test contract in the alt-F12 menu it shows: [Error]: Contract of type 'PartTest' was not be generated in the alt-F2 log window

Now it does this for pretty much all of the other contracts as well, except rescue a kerbal, this it will let me add two and then will show the same error, and the First Launch contract, this it will let me add seemingly infinite launch a new vessel contracts.

please any help and trouble shooting tips are greatly appreciated

Edit: link to my thread in the modded support forum

Edited by Akira_R
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...