nightingale Posted March 17, 2016 Author Share Posted March 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
eberkain Posted March 17, 2016 Share Posted March 17, 2016 9 hours ago, Nori said: Oh and how is Factorio? Sounds fun. Factorio is a really great game, truly, there are no other games like it. Quote Link to comment Share on other sites More sharing options...
berkekrkn Posted March 17, 2016 Share Posted March 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
smjjames Posted March 17, 2016 Share Posted March 17, 2016 (edited) 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 March 17, 2016 by smjjames Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 17, 2016 Author Share Posted March 17, 2016 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). Quote Link to comment Share on other sites More sharing options...
Nori Posted March 17, 2016 Share Posted March 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
Brigadier Posted March 17, 2016 Share Posted March 17, 2016 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? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 17, 2016 Author Share Posted March 17, 2016 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). Quote Link to comment Share on other sites More sharing options...
Nori Posted March 18, 2016 Share Posted March 18, 2016 Cool, thanks for the detailed explanation. It helps a lot. Quote Link to comment Share on other sites More sharing options...
berkekrkn Posted March 18, 2016 Share Posted March 18, 2016 21 hours ago, nightingale said: I need the full stack trace (or better yet, the full log file). 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 Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 18, 2016 Author Share Posted March 18, 2016 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. Quote Link to comment Share on other sites More sharing options...
Brigadier Posted March 18, 2016 Share Posted March 18, 2016 15 minutes ago, nightingale said: @Brigadier - I think this should also resolve your issue. And it does. Many thanks. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 18, 2016 Author Share Posted March 18, 2016 Just now, Brigadier said: And it does. Many thanks. Great, I'll most likely take a look at getting a small bugfix release out tonight. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 19, 2016 Author Share Posted March 19, 2016 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). Quote Link to comment Share on other sites More sharing options...
inigma Posted March 19, 2016 Share Posted March 19, 2016 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. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 20, 2016 Share Posted March 20, 2016 @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 LGG Quote Link to comment Share on other sites More sharing options...
inigma Posted March 20, 2016 Share Posted March 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
tjsnh Posted March 20, 2016 Share Posted March 20, 2016 (edited) 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 March 20, 2016 by tjsnh Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 20, 2016 Author Share Posted March 20, 2016 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? Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 20, 2016 Share Posted March 20, 2016 1 hour ago, nightingale said: Will do, although that was for Strategia, not Contract Configurator. LOL. Sorry, I knew it was you, and wanted to get you the info. LGG Quote Link to comment Share on other sites More sharing options...
inigma Posted March 20, 2016 Share Posted March 20, 2016 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! Quote Link to comment Share on other sites More sharing options...
tjsnh Posted March 20, 2016 Share Posted March 20, 2016 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 } } Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 20, 2016 Author Share Posted March 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
tjsnh Posted March 20, 2016 Share Posted March 20, 2016 (edited) 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 March 20, 2016 by tjsnh Quote Link to comment Share on other sites More sharing options...
inigma Posted March 21, 2016 Share Posted March 21, 2016 @nightingale I can't seem to figure out why the safety check here is not passing. Ideas? contract: https://github.com/inigmatus/GAP/blob/master/Development/Charter-Flight-4bug.cfg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.