Caerfinon Posted June 11, 2021 Share Posted June 11, 2021 5 hours ago, Mr Shifty said: Anyone know? You can do this in the CONTRACT_GROUP node with the following; // List any contract types to disable as part of this contract group. // Multiple values can be provided. These can be a Contract Configurator // CONTRAC_TYPE name, a stock contract type class name, or a mod contract // type class name. disabledContractType = ARMContract You can also go into the difficulty settings for Contract Configurator and disable various contract agencies there as well as certain classes of stock contracts. 21 hours ago, Kerolyov said: Once I do the other contract can then be identical to the acepted one and it seems random even using SelectUnique() I would need to look at your contract file. Quote Link to comment Share on other sites More sharing options...
Kerolyov Posted June 19, 2021 Share Posted June 19, 2021 On 6/11/2021 at 10:59 AM, Caerfinon said: I would need to look at your contract file. I was modding the Exploration Plus contract pack. I modified just one file which I pastebin here https://pastebin.com/Rv61uiC8 Any thoughts or help appreciated Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted June 19, 2021 Share Posted June 19, 2021 1 hour ago, Kerolyov said: Any thoughts or help appreciated I was able to get the next two unreached bodies to be offered in contracts at the same time with the following; DATA { type = CelestialBody targetBody1 = NextUnreachedBodies(2).Random() uniquenessCheck = GROUP_ACTIVE title = Must have not reached all bodies. } Quote Link to comment Share on other sites More sharing options...
Zelda Posted June 19, 2021 Share Posted June 19, 2021 (edited) I'm having an issue with ScienceSubject functions. I am making unmanned Mun / Minmus lander contracts where each Biome should only be visited once, and the ScienceSubject needs to be something that can be done autonomously, but is not a robotic arm contract. How I am doing this is by filtering all experiments on the body through an exclusion list, which contains the manned experiments as well as all possible robotic arm combinations (i.e., ROCScience_MunStone, ROCScience_MunCrater, etc). My issue is that the only subjects returned by AllScienceSubjectsByBiome() are the robotic arm subjects, despite there being many other valid subjects, so my subsequent filtering starts returning null values because it's doing the right thing by removing them. At that point, the contract doesn't fail to load but it never gets offered, which I presume is because there's no ScienceSubject for the CollectScience parameter to work with. Assuming no known issues with ScienceSubject, then I'm sure I'm missing something simple. If anyone has the time, these are the relevant data nodes in my contract, though they are a little more verbose than normal since I'm trying to debug. Everything appears to function normally until tempSubjects0 returns only the possible ROCScience_* subjects for the selected biome. DATA { type = Biome uniquenessCheck = CONTRACT_ALL hidden = true selectedBiome = @/targetBody.Biomes().SelectUnique() } DATA { type = List<ScienceExperiment> hidden = true validExperiments = AvailableExperiments(@targetBody).ExcludeAll(@CREI:srfProbeExcludeList) } DATA { type = List<ScienceSubject> hidden = true tempSubjects0 = AllScienceSubjectsByBiome([@selectedBiome]). tempSubjects1 = @tempSubjects0.Where(s => @validExperiments.Contains(s.Experiment())) tempSubjects2 = @tempSubjects1.Where(s => s.Situation() == SrfLanded) validSubjects = @tempSubjects2.Where(s => s.RemainingScience() > 0) } DATA { type = ScienceSubject hidden = true selectedSubject = @validSubjects.Random() } Edited June 19, 2021 by Zelda Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted June 19, 2021 Share Posted June 19, 2021 1 hour ago, Zelda said: I'm having an issue with ScienceSubject functions. Can you post the CC debug log for the contract file? and the group.cfg containing @CREI:srfProbeExcludeList ? Quote Link to comment Share on other sites More sharing options...
Kerolyov Posted June 19, 2021 Share Posted June 19, 2021 3 hours ago, Caerfinon said: I was able to get the next two unreached bodies to be offered in contracts at the same time with the following; DATA { type = CelestialBody targetBody1 = NextUnreachedBodies(2).Random() uniquenessCheck = GROUP_ACTIVE title = Must have not reached all bodies. } Thanks so much for taking a look. The bit that isnt working for me with this code or my original is when one of the two contracts is accepted. I was hoping the second offered contract would not duplicate the accepted one but it still does. I tested this by accepting one contract and then declining the other. In my save the next two unreached bodies are Duna and Gilly. When I have no contract accepted it seems to work ok, but as soon as I accept one then the second one can duplicate the accepted one. ie Accept the Duna one and when the Gilly one expired/declined the regenerated one some of the time is another Duna one. Same prob with your code. Could this be a CC bug? Is there a way to edit the unreached bodies in the save file? Is there a log or debug info for CC beyond the Alt-F10 window (which doesn't say much about generation)? Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted June 19, 2021 Share Posted June 19, 2021 1 hour ago, Kerolyov said: Is there a log or debug info for CC beyond the Alt-F10 window There is a file in the Contract Configurator folder called ContractConfigurator.cfg.default. Edit this and set all logging levels to debug. Then save it as ContractConfigurator.cfg in the folder. Then next time your game starts it will log more detail in the ksp.log and each contract file will have a separate log in the ContractConfigurator/log folder. 1 hour ago, Kerolyov said: Is there a way to edit the unreached bodies in the save file? I have not really looked into this. Quote Link to comment Share on other sites More sharing options...
Zelda Posted June 20, 2021 Share Posted June 20, 2021 3 hours ago, Caerfinon said: Can you post the CC debug log for the contract file? and the group.cfg containing @CREI:srfProbeExcludeList ? Well strangely enough, I just attempted to repro again to grab the logs and it worked this time. I did change the sort keys a bit, but that's it. Weird. Thanks for offering to help though! Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted June 20, 2021 Share Posted June 20, 2021 1 hour ago, Zelda said: Thanks for offering to help though! Any time. Glad it got sorted. Quote Link to comment Share on other sites More sharing options...
Duck0520 Posted June 25, 2021 Share Posted June 25, 2021 Im on ksp 1.12 and recieved this error. Exception occured while loading contract 'ExplorationPlus.ExplorationPlus-FlyBy': System.ArgumentException: 'ProximaCentauri' is not a valid CelestialBody. at ContractConfigurator.ConfigNodeUtil.ParseCelestialBodyValue (System.String celestialName) [0x00046] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) [0x00179] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Boolean allowExpression) [0x002bc] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, T defaultValue) [0x00012] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfiguredContract.OnLoad (ConfigNode node) [0x00121] in <ef0243a06f2841fe9bf57034a334902e>:0 Im wondering about this because I dont want to lose any contract data stuff and Im wondering how to fix this or if it will be fixed by the author. Quote Link to comment Share on other sites More sharing options...
Duck0520 Posted June 26, 2021 Share Posted June 26, 2021 18 hours ago, Duck0520 said: Im on ksp 1.12 and recieved this error. Exception occured while loading contract 'ExplorationPlus.ExplorationPlus-FlyBy': System.ArgumentException: 'ProximaCentauri' is not a valid CelestialBody. at ContractConfigurator.ConfigNodeUtil.ParseCelestialBodyValue (System.String celestialName) [0x00046] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) [0x00179] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Boolean allowExpression) [0x002bc] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, T defaultValue) [0x00012] in <ef0243a06f2841fe9bf57034a334902e>:0 at ContractConfigurator.ConfiguredContract.OnLoad (ConfigNode node) [0x00121] in <ef0243a06f2841fe9bf57034a334902e>:0 Im wondering about this because I dont want to lose any contract data stuff and Im wondering how to fix this or if it will be fixed by the author. Nevermind I just updated My mods and fixed it. Quote Link to comment Share on other sites More sharing options...
Angel33Demon Posted August 10, 2021 Share Posted August 10, 2021 I'm not sure if I'm using the mod right, but I just installed it and it's giving me contracts for parts which I don't even have installed (Triple-Z Radio Telescope contract). Is there a fix for this? Quote Link to comment Share on other sites More sharing options...
Morphisor Posted August 15, 2021 Share Posted August 15, 2021 On 8/10/2021 at 7:48 PM, Angel33Demon said: I'm not sure if I'm using the mod right, but I just installed it and it's giving me contracts for parts which I don't even have installed (Triple-Z Radio Telescope contract). Is there a fix for this? If it's giving you a contract for a part, you've got the part in your install. It might be named differently in the in-game menu however. Quote Link to comment Share on other sites More sharing options...
wolffy_au Posted August 23, 2021 Share Posted August 23, 2021 So I guess @nightingale is gone for good? Last release Oct 2020 and no movement on any issues in GitHub. Is anyone planning on picking this mod up in his absence? Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 23, 2021 Share Posted August 23, 2021 @wolffy_au It's hard to say on both counts. There are some quirks but the mod still functions fairly well. Quote Link to comment Share on other sites More sharing options...
wolffy_au Posted August 23, 2021 Share Posted August 23, 2021 8 minutes ago, Caerfinon said: @wolffy_au It's hard to say on both counts. There are some quirks but the mod still functions fairly well. I'm helping out on History Of Space Flight contract pack and I have a bug or two in the pile. If I knew anything about C# I'd give it a go myself. Quote Link to comment Share on other sites More sharing options...
Teykn Posted September 13, 2021 Share Posted September 13, 2021 Is there any way to have a PartValidation Parameter detect specifically Cupolas? I dont see a partModule for cupolas hence why I ask. Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted September 13, 2021 Share Posted September 13, 2021 45 minutes ago, Teykn said: Is there any way to have a PartValidation Parameter detect specifically Cupolas? You can use part validation for all the specific parts for the various cupolas you are interested in. Just add multiple "part =" statements. PARAMETER { name = PartValidation type = PartValidation // The name of the part to check for. If multiple are specified, will // match on ANY of the parts listed. // // Type: AvailablePart // Required: No (multiples allowed) // part = mk1pod part = mk1-2pod } Quote Link to comment Share on other sites More sharing options...
Pehvbot Posted September 13, 2021 Share Posted September 13, 2021 I would like to create contracts that look for parts in the stock inventory system, something like: PARAMETER { name = PartValidation type = PartValidation // other parameters // inventory = none | all | only //defaults to none but can search through all parts and inventories or just inventories (i.e. not active parts) } My questions to the dev(s): I'm pretty sure I can add something like this by extending CC but before I dive in, is some sort of inventory validation being considered or worked on? If not is this something you would want to include into the base CC as a pull request? Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted September 19, 2021 Share Posted September 19, 2021 On 8/23/2021 at 10:16 PM, wolffy_au said: So I guess @nightingale is gone for good? Last release Oct 2020 and no movement on any issues in GitHub. Is anyone planning on picking this mod up in his absence? I don't think he's gone. He's very busy. But he logs on. The mod still works far as I know? do others know different? and it says it supports 1.10+ and until it doesn't work. then it is still good right? no need to update it. Quote Link to comment Share on other sites More sharing options...
Krzeszny Posted September 19, 2021 Share Posted September 19, 2021 (edited) I've noticed that SSPXR has patches that seemingly add its cupolas, science labs, etc. to contracts. However, the contract pack Bases and Stations Reborn don't accept those parts (or at least doesn't list them as options in the contract). Why? Example from SSPXR: // SSPXr contract patches // New cupolas count for contracts @Contracts { @Base { @PART_REQUEST:HAS[#Part[cupola]] { Part = sspx-cupola-125-1 Part = sspx-cupola-1875-1 Part = sspx-cupola-375-1 Part = sspx-observation-25-1 Part = sspx-dome-5-1 Part = sspx-dome-observation-5-1 } } @Station { @PART_REQUEST:HAS[#Part[cupola]] { Part = sspx-cupola-125-1 Part = sspx-cupola-1875-1 Part = sspx-cupola-375-1 Part = sspx-observation-25-1 Part = sspx-dome-5-1 } } Edited September 19, 2021 by Krzeszny Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted September 19, 2021 Share Posted September 19, 2021 2 minutes ago, Krzeszny said: I've noticed that SSPXR has patches I believe the patch targets stock contracts not Contract Configurator contracts. Quote Link to comment Share on other sites More sharing options...
Morphisor Posted September 19, 2021 Share Posted September 19, 2021 6 hours ago, JPLRepo said: I don't think he's gone. He's very busy. But he logs on. The mod still works far as I know? do others know different? and it says it supports 1.10+ and until it doesn't work. then it is still good right? no need to update it. Wolffy wasn't so much asking for a new version to update functionality, rather just point out there's a number of issues that have been reported over past few years that are left unattended. That's no criticism of Nightingale either, everyone here is thankful this exists at all. It's just the state of the mod. Quote Link to comment Share on other sites More sharing options...
Krzeszny Posted September 19, 2021 Share Posted September 19, 2021 (edited) What would a contract look like if it had 2 parameters: Parameter 1 would check for module x (unspecified part) and gave a specific reward (multiple parts have that module) Parameter 2 would check for one specific part (which has module x in it) but gave a different reward? I know how to check for errors (the Ctrl+Alt+F10 menu) but not how to "spawn" a contract if not all requirements have been met, so testing it isn't that easy. Edited September 19, 2021 by Krzeszny Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted September 19, 2021 Share Posted September 19, 2021 2 hours ago, Krzeszny said: but not how to "spawn" a contract if not all requirements have been met An easier way would be to remove all unmet requirements (or comment them out) and then the contract will be offered. 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.