inigma Posted January 31, 2016 Share Posted January 31, 2016 (edited) Is it possible to add MM checking to PartValidation? PARAMETER { name = PartValidation type = PartValidation:!NEEDS[RemoteTech] title = each having a transmitter partModule = ModuleDataTransmitter minCount = 2 disableOnStateChange = true hideChildren = true } PARAMETER { name = PartValidation type = PartValidation:NEEDS[RemoteTech] title = each having a transmitter partModule = ModuleRTAntenna minCount = 2 disableOnStateChange = true hideChildren = true } I found that RT renames the module from ModuleDataTransmitter to ModuleRTAntenna and I need to check for this. The above though doesn't seem to pass the CC debug reload: [Error]: ContractConfigurator.ParameterFactory: CONTRACT_TYPE 'CoastGuard-DropBuoys',PARAMETER 'PartValidation' of type 'PartValidation:NEEDS[RemoteTech]': Unknown parameter 'PartValidation:NEEDS[RemoteTech]'. Is there a way to check for either or without resorting to an Any set parameter? edit: im such a dufus. nevermind. PARAMETER:NEEDS argh. Edited January 31, 2016 by inigma Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 31, 2016 Author Share Posted January 31, 2016 (edited) 37 minutes ago, inigma said: Is it possible to add MM checking to PartValidation? <snip> edit: im such a dufus. nevermind. PARAMETER:NEEDS argh. Yup. Here's a bit from Tourism that also handles AntennaRange (and the bizzare combination of both RemoteTech + AntennaRange), you may be able to do something similar without having to completely duplicate the blocks: // RemoteTech changes the antenna module, so change it in our config too to // support RemoteTech installs. @CONTRACT_TYPE[Tourism_Casino]:FOR[Tourism]:NEEDS[RemoteTech] { @PARAMETER[VesselParameterGroup] { @PARAMETER[AntennaPart] { @partModule = ModuleRTAntenna } } } // AntennaRange changes the antenna module, so change it in our config too to // support AntennaRange installs. @CONTRACT_TYPE[Tourism_Casino]:FOR[Tourism]:NEEDS[AntennaRange&!RemoteTech] { @PARAMETER[VesselParameterGroup] { @PARAMETER[AntennaPart] { @partModule = ModuleLimitedDataTransmitter } } } Edited January 31, 2016 by nightingale Quote Link to comment Share on other sites More sharing options...
inigma Posted January 31, 2016 Share Posted January 31, 2016 (edited) 2 hours ago, nightingale said: Yup. Here's a bit from Tourism that also handles AntennaRange (and the bizzare combination of both RemoteTech + AntennaRange), you may be able to do something similar without having to completely duplicate the blocks: // RemoteTech changes the antenna module, so change it in our config too to // support RemoteTech installs. @CONTRACT_TYPE[Tourism_Casino]:FOR[Tourism]:NEEDS[RemoteTech] { @PARAMETER[VesselParameterGroup] { @PARAMETER[AntennaPart] { @partModule = ModuleRTAntenna } } } // AntennaRange changes the antenna module, so change it in our config too to // support AntennaRange installs. @CONTRACT_TYPE[Tourism_Casino]:FOR[Tourism]:NEEDS[AntennaRange&!RemoteTech] { @PARAMETER[VesselParameterGroup] { @PARAMETER[AntennaPart] { @partModule = ModuleLimitedDataTransmitter } } } I do run into a slight problem with this - and I am sure your players would too: CKAN does not remove the directory when a mod such as RemoteTech is uninstalled. This causes MM to still see the RemoteTech folder, and thus for MM to apply the patch to the contract, and then causes CC to fail loading the contract since that part does not exist. I then tried: @CONTRACT_TYPE[CoastGuard-DropBuoys]:FOR[KSC?Coast?Guard]:NEEDS[RemoteTech]:HAS[@MODULE[ModuleRTAntenna]] as the condition for applying the patch but it was to no avail though. This was my best attempt for MM to check if there is a RemoteTech folder in GameData, to also then check if there is a ModuleRTAntenna module available, and only then apply the patch. But apparently my syntax is wrong (possible, it's almost 2 am) and MM thinks ModuleRTAntenna exists and thus applying the patch, since the patch still gets applied when seeing the RemoteTech folder and then CC fails loading contract since the part does not exist. I did various combinations to simplify the check, using just the HAS or removing the NEEDS and FOR, but again, to no avail. Same result, the patch is always applied, until I delete the RemoteTech folder manually. Lots of fun. Edit: 4 excruciating hours trying to figure this out (why am i beating my head over a CKAN issue?). I gave up on it and decided to just remove the antenna check to avoid GAP requiring MM for anything. Edited January 31, 2016 by inigma Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 31, 2016 Author Share Posted January 31, 2016 6 hours ago, inigma said: I do run into a slight problem with this - and I am sure your players would too: CKAN does not remove the directory when a mod such as RemoteTech is uninstalled. This causes MM to still see the RemoteTech folder, and thus for MM to apply the patch to the contract, and then causes CC to fail loading the contract since that part does not exist. I then tried: @CONTRACT_TYPE[CoastGuard-DropBuoys]:FOR[KSC?Coast?Guard]:NEEDS[RemoteTech]:HAS[@MODULE[ModuleRTAntenna]] as the condition for applying the patch but it was to no avail though. This was my best attempt for MM to check if there is a RemoteTech folder in GameData, to also then check if there is a ModuleRTAntenna module available, and only then apply the patch. But apparently my syntax is wrong (possible, it's almost 2 am) and MM thinks ModuleRTAntenna exists and thus applying the patch, since the patch still gets applied when seeing the RemoteTech folder and then CC fails loading contract since the part does not exist. I did various combinations to simplify the check, using just the HAS or removing the NEEDS and FOR, but again, to no avail. Same result, the patch is always applied, until I delete the RemoteTech folder manually. Lots of fun. Edit: 4 excruciating hours trying to figure this out (why am i beating my head over a CKAN issue?). I gave up on it and decided to just remove the antenna check to avoid GAP requiring MM for anything. You're on the Contract Configurator thread, trying figure out how to use Module Manager to work around a CKAN or RemoteTech bug. I would start with CKAN. I'm guessing though that there is something left in the directory so it's not empty. If it's something you had added, problem solved. If it's something generated by RemoteTech as part of normal operation, then RemoteTech needs to change, or CKAN needs a mechanism to handle it. All up, I wouldn't use this as a reason to not use Module Manager, as it seems like quite the edge case. Quote Link to comment Share on other sites More sharing options...
chrisl Posted February 1, 2016 Share Posted February 1, 2016 In my RO/RSS/RP-0 game, I'm running the "Moon/1" landing contract. The craft I used was basically the "FASA Saturn V Apollo Lunar" that comes with RO, though I did make a couple of tweaks to it. I've already flown the CSM+LM to the moon and landed the LM in the correct biome. My mission timer says I've effectively completed the mission. Now all I need to do is separate the Ascent stage from the Descent, rendezvous with the CSM, fly home and spash down. Trouble is, every time I decouple the Ascent stage to take off, the timer is mission timer is resetting itself. After a bit of trial and error, I think the problem stems from the fact that the LM is built backwards. I.E., to build the LM "under" the CSM on the Saturn V, you put a decoupler into the "FASASaturnSLA", then attach the descent engine, then the descent stage, then the decoupler ring, then the ascent engine and then the ascent stage (plus landing gear and such). So when you look at the VESSEL in your save game, the first part listed is the Descent Engine. From what I can tell, when you activate the decoupler ring, the parts below it on the original vessel (in this case the Ascent Engine, Ascent Stage, LM Antenna and my science stuff) become a new vessel and the contract's completion status doesn't link to this "new" vessel. Is there any way to make it so that contact status applies to the main vessel plus any vessels that "break off" from the main? Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 2, 2016 Author Share Posted February 2, 2016 7 hours ago, chrisl said: In my RO/RSS/RP-0 game, I'm running the "Moon/1" landing contract. The craft I used was basically the "FASA Saturn V Apollo Lunar" that comes with RO, though I did make a couple of tweaks to it. I've already flown the CSM+LM to the moon and landed the LM in the correct biome. My mission timer says I've effectively completed the mission. Now all I need to do is separate the Ascent stage from the Descent, rendezvous with the CSM, fly home and spash down. Trouble is, every time I decouple the Ascent stage to take off, the timer is mission timer is resetting itself. After a bit of trial and error, I think the problem stems from the fact that the LM is built backwards. I.E., to build the LM "under" the CSM on the Saturn V, you put a decoupler into the "FASASaturnSLA", then attach the descent engine, then the descent stage, then the decoupler ring, then the ascent engine and then the ascent stage (plus landing gear and such). So when you look at the VESSEL in your save game, the first part listed is the Descent Engine. From what I can tell, when you activate the decoupler ring, the parts below it on the original vessel (in this case the Ascent Engine, Ascent Stage, LM Antenna and my science stuff) become a new vessel and the contract's completion status doesn't link to this "new" vessel. Is there any way to make it so that contact status applies to the main vessel plus any vessels that "break off" from the main? Yup, you've pretty much hit the nail on the head. This is one of the cases where I'm not doing anything special with vessel tracking, KSP just decides on its own what part of the vessel should be the "main" part and which part is then the debris/lander/whatever when you decouple/undock. I'll have to give some thought as to the fix here, if there is an easy one. Raised [#467]. Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 3, 2016 Author Share Posted February 3, 2016 Another big meaty release: download here. Contract Configurator 1.9.5 Output additional log files when log level is debug or higher (thanks linuxgurugamer). VesselParameterGroup now supports a defineList attribute to add a vessel to a list on contract completion. PartValidation module checks now check the parent type. This allows mod-introduced PartModules that inherit from stock ones to count for PartValidation checks that look for the stock module (eg. ModuleEnginesFX = ModulesEngines). Added SubAssembly as a valid option for CopyCraftFile.craftType. Added NewKerbals() methods to generate lists of Kerbals. AwardExperience now supports awarding experience directly to Kerbals (instead of via a VesselParameterGroup). Limited the impact of a problem where the final Anomaly Surveyor contract causes revert to editor to leave a vessel on the pad (thanks lodestar). Fixed problem introduced in 1.9.4 where all waypoints without a name get called "site" (thanks smjjames). Fixed issue where Kerbal spawning behaviours didn't clean up properly when the Kerbal was in a command chair (thanks inigma & nobodyhasthis2). Fixed issue with Expression requirement bleeding through between different contracts (thanks Yemo, smjjames and nobodyhasthis2). Added logic to prevent duplicate Kerbal names from coming up in the same (or recent) contracts. Fixed issue with VesselParameterGroup where the vessel wasn't set correctly when loading a Kerbal into an EVA seat triggered the completion (thanks inigma). Minor bug fixes. Quote Link to comment Share on other sites More sharing options...
inigma Posted February 3, 2016 Share Posted February 3, 2016 Another awesome release! Thank you! I am looking forward to using the new NewKerbals() and SubAssemblies features. Some questions: 1. Can you give me a use case for defineList? 2. What do you think of this pioneering contract I've been working on: (btw, I've play tested it and it works very well, and am looking for testers before releasing it) calling @BahamutoD and @selfish_meme Quote Link to comment Share on other sites More sharing options...
selfish_meme Posted February 3, 2016 Share Posted February 3, 2016 1 hour ago, inigma said: Another awesome release! Thank you! I am looking forward to using the new NewKerbals() and SubAssemblies features. Some questions: 1. Can you give me a use case for defineList? 2. What do you think of this pioneering contract I've been working on: (btw, I've play tested it and it works very well, and am looking for testers before releasing it) calling @BahamutoD and @selfish_meme While I like the idea, and the idea of your contract pack I have never had a desire to play career. Sorry. Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 3, 2016 Author Share Posted February 3, 2016 8 hours ago, inigma said: 1. Can you give me a use case for defineList? Have a look at the recent Tourism release - I use it for the repeatable Hotel/Casino tourism contracts to create lists of vessels that are either casinos or hotels. Other ideas - use it to track satellites that are launched for a GPS or RemoteTech constellation, and then provide some sort of follow up contract (eg. replace faulty satellite). Or closer to your bread and butter, you can use to track all the navigation buoys and then have a contract that requires visiting them in a randomized order (Vessel.Location() can be used to create a waypoint). 8 hours ago, inigma said: 2. What do you think of this pioneering contract I've been working on: (btw, I've play tested it and it works very well, and am looking for testers before releasing it) calling @BahamutoD and @selfish_meme Haha, very cute! You should release it and see if @illectro will stream playing it while "Stream Hack 2016" is still relevant news. Quote Link to comment Share on other sites More sharing options...
Dunbaratu Posted February 5, 2016 Share Posted February 5, 2016 (edited) This may be answered upthread already but It's a lot of reading to slog through: AVC claims that ContractConfigurator is now up to version 1.9.5. But CKAN still only has it at 1.9.4.1 so in order to obtain it and make the AVC complaint go away I have to go outside of CKAN to do it. Is that deliberate? Is 1.9.5 just an alpha release that's being kept off CKAN deliberately or is this a mistake that it's not on there? Edited February 5, 2016 by Steven Mading Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 5, 2016 Author Share Posted February 5, 2016 1 hour ago, Steven Mading said: This may be answered upthread already but It's a lot of reading to slog through: AVC claims that ContractConfigurator is now up to version 1.9.5. But CKAN still only has it at 1.9.4.1 so in order to obtain it and make the AVC complaint go away I have to go outside of CKAN to do it. Is that deliberate? Is 1.9.5 just an alpha release that's being kept off CKAN deliberately or is this a mistake that it's not on there? CKAN meta-files look like they got updated correctly after release, so should be working correctly on CKAN. Make sure to hit the refresh button in CKAN. I don't know much beyond that on the client side, so you'll have to look to the CKAN folk for support if that doesn't do it. Quote Link to comment Share on other sites More sharing options...
Dunbaratu Posted February 5, 2016 Share Posted February 5, 2016 (edited) 1 hour ago, nightingale said: CKAN meta-files look like they got updated correctly after release, so should be working correctly on CKAN. Make sure to hit the refresh button in CKAN. I don't know much beyond that on the client side, so you'll have to look to the CKAN folk for support if that doesn't do it. I hit the refresh before issuing the report just to be sure. But, just now to be really sure I wiped CKAN entirely, re-installed it from scratch, and now it's showing up. Refresh wasn't working for some reason. Not your problem then. Never mind. Edited February 5, 2016 by Steven Mading Quote Link to comment Share on other sites More sharing options...
renoplane Posted February 5, 2016 Share Posted February 5, 2016 Hey nightingale, I've been having a really strange bug with Contract Configurator and it would be great if you could take a look at it. Thanks, renoplane Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 6, 2016 Author Share Posted February 6, 2016 @renoplane - that is a ton of weirdness. Can you send a KSP.log? Quote Link to comment Share on other sites More sharing options...
renoplane Posted February 6, 2016 Share Posted February 6, 2016 (edited) Here you go. Sorry, guy. This forum has had to block Mediafire links. Please a different file hosting service. Edited February 6, 2016 by renoplane link not working Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 6, 2016 Author Share Posted February 6, 2016 1 hour ago, renoplane said: Here you go : [snip] Sorry, guy. This forum has had to block Mediafire links. Please a different file hosting service. Quoting in case you missed that the forum ate your link. Quote Link to comment Share on other sites More sharing options...
renoplane Posted February 6, 2016 Share Posted February 6, 2016 6 minutes ago, nightingale said: Quoting in case you missed that the forum ate your link. Thanks, I've edited it now. Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 6, 2016 Author Share Posted February 6, 2016 39 minutes ago, renoplane said: Thanks, I've edited it now. Looks like you've got a CONTRACT_TYPE with a missing/blank name field. I've fixed the code so it won't fall over in that case, but for the moment I have no way of telling where it came from. If you have a look in the GameData/ModuleManager.ConfigCache, and search for CONTRACT_TYPE you might be able to tell where the issue is (or just post up the file and I'll take a look). That being said, it looks like you might not even have Module Manager installed, which is needed for many (if not all) contract packs to work properly. Quote Link to comment Share on other sites More sharing options...
renoplane Posted February 6, 2016 Share Posted February 6, 2016 (edited) @nightingale- Well, I seem to have fixed it. I did some testing, and found the contract making problems. I still don't know exactly what caused it, but I fixed some syntax errors in that contract and it worked fine after that. Everything has been going well since, thanks for your help! Edited February 6, 2016 by renoplane Quote Link to comment Share on other sites More sharing options...
smjjames Posted February 8, 2016 Share Posted February 8, 2016 Is it possible to have the generated waypoints take into account the slope of the terrain? Because I was forced to cancel a survey contract (I think it was the stock one) because I was having trouble getting to a cluster of waypoints that were on a very steep hillside. Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 8, 2016 Author Share Posted February 8, 2016 56 minutes ago, smjjames said: Is it possible to have the generated waypoints take into account the slope of the terrain? Because I was forced to cancel a survey contract (I think it was the stock one) because I was having trouble getting to a cluster of waypoints that were on a very steep hillside. Hypothetically possible, but computationally expensive, because it requires sampling points around the selected point. More importantly, that data isn't loaded by KSP until you have a vessel pretty much right there, so it means that you'd have do really expensive queries to the PQS to actually get that information at the time a contract is being generated. Quote Link to comment Share on other sites More sharing options...
chrisl Posted February 8, 2016 Share Posted February 8, 2016 On 2/3/2016 at 10:01 PM, nightingale said: Another big meaty release: download here. Contract Configurator 1.9.5 Output additional log files when log level is debug or higher (thanks linuxgurugamer). VesselParameterGroup now supports a defineList attribute to add a vessel to a list on contract completion. PartValidation module checks now check the parent type. This allows mod-introduced PartModules that inherit from stock ones to count for PartValidation checks that look for the stock module (eg. ModuleEnginesFX = ModulesEngines). Added SubAssembly as a valid option for CopyCraftFile.craftType. Added NewKerbals() methods to generate lists of Kerbals. AwardExperience now supports awarding experience directly to Kerbals (instead of via a VesselParameterGroup). Limited the impact of a problem where the final Anomaly Surveyor contract causes revert to editor to leave a vessel on the pad (thanks lodestar). Fixed problem introduced in 1.9.4 where all waypoints without a name get called "site" (thanks smjjames). Fixed issue where Kerbal spawning behaviours didn't clean up properly when the Kerbal was in a command chair (thanks inigma & nobodyhasthis2). Fixed issue with Expression requirement bleeding through between different contracts (thanks Yemo, smjjames and nobodyhasthis2). Added logic to prevent duplicate Kerbal names from coming up in the same (or recent) contracts. Fixed issue with VesselParameterGroup where the vessel wasn't set correctly when loading a Kerbal into an EVA seat triggered the completion (thanks inigma). Minor bug fixes. Can't seem to find any information in the Docs about the AwardExperience command. Quote Link to comment Share on other sites More sharing options...
nightingale Posted February 8, 2016 Author Share Posted February 8, 2016 2 hours ago, chrisl said: Can't seem to find any information in the Docs about the AwardExperience command. https://github.com/jrossignol/ContractConfigurator/wiki/AwardExperience-Behaviour Quote Link to comment Share on other sites More sharing options...
oniontrain Posted February 9, 2016 Share Posted February 9, 2016 (edited) Would installing contract packs cause this to happen when I try to launch a vessel? It looks like there's no vessel loaded and it focuses on the sun when I go to map view. The space center view looks normal but there's some weirdness inside the SPH and VAB. Never had this happen before, it started after I installed a few contract packs (Tourism plus, field research, bases, and GAP). The tourist waypoints were also in weird places and not where they said they were. It's like they were shifted west about a km or so. Restarting KSP fixes it for one launch but anything I do after that appears to be bugged. Edited February 9, 2016 by oniontrain 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.