Jump to content

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


nightingale

Recommended Posts

17 minutes ago, severedsolo said:

Ah you are a gentleman thank you! I'll let you know when/if I need anything else.

Hmm, I'm having a few issues with the defineList stuff (or rather recalling it). I'm sure it's me but would you mind telling me where I'm going wrong:


	DATA
	{
	type = Vessel
	groupSat = $SatList.Where(g => g.IsOrbiting()).Random()
	}
	

It's complaining that Where is not a valid method (which is obviously not true)

On mobile, so apologies for the brevity. In short, it's a limitation of global variables where it doesn't know the type and is guessing wrong. You can work around by putting it in a data node on its own first (I do that in the attraction contract I linked earlier). 

Link to comment
Share on other sites

2 minutes ago, nightingale said:

On mobile, so apologies for the brevity. In short, it's a limitation of global variables where it doesn't know the type and is guessing wrong. You can work around by putting it in a data node on its own first (I do that in the attraction contract I linked earlier). 

Oh duh. That's why you are explicity specifying vessel in the Where command. I looked at that and couldn't see why you were doing it, but that makes total sense now. It's working now (well, validating anyway) Cheers!

Link to comment
Share on other sites

This is why you should use maxSimultaneous while debugging folks: http://imgur.com/y59spYk

Looks like I caught an exception: (unrelated to my screenshot)

Spoiler

Exception occured while loading ScenarioModule 'PersistentDataStore':
System.Exception: Error parsing statement.
Error occurred near '*':
[ e9e998c4-3c7a-4c9f-af29-9ee15e0d9990, 5ac1adac-2406-442d-ae85-3e6050a64f2a ]
.........................................* <-- HERE ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Unexpected value: ac1adac
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseStatement[VesselIdentifier] (Double lval) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[ContractConfigurator.VesselIdentifier].ParseStatement[VesselIdentifier] () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Collections.Generic.List`1[ContractConfigurator.VesselIdentifier]].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Collections.Generic.List`1[ContractConfigurator.VesselIdentifier]].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.PersistentDataStore.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0

Log: https://www.dropbox.com/s/kx7gh1e88mhggmj/KSP.log?dl=0

Contract which (I think) caused it - but not sure. May have been one of the others (happened on generation so not sure which it was). - https://github.com/severedsolo/CleverSat/blob/master/CleverSatRandomShift.cfg

Edited by severedsolo
Link to comment
Share on other sites

9 hours ago, nightingale said:

@Speedster159 - I've run that contract and wasn't able to reproduce the issue.  Can you confirm you are on the latest Contract Configurator, and if so, get me a KSP.log that covers the time that you hit orbit with that craft?

So I launch Gemini I and splash it down then give you the KSP.log file from the root folder? Or do you want me to launch it as "Kerbin Duo Orbiter" ?

Link to comment
Share on other sites

39 minutes ago, Speedster159 said:

So I launch Gemini I and splash it down then give you the KSP.log file from the root folder? Or do you want me to launch it as "Kerbin Duo Orbiter" ?

The name doesn't matter.  Otherwise yup, that's what I need.

6 hours ago, severedsolo said:

This is why you should use maxSimultaneous while debugging folks: http://imgur.com/y59spYk

Looks like I caught an exception: (unrelated to my screenshot)

  Reveal hidden contents

Exception occured while loading ScenarioModule 'PersistentDataStore':
System.Exception: Error parsing statement.
Error occurred near '*':
[ e9e998c4-3c7a-4c9f-af29-9ee15e0d9990, 5ac1adac-2406-442d-ae85-3e6050a64f2a ]
.........................................* <-- HERE ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Unexpected value: ac1adac
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseStatement[VesselIdentifier] (Double lval) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[ContractConfigurator.VesselIdentifier].ParseStatement[VesselIdentifier] () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Collections.Generic.List`1[ContractConfigurator.VesselIdentifier]].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Collections.Generic.List`1[ContractConfigurator.VesselIdentifier]].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.PersistentDataStore.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0

Log: https://www.dropbox.com/s/kx7gh1e88mhggmj/KSP.log?dl=0

Contract which (I think) caused it - but not sure. May have been one of the others (happened on generation so not sure which it was). - https://github.com/severedsolo/CleverSat/blob/master/CleverSatRandomShift.cfg

Whoops, will have to fix that - identifiers are supposed to start with [A-Za-z], but I'm generating these from the vessel ID so I may have to relax that.

Link to comment
Share on other sites

2 hours ago, nightingale said:

The name doesn't matter.  Otherwise yup, that's what I need.

Whoops, will have to fix that - identifiers are supposed to start with [A-Za-z], but I'm generating these from the vessel ID so I may have to relax that.

@severedsolo - I've fixed it, but I did the easy fix (fixing it for existing data would be extremely hard).  So let me know if you have any more issues, and I'll issue a release some time today before this one gets reported "in the wild" (it could potentially get hit in one of the late-game Tourism Plus contracts).

Link to comment
Share on other sites

