Caerfinon Posted December 17, 2020 Share Posted December 17, 2020 7 hours ago, eightiesboi said: The beatings will continue until morale improves. This is the way.... Quote Link to comment Share on other sites More sharing options...
bukschr Posted December 19, 2020 Share Posted December 19, 2020 This may make me sound like an insane person. I would like to edit the scansat contracts so the easy ones (Kerbin, Mun, Minimus) are available even if I've scanned more than 75% of the body. I've edited the files in the log folder. They just keep resetting. Which I thought was what would happen. Is there anyway to accomplish this, I just don't want to see them not completed in my contract building... Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted December 19, 2020 Share Posted December 19, 2020 2 hours ago, bukschr said: I would like to edit the scansat contracts The Scansat contracts are located in *.cfg files in the GameData\SCANsat\Resources\Contracts directory. You can alter their behaviour by making your changes there. Your changes will be overwritten each time the mod is updated. Quote Link to comment Share on other sites More sharing options...
bukschr Posted December 19, 2020 Share Posted December 19, 2020 10 hours ago, Caerfinon said: The Scansat contracts are located in *.cfg files in the GameData\SCANsat\Resources\Contracts directory. You can alter their behaviour by making your changes there. Your changes will be overwritten each time the mod is updated. You know, that makes significantly more sense... Thank you for the assist! Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted December 19, 2020 Share Posted December 19, 2020 35 minutes ago, bukschr said: Thank you for the assist! Any time. Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted December 22, 2020 Share Posted December 22, 2020 I'm hoping to get some help.... Is there a way to determine in a list, what index a particular value is located? For example, I have the following list and I want to return the element number of Kerbin within the list? allPlanets = [ Moho (CelestialBody), Eve (CelestialBody), Kerbin (CelestialBody), Duna (CelestialBody), Edna (CelestialBody), Dres (CelestialBody), Jool (CelestialBody), Lindor (CelestialBody), Hamek (CelestialBody), Eeloo (CelestialBody), Nara (CelestialBody) ] Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted December 28, 2020 Share Posted December 28, 2020 2 minutes ago, Oneiros said: if there are requirements/behaviours that interact with the destructible buildings? The only scenario that might apply is using the TargetDestroyed Parameter, but you would have to construct "the building" structure as a "vessel" since the parameter only relates to vessels. It is used in conjunction with weapons mods. There isn't anything that I could see that checks the status of building structures like the KSC ones. Quote Link to comment Share on other sites More sharing options...
Qwarkk Posted December 28, 2020 Share Posted December 28, 2020 I've searched this topic as best I can and cant find the answer to my question - so I thought id post. Im creating a basic satellite contract pack. The contract in question is to deliver a payload into an orbit generated using the OrbitGenerator / RANDOM_ORBIT. What i want to do is set the rewardFunds to be calculated based off the orbit parameters generated (eg more reward for higher inclined orbit). Can this be done? Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted December 28, 2020 Share Posted December 28, 2020 6 minutes ago, Qwarkk said: Can this be done? Could you use two vessel state Orbit Parameters to accomplish this? The first Parameter is the min/max settings to satisfy the contract. The second optional Parameter is a more specific min/max requirement for the orbit that if met generates an additional reward for completion of the parameter. Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 1, 2021 Share Posted January 1, 2021 Did some testing with the new EVA construction Inventory slots. Couldn't find an obvious way to detect what was contained in the inventory, but the PartValidation parameter can be triggered by using EVA Construction to add new parts to the vessel. (Same behaviour with KIS also). Raised a Feature request on GitHub to see if there was a way that stock inventory could be added with maybe a HasCargo parameter check. Envisioning creating some field repair contract possibilities in a future update if it's doable. Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 2, 2021 Share Posted January 2, 2021 Is there a way to use contract names that have been generated through the DATA_EXPAND in complete contract requirements? I have a contract with the following DATA_EXPAND where homeMoons are moons around the home world: DATA_EXPAND { type = CelestialBody targetBody1 = @KSP_Contracts:homeMoons } I want to use the requirement complete requirement in other contracts to ensure they are complete first but I can't get the requirement to work unless I hardcode the name. I don't want to hardcode the name since I want the contract pack to work with different planet systems. Any ideas would be appreciated... Quote Link to comment Share on other sites More sharing options...
TheDeamon Posted January 3, 2021 Share Posted January 3, 2021 (edited) edit: Okay, found my issue causing the contract failure, disregard. I only thought they were alive because the command capsule survived. They were in the Hitchhiker Storage Container, which didn't survive. Ouch. Edited January 3, 2021 by TheDeamon Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 3, 2021 Share Posted January 3, 2021 19 hours ago, HawkEngineer said: DATA_EXPAND { type = CelestialBody targetBody1 = @KSP_Contracts:homeMoons } Isn't he data expand a list? so type = List<CelestialBody> ? In the page https://github.com/jrossignol/ContractConfigurator/wiki/Data-Node#the-data_expand-node The notes at the bottom says "Note in the example above that the type is defined as an int, but the actual type provided must be List<int>." Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 3, 2021 Share Posted January 3, 2021 (edited) 57 minutes ago, Caerfinon said: Isn't he data expand a list? so type = List<CelestialBody> ? In the page https://github.com/jrossignol/ContractConfigurator/wiki/Data-Node#the-data_expand-node The notes at the bottom says "Note in the example above that the type is defined as an int, but the actual type provided must be List<int>." Thanks for the response, the homeMoons is actually a list which is defined elsewhere in the main contract group. The contract works until I try to set a requirement complete complete that references another contract that uses DATA_EXPAND... I define the contract variable using the following data structure which works and the verifyContract variable is assigned the correct contract name which I want to verify complete: DATA { type = string verify1 = MoonRelay verifyContract = @verify1 + @/targetBody requiredValue = true } Then in the requirement section, the contract fails to load but does not give me any errors when I insert the following text into the contract definition file, without the requirement check, the contract loads and expands correctly. The verifyContract variable is the name of the previous contract that should be completed before this one is offered. REQUIREMENT { name = CompleteContract type = CompleteContract contractType = @/verifyContract title = Complete @contractType Contract } For the requirement complete type, can the contractType equal a variable? It seems when a variable is used, the contract fails but when it is hardcoded, it works? Edited January 3, 2021 by HawkEngineer Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 3, 2021 Share Posted January 3, 2021 48 minutes ago, HawkEngineer said: the contract fails to load but does not give me any errors Do you have output from the Contract Configurator log directory for this contract? Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 3, 2021 Share Posted January 3, 2021 5 minutes ago, Caerfinon said: Do you have output from the Contract Configurator log directory for this contract? No, unfortunately the log file does not get created when I insert the complete Contract requirement...when I remove it, it generates and loads properly.... Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 3, 2021 Share Posted January 3, 2021 1 hour ago, HawkEngineer said: unfortunately the log file does not get created when I insert the complete Contract requirement There should be entries in your KSP.log then that shows what might be going on with the contract as the game tries to load it and it fails to do so. That would be the next place to look for causes. Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 3, 2021 Share Posted January 3, 2021 28 minutes ago, Caerfinon said: There should be entries in your KSP.log then that shows what might be going on with the contract as the game tries to load it and it fails to do so. That would be the next place to look for causes. Appreciate the help....I have parsed through the ksp.log file and found the following error related to the contract in question: Spoiler LOG 12:26:40.250] [DEBUG] ContractConfigurator.ContractConfigurator: Loading CONTRACT_TYPE nodes. [EXC 12:26:40.743] NullReferenceException: Object reference not set to an instance of an object ContractConfigurator.ContractCheckRequirement+<>c__DisplayClass5_0.<SetValues>b__0 (ContractConfigurator.ContractType ct) (at <ef0243a06f2841fe9bf57034a334902e>:0) System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0) ContractConfigurator.ContractCheckRequirement.SetValues (System.String contractType) (at <ef0243a06f2841fe9bf57034a334902e>:0) ContractConfigurator.ContractCheckRequirement.LoadFromConfig (ConfigNode configNode) (at <ef0243a06f2841fe9bf57034a334902e>:0) ContractConfigurator.CompleteContractRequirement.LoadFromConfig (ConfigNode configNode) (at <ef0243a06f2841fe9bf57034a334902e>:0) ContractConfigurator.ContractRequirement.GenerateRequirement (ConfigNode configNode, ContractConfigurator.ContractType contractType, ContractConfigurator.ContractRequirement& requirement, ContractConfigurator.IContractConfiguratorFactory parent) (at <ef0243a06f2841fe9bf57034a334902e>:0) ContractConfigurator.ContractType.Load (ConfigNode configNode) (at <ef0243a06f2841fe9bf57034a334902e>:0) Rethrow as Exception: Error loading CONTRACT_TYPE 'MoonRelayBackup' ContractConfigurator.ContractType.Load (ConfigNode configNode) (at <ef0243a06f2841fe9bf57034a334902e>:0) ContractConfigurator.ContractConfigurator+<LoadContractTypeConfig>d__31.MoveNext () (at <ef0243a06f2841fe9bf57034a334902e>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.<LoadContractTypeConfig>d__31:MoveNext() ContractConfigurator.<FinalizeContractTypeLoad>d__30:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 3, 2021 Share Posted January 3, 2021 3 hours ago, HawkEngineer said: Appreciate the help Not sure I can help with this though. The only other contract packs I've seen use the Data_Expand are the ScanSat contracts, but in their requirements they are looking for % of planet scanned not the completion of another contract. Perhaps that particular requirement node required a not variable entry or one that meets deterministic = true requirement. Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 4, 2021 Share Posted January 4, 2021 14 hours ago, Caerfinon said: Not sure I can help with this though. The only other contract packs I've seen use the Data_Expand are the ScanSat contracts, but in their requirements they are looking for % of planet scanned not the completion of another contract. Perhaps that particular requirement node required a not variable entry or one that meets deterministic = true requirement. Thanks for the feedback, I did try that hardcoding the name works so I believe it is something to do with using a variable in the contractType field. I was hoping to use the DATA_EXPAND field so that the contract files could be used for any planet pack...might need to rethink the approach.... Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted January 13, 2021 Share Posted January 13, 2021 Quick Question: Does anyone know if an error is generated when using an iterator within the parameter node when the iterator list is empty? For example, if the iterator is written: ITERATOR { type = CelestialBody targetMoon = @/targetBody.Children() } If the targetBody does not have any moons, will the parameter node be skipped or will this cause an error in loading the contract? Quote Link to comment Share on other sites More sharing options...
Morphisor Posted January 13, 2021 Share Posted January 13, 2021 11 hours ago, HawkEngineer said: Quick Question: Does anyone know if an error is generated when using an iterator within the parameter node when the iterator list is empty? For example, if the iterator is written: ITERATOR { type = CelestialBody targetMoon = @/targetBody.Children() } If the targetBody does not have any moons, will the parameter node be skipped or will this cause an error in loading the contract? Probably the latter, but it may depend on the type of parameter. It's an easy thing to check. When ingame, just checkout the CC debug menu for any notifications (red texts usually) concering the contract in question. Quote Link to comment Share on other sites More sharing options...
RenegadeWizard Posted January 15, 2021 Share Posted January 15, 2021 Hi there. I was just wondering something. I've gone through the documentation, but I couldn't find how to do the following: If I just want to disable all ARM Contracts from the base game, do I just make a .cfg file in a folder like /GameData/ContractPacks/MyFilter/filter.cfg, and then have the contents of filter.cfg be CONTRACT_CONFIGURATOR { disabledContractType = ARMContract } ? Thanks. Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted January 15, 2021 Share Posted January 15, 2021 (edited) 19 minutes ago, RenegadeWizard said: If I just want to disable all ARM Contracts from the base game You could just go into settings of Contract Configurator and disable them from GUI (along with any other stock contracts as well). Otherwise you need to make a contract group... but the GUI is the way to go on this. CONTRACT_GROUP { name = somename displayName = sometext minVersion = 1.30.3 agent = Field Research Team // Disable the stock science contracts disabledContractType = thingstodisable } Contract Configurator > wiki > Contract-Group More details in the wiki Edited January 15, 2021 by Caerfinon Quote Link to comment Share on other sites More sharing options...
RenegadeWizard Posted January 16, 2021 Share Posted January 16, 2021 1 hour ago, Caerfinon said: You could just go into settings of Contract Configurator and disable them from GUI (along with any other stock contracts as well). Otherwise you need to make a contract group... but the GUI is the way to go on this. CONTRACT_GROUP { name = somename displayName = sometext minVersion = 1.30.3 agent = Field Research Team // Disable the stock science contracts disabledContractType = thingstodisable } Contract Configurator > wiki > Contract-Group More details in the wiki Thanks! I will try both. This is a great mod and I look forward to learning all about it. 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.