nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 12 minutes ago, inigma said: I thought about doing the check based on intakes, however some players will be able to create intake crafts powered by solid rockets or rockets, defeating the check and intent of GAP. Would it be an easy enhancement to include the same logic for PartModuleUnlocked as you do for PartValidation and its ability to filter? Not an easy enhancement, no. I don't understand what mod or situation you're trying to cater for. In an otherwise stock install, it's impossible to research an early tech that gives intakes but not air breathing engines. Yes, there's the very slim percentage playing with part unlocking that could see the contract even though they've unlocked intakes but not engines, but the contract should hopefully spur them to unlock the right part. Quote Link to comment Share on other sites More sharing options...
inigma Posted January 11, 2016 Share Posted January 11, 2016 Just now, nightingale said: Not an easy enhancement, no. I don't understand what mod or situation you're trying to cater for. In an otherwise stock install, it's impossible to research an early tech that gives intakes but not air breathing engines. Yes, there's the very slim percentage playing with part unlocking that could see the contract even though they've unlocked intakes but not engines, but the contract should hopefully spur them to unlock the right part. ok. then i'll go with intakes then. Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 New release with lots of bug fixes. Download now! Contract Configurator 1.9.3 Added VesselParameterGroup.hideVesselName. General improvements to behaviour of parameters with in-sequence completion (thanks inigma). Improved reliability of RemoteTech parameters. Fixed issue with some expressions being parsed twice in the Expression behaviour (thanks linuxgurugamer). Fixed problem with Duration timer contracts not working when used as a child parameter (thanks TrooperCooper & NathanKell). Fixed issue that caused disabled stock contracts to re-enable themselves on occasion (thanks Rokker). Fixed supposedly removed Kerbals going MIA (thanks inigma). Fixed major issue with RemoveKerbal (thanks inigma). Fixed issue with Sequence parameter not always firing (thanks Steven Mading). Fixed issue where CollectScience wouldn't correctly check that it needed to be completed in sequence (thanks linuxgurugamer). Fixed failWhenUnmet to actually fail contracts (thanks inigma). Fixed issue with biomes with spaces in their names in CollectScience (like "Ice Caps"). Quote Link to comment Share on other sites More sharing options...
inigma Posted January 11, 2016 Share Posted January 11, 2016 Congrats on the release! I've been meaning to update my Flight 101 contract to check for VesselDestroyed when the airplane is destroyed by the player, which will then trigger a dialog from Air Traffic Control. However, I wanted to know if it meant any vessel, since "vessel" is not a attribute for that parameter. If I couch it in a VPG, will VesselDestroyed only trigger off the destruction of the VPG? Quote Link to comment Share on other sites More sharing options...
Dunbaratu Posted January 11, 2016 Share Posted January 11, 2016 Yay, new release. Thanks. It's looking like I'm going to need that idea for a kind of Sequence that has 'must continue being true' parameters in it. (i.e if parameter 1 and 2 were true, and now you're about to try to make parameter 3 true, if parameter 1 becomes untrue again, then the sequence rewinds back to step 1.) I'm tempted to give it ago myself and try a PR for it. Quote Link to comment Share on other sites More sharing options...
Ryusho Posted January 11, 2016 Share Posted January 11, 2016 I just had a major error occur, and it kinda hit in an unavoidable way because I just did the first tourism Contract of the contract pack, and now this auto tirggers if I load the save... Exception occured while loading contract 'Tourism_LowOrbit': System.Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE ---> System.ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 This makes it now impossible to continue that campaign, unless fixed because it locks out all my contracts and It fails 2 or 3 contracts the instant it tries to load, ones I never had, but they are failed as if I had taken them. Quote Link to comment Share on other sites More sharing options...
SoTOP Posted January 11, 2016 Share Posted January 11, 2016 (edited) So with 1.9.3 the RP-0 supersonic x planes contract now doesnt even pick up that Im flying, my speed or my altitude(Before the problem was that it completed instantly without taking required time). Edited January 11, 2016 by SoTOP Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 9 hours ago, inigma said: Congrats on the release! I've been meaning to update my Flight 101 contract to check for VesselDestroyed when the airplane is destroyed by the player, which will then trigger a dialog from Air Traffic Control. However, I wanted to know if it meant any vessel, since "vessel" is not a attribute for that parameter. If I couch it in a VPG, will VesselDestroyed only trigger off the destruction of the VPG? Should work that way if you put it in the VPG. 7 hours ago, Steven Mading said: Thanks. It's looking like I'm going to need that idea for a kind of Sequence that has 'must continue being true' parameters in it. (i.e if parameter 1 and 2 were true, and now you're about to try to make parameter 3 true, if parameter 1 becomes untrue again, then the sequence rewinds back to step 1.) I'm tempted to give it ago myself and try a PR for it. I'll try to get to it in the next week... but a PR would help. 3 hours ago, Ryusho said: I just had a major error occur, and it kinda hit in an unavoidable way because I just did the first tourism Contract of the contract pack, and now this auto tirggers if I load the save... Exception occured while loading contract 'Tourism_LowOrbit': System.Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE ---> System.ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 This makes it now impossible to continue that campaign, unless fixed because it locks out all my contracts and It fails 2 or 3 contracts the instant it tries to load, ones I never had, but they are failed as if I had taken them. 2 hours ago, SoTOP said: So with 1.9.3 the RP-0 supersonic x planes contract now doesnt even pick up that Im flying, my speed or my altitude(Before the problem was that it completed instantly without taking required time). I'll look into both of these and see if I can get a fix out ASAP. Quote Link to comment Share on other sites More sharing options...
dr_evil Posted January 11, 2016 Share Posted January 11, 2016 2 hours ago, Ryusho said: I just had a major error occur, and it kinda hit in an unavoidable way because I just did the first tourism Contract of the contract pack, and now this auto tirggers if I load the save... (...) This makes it now impossible to continue that campaign, unless fixed because it locks out all my contracts and It fails 2 or 3 contracts the instant it tries to load, ones I never had, but they are failed as if I had taken them. Hi there, this also happened to me. I had a similar error message if not the exactly same. I have successfully tried to reproduce the error. For me it happens when a contract from tourism plus runs out (deadline) or when I decline a contract from tourism plus. Afterwards I get the error message when entering the tracking station. After exiting the tracking station I get a notification that that specific contract has failed even though I didn´t accept the contract in the first place. I hope this helps. P.S.: Version before update 1.9.2.1; Version after update when the error occurs 1.9.3 It also occurs when I decline a tourism plus unrelated contract sometimes. This is the error message in the logs while in the tracking station: (...) [ERR 17:13:23.967] ContractConfigurator.ConfiguredContract: Error loading contract from persistance file! [EXC 17:13:23.969] ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) Rethrow as Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.ConfiguredContract:OnLoad(ConfigNode) Contracts.Contract:Load(Contract, ConfigNode) Contracts.ContractSystem:LoadContract(ConfigNode) Contracts. :MoveNext() [LOG 17:13:23.972] Penalizing 25 reputation from player for contract failure [LOG 17:13:23.972] Added -32.48557 (-25) reputation: 'ContractPenalty'. [LOG 17:13:23.976] Contract (Tourism Plus: Bring two tourists over k2): We have failed our contract for Kerbal Space Tourism: Tourism Plus: Bring two tourists over k2 <b><#ED0B0B>Penalties for Failure:</></> <#ED0B0B>¡ -25 </> (...) Quote Link to comment Share on other sites More sharing options...
smjjames Posted January 11, 2016 Share Posted January 11, 2016 (edited) Edit: This is with 1.9.3 I just had something very similar, after I had briefly exited to main menu to transfer a craft file, it spat out some exceptions (CC custom exception screen message even) and seemed to claim that I had taken two tourist contracts. While I did decline some tourist asteroid contracts before transferring that craft file over, I'm 99% sure I didn't accidentially accept some. error excerpt from output log: ContractConfigurator.ConfiguredContract: Error loading contract from persistance file! (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 Rethrow as Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 UnityEngine.Debug:Internal_LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.ConfiguredContract:OnLoad(ConfigNode) Contracts.Contract:Load(Contract, ConfigNode) ContractConfigurator.ContractPreLoader:OnLoad(ConfigNode) ScenarioModule:Load(ConfigNode) ScenarioRunner:AddModule(ConfigNode) ProtoScenarioModule:Load(ScenarioRunner) :MoveNext() (Filename: Line: -1) Penalizing 30 reputation from player for contract failure (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Added -47.63845 (-30) reputation: 'ContractPenalty'. (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Contract (Tourism Plus: Bring four tourists to visit an asteroid.): We have failed our contract for Kerbal Space Tourism: Tourism Plus: Bring four tourists to visit an asteroid. <b><#ED0B0B>Penalties for Failure:</></> <#ED0B0B>¡ -30 </> (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) ContractConfigurator.ConfiguredContract: Error loading contract from persistance file! (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 Rethrow as Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 UnityEngine.Debug:Internal_LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.ConfiguredContract:OnLoad(ConfigNode) Contracts.Contract:Load(Contract, ConfigNode) ContractConfigurator.ContractPreLoader:OnLoad(ConfigNode) ScenarioModule:Load(ConfigNode) ScenarioRunner:AddModule(ConfigNode) ProtoScenarioModule:Load(ScenarioRunner) :MoveNext() (Filename: Line: -1) Penalizing 30 reputation from player for contract failure (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Added -45.17829 (-30) reputation: 'ContractPenalty'. (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Contract (Tourism Plus: Bring three tourists to visit an asteroid.): We have failed our contract for Kerbal Space Tourism: Tourism Plus: Bring three tourists to visit an asteroid. <b><#ED0B0B>Penalties for Failure:</></> <#ED0B0B>¡ -30 </> what the CC exception message window ingame gave me: Exception occured while loading contract 'Tourism_Asteroid': System.Exception: Error parsing statement. Error occurred near '*': TouristCount + @Tourism:touristCount ..............* <-- HERE ---> System.ArgumentException: Cannot get value for @Tourism:touristCount: not available in this context. at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filenameunknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Double].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 full output log: http://sta.sh/01nhexru0jsu Edited January 11, 2016 by smjjames Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 Fixed some major problems with 1.9.3. Download the update now! Contract Configurator 1.9.3.1 Fixed MAJOR issue introduced in 1.9.3 that broke Tourism Plus (thanks Ryusho). Fixed ReachState not working with timers (thanks SoTOP). Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 11, 2016 Share Posted January 11, 2016 @nightingale I was looking at the AvailableParts class, and don't see any way to find the maximum range of an antenna. Is this something difficult to add? Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 6 minutes ago, linuxgurugamer said: @nightingale I was looking at the AvailableParts class, and don't see any way to find the maximum range of an antenna. Is this something difficult to add? Antennas don't have range in stock - which mod are you looking at? (unless that's something new?) Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 11, 2016 Share Posted January 11, 2016 33 minutes ago, nightingale said: Antennas don't have range in stock - which mod are you looking at? (unless that's something new?) Duh! You are absolutely correct, sorry. I am thinking about both AntennaRange and RT. I'm not sure yet if I want to go this route, but was wondering if there was a way to find out the antenna range. I was thinking of making some contracts dependent on if the player has an antenna with the available range (or some fraction thereof) before creating a contract Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 11, 2016 Author Share Posted January 11, 2016 3 minutes ago, linuxgurugamer said: Duh! You are absolutely correct, sorry. I am thinking about both AntennaRange and RT. I'm not sure yet if I want to go this route, but was wondering if there was a way to find out the antenna range. I was thinking of making some contracts dependent on if the player has an antenna with the available range (or some fraction thereof) before creating a contract There's actually a specific parameter for that for RT. Nothing for AntennaRange, and not planned (nothing against it, just not terribly interesting in doing any more mod-specific parameters with the current workload i already have). Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 12, 2016 Share Posted January 12, 2016 1 hour ago, nightingale said: There's actually a specific parameter for that for RT. Nothing for AntennaRange, and not planned (nothing against it, just not terribly interesting in doing any more mod-specific parameters with the current workload i already have). I saw that, and it won't do what I want. That's ok, I'll figure something else out. If I decide to take a crack at it, would you be willing to accept a patch? Thanks for all you do Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 12, 2016 Author Share Posted January 12, 2016 37 minutes ago, linuxgurugamer said: I saw that, and it won't do what I want. That's ok, I'll figure something else out. If I decide to take a crack at it, would you be willing to accept a patch? Thanks for all you do Yup, I'll definitely take a pull request for that one. Note that if possible, it would need to be via reflection. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 12, 2016 Share Posted January 12, 2016 19 minutes ago, nightingale said: Yup, I'll definitely take a pull request for that one. Note that if possible, it would need to be via reflection. Ok. don't hold your breath, but I'll keep it in the back of my mind. LGG Quote Link to comment Share on other sites More sharing options...
inigma Posted January 12, 2016 Share Posted January 12, 2016 what defines category = Aero for PartValidation? I need a list of parts. Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 12, 2016 Author Share Posted January 12, 2016 40 minutes ago, inigma said: what defines category = Aero for PartValidation? I need a list of parts. Each part has a category in its config file. It's the same as the categories the parts are grouped into in the VAB/SPH. Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted January 12, 2016 Share Posted January 12, 2016 hi @nightingale, I'm doing a rescale mod and I was wondering which are the parameters for stock contracts that have a "distance" set up. I am thinking that I should probably edit those values in order to account for the different size of the system. do you know which these variables are? and are there any added by contract configurator? I'll need to edit those too I guess Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 12, 2016 Author Share Posted January 12, 2016 5 hours ago, Sigma88 said: hi @nightingale, I'm doing a rescale mod and I was wondering which are the parameters for stock contracts that have a "distance" set up. I am thinking that I should probably edit those values in order to account for the different size of the system. do you know which these variables are? and are there any added by contract configurator? I'll need to edit those too I guess You've actually asked a really tricky question. I would actually be very careful about this, as a lot of contract packs already have fairly good support in generic fashion for rescale mods and planet packs with new planets. So trying to add on to that yourself could throw things off or break them completely. Anyway, I'll answer your questions and then give you my personal suggestion on where to go. Let's start with stock, because the stock/Contract Configurator answers are completely different: Stock - Pretty much all the *easy* customizability options are what exists in GameData/Squad/Contracts/Contracts.cfg. Most revolve around weights for different types of things and rewards - I didn't see anything in there for size/distance/altitude related stuff. The hard customizability would be changing anything that's saved in the persistence file for any of the ContractParameters (some may be public members, but most likely aren't). Contract Configurator - See Parameters. There's a lot. And you likely can't change a lot of it via module manager due to Contract Configurator's expression langugage - I could do something like "altitude = @targetBody.Radius() / 2.0" - which isn't module managerable, but already suppports the resizing. Anyway, that being said, what I'd recommend is to apply a scaling factor to the celestial body's mutliplier. All contract rewards and science stuff gets that multiplier applied to it. You can also play with the global funds/reputation/science multipliers (stuff like HighLogic.CurrentGame.Parameters.Career.FundsGainMultiplier) if you want to decouple them a little bit. That way you could figure out a method to get scaled contract funds based on the scaling of planets. Or if you don't support per-planet scaling, then maybe you can do just the career parameter based scaling. Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted January 12, 2016 Share Posted January 12, 2016 3 minutes ago, nightingale said: You've actually asked a really tricky question. I would actually be very careful about this, as a lot of contract packs already have fairly good support in generic fashion for rescale mods and planet packs with new planets. So trying to add on to that yourself could throw things off or break them completely. Anyway, I'll answer your questions and then give you my personal suggestion on where to go. Let's start with stock, because the stock/Contract Configurator answers are completely different: Stock - Pretty much all the *easy* customizability options are what exists in GameData/Squad/Contracts/Contracts.cfg. Most revolve around weights for different types of things and rewards - I didn't see anything in there for size/distance/altitude related stuff. The hard customizability would be changing anything that's saved in the persistence file for any of the ContractParameters (some may be public members, but most likely aren't). Contract Configurator - See Parameters. There's a lot. And you likely can't change a lot of it via module manager due to Contract Configurator's expression langugage - I could do something like "altitude = @targetBody.Radius() / 2.0" - which isn't module managerable, but already suppports the resizing. Anyway, that being said, what I'd recommend is to apply a scaling factor to the celestial body's mutliplier. All contract rewards and science stuff gets that multiplier applied to it. You can also play with the global funds/reputation/science multipliers (stuff like HighLogic.CurrentGame.Parameters.Career.FundsGainMultiplier) if you want to decouple them a little bit. That way you could figure out a method to get scaled contract funds based on the scaling of planets. Or if you don't support per-planet scaling, then maybe you can do just the career parameter based scaling. Actually I don't really want to change the rewards or difficulty settings. I just want to make sure that things which are supposed to be in orbit are not spawned inside the atmosphere or inside the planet Stuff like that Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 12, 2016 Share Posted January 12, 2016 (edited) I'm having a problem with the following code: CONTRACT_TYPE { name = FirstImpact_@/STGUnmannedMissions:UnmannedMissionPlanet group = STGUnmannedMissions .... } CONTRACT_TYPE { name = Targeted @STGUnmannedMissions:UnmannedMissionPlanet Impact group = STGUnmannedMissions .... REQUIREMENT { name = CompleteContract_3 type = CompleteContract contractType = FirstImpact_@/STGUnmannedMissions:UnmannedMissionPlanet } } I'm getting the following error: [ERR 10:52:36.328] ContractConfigurator.CompleteContractRequirement: contractType 'FirstImpact_' must either be a Contract sub-class or ContractConfigurator contract type I have tried variations without the "/" in the "@/"; ie: "@STDUnmannedMissions", but still get the same error. I'm wondering if the contractType can't parse variables? Thanks in advance Edited January 12, 2016 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
nightingale Posted January 12, 2016 Author Share Posted January 12, 2016 7 minutes ago, Sigma88 said: Actually I don't really want to change the rewards or difficulty settings. I just want to make sure that things which are supposed to be in orbit are not spawned inside the atmosphere or inside the planet Stuff like that I know the stock contracts for recovery have a lot of smarts (it looks at planet radius, atmosphere depth and the highest peak), so you're set there. For Contract Configurator stuff... I'd just trust to the authors as Contract Configurator should give them the tools they need to avoid hard-coding altitudes and such. 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.