nightingale

[1.6.x+] Contract Configurator [v1.27.1] [2018-12-28]

Recommended Posts

@nightingale I also ran into a critical issue with docking ports, where they introduce a huge phantom torque after docking. Left KSP for quite a while because I couldn't pinpoint the problematic mod, not being able to dock is not fun. Decided to run the game again and devoted 4 hours to juggling and testing. Turns out all versions of CC for KSP 1.1.2 have this problem (tested with only MM and CC present). Strange that more people don't report this.

I can genereate plenty of logs, pics and vids on request.

Share this post


Link to post
Share on other sites

@nightingale

I'm looking into some issues with my rover contracts.  This is the first time I'm looking at it since the 1.1 release.  In 1.0.5, they worked fine, but in 1.1.2, I see the following error:


ContractConfigurator.Behaviour.WaypointGeneratorFactory: CONTRACT_TYPE 'RoverExplore', BEHAVIOUR '@/a1' of type 'WaypointGenerator: A validation error occured while loading the key 'maxDistance' with value '3000'.
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

ArgumentException: Must be greater than 3500
  at ContractConfigurator.Validation.GT[Double] (Double val, Double referenceValue) [0x00000] in <filename unknown>:0 

  at ContractConfigurator.Behaviour.WaypointGenerator+<>c__DisplayClass8_0.<Create>b__25 (Double x) [0x00000] in <filename unknown>:0 

  at ContractConfigurator.ConfigNodeUtil.ParseValue[Double] (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Double defaultValue, System.Func`2 validation) [0x00000] in <filename unknown>:0 
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ContractConfigurator.LoggingUtil:LogException(Exception)
ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Double, Func`2)
ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2)
ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
ContractConfigurator.<UpdateNonDeterministicValuesIterator>d__26:MoveNext()
System.Linq.<CreateConcatIterator>c__Iterator1`1:MoveNext()
ContractConfigurator.<ContractGenerator>d__26:MoveNext()
ContractConfigurator.<ContractGenerator>d__25:MoveNext()
ContractConfigurator.ContractPreLoader:Update()

When I look at the CC screen, it says it successfully loaded 2 out of 2 contracts

This happened after a first mission, didn't see it again.

Share this post


Link to post
Share on other sites

I am attempting to do something that is most likely, the wrong way to do it or I just shouldn't do it.  Anyway, I got this error and was curious if someone can help me attempt to fix it?

Exception occured while loading contract parameter 'SCANsatCoverage' in contract 'unknown':
System.ArgumentException: Missing required value 'targetBody'.
  at ContractConfigurator.ConfigNodeUtil.ParseValue[CelestialBody] (.ConfigNode configNode, System.String key, Boolean allowExpression) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.SCANsatCoverage.OnParameterLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Parameters.ContractConfiguratorParameter.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

 

What am I doing?  I am attempting to take a modded career and use it in SSRSS [Stock Sized RSS]  - I have all the same mods, but yes - the planets are different, all flights are gone, just attempting to preserve the contract progress.
 

Thanks

Share this post


Link to post
Share on other sites

Another issue I'm having:

The RoverDeploy contract, which is loaded correctly, never gets presented.

This is a career game, everything is unlocked (via alt-F12), the only requirement is Antenna & Wheel unlocked.

I don't see anything wrong.  I used the StockNoContracts to disable all stock contracts

any ideas?

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites
6 hours ago, Enceos said:

@nightingale I also ran into a critical issue with docking ports, where they introduce a huge phantom torque after docking. Left KSP for quite a while because I couldn't pinpoint the problematic mod, not being able to dock is not fun. Decided to run the game again and devoted 4 hours to juggling and testing. Turns out all versions of CC for KSP 1.1.2 have this problem (tested with only MM and CC present). Strange that more people don't report this.

I can genereate plenty of logs, pics and vids on request.

Sure, can you log a GitHub issue and link the logs/pics there?

2 hours ago, linuxgurugamer said:

@nightingale

I'm looking into some issues with my rover contracts.  This is the first time I'm looking at it since the 1.1 release.  In 1.0.5, they worked fine, but in 1.1.2, I see the following error:



ContractConfigurator.Behaviour.WaypointGeneratorFactory: CONTRACT_TYPE 'RoverExplore', BEHAVIOUR '@/a1' of type 'WaypointGenerator: A validation error occured while loading the key 'maxDistance' with value '3000'.
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

ArgumentException: Must be greater than 3500
  at ContractConfigurator.Validation.GT[Double] (Double val, Double referenceValue) [0x00000] in <filename unknown>:0 

  at ContractConfigurator.Behaviour.WaypointGenerator+<>c__DisplayClass8_0.<Create>b__25 (Double x) [0x00000] in <filename unknown>:0 

  at ContractConfigurator.ConfigNodeUtil.ParseValue[Double] (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Double defaultValue, System.Func`2 validation) [0x00000] in <filename unknown>:0 
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ContractConfigurator.LoggingUtil:LogException(Exception)
ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Double, Func`2)
ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2)
ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
ContractConfigurator.<UpdateNonDeterministicValuesIterator>d__26:MoveNext()
System.Linq.<CreateConcatIterator>c__Iterator1`1:MoveNext()
ContractConfigurator.<ContractGenerator>d__26:MoveNext()
ContractConfigurator.<ContractGenerator>d__25:MoveNext()
ContractConfigurator.ContractPreLoader:Update()

