Jump to content

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


nightingale

Recommended Posts

23 minutes ago, Nori said:

Heya, long time no see.

Sooo, started working on contracts again and am trying to get what I had working in 1.0.5 and the newest CC. Running into a error while parsing the minAltitude below. I think it worked a while back, but I don't recall, no doubt I'm just being dumb.  :)


        PARAMETER
        {
            name = ReachState
            type = ReachState
            situation = ESCAPING
            
            minAltitude = @targetBody.SphereOfInfluence() * 0.9 - @targetBody.Radius()
        }

~edit - and I'm a idiot I think... Changed @targetBody to @/targetBody and I guess that was it. 

Not an idiot - I made an ill advised change a release or two back that added the ability to specify multiple target bodies on ReachState.  But I didn't consider the fact that it would break lots of stuff like this. :(

23 minutes ago, Nori said:

Oh and how is Factorio? Sounds fun.  :)

Love it, I'm at that "mod it like crazy" stage (as a player, that is, not writing mods).  You can check out the series, which is actually ending in a week or two.  I'll most likely start up a new one in early April.

Link to comment
Share on other sites

Exception occured while saving contract parameter 'SCANsatCoverage' in contract 'SCAN_LoRes':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.SCANsatCoverage.OnParameterSave (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Parameters.ContractConfiguratorParameter.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0 

Guys I have this problem what should I do ? I'm playing in carrier mode and because of this some contracts cancelled and I lost 300,000 funds. 

Link to comment
Share on other sites

Might be the same thing behind the fact that the SCANsat contracts barely stay on the list for longer than a second. I haven't had any outright cancel on me though. Yet....

Edited by smjjames
Link to comment
Share on other sites

32 minutes ago, berkekrkn said:

Exception occured while saving contract parameter 'SCANsatCoverage' in contract 'SCAN_LoRes':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.SCANsatCoverage.OnParameterSave (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Parameters.ContractConfiguratorParameter.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0 

Guys I have this problem what should I do ? I'm playing in carrier mode and because of this some contracts cancelled and I lost 300,000 funds. 

I need the full stack trace (or better yet, the full log file).

Link to comment
Share on other sites

17 hours ago, nightingale said:

Not an idiot - I made an ill advised change a release or two back that added the ability to specify multiple target bodies on ReachState.  But I didn't consider the fact that it would break lots of stuff like this. :(

Love it, I'm at that "mod it like crazy" stage (as a player, that is, not writing mods).  You can check out the series, which is actually ending in a week or two.  I'll most likely start up a new one in early April.

Cool!

I think this is a very basic question and I'm reasonably sure I've read it on the docs somewhere but I'm still not quite clear on it.
In this case changing the @targetBody to @/targetBody "fixed" the error. But I'm a bit confused on what really changed there. As I understand it @targetBody is a variable of sorts and I thought adding a / after the @ was to specify a variable location. But in this case wouldn't it know to look in this file first? Or is that part of the change you made?

Oooh, I didn't realize that you did videos. I started watching them and it made me want to play that game now. I hadn't quite realized what the game was about before. Looks stellar and the devs seem pretty cool.

 

Link to comment
Share on other sites

KSP 1.0.5 32-bit, ContractConfigurator 1.9.8, CapCom and ContractWindow+, Win7 64-bit

I'm not creating any contracts but I've noticed two errors in the CC Debug Log and I was wondering if these are causing any problems I need to resolve.  Recently I have not been getting many offered contracts in an early career game. I haven't even got to Duna and I'm being offered a contract to explore Laythe, but that might be due to the fact that I have 14 active contracts on which I'm currently working.

[ERROR] ContractConfigurator.ReachStateFactory: CONTRACT_TYPE 'FirstPlanetFlyby', PARAMETER 'ReachState11002' of type 'ReachState': targetBody for ContractConfigurator.ReachStateFactory must be specified.

I'm getting these for ReachState11002 to ReachState11006, and a similar set for CONTRACT_TYPE 'FirstPlanetProbe' ReachState6001 to ReachState6007.

Consequently, only 60 of 62 contracts are being loaded successfully.  I've tried reloading the contracts.

Is this a concern?

Link to comment
Share on other sites

1 minute ago, Nori said:

I think this is a very basic question and I'm reasonably sure I've read it on the docs somewhere but I'm still not quite clear on it.
In this case changing the @targetBody to @/targetBody "fixed" the error. But I'm a bit confused on what really changed there. As I understand it @targetBody is a variable of sorts and I thought adding a / after the @ was to specify a variable location. But in this case wouldn't it know to look in this file first? Or is that part of the change you made?

Correct, that the '/' indicates a location like a path.  The targetBody variable is special because it's used pretty much everywhere.  Using this contract as an example:

CONTRACT_TYPE
{
    targetBody = Kerbin

    PARAMETER
    {
        name = MyReachState
        type = ReachState
        targetBody = Eve

        # This one gives "Kerbin"
        fakeStringValue = @/targetBody.Name()

        # This one gives "Kerbin"
        fakeStringValue1 = @../targetBody.Name()

        # This one gives "Eve"
        fakeStringValue2 = @targetBody.First().Name()
    }

    # This one gives "Kerbin"
    fakeStringValue3 = @targetBody.Name()

    # This one gives "Eve"
    fakeStringValue4 = @MyReachState/targetBody.First().Name()

    # This one gives "Eve"
    fakeStringValue5 = @/MyReachState/targetBody.First().Name()
}

You can see that there are two targetBody variables (one at the contract level, one in the parameter).  These are different variables that just happen to have the same name.  Because of the change I made, the type of the one in ReachState is now List<CelestialBody> instead of CelestialBody (which is why I have to access it a little differently).  

Link to comment
Share on other sites

1 hour ago, berkekrkn said:

Here you are. By the way I am using KSP 64 bit on windows The unofficial mod I mean. Isn't Contractconfigurator compatible with KSP 64 bit

To be fair, no mods are compatible with Win64 KSP, because it's unstable/unpredictable.  That being said, I don't think it's a factor here.  I think I see the problem, and have a fix.  Can you try out the dev dll here?

@Brigadier - I think this should also resolve your issue.

Link to comment
Share on other sites

Time to party like it's version 1.9.9.  Mostly bugfixes, download here.

Contract Configurator 1.9.9

  • Fixed issue with SCANsat contract that keep recycling (thanks smjjames).
  • Fixed issue with ReachState not supporting the proper defaulting for targetBody (thanks Brigadier).
  • Fixed issue with ReachState loading (thanks berkekrkn).
Link to comment
Share on other sites

2 hours ago, nightingale said:

Time to party like it's version 1.9.9.  Mostly bugfixes, download here.

Contract Configurator 1.9.9

  • Fixed issue with SCANsat contract that keep recycling (thanks smjjames).
  • Fixed issue with ReachState not supporting the proper defaulting for targetBody (thanks Brigadier).
  • Fixed issue with ReachState loading (thanks berkekrkn).

Awesome! Thanks! I'm doing coding tonight after over a month break.

Link to comment
Share on other sites

Was noticing this from CC 1.9.6 and continues in 1.9.9:

 

The option to have a Kerbal leave an external seat gets bugged:

 

[EXC 00:13:23.014] NullReferenceException: Object reference not set to an instance of an object
    Firespitter.engine.FSplanePropellerSpinner.OnUpdate ()
    Part.ModulesOnUpdate ()
    Part.Update ()
[EXC 00:13:23.026] NullReferenceException: Object reference not set to an instance of an object
    Firespitter.engine.FSplanePropellerSpinner.OnUpdate ()
    Part.ModulesOnUpdate ()
    Part.Update ()
[EXC 00:13:23.036] NullReferenceException: Object reference not set to an instance of an object
    Firespitter.engine.FSplanePropellerSpinner.OnUpdate ()
    Part.ModulesOnUpdate ()
    Part.Update ()
[EXC 00:13:35.740] KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.UInt32,System.Collections.Generic.KeyValuePair`2[ContractConfigurator.Parameters.VesselParameter+ParamStrength,System.Double]].get_Item (UInt32 key)
    ContractConfigurator.Parameters.VesselParameter.OnPartJointBreak (.PartJoint p)
    EventData`1[PartJoint].Fire (.PartJoint data)
    PartJoint.DestroyJoint ()
    Part.Undock (.DockedVesselInfo newVesselInfo)
    KerbalEVA.<SetupFSM>m__96 ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalEVA.OnDeboardSeat ()
    BaseEvent.Invoke ()
    UIPartActionButton.OnClick ()
[EXC 00:13:36.706] KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.UInt32,System.Collections.Generic.KeyValuePair`2[ContractConfigurator.Parameters.VesselParameter+ParamStrength,System.Double]].get_Item (UInt32 key)
    ContractConfigurator.Parameters.VesselParameter.OnPartJointBreak (.PartJoint p)
    EventData`1[PartJoint].Fire (.PartJoint data)
    PartJoint.DestroyJoint ()
    Part.Undock (.DockedVesselInfo newVesselInfo)
    KerbalEVA.<SetupFSM>m__96 ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalEVA.OnDeboardSeat ()
    BaseEvent.Invoke ()
    UIPartActionButton.OnClick ()
[EXC 00:13:36.893] KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.UInt32,System.Collections.Generic.KeyValuePair`2[ContractConfigurator.Parameters.VesselParameter+ParamStrength,System.Double]].get_Item (UInt32 key)
    ContractConfigurator.Parameters.VesselParameter.OnPartJointBreak (.PartJoint p)
    EventData`1[PartJoint].Fire (.PartJoint data)
    PartJoint.DestroyJoint ()
    Part.Undock (.DockedVesselInfo newVesselInfo)
    KerbalEVA.<SetupFSM>m__96 ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalEVA.OnDeboardSeat ()
    BaseEvent.Invoke ()
    UIPartActionButton.OnClick ()
[EXC 00:13:37.040] KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.UInt32,System.Collections.Generic.KeyValuePair`2[ContractConfigurator.Parameters.VesselParameter+ParamStrength,System.Double]].get_Item (UInt32 key)
    ContractConfigurator.Parameters.VesselParameter.OnPartJointBreak (.PartJoint p)
    EventData`1[PartJoint].Fire (.PartJoint data)
    PartJoint.DestroyJoint ()
    Part.Undock (.DockedVesselInfo newVesselInfo)
    KerbalEVA.<SetupFSM>m__96 ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalEVA.OnDeboardSeat ()
    BaseEvent.Invoke ()
    UIPartActionButton.OnClick ()
[EXC 00:13:37.210] KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.UInt32,System.Collections.Generic.KeyValuePair`2[ContractConfigurator.Parameters.VesselParameter+ParamStrength,System.Double]].get_Item (UInt32 key)
    ContractConfigurator.Parameters.VesselParameter.OnPartJointBreak (.PartJoint p)
    EventData`1[PartJoint].Fire (.PartJoint data)
    PartJoint.DestroyJoint ()
    Part.Undock (.DockedVesselInfo newVesselInfo)
    KerbalEVA.<SetupFSM>m__96 ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalEVA.OnDeboardSeat ()
    BaseEvent.Invoke ()
    UIPartActionButton.OnClick ()

 

 

I am running TakeCommand, but the issue remains, even with TakeCommand removed I still get the above. Based on the above, I'm leaning toward a CC issue.

 

I got the above after first manually picking up some Kerbals into a tour bus with nothing but Command Seats, and then had them leave their seats on the bus to board a waiting plane on the runway (also with only Command Seats for everyone including pilot). Then flew to the Island, landed, and came to a full stop. Then I attempted to have the passengers leave their Command Seats to no avail. The button clicks but nothing happens. Errors only show in log above.

Contract: https://github.com/inigmatus/GAP/blob/master/Development/Charter-Flight-4bug.cfg

Link to comment
Share on other sites

Quick question. Is there a generic NOT operator that works for Requirements? I've looked in the docs and if it's there I'm blind :)

What I'm trying to do is offer up a contract if the player has NOT unlocked a specific part yet , for example :

 

REQUIREMENT
{
    name = PartUnlocked
    type = PartUnlocked
    part = SmallGearBay
}

But add some kind of negative operator to it.
The idea, with my progression contracts, is to allow a series of contracts that use PartX then get phased out once the player unlocks PartY which replaces PartX for most uses.

 

EDIT :

Ignore me, I just found

invertRequirement = true

 

Edited by tjsnh
Link to comment
Share on other sites

16 hours ago, linuxgurugamer said:

@nightingale I released KRASH 0.4.0 a few days ago with that flag you asked for.  Take a look at the wrapper file included in the mod

Will do, although that was for Strategia, not Contract Configurator.

12 hours ago, inigma said:

Was noticing this from CC 1.9.6 and continues in 1.9.9:

The option to have a Kerbal leave an external seat gets bugged:

<snip>

I am running TakeCommand, but the issue remains, even with TakeCommand removed I still get the above. Based on the above, I'm leaning toward a CC issue.

I got the above after first manually picking up some Kerbals into a tour bus with nothing but Command Seats, and then had them leave their seats on the bus to board a waiting plane on the runway (also with only Command Seats for everyone including pilot). Then flew to the Island, landed, and came to a full stop. Then I attempted to have the passengers leave their Command Seats to no avail. The button clicks but nothing happens. Errors only show in log above.

Contract: https://github.com/inigmatus/GAP/blob/master/Development/Charter-Flight-4bug.cfg

This looks like a duplicated of #494 that was raised and fixed yesterday.  Can you grab the dev version and confirm it fixes it for you?

Link to comment
Share on other sites

2 hours ago, nightingale said:

Will do, although that was for Strategia, not Contract Configurator.

This looks like a duplicated of #494 that was raised and fixed yesterday.  Can you grab the dev version and confirm it fixes it for you?

Tested and confirmed fixed in the dev version. Thank you!

Link to comment
Share on other sites

Advice sought :

What is the best/easiest way to create a random waypoint within 25000km of KSC?

Would this be my best bet?
 

BEHAVIOUR
{
    name = WaypointGenerator
    type = WaypointGenerator

    // Use this to generate a waypoint with fixed coordinates
    WAYPOINT
    {
        name = KSC
        hidden = true
        underwater = false
        targetBody = Kerbin
        icon = orbit
        altitude = 0.0
        latitude = -0.102668048654
        longitude = -74.5753856554
    }
RANDOM_WAYPOINT_NEAR
    {
        name = Target
        hidden = false
        targetBody = Kerbin
        icon = dish
        altitude = 0.0
        waterAllowed = false
        nearIndex = 0
        chained = false
        minDistance = 1000.0
        maxDistance = 25000.0
    }

}

 

Link to comment
Share on other sites

25 minutes ago, tjsnh said:

Advice sought :

What is the best/easiest way to create a random waypoint within 25000km of KSC?

Would this be my best bet?

<snip>

Pretty much.  One improvemnt would be to  base the first Waypoint location off of the KSC PQSCity - that way it'll work for RSS or mods that otherwise move KSC.

Link to comment
Share on other sites

Update : Upon some testing, it's not quite working right.
It generates the random waypoint correctly, but the parameters of the contract use the KSC waypoint as their "target".
I'm going to play around with "index = " in the parameter and see if that solves my issue

Edit : Yep, "index =" in the parameter was the key.
For others who might play with this particular scenario, using the KSC waypoint and the second waypointnear behaviors, make sure to use index = 1 in your visitwaypoint parameter to "target" the random one, otherwise the KSC waypoint will be the parameter target.

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