nightingale Posted March 25, 2015 Author Share Posted March 25, 2015 I am not sure if its something i did wrong, But after installing the last update I no longer get Station Science contracts appear?Any idea where I need to look for why this is the case?Contract Configurator shouldn't interfere with other contract mods. That being said, any number of errors in the contract system can cause stuff to start going wonky. I'd need to see a log file from the time KSP started including going into the mission control building and cancelling a few offered contracts (to try and get the station science ones to show up). If anything bad is happening, that's where it would be. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 25, 2015 Share Posted March 25, 2015 Stupid question perhaps, but what does maxCount under the CompleteContract requirement actually do?By this I mean, when the max count is exceeded, does the counter reset? or will the contract just never fire again....As an example:minCount = 1maxCount = 3 - what happens once I've flown 4 missions? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 25, 2015 Author Share Posted March 25, 2015 Stupid question perhaps, but what does maxCount under the CompleteContract requirement actually do?By this I mean, when the max count is exceeded, does the counter reset? or will the contract just never fire again....As an example:minCount = 1maxCount = 3 - what happens once I've flown 4 missions?If count > maxCount, then the requirement returns false and this contract doesn't get offered any more. I can't remember the exact use case I had in mind when I did it that way, it may have just been for flexibility's sake. Someone is bound to think of a reason why they want to do it that way. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 25, 2015 Share Posted March 25, 2015 Yeah thats what I thought, not what I'm looking for. I'll have to abuse cooldown a little more Quote Link to comment Share on other sites More sharing options...
rockowwc Posted March 26, 2015 Share Posted March 26, 2015 i have uploaded the log file if you want to take a look..https://dl.dropboxusercontent.com/u/61856476/KSP.log Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 26, 2015 Share Posted March 26, 2015 It seems if you use the debug tools to reload contracts, CC starts ignoring requirements and offering contracts it shouldn't be (specifically for my contracts cooldown gets ignored mainly), I realise that it shouldn't affect normal play but was wondering if you could take a look? In my testing it seems once the contract gets loaded wrong once it messes up the save, and wrong contracts keep being offered Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 26, 2015 Author Share Posted March 26, 2015 It seems if you use the debug tools to reload contracts, CC starts ignoring requirements and offering contracts it shouldn't be (specifically for my contracts cooldown gets ignored mainly), I realise that it shouldn't affect normal play but was wondering if you could take a look? In my testing it seems once the contract gets loaded wrong once it messes up the save, and wrong contracts keep being offeredActually I did notice that a little while back - I started seeing duplicates for contracts where maxCompletions=1. Raised [#162] on GitHub. I'm planning a release tonight, I'll attempt to get this one in if there's time.- - - Updated - - -i have uploaded the log file if you want to take a look..https://dl.dropboxusercontent.com/u/61856476/KSP.logNothing conclusive in those logs, best I can tell, the game didn't make an attempt to generate a station science contract. Or you didn't meet one of the following conditions:Achieved orbit of KerbinUnlocked a docking portUnlocked the Station Science labI'm assuming all those are true. So to debug further, you'll need to go to the stock debug menu (Alt-F12). On the contracts tab, there should be a sub-tab for generating contract (forget the name of the button). You should see an entry for StnSciContract with E, M, H buttons (easy, medium, hard). Press those buttons and see what happens. It should either generate a station contract or log something hopefully helpful in the log. Good luck.Oh, and about the only thing somewhat sketchy I could find int he log was this:[ERR 20:26:15.722] Cannot find a Module of typename 'contractScenario'[ERR 20:26:15.722] ScenarioModule is null.It's not coming from either Station Science or Contract Configurator. Hard to say where it comes from and if it's relevant. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 27, 2015 Author Share Posted March 27, 2015 New version is out. More than a few bug fixes, and new stuff for modders! Download it now!Contract Configurator 0.7.4Fix for unmanned vessels in HasCrew.Fix to check both vessels when undocking in HasCrew (thanks severedsolo).Fix for Kerbals spawning at 0 latitude, 0 longitude (thanks Wiseman).Support for new DATA node for storing arbitrary values for use in expressions.Improvements to SpawnPassengers, including an upper limit to the number of Kerbals it will spawn before reusing them (to keep the crew roster manageable).WaypointGenerator now supports both min and max values for RANDOM_WAYPOINT_NEAR.Add parameter attribute to WaypointGenerator to make waypoints dependent on a parameter.Improved output messages when reloading contracts through the debug menu.Debug window now contains details of contract groups.Reloading in debug window no longer causes duplicate contracts to be allowed.Add close icon to debug menu.Minor bug fixes. Quote Link to comment Share on other sites More sharing options...
metl Posted March 28, 2015 Share Posted March 28, 2015 I am trying to prevent a duplicate mission coming up if there is already a vessel in existence with the same nametag. On the reverse, I want to make a mission appear only if a certain vessel nametag exists. I'm certain an expression should be able to do this, but i just can't figure it out.My example:expression = vessel(myVessel).IsOrbiting(Kerbin).falseI've tried several variations on the () and using periods, plus rearranging the statement, but nothing works. What am I missing? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 I am trying to prevent a duplicate mission coming up if there is already a vessel in existence with the same nametag. On the reverse, I want to make a mission appear only if a certain vessel nametag exists. I'm certain an expression should be able to do this, but i just can't figure it out.My example:expression = vessel(myVessel).IsOrbiting(Kerbin).falseI've tried several variations on the () and using periods, plus rearranging the statement, but nothing works. What am I missing?Try this (I haven't tested, but should work):!myVessel.IsOrbiting()! - reverses the conditional statementmyVessel - the name/tag of the vesselIsOrbiting() - Function to check if the given vessel is orbiting, takes no parameters (see wiki) Quote Link to comment Share on other sites More sharing options...
DMagic Posted March 28, 2015 Share Posted March 28, 2015 Oh, and about the only thing somewhat sketchy I could find int he log was this:[ERR 20:26:15.722] Cannot find a Module of typename 'contractScenario'[ERR 20:26:15.722] ScenarioModule is null.It's not coming from either Station Science or Contract Configurator. Hard to say where it comes from and if it's relevant.That would be the rather poorly named Scenario Module from Contracts Window +, also a rather poor name... Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 That would be the rather poorly named Scenario Module from Contracts Window +, also a rather poor name...Which looking at his log, he doesn't appear to have installed. Which basically means removing any mod that uses a scenario module will break saved games. Nice... And yeah, I have a scenario called "PersistentDataStore", that I doubt anyone would be able to figure out in a similar situation. Quote Link to comment Share on other sites More sharing options...
DMagic Posted March 28, 2015 Share Posted March 28, 2015 Which looking at his log, he doesn't appear to have installed. Which basically means removing any mod that uses a scenario module will break saved games. Nice... And yeah, I have a scenario called "PersistentDataStore", that I doubt anyone would be able to figure out in a similar situation. No, it shouldn't break anything, it just sees the scenario module in the Game config, tries to load it, fails, and gives the error, I think it continues to save a little stub in the save file, so you'll continue to see that for any uninstalled scenario module addon. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 No, it shouldn't break anything, it just sees the scenario module in the Game config, tries to load it, fails, and gives the error, I think it continues to save a little stub in the save file, so you'll continue to see that for any uninstalled scenario module addon.Oh, that's not so bad - I was thinking it was a thrown exception, not just an error message. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 28, 2015 Share Posted March 28, 2015 Alright, I think I have found a problem with defined vessels...DATA { type = Vessel targetVessel = LKOStation }REQUIREMENT{ name = Expression type = Expression expression = @/targetVessel.IsOrbiting() invertRequirement = true}I'm not fantastic with expressions... but I'm fairly certain this should look for "LKOStation" and if it doesn't find it, the requirement is fufilled.It seems to work ok, as the first contract generates fine... but, if I go into tracking station and terminate the flight, the requirement stays false. It's like CC isn't "undefining" when the vessel is deleted. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 Alright, I think I have found a problem with defined vessels...DATA { type = Vessel targetVessel = LKOStation }REQUIREMENT{ name = Expression type = Expression expression = @/targetVessel.IsOrbiting() invertRequirement = true}I'm not fantastic with expressions... but I'm fairly certain this should look for "LKOStation" and if it doesn't find it, the requirement is fufilled.It seems to work ok, as the first contract generates fine... but, if I go into tracking station and terminate the flight, the requirement stays false. It's like CC isn't "undefining" when the vessel is deleted.I've added this to [#158] to track. You, linuxgurugamer and tjsnh are making pretty heavy use of the vessel tracking, especially your station contracts. So I'm going to make the changes under 0.7.5 instead of waiting for 1.0.0. Hopefully this'll mean your fallback logic won't be needed anymore.So one interesting thing about the data node that I think I forgot to document is that if the value is null, it will be like an unmet requirement. It's done that way so you could have something like:DATA{ type = Vessel targetVessel = AllVessels().Where(v => v.IsOrbiting() && v.CelestialBody() == @/targetBody).Random()}... and if no vessels match the criteria, no contract should be offered. So I would've expected the contract to never have its requirements met in your case. So if you could give me the whole contract it'll help me debug this (although I may be able to with just that block). Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 28, 2015 Share Posted March 28, 2015 Well that is strange. You are right, the requirement is now coming back false in a new game... although it didn't before..... sorry probably just one of those things.My contract is here if you want it: https://www.dropbox.com/s/dohyucsmvaqrwa3/KerbinStationCore.cfg?dl=0 but I'm sure it was just me.I moved everything into a data node, as I was getting a warning saying that targetVessel was going to be deprecated. Hmm, guess it may not be possible to do what I want then. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 Well that is strange. You are right, the requirement is now coming back false in a new game... although it didn't before..... sorry probably just one of those things.My contract is here if you want it: https://www.dropbox.com/s/dohyucsmvaqrwa3/KerbinStationCore.cfg?dl=0 but I'm sure it was just me.I moved everything into a data node, as I was getting a warning saying that targetVessel was going to be deprecated. Hmm, guess it may not be possible to do what I want then.Try this, (untested):[COLOR=#333333][I]expression = LKOStation.IsOrbiting() Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 28, 2015 Share Posted March 28, 2015 Try this, (untested):[COLOR=#333333][I]expression = LKOStation.IsOrbiting()"Cannot find Method "IsOrbiting" for class "Double" (I presume I was meant to put this under the requirement node?)I also tried storing LKOStation.IsOrbiting() as a boolean Data node (I assumed I could change type to bool, but I'm getting "bool is not a valid type") (again possible I'm getting syntax wrong....) DATA { type = bool targetVessel = LKOStation.IsOrbiting() }I think I might give up with the whole thing, and just cut the fallback out entriely as you are about to fix one of the issues with defined vessels anyay Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 28, 2015 Author Share Posted March 28, 2015 "Cannot find Method "IsOrbiting" for class "Double" (I presume I was meant to put this under the requirement node?)I also tried storing LKOStation.IsOrbiting() as a boolean Data node (I assumed I could change type to bool, but I'm getting "bool is not a valid type") (again possible I'm getting syntax wrong....) DATA { type = bool targetVessel = LKOStation.IsOrbiting() }I think I might give up with the whole thing, and just cut the fallback out entriely as you are about to fix one of the issues with defined vessels anyayAh, yup, I can see what that wouldn't work. It doesn't know that it's a vessel you're looking for. I'll have to give it some more thought, but I'll fix the more important issue of fixing the definied vessels for docking/undocking/destroying/etc. Quote Link to comment Share on other sites More sharing options...
metl Posted March 29, 2015 Share Posted March 29, 2015 I've looked at the wiki on how to extend requirements and create new ones, so I may play with that to create a new requirement type based on if a vessel exists. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 29, 2015 Author Share Posted March 29, 2015 I've looked at the wiki on how to extend requirements and create new ones, so I may play with that to create a new requirement type based on if a vessel exists.Go for it! That page needs some updates, but it's still generally correct. The requirements one shouldn't haven anything wrong. Send me a pull request when you're done and I'll include it in the next release. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 29, 2015 Author Share Posted March 29, 2015 Okay everyone, I'm going to be doing some cleanup in preparation for the Contract Configurator 1.0.0 release. This means that I'm planning on removing parameters from the very first release (where everything was just a wrapper to stock stuff) in favour of other stuff. There should be no loss of functionality - as everything that's being removed is redundant. Here's the plan, please let me know if anyone has concerns over any of this:[TABLE=width: 0][TR][TD]Parameter[/TD][TD]0.7.5[/TD][TD]1.0.0[/TD][TD]Notes[/TD][/TR][TR][TD]EnterOrbit[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][TR][TD]EnterSOI[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][TR][TD]LandOnBody[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][/TABLE] Quote Link to comment Share on other sites More sharing options...
Yemo Posted March 29, 2015 Share Posted March 29, 2015 (edited) Okay everyone, I'm going to be doing some cleanup in preparation for the Contract Configurator 1.0.0 release. This means that I'm planning on removing parameters from the very first release (where everything was just a wrapper to stock stuff) in favour of other stuff. There should be no loss of functionality - as everything that's being removed is redundant. Here's the plan, please let me know if anyone has concerns over any of this:Hey,great to hear that you are closing in on 1.0.0.I do not use any of the parameters above.About the "cleaning up", that got me thinking. For more elaborate contracts using sequence node and vessel parameter groups and so on, the contracts window looks very cluttered now.For example one of my earlier contracts should only require players to bring a vessel with at least one crew above 18km and then land safely on Kerbin again.This is the code, and it generates a whole 18! lines of mission objectives in the Mission Control building. Which is kind of overwhelming. Is there a way to introduce at least a "hiding" statements for each parameter?For example instead of having one line saying "Crew: At least 1 Kerbal: Incomplete" and the next line saying "Count: At least 1: Incomplete", one would be enough.Same goes for the "Destination: Kerbin" and the "Vessel State", in most contracts, that is obvious from the context, so a flag to hide them would be nice.PARAMETER { name = 18kmKerbinSeqNode type = SequenceNode PARAMETER { name = 18kmKerbin type = VesselParameterGroup define = mAltRecord PARAMETER { name = HasCrew type = HasCrew minCrew = 1 } PARAMETER { name = ReachState type = ReachState minAltitude = 18000 } } } PARAMETER { name = LandKerbinSeqNode type = SequenceNode PARAMETER { name = LandKerbin type = VesselParameterGroup vessel = mAltRecord PARAMETER { name = HasCrew type = HasCrew minCrew = 1 } PARAMETER { name = Any type = Any PARAMETER { name = ReachState type = ReachState targetBody = Kerbin situation = LANDED } PARAMETER { name = ReachState type = ReachState targetBody = Kerbin situation = SPLASHED } } } }Thank you very much for the plugin and your support! Edited March 29, 2015 by Yemo Quote Link to comment Share on other sites More sharing options...
tjsnh Posted March 29, 2015 Share Posted March 29, 2015 Okay everyone, I'm going to be doing some cleanup in preparation for the Contract Configurator 1.0.0 release. This means that I'm planning on removing parameters from the very first release (where everything was just a wrapper to stock stuff) in favour of other stuff. There should be no loss of functionality - as everything that's being removed is redundant. Here's the plan, please let me know if anyone has concerns over any of this:[TABLE=width: 0][TR][TD]Parameter[/TD][TD]0.7.5[/TD][TD]1.0.0[/TD][TD]Notes[/TD][/TR][TR][TD]EnterOrbit[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][TR][TD]EnterSOI[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][TR][TD]LandOnBody[/TD][TD]Obsolete[/TD][TD]Removed[/TD][TD]Use VesselHasVisited, Orbit or ReachState instead.[/TD][/TR][/TABLE]Looks like I've got some modifying to do 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.