When I look at the CC screen, it says it successfully loaded 2 out of 2 contracts

This happened after a first mission, didn't see it again.

I vaguely remember making some changes that affected the validations here.  Do you mind raising a GitHub issue (and ideally including a partial snippet of the contract config or link if it's in GitHub).

1 hour ago, gamerscircle said:

I am attempting to do something that is most likely, the wrong way to do it or I just shouldn't do it.  Anyway, I got this error and was curious if someone can help me attempt to fix it?

Exception occured while loading contract parameter 'SCANsatCoverage' in contract 'unknown':
System.ArgumentException: Missing required value 'targetBody'.
  at ContractConfigurator.ConfigNodeUtil.ParseValue[CelestialBody] (.ConfigNode configNode, System.String key, Boolean allowExpression) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.SCANsatCoverage.OnParameterLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Parameters.ContractConfiguratorParameter.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

 

What am I doing?  I am attempting to take a modded career and use it in SSRSS [Stock Sized RSS]  - I have all the same mods, but yes - the planets are different, all flights are gone, just attempting to preserve the contract progress.
 

Thanks

In this case the change from Kerbin to RSS is likely the cause.  I'd go in and find all the SCANsatCoverage parameters in completed contracts in the save file and just remove them entirely.

1 hour ago, linuxgurugamer said:

Another issue I'm having:

The RoverDeploy contract, which is loaded correctly, never gets presented.

This is a career game, everything is unlocked (via alt-F12), the only requirement is Antenna & Wheel unlocked.

I don't see anything wrong.  I used the StockNoContracts to disable all stock contracts

any ideas?

Could be related to #510.  Turn debug logging on for Contract Configurator and you should see attempts to generate contracts and why they failed (make sure to do the clear contracts debug to give it a change to generate a couple times).  Also, disabling all stock contracts can cause the contract generation system to give up entirely if it doesn't have any contracts to generate at all.

Share this post


Link to post
Share on other sites
Quote

In this case the change from Kerbin to RSS is likely the cause.  I'd go in and find all the SCANsatCoverage parameters in completed contracts in the save file and just remove them entirely.

Bare with me on this, I am assuming the persistent file?

Share this post


Link to post
Share on other sites

Hi, I just got an error from Contract configurator

Exception occured while saving ScenarioModule 'ContractVesselTracker':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.Extensions+<>c__DisplayClass5_1.<GetHashes>b__1 (.ProtoPartSnapshot childPart) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[ProtoPartSnapshot].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.First[ProtoPartSnapshot] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.FirstOrDefault[ProtoPartSnapshot] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Extensions+<GetHashes>d__5.MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Contains[UInt32] (IEnumerable`1 source, UInt32 value, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Contains[UInt32] (IEnumerable`1 source, UInt32 value) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractVesselTracker+<>c__DisplayClass14_0.<OnSave>b__1 (.Vessel v) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Vessel].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Vessel].Find (System.Predicate`1 match) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractVesselTracker.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0 

It was after hitting recover on a submarine contract that I think came from tourism plus.

I hit ignore and the contract has been completed and I haven't noticed any ill effects yet

Edited by tomf

Share this post


Link to post
Share on other sites
6 hours ago, nightingale said:

I vaguely remember making some changes that affected the validations here.  Do you mind raising a GitHub issue (and ideally including a partial snippet of the contract config or link if it's in GitHub).

Done

6 hours ago, nightingale said:

Could be related to #510.  Turn debug logging on for Contract Configurator and you should see attempts to generate contracts and why they failed (make sure to do the clear contracts debug to give it a change to generate a couple times).  Also, disabling all stock contracts can cause the contract generation system to give up entirely if it doesn't have any contracts to generate at all.

 I did that, and boy did it slow down :-)

I enabled the partTest, and got 20-30 part test contracts, so disabled that  and enabled the GrandTour, then I got nothing, the CC messages are below. 
 

[VERBOSE] ContractConfigurator.ContractPreLoader:    Not going to generate a contract...
[VERBOSE] ContractConfigurator.ConfiguredContract: MeetRequirements()
[VERBOSE] ContractConfigurator.ContractPreLoader: Request to generate contract of prestige level Exceptional

 

Details:  I first did 2 or three missions to get past the initial contracts, including getting to space, orbiting, data, etc.  I didn't see any contracts, so I then used the cheat to enable all parts.  Still nothing, I turned on the debug and got the above messages.  Sometime after doing all the testing, the 4 contracts I had completed disappeared from the archives.  In order to get some contracts from stock, I enabled the WorldFirst contracts, so I got those, but never any from CC

Edit:  I went back and looked at the file, and I did see other request to generate Trivial and Significant contracts.  here is a link to the log file: https://www.dropbox.com/s/ip6ovangy2j6htv/rovertest_output_log.txt?dl=0

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites
1 minute ago, linuxgurugamer said:

[VERBOSE] ContractConfigurator.ContractPreLoader: Request to generate contract of prestige level Exceptional

Is it possible you just don't have enough rep yet to get exceptional contracts?

Share this post


Link to post
Share on other sites
2 minutes ago, AlphaAsh said:

Is it possible you just don't have enough rep yet to get exceptional contracts?

Ummm, rep = 1000.  This was a test, so I set it to very easy.  Also, the RoverDeploy contracts don't require exceptional, they will do all

Share this post


Link to post
Share on other sites
14 minutes ago, AlphaAsh said:

Is it possible you just don't have enough rep yet to get exceptional contracts?

Just updated the post, there were request for trivial and significant contracts

Share this post


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

Ummm, rep = 1000.  This was a test, so I set it to very easy.  Also, the RoverDeploy contracts don't require exceptional, they will do all

May still be on to something. Try setting it to 950 or something, in a stock game you can't hit 1000 can you?

Share this post


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

May still be on to something. Try setting it to 950 or something, in a stock game you can't hit 1000 can you?

Aye. IIRC 999 might be the maximum, and 1000 might actually be part of the problem.

Share this post


Link to post
Share on other sites

I guess this is the right place to ask.

Did anything ever come of that Astronaut training contract pack that someone was working on (I forget who). I'd be interested in giving it a go.

Share this post


Link to post
Share on other sites
5 hours ago, AlphaAsh said:

Aye. IIRC 999 might be the maximum, and 1000 might actually be part of the problem.

Well, I set it to 1000 in the game cheat menumerated.  I'll try a lower number when I get home

Share this post


Link to post
Share on other sites
On 18/05/2016 at 0:35 AM, gamerscircle said:

Bare with me on this, I am assuming the persistent file?

Yup

On 18/05/2016 at 4:09 AM, tomf said:

Hi, I just got an error from Contract configurator


Exception occured while saving ScenarioModule 'ContractVesselTracker':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.Extensions+<>c__DisplayClass5_1.<GetHashes>b__1 (.ProtoPartSnapshot childPart) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[ProtoPartSnapshot].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.First[ProtoPartSnapshot] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.FirstOrDefault[ProtoPartSnapshot] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Extensions+<GetHashes>d__5.MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Contains[UInt32] (IEnumerable`1 source, UInt32 value, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Contains[UInt32] (IEnumerable`1 source, UInt32 value) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractVesselTracker+<>c__DisplayClass14_0.<OnSave>b__1 (.Vessel v) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Vessel].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Vessel].Find (System.Predicate`1 match) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractVesselTracker.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0 

It was after hitting recover on a submarine contract that I think came from tourism plus.

I hit ignore and the contract has been completed and I haven't noticed any ill effects yet

Could you raise it on GitHub for me?

On 18/05/2016 at 7:55 AM, severedsolo said:

I guess this is the right place to ask.

Did anything ever come of that Astronaut training contract pack that someone was working on (I forget who). I'd be interested in giving it a go.

Trying to remember who was looking at it, but drawing a blank.  I'm fairly certain that you wouldn't be stepping on any toes if you ran with the idea (and I don't think anyone got all that far anyway).

Share this post


Link to post
Share on other sites

I am trying to create a contract pack, but I ran into a little problem... My satellite contract will have a specific orbit assigned to it, but I cannot figure out what each symbol means. I need to know what and how to get the following parameters,

- SMA (Semi-major Axis?)

- ECC (Eccentricity)

- INC (Inclination)

- LPE (?)

- LAN (Longitude of Ascending Node?)

- MNA (Mean Anomaly?)

- EPH (?)

- REF (Reference Body)

Each one that has a question mark is one that I want to know, but I would also thank if the rest is also checked.

Thanks in advance,

~TheArmoredReaper

Share this post


Link to post
Share on other sites

I am curious if this is possible with Contract Configurator. 

Would it be possible to create a contract that would require a specific science instrument (or group of instruments) to be placed within a specified biome and require periodic data collection from the instrument over an extended time frame? 

Not sure if that came out understandably, so an example might be helpful:

Contract requires a goo-pod be landed in Kerbin's Deserts biome. Contract then requires a total of 12 science reports with a minimum of one month between them. Data must be collected and stored (or returned to KSC) and the experiment reset with each report (so the data cannot just be transmitted, a kerbal must physically collect the data and restore the pod). Once all 12 reports have been returned to KSC, the contract is complete. 

The reason for this is to fulfill an idea I had for extended duration science gathering, to make ground bases useful for more than just resource development. Since I have no idea how to create a plugin to modify how science is generated, I thought maybe I could do something similar with contracts instead. 

Share this post


Link to post
Share on other sites
14 hours ago, ArmoredReaper said:

I am trying to create a contract pack, but I ran into a little problem... My satellite contract will have a specific orbit assigned to it, but I cannot figure out what each symbol means. I need to know what and how to get the following parameters,

- SMA (Semi-major Axis?)

- ECC (Eccentricity)

- INC (Inclination)

- LPE (?)

- LAN (Longitude of Ascending Node?)

- MNA (Mean Anomaly?)

- EPH (?)

- REF (Reference Body)

Each one that has a question mark is one that I want to know, but I would also thank if the rest is also checked.

Thanks in advance,

~TheArmoredReaper

LPE = Longitude of the periapsis
EPH = Epoch - basically a timestamp reference

That being said - you don't need to understand the orbits.  The easiest thing to do is just put a ship in the orbit you want (via hyperedit works), and then copy the orbit information from the persistence file.

10 hours ago, kananesgi said:

I am curious if this is possible with Contract Configurator. 

Would it be possible to create a contract that would require a specific science instrument (or group of instruments) to be placed within a specified biome and require periodic data collection from the instrument over an extended time frame? 

Not sure if that came out understandably, so an example might be helpful:

Contract requires a goo-pod be landed in Kerbin's Deserts biome. Contract then requires a total of 12 science reports with a minimum of one month between them. Data must be collected and stored (or returned to KSC) and the experiment reset with each report (so the data cannot just be transmitted, a kerbal must physically collect the data and restore the pod). Once all 12 reports have been returned to KSC, the contract is complete. 

The reason for this is to fulfill an idea I had for extended duration science gathering, to make ground bases useful for more than just resource development. Since I have no idea how to create a plugin to modify how science is generated, I thought maybe I could do something similar with contracts instead. 

It's doable, but would look a bit ugly.  You'd need to do a CollectScience, followed by a Duration to wait, followed by a CollectScience, etc.  You'd need to do a completeInSequence=true for all of them so that it all has to be done in order.

Share this post


Link to post
Share on other sites

Alright, I'm back from travelling, and slowly working through the backlog of issues that have built up.  For the docking issue reported by @Lennartos, @Enceos, @Galenmacil and @tomf, I need some help verifying the fix.  I'll need someone to grab the dev dll here and let me know if it fixes the issue.

If it does not fix the issue, then I'll need some verbose logging.  To do that, put the following in GameData/ContractConfigurator/ContractConfigurator.cfg:

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

Then reproduce the issue and submit a KSP.log.

Share this post


Link to post
Share on other sites

hey there nightingale...not sure if its this mod or waypoint manager..but I have several survey contracts from the DMagic survey group that the waypoint doesnt get removed once completed. It doesn't happen consistently with every contract...just a few I have in game right now . There is no error in the debug screen in game.

 

....After a game restart the ghost waypoints had gone. not sure what the issue was ...maybe the kraken 

Share this post


Link to post
Share on other sites
5 hours ago, casper88 said:

hey there nightingale...not sure if its this mod or waypoint manager..but I have several survey contracts from the DMagic survey group that the waypoint doesnt get removed once completed. It doesn't happen consistently with every contract...just a few I have in game right now . There is no error in the debug screen in game.

 

....After a game restart the ghost waypoints had gone. not sure what the issue was ...maybe the kraken 

I'd need to see a log.  Also, what contracts are those?  DMagic has a lot of stuff that doesn't use Contract Configurator, so please be specific.

EDIT: Actually, more than likely this is the same issue as reported in #519.

Edited by nightingale

Share this post


Link to post
Share on other sites

@brainy - I had a look at your issue, and it's most likely due to a part mod that hasn't been updated to 1.1.x.  What happens is that the part fails to load and leaves an invalid entry in the list that messed up other mods.

I'd need to see a full log to be able to investigate further.

Share this post


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