nightingale Posted March 22, 2015 Author Share Posted March 22, 2015 It worked in my first test, will be doing some more. But it feels good.Thanks for your perservanceEdit: Worked in a full test, where I actually flew a ship to Minmus and crashed onto it. This contract had several requirements, and all worked!Good Job!Great to hear it! I'll probably release the next version tomorrow or the day after. There's some problems with HasCrew (in particular when it's unmanned) and one or two other potential bugs I want to investigate. Quote Link to comment Share on other sites More sharing options...
DirtyFace83 Posted March 22, 2015 Share Posted March 22, 2015 Just a quick and probably really noobish question... (I r lurning)If my contracts are related to a non-stock planet in a planet pack add-on, I'm assuming that I need to put the line CONTRACT_TYPE:NEEDS[Kopernicus], right? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 22, 2015 Author Share Posted March 22, 2015 Just a quick and probably really noobish question... (I r lurning)If my contracts are related to a non-stock planet in a planet pack add-on, I'm assuming that I need to put the line CONTRACT_TYPE:NEEDS[Kopernicus], right?Yes and no. If you put the Module Manager NEEDS bit in, then it means that the contract type won't get loaded if the player doesn't have Kopernicus installed. So it's recommended, but only necessary if you have a mix of contracts that do and don't require Kopernicus. Depending on what you're trying to achieve, you can also do stuff like this with the new expression syntax:[COLOR=#A71D5D][FONT=Consolas]targetBody[/FONT][/COLOR][COLOR=#333333][FONT=Consolas] = AllBodies().Where([/FONT][/COLOR][COLOR=#A71D5D][FONT=Consolas]b[/FONT][/COLOR][COLOR=#333333][FONT=Consolas] => !b.HasSurface() && b.IsPlanet() && b.Children().Count() > 0).Random()[/FONT][/COLOR]Which would select a random gas giant with moons (of which there is only one in stock). Quote Link to comment Share on other sites More sharing options...
DirtyFace83 Posted March 22, 2015 Share Posted March 22, 2015 Ok. Thx for quick reply Quote Link to comment Share on other sites More sharing options...
IntoSpaceAgain Posted March 22, 2015 Share Posted March 22, 2015 Nightingale, It appears that LinuxGuruGamer has released a renamed version of the Unmanned Contracts pack at https://kerbalstuff.com/mod/651/Contract%20Pack:%20Unmanned%20Contracts. It might pay to update the link in the OP so that people can keep up to date with the correct version. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 22, 2015 Share Posted March 22, 2015 (edited) Great to hear it! I'll probably release the next version tomorrow or the day after. There's some problems with HasCrew (in particular when it's unmanned) and one or two other potential bugs I want to investigate.Is this that maxCrew = 0 is invalid? Thats awesome if you've already picked that up, I was about to raise a github issue for it. Also, as a test to work around it I tried this: PARAMETER{ name = VesselParameterGroup type = VesselParameterGroup // The title text to display. // Default - Vessel: Any; Duration: <duration> // Note in future this will be expanded to support setting the parameters to // be for a specific vessel title = Fully evacuate the KSS // Lock this parameter so that it can only be accomplished by the // specified craft. Note that the name is a "define" name set via // the define key in a *different* VesselParameterGroup parameter // (which can be in the same contract, or a different one). This // attribute can be specified multiple times to allow multiple vessel // to be available to complete the parameter. vessel = LKOStation PARAMETER { name = HasCrew type = HasCrew maxCrew = 1 title = Leave no Kerbals on board the KSS. }}However, the contract seems to complete the moment the right craft is loaded, no matter how many crew it has (had 5 at the time)Also: Is it possible (maybe using expressions?) to test to see if a certain vessel exists using REQUIREMENT? In the example above for example, I'd want to test if LKOStation is a real vessel. Edited March 22, 2015 by severedsolo Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 22, 2015 Share Posted March 22, 2015 Is this that maxCrew = 0 is invalid? Thats awesome if you've already picked that up, I was about to raise a github issue for it. Also, as a test to work around it I tried this: PARAMETER{ name = VesselParameterGroup type = VesselParameterGroup // The title text to display. // Default - Vessel: Any; Duration: <duration> // Note in future this will be expanded to support setting the parameters to // be for a specific vessel title = Fully evacuate the KSS // Lock this parameter so that it can only be accomplished by the // specified craft. Note that the name is a "define" name set via // the define key in a *different* VesselParameterGroup parameter // (which can be in the same contract, or a different one). This // attribute can be specified multiple times to allow multiple vessel // to be available to complete the parameter. vessel = LKOStation PARAMETER { name = HasCrew type = HasCrew maxCrew = 1 title = Leave no Kerbals on board the KSS. }}However, the contract seems to complete the moment the right craft is loaded, no matter how many crew it has (had 5 at the time)Also: Is it possible (maybe using expressions?) to test to see if a certain vessel exists using REQUIREMENT? In the example above for example, I'd want to test if LKOStation is a real vessel.Try adding:minCrew = 1 Quote Link to comment Share on other sites More sharing options...
Zach9236 Posted March 22, 2015 Share Posted March 22, 2015 I've noticed that with 0.7.1 and 0.7.2 the kerbal will freeze[*] when planting a flag. The dialog to name the flag doesn't show up and any contracts that require a flag planted do not update. If I revert back to 0.7.0, flag planting works normally.[*] The right-click menu shows up and can be used, but the kerbal is paralyzed.The debug log is spammed with this message:[Exception]: NullReferenceException: Object reference not set to an instance of an object Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 22, 2015 Author Share Posted March 22, 2015 Nightingale, It appears that LinuxGuruGamer has released a renamed version of the Unmanned Contracts pack at https://kerbalstuff.com/mod/651/Contract%20Pack:%20Unmanned%20Contracts. It might pay to update the link in the OP so that people can keep up to date with the correct version.Thanks, I remember seeing him do that, but forgot that I have the direct download link(s) to update. Have some rep!Is this that maxCrew = 0 is invalid? Thats awesome if you've already picked that up, I was about to raise a github issue for it. Also, as a test to work around it I tried thisThat's the exact one! If you want to give it an early test, you can grab the dll from GitHub. My expectation is that I'll release the updated version tonight.Try adding:minCrew = 1That shouldn't work as there should be validation that minCrew <= maxCrew (and if there isn't I need to fix that).Also: Is it possible (maybe using expressions?) to test to see if a certain vessel exists using REQUIREMENT? In the example above for example, I'd want to test if LKOStation is a real vessel.Yes and no. It's not quite as clean in terms of the feedback for someone setting up the contracts, so I may eventually add something more in the debug window for this, but you can look at how I do it for the "bring tourists to attraction" contract, which requires one of two vessels to exist. What I did there was:[COLOR=#A71D5D]targetVessel[/COLOR] = [ Space Casino, Space Hotel ].Where([COLOR=#A71D5D]v[/COLOR] => v.IsOrbiting()).Random()I think if you just do this though, it should work (and if not, I may want to improve upon that logic):targetVessel = LKOStationI've noticed that with 0.7.1 and 0.7.2 the kerbal will freeze[*] when planting a flag. The dialog to name the flag doesn't show up and any contracts that require a flag planted do not update. If I revert back to 0.7.0, flag planting works normally.[*] The right-click menu shows up and can be used, but the kerbal is paralyzed.The debug log is spammed with this message:[Exception]: NullReferenceException: Object reference not set to an instance of an objectNot something I was aware of, but should be easy enough to find if it was introduced in 0.7.1. Can you either provide the KPS.log or let me know what contract(s) you had active to help narrow it down? Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 22, 2015 Share Posted March 22, 2015 (edited) The new DLL didn't work with just maxCrew = 0 (is it validating against the default minCrew of 1?) - linuxgurugamer is correct though, minCrew = 0 and maxCrew = 0 do actually get greenlights. I haven't tested if it actually works yet, as my testbed environment seems to have corrupted somehow.Edit: Also, setting min to 0, and max to 0 still results in ANY crew combination being accepted. Edited March 22, 2015 by severedsolo Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 22, 2015 Share Posted March 22, 2015 Thanks, I remember seeing him do that, but forgot that I have the direct download link(s) to update. Have some rep!That shouldn't work as there should be validation that minCrew <= maxCrew (and if there isn't I need to fix that).I had a problem when I had maxcrew=0 and mincrew=1. When I set them both to 0, it worked.This was back in 0.7.0 Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 22, 2015 Author Share Posted March 22, 2015 The new DLL didn't work with just maxCrew = 0 (is it validating against the default minCrew of 1?) - linuxgurugamer is correct though, minCrew = 0 and maxCrew = 0 do actually get greenlights. I haven't tested if it actually works yet, as my testbed environment seems to have corrupted somehow.Edit: Also, setting min to 0, and max to 0 still results in ANY crew combination being accepted.Ack, just released 0.7.3 and missed this post. I'll have to retest some more. - - - Updated - - -Contract Configurator 0.7.3 is out with a few bug fixes. Download it here!Contract Configurator 0.7.3Fix problems with VesselDestroyed (big thanks to linuxgurugamer for his patience on this one).Fix HasCrew for unmanned check. Improved parameter text slightly.Fix exceptions when planting flag (thanks Zach9236).Removing contracts (ie. uninstalling a contract pack) no longer causes exceptions in existing save games. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 22, 2015 Author Share Posted March 22, 2015 Alright, think I've got the HasCrew issue for unmanned fixed properly now. If someone can give it a try and let me know if it's good, I'd appreciate it. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 22, 2015 Share Posted March 22, 2015 Alright, think I've got the HasCrew issue for unmanned fixed properly now. If someone can give it a try and let me know if it's good, I'd appreciate it.Looks good.I tested by putting a pod on the pad, it showed that the parameter was not valid (ie: it wasn't unmanned). then I put an M-38 unoccupied guidence system, and it looked good. Finally I used hyperedit to move the M-38 into Mun orbit and set orbital velocity to 0, it crashed and the contract was fulfilled. Quote Link to comment Share on other sites More sharing options...
khearn Posted March 23, 2015 Share Posted March 23, 2015 Naturally, as soon as I finally decide to fail on the "Plant a flag on the Mun" contract because it was freezing up my Kerbal every time I planted a flag, you come out with a new version that fixes it. :-/ Thanks for all the work. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 23, 2015 Share Posted March 23, 2015 (edited) maxCrew seems to be working as intended on the new DLL. My evac mission went without a hitch, Thanks! As soon as you release I should be able to push 0.2 out the door I suspect the answer is going to be no, as I notice the scansat pack works the same way, but I noted I had to switch back to my defined vessel to make the contract complete after the evac capsule left the station, would it be possible to check the defined vessel for crew even if it isn't active? (even in physics range would be fine),If not, I'll just add a contract note to tell the player to switch back Edited March 23, 2015 by severedsolo Quote Link to comment Share on other sites More sharing options...
BlackHat Posted March 23, 2015 Share Posted March 23, 2015 Naturally, as soon as I finally decide to fail on the "Plant a flag on the Mun" contract because it was freezing up my Kerbal every time I planted a flag, you come out with a new version that fixes it. :-/ Thanks for all the work. Wait, was CC causing that? I noticed a problem yesterday, I had just unlocked planting flags, and tried to plant one on Kerbin near the runway. (and in testing, other KSC locations) but after planting the flag, the Name flag popup never appear and the Kerbal was locked up. I could go to the space center and "recover him" sometimes. (the game usually crashed shortly after this)But I did NOT have any plant flag contracts, so did not think that was the cause. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 23, 2015 Author Share Posted March 23, 2015 maxCrew seems to be working as intended on the new DLL. My evac mission went without a hitch, Thanks! As soon as you release I should be able to push 0.2 out the door I suspect the answer is going to be no, as I notice the scansat pack works the same way, but I noted I had to switch back to my defined vessel to make the contract complete after the evac capsule left the station, would it be possible to check the defined vessel for crew even if it isn't active? (even in physics range would be fine),If not, I'll just add a contract note to tell the player to switch backIt should work that way, although sometimes KSP gets in the way. Can you send me the contract config in question and I'll take a closer look at it?Wait, was CC causing that? I noticed a problem yesterday, I had just unlocked planting flags, and tried to plant one on Kerbin near the runway. (and in testing, other KSC locations) but after planting the flag, the Name flag popup never appear and the Kerbal was locked up. I could go to the space center and "recover him" sometimes. (the game usually crashed shortly after this)But I did NOT have any plant flag contracts, so did not think that was the cause.Yup, unfortunately. What I was doing had nothing to do with flag planting, which is why I hadn't even though to test that. In short, KSP does weird things with EVAs when planting a flag, and I did not expect it. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 23, 2015 Share Posted March 23, 2015 It should work that way, although sometimes KSP gets in the way. Can you send me the contract config in question and I'll take a closer look at it?Here it is: https://github.com/severedsolo/KerbinSpaceStation/blob/master/KerbinEvacuate.cfg - I have a feeling this may be PEBCAK though, I think I may have just cast off one of the Hab Modules (which would have also been defined as LKOStation I imagine) rather than docking a new evac capsule Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 24, 2015 Author Share Posted March 24, 2015 Here it is: https://github.com/severedsolo/KerbinSpaceStation/blob/master/KerbinEvacuate.cfg - I have a feeling this may be PEBCAK though, I think I may have just cast off one of the Hab Modules (which would have also been defined as LKOStation I imagine) rather than docking a new evac capsuleGive the dev version a try, should be working now.I suspect with the "define" vessels you may run into issues with undocking/docking at some point where it loses track of the vessel (I think linuxgurugamer may have already run into it). I've raised [#158] to track it, so if either of you (or anyone else, really) run into issues with losing tracking of a vessel and can reliably reproduce it, please post the details there. I'll help me greatly when it comes time to fix that stuff up. Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 24, 2015 Share Posted March 24, 2015 Yeah I ran into that earlier, I think the problem is that a defined vessel loses its label when something is docked to it, I get around it be redefining every time a docking parameter is met, (this is just a guess based on a quick test earlier, I'll do some proper research later) Quote Link to comment Share on other sites More sharing options...
BlackHat Posted March 24, 2015 Share Posted March 24, 2015 Yup, unfortunately. What I was doing had nothing to do with flag planting, which is why I hadn't even though to test that. In short, KSP does weird things with EVAs when planting a flag, and I did not expect it.Ok upgraded, and my flag planting bug is done now. But twice not I have had another problem... (Probably not a bug, just my failure to know how to use CC)When I reload a quicksave, twice now I have had a large CC popup saying that it has reloaded xx Contracts, and it list them and has other buttons that can be used to (configure?) the contracts or display info about them. My problem is I cant figgure out how to close that window. I dont see a close button, or "x" box, and I am stuck with the window open.(I just had a thought that it might not be a CC window. But I have no clue what else it could be. It had about 5 buttons across the top, [going from memory] Reload contracts, Force _____ ?, Debug contracts?, Edit contracts?, Location) Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 24, 2015 Author Share Posted March 24, 2015 Ok upgraded, and my flag planting bug is done now. But twice not I have had another problem... (Probably not a bug, just my failure to know how to use CC)When I reload a quicksave, twice now I have had a large CC popup saying that it has reloaded xx Contracts, and it list them and has other buttons that can be used to (configure?) the contracts or display info about them. My problem is I cant figgure out how to close that window. I dont see a close button, or "x" box, and I am stuck with the window open.(I just had a thought that it might not be a CC window. But I have no clue what else it could be. It had about 5 buttons across the top, [going from memory] Reload contracts, Force _____ ?, Debug contracts?, Edit contracts?, Location)That's the Contract Configurator debug window, which is mapped to Alt-F10. My guess is either you've remapped your hotkeys, or you have sticky fingers when you're trying to do Alt-F9. I'll put a close button into the corner, but in the meantime you can close it by doing Alt-F10 again. Quote Link to comment Share on other sites More sharing options...
BlackHat Posted March 24, 2015 Share Posted March 24, 2015 Yeah I probably did accidentally hit Alt-F10 instead of (or in addition to) Alt-F9.(I am using a Laptop and in dim lighting have a hard time reading the keys sometimes. Next Laptop will have backlit keyboard!) Quote Link to comment Share on other sites More sharing options...
rockowwc Posted March 25, 2015 Share Posted March 25, 2015 (edited) 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? Edited March 25, 2015 by rockowwc 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.