1 hour ago, nightingale said:

@severedsolo - I've fixed it, but I did the easy fix (fixing it for existing data would be extremely hard).  So let me know if you have any more issues, and I'll issue a release some time today before this one gets reported "in the wild" (it could potentially get hit in one of the late-game Tourism Plus contracts).

Well it's not exceptioning any more.

The contract doesn't seem to be generating - not massively concerned about this though, I think it's probably because it errored before. The debug menu says it's populated values, I suspect I've left a requiredValue = false flag somewhere.

Yup I was right. Never mind, seems to be working ok.

Edited by severedsolo
Link to comment
Share on other sites

1 minute ago, severedsolo said:

Hmm, so I thought I was being clever and loaded a vessel list into VesselParameterGroup. The result isn't quite what i wanted. Any way to turn these into ANDs instead of ORs?

http://imgur.com/ZanPxVe

Do something with an iterator (did this from memory, may not be 100% correct):

PARAMETER
{
    type = VesselParameterGroup

    ITERATOR
    {
        type = VesselIdentifier
        vessel = @/someVesselList
    }

    PARAMETER
    {
        <The Stuff>
    }
}

 

Link to comment
Share on other sites

9 minutes ago, nightingale said:

Do something with an iterator (did this from memory, may not be 100% correct):


PARAMETER
{
    type = VesselParameterGroup

    ITERATOR
    {
        type = VesselIdentifier
        vessel = @/someVesselList
    }

    PARAMETER
    {
        <The Stuff>
    }
}

 

You know, I thought it was Iterators but I couldn't figure out how to make it work. I didn't realise I could stick anything (pretty much) in there. That makes sense. Cheers!

Not ideal though, because it repeats the required orbit for each Vessel in the Iterator in the contract window (and they are all identical). In this case it was only 3... but it could be alot more. Any way of filtering these out? - screenshot of what i mean: http://imgur.com/GcgvPYO

Edited by severedsolo
Link to comment
Share on other sites

Just now, severedsolo said:

You know, I thought it was Iterators but I couldn't figure out how to make it work. I didn't realise I could stick anything (pretty much) in there. That makes sense.

Not ideal though, because it repeats the required orbit for each Vessel in the Iterator (and they are all identical). In this case it was only 3... but it could be alot more. Any way of filtering these out?

You mean the notes that come with ReachSpecificOrbit?  Raise a GitHub request and I'll add a flag to disable those (should be easy enough).  If you want it to show up only once...  that's harder, and may just require hackery in your contract once I get the disable flag in place.

Link to comment
Share on other sites

16 minutes ago, nightingale said:

You mean the notes that come with ReachSpecificOrbit?  Raise a GitHub request and I'll add a flag to disable those (should be easy enough).  If you want it to show up only once...  that's harder, and may just require hackery in your contract once I get the disable flag in place.

Yeah, that's what I meant. I added screenshots after I replied, as I realised it made very little sense. Github request raised. I also raised another one, as I could do with being able to query the LAN of a vessel.

Edited by severedsolo
Link to comment
Share on other sites

Are the 'grand tour' contracts supposed to duplicate or at least have multiple of the same contract, just different order of the three bodies listed? Not sure if it's a CC thing or what though, and whenever I decline another contract, it reshuffles the order of those three.

Link to comment
Share on other sites

15 minutes ago, smjjames said:

Are the 'grand tour' contracts supposed to duplicate or at least have multiple of the same contract, just different order of the three bodies listed? Not sure if it's a CC thing or what though, and whenever I decline another contract, it reshuffles the order of those three.

No idea, you're probably talking about linuxgurugamer's grand tours, so best to ask on that thread.

Link to comment
Share on other sites

Just now, nightingale said:

No idea, you're probably talking about linuxgurugamer's grand tours, so best to ask on that thread.

Except that I don't have those, it's the 'grand tour' stock contract type shown in the CC settings window in the KSC screen.

Link to comment
Share on other sites

I'm getting a "silent" exception when trying to load one of my contracts. By that I mean that it doesn't bring up the big pop-up window like they normally do, there is just one line in the Alt-F12 menu which says "nullref exception".

I dug into the log and found this:

Spoiler

[LOG 08:10:12.169] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatProbeMalfunction'
[EXC 08:10:12.189] NullReferenceException: Object reference not set to an instance of an object
    ContractConfigurator.RendezvousFactory.Load (.ConfigNode configNode)
    ContractConfigurator.ParameterFactory.GenerateParameterFactory (.ConfigNode parameterConfig, ContractConfigurator.ContractType contractType, ContractConfigurator.ParameterFactory& paramFactory, ContractConfigurator.ParameterFactory parent)
    ContractConfigurator.ParameterFactory.GenerateParameterFactory (.ConfigNode parameterConfig, ContractConfigurator.ContractType contractType, ContractConfigurator.ParameterFactory& paramFactory, ContractConfigurator.ParameterFactory parent)
    ContractConfigurator.ContractType.Load (.ConfigNode configNode)
    Rethrow as Exception: Error loading CONTRACT_TYPE 'CleverSatProbeMalfunction'
    ContractConfigurator.ContractType.Load (.ConfigNode configNode)
    ContractConfigurator.ContractConfigurator+<LoadContractConfig>d__1e.MoveNext ()
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.<LoadContractConfig>d__1e:MoveNext()
    ContractConfigurator.ContractConfigurator:Update()

It looks like it may be linked to the rendezvous (stupid american spelling) parameter? I'm not going to raise a github issue because it doesn't look like a usual exception so I'm not sure it is, but it's making the contract fail to load.

THis is the log: https://www.dropbox.com/s/kx7gh1e88mhggmj/KSP.log?dl=0

This is the problem contract: https://github.com/severedsolo/CleverSat/blob/master/CleverSatProbeMalfunction.cfg

Edited by severedsolo
Link to comment
Share on other sites

7 hours ago, severedsolo said:

I'm getting a "silent" exception when trying to load one of my contracts. By that I mean that it doesn't bring up the big pop-up window like they normally do, there is just one line in the Alt-F12 menu which says "nullref exception".

Yup, the popup is only for save-breaking things.

7 hours ago, severedsolo said:

It looks like it may be linked to the rendezvous (stupid american spelling) parameter? I'm not going to raise a github issue because it doesn't look like a usual exception so I'm not sure it is, but it's making the contract fail to load.

Fixed for next release.

7 hours ago, severedsolo said:

... rendezvous (stupid american spelling) ...

Except that there's only one way to spell it, since it's from French.  @5thHorseman already complained about my use of Canadian/British spelling, so don't you start too. ;)

Link to comment
Share on other sites

New release out, download here!

Contract Configurator 1.9.6

  • Added kerbal attribute to KerbalDeaths.
  • Added Vessel.Orbit() method.
  • Moved Vessel.OrbitX() methods to the Orbit class, added a few new ones.
  • Added ReachSpecificOrbit.displayNotes to allow disabling of orbit notes.
  • Allow negative contract rewards.
  • Added StartinFunds(), StartingReputation() and StartingScience().
  • Changed HasCrew and HasCrewCapacity to reduce min values when it is larger than the max (thanks severedsolo).
  • Fixed problem in CollectScience that affected bathymeter experiment from DMagic Orbital Science (thanks smjjames).
  • Fixed warnings for newer DMagic Orbital Science experiments.
  • Fixed (Optional) text being output when it shouldn't (thanks Keniamin).
  • Fixed issue with passenger load dialog being shown with incorrect details (thanks smjjames).
  • Fixed issue with defineList when the vessel id haapens to start with a number (thanks severedsolo).
  • Fixed exception when using expressions in Rendezvous parameter (thanks severedsolo).
Link to comment
Share on other sites

Is anybody else noticing flickering of the contracts? It resembles the issue reported back here: http://forum.kerbalspaceprogram.com/index.php?/topic/91625-105-contract-configurator-v196-2016-02-17/&page=98#comment-2387071 except that the contracts load and disappear in a blink and its not clear that they are tied to any specific contract. It may possibly have partially to do with limiting what contracts there are, but theres something going on.

Link to comment
Share on other sites

1 hour ago, smjjames said:

Is anybody else noticing flickering of the contracts? It resembles the issue reported back here: http://forum.kerbalspaceprogram.com/index.php?/topic/91625-105-contract-configurator-v196-2016-02-17/&page=98#comment-2387071 except that the contracts load and disappear in a blink and its not clear that they are tied to any specific contract. It may possibly have partially to do with limiting what contracts there are, but theres something going on.

Last time the problem was that one of the contract requirements would point to a new generated contract instead of the current contract and get invalidated.  It's possible that there's a similar bug with another parameter, but I'd need to know which contract(s) are being affected to be able to dig into it.

Link to comment
Share on other sites

one thing I've noticed but I'm not sure whether it's a KSP bug or a bug with one of my addons, but maybe this addon can do something to fix the problem: I frequently am offered contracts to test one of the ground launch clamps, which are designed to STAY on the ground, but asking me to test them in-flight or even in orbit or on an escape trajectory. Is there any way to make the presence of a ground-clamp have the contract ONLY ask me to test such clamps at the launch site?

Link to comment
Share on other sites

All of them? Though with the current narrowed down state of advanced progression, SCANsat official, strategia, DMsurveycontract, and worldfirstcontract (stock) , it seems to be mainly the Official SCANsat since they're kind of popping in and out of existence.

Just now, StevieC said:

one thing I've noticed but I'm not sure whether it's a KSP bug or a bug with one of my addons, but maybe this addon can do something to fix the problem: I frequently am offered contracts to test one of the ground launch clamps, which are designed to STAY on the ground, but asking me to test them in-flight or even in orbit or on an escape trajectory. Is there any way to make the presence of a ground-clamp have the contract ONLY ask me to test such clamps at the launch site?

I thought that contract bug with the launch clamps was fixed a few KSP versions ago?

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