inigma Posted March 24, 2016 Share Posted March 24, 2016 Where and how do I use the Print() method to convert a double into a nice string such as 10,000 funds? DATA { type = double membershipBalance = Round( StartingFunds() * 0.25 ) loan = Round( StartingFunds() / 2 ) loanPayback = 0 - Round( @loan + (@loan * 0.35) ) interest = Round( @loan * 0.35 ) } I want to reference @/loan as a string usable in the Duration parameter text: PARAMETER { name = Duration type = Duration duration = 30d preWaitText = √@/loan loan duration: waitingText = Your √@/loan loan is due in: completionText = Your √@/loan loan is due! } But currently the √ doesn't display in the text, and the format is 10000 rather than √10,000. Thoughts? Quote Link to comment Share on other sites More sharing options...
Noobton Posted March 25, 2016 Share Posted March 25, 2016 I have a contract to send 2 kerbals to orbit, but when I launch my space station it got associated to the station and now it wants me to get land it and it won't recognize new vessels, is there any way to reset this association? Quote Link to comment Share on other sites More sharing options...
eberkain Posted March 25, 2016 Share Posted March 25, 2016 1 hour ago, Noobton said: I have a contract to send 2 kerbals to orbit, but when I launch my space station it got associated to the station and now it wants me to get land it and it won't recognize new vessels, is there any way to reset this association? Yeah I've noticed that too for the solo orbiter and duo orbiter missions, I have just been going into the debug menu and forcing the mission to complete. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 25, 2016 Author Share Posted March 25, 2016 1 hour ago, Noobton said: I have a contract to send 2 kerbals to orbit, but when I launch my space station it got associated to the station and now it wants me to get land it and it won't recognize new vessels, is there any way to reset this association? Check the ContractVesselTracker section of the save file and delete the appropriate lines (with care!). Depending on the contract, that may put it in an uncompletable state though, so you may be better off reporting the issue on the thread of the appropriate contract pack (and perhaps force-completing it as @eberkain suggested). 3 hours ago, inigma said: Where and how do I use the Print() method to convert a double into a nice string such as 10,000 funds? <snip> But currently the √ doesn't display in the text, and the format is 10000 rather than √10,000. Thoughts? You should just be able to do @/loan.Print() in that expression. Also, for most places that KSP renders the funds checkmark, it's internally the £ symbol to represent funds (so try that one instead). Quote Link to comment Share on other sites More sharing options...
Noobton Posted March 25, 2016 Share Posted March 25, 2016 I'll do that thanks. Quote Link to comment Share on other sites More sharing options...
thedmbarlow Posted March 25, 2016 Share Posted March 25, 2016 14 hours ago, nightingale said: You're still missing information that I need (the actual exception). Please just post the entire log (via dropbox or another file service). Sure. https://www.dropbox.com/s/vz1wer80hm9s8zx/KSP.log?dl=0 Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 25, 2016 Author Share Posted March 25, 2016 7 minutes ago, thedmbarlow said: Sure. https://www.dropbox.com/s/vz1wer80hm9s8zx/KSP.log?dl=0 Ummm.... so if you look at the whole thing, it's this: [ERR 00:41:17.101] ContractConfigurator.PartValidationFactory: CONTRACT_TYPE 'ExodusFirstStation', PARAMETER 'ElectricalGen' of type 'PartValidation': Error parsing part [EXC 00:41:17.112] ArgumentException: 'gigantorXlSolarArray' is not a valid Part. ContractConfigurator.ExpressionParser.PartParser.ParseIdentifier (ContractConfigurator.ExpressionParser.Token token) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseVarOrIdentifier (ContractConfigurator.ExpressionParser.Token token) ContractConfigurator.ExpressionParser.ExpressionParser`1[AvailablePart].ParseSimpleStatement[AvailablePart] () Rethrow as Exception: Error parsing statement. Error occurred near '*': gigantorXlSolarArray ....................* <-- HERE ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) ContractConfigurator.ConfigNodeUtil.ParseSingleValue[AvailablePart] (System.String key, System.String stringValue, Boolean allowExpression) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) ContractConfigurator.ConfigNodeUtil.ParseValue[List`1] (.ConfigNode configNode, System.String key, Boolean allowExpression) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List`1, Func`2) ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List`1) ContractConfigurator.PartValidationFactory:Load(ConfigNode) ContractConfigurator.ParameterFactory:GenerateParameterFactory(ConfigNode, ContractType, ParameterFactory&, ParameterFactory) ContractConfigurator.ParameterFactory:GenerateParameterFactory(ConfigNode, ContractType, ParameterFactory&, ParameterFactory) ContractConfigurator.ContractType:Load(ConfigNode) ContractConfigurator.<LoadContractConfig>d__1e:MoveNext() ContractConfigurator.<ContractConfiguratorReload>d__13:MoveNext() ... which is just a variant on the same problem with parts. Nothing with the debug window (either you didn't have the issue with the debug window this time, or you didn't open the debug window while capturing the log file). Quote Link to comment Share on other sites More sharing options...
thedmbarlow Posted March 25, 2016 Share Posted March 25, 2016 Please try and remember I'm not a programmer. A big part of why I'm doing this entire project is to expand my skillset, so I don't have knowledge that may to you simply be basic stuff. Most of my specific in-context knowledge actually comes from your excellent CC wiki (which I originally didn't like much, fill disclosure), Nightingale. So now that I'm getting a useful output (I don't know how what I changed fixed that!) in the debug window, I've found and fixed the root issue. Many thanks, nightingale. When you initially gave the suggestion, I assumed that the name of the CFG file would work, and that's part of why it seemed to continue. Now that I've fixed that and the contract is loading, however, I have another question. How can I make sure that a contract appears when it's prerequisites are satisfied? Quote Link to comment Share on other sites More sharing options...
Noobton Posted March 25, 2016 Share Posted March 25, 2016 10 hours ago, nightingale said: Check the ContractVesselTracker section of the save file and delete the appropriate lines (with care!). Depending on the contract, that may put it in an uncompletable state though, so you may be better off reporting the issue on the thread of the appropriate contract pack (and perhaps force-completing it as @eberkain suggested). I believe MCE is creating this problem with one of the "Early Career Mode Contract Help Get off feet" contracts, but I'm not sure, is there any way to tell what pack the contract belogs to (I went a little crazy with contract packs)? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 25, 2016 Author Share Posted March 25, 2016 4 hours ago, thedmbarlow said: Please try and remember I'm not a programmer. A big part of why I'm doing this entire project is to expand my skillset, so I don't have knowledge that may to you simply be basic stuff. Most of my specific in-context knowledge actually comes from your excellent CC wiki (which I originally didn't like much, fill disclosure), Nightingale. No worries, I probably should've just asked for the log right from the get-go. 4 hours ago, thedmbarlow said: So now that I'm getting a useful output (I don't know how what I changed fixed that!) in the debug window, I've found and fixed the root issue. Many thanks, nightingale. When you initially gave the suggestion, I assumed that the name of the CFG file would work, and that's part of why it seemed to continue. Now that I've fixed that and the contract is loading, however, I have another question. How can I make sure that a contract appears when it's prerequisites are satisfied? Not easily, you're sort of at the whim of the contract generation system. For testing purposes, the easiest thing is to just go to the debug window (alt-f12), and hit the clear current contracts button on the contracts tab to generate a new set of contracts. 1 hour ago, Noobton said: I believe MCE is creating this problem with one of the "Early Career Mode Contract Help Get off feet" contracts, but I'm not sure, is there any way to tell what pack the contract belogs to (I went a little crazy with contract packs)? You'd have to look at the save file, and possibly the contract configs and figure it out from there. So no easy way. If I had to take a guess it looks like the Advanced Progression contract pack. Quote Link to comment Share on other sites More sharing options...
inigma Posted March 29, 2016 Share Posted March 29, 2016 @nightingale have you gotten a preview release of 1.1 with which to begin preparing CC for 1.1? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 29, 2016 Author Share Posted March 29, 2016 54 minutes ago, inigma said: @nightingale have you gotten a preview release of 1.1 with which to begin preparing CC for 1.1? Based on all the KSPTV activity, the public pre-release is imminent, at which point the KSP 1.1 compatible Contract Configurator will follow shortly. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 30, 2016 Author Share Posted March 30, 2016 (edited) New features and KSP 1.1 release, download is here. This release has caveats though: Most contracts packs use at least some Module Manager, for which the KSP 1.1 update has not yet been released. It's in the early morning for @sarbian, so be patient, try out stock KSP for a day and there should be an update from him soon. RemoteTech support is disabled until RemoteTech gets a KSP 1.1 update. SCANsat support is untested but will probably just work when SCANsat is updated. Stay tuned. Contract Configurator 1.10.0 (for KSP 1.1) Support for KSP 1.1. Contract requirements are now saved to persistence file (fixes issues with "flickering" contracts in mission control). Added VesselValidRequirement to check if a vessel identifier is valid throughout the life of a contract. Added support for PQSCity in expressions. Added CelestialBody.PQSCities(). Fixed backwards compatibility on uniqueness checks (thanks eberkain). Fixed edge case for VesselParameterGroup and completeInSequence (thanks NathanKell and stratochief). Fixed problem with loading pqsCity and targetBody out of order in WaypointGenerator (thanks severedsolo). Edited March 30, 2016 by nightingale Quote Link to comment Share on other sites More sharing options...
NathanKell Posted March 30, 2016 Share Posted March 30, 2016 @nightingale can we have a version with those fixes that is for 1.0.5 as well? Because it's likely a month or two for all of RP-0 to update, given how much there is to do Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 30, 2016 Author Share Posted March 30, 2016 (edited) At the request of @NathanKell, one final KSP 1.0.5 release (unless a major bug crops up). Download here, changelog is very similar to the 1.10.0 release: Contract Configurator 1.9.11 (for KSP 1.0.5) Added VesselValidRequirement to check if a vessel identifier is valid throughout the life of a contract. Added support for PQSCity in expressions. Added CelestialBody.PQSCities(). Fixed backwards compatibility on uniqueness checks (thanks eberkain). Fixed edge case for VesselParameterGroup and completeInSequence (thanks NathanKell and stratochief). Fixed problem with loading pqsCity and targetBody out of order in WaypointGenerator (thanks severedsolo). Edited March 30, 2016 by nightingale Quote Link to comment Share on other sites More sharing options...
eberkain Posted March 30, 2016 Share Posted March 30, 2016 Will contract packs require an update for 1.1, or will they be good as is? Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 30, 2016 Share Posted March 30, 2016 (edited) 36 minutes ago, eberkain said: Will contract packs require an update for 1.1, or will they be good as is? Should be fine as is. Unless we reference one of the PartModules that got changed (or similar). I'm working on bringing my AVC files up to date (I like to hold back on bug fixes when I know there is a release coming). @nightingale - Currently tracking a bug where the start menu lags like hell when CC is installed. At this point cannot verify it's you. Will provide logs when I know more. Edit: Never mind it's not you. Happening on stock install too. Weird that it didn't happen the first time though. Edited March 30, 2016 by severedsolo Quote Link to comment Share on other sites More sharing options...
severedsolo Posted March 30, 2016 Share Posted March 30, 2016 Do we know whether the contract weighting is going to affect CC yet? I seem to remember that CC loads one "contract type" - a "Configurated contract" (or something like that). Is this going to affect the contracts generated by CC, and is there anything we can do to combat it? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 30, 2016 Author Share Posted March 30, 2016 4 minutes ago, severedsolo said: Do we know whether the contract weighting is going to affect CC yet? I seem to remember that CC loads one "contract type" - a "Configurated contract" (or something like that). Is this going to affect the contracts generated by CC, and is there anything we can do to combat it? I've got it set up so that the Contract Configurator contract ignores weighting (so the weight for the "configured contract" won't go up or down). It also has a default relative weight to other contracts based on how many contract groups/types are in the system (which is the exact logic that existed before, it just uses the weight system now). So you should see very little difference for Contract Configurator contracts in 1.1 (of course, if you believe you're seeing otherwise in testing, let me know and I can tweak the numbers or otherwise check it out). Quote Link to comment Share on other sites More sharing options...
StevieC Posted March 30, 2016 Share Posted March 30, 2016 so are all your contract packs ready to use with this new Contract Configurator version? Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 30, 2016 Author Share Posted March 30, 2016 3 minutes ago, StevieC said: so are all your contract packs ready to use with this new Contract Configurator version? Final mission on Anomaly Surveyor likely needs work, RemoteTech needs RemoteTech (naturally). The rest should be fine and will have their threads updated sometime today. Quote Link to comment Share on other sites More sharing options...
narvster Posted March 30, 2016 Share Posted March 30, 2016 (edited) Hey, thanks for the update to 1.1. However, I've got an issue with this where, without contract packs installed, using just the base Contract Configurator for 1.1. I've found when I go into the Mission Control the leave facility button stops working and you're stuck until you kill the process in task manager. I'm not sure if anyone else has the same issue, the only other thing of note I think that could be affecting it is the new ModuleManager.2.6.21.dll which has been released today. Scratch that, I had one contract pack left installed, it broke my save as even when removing the packs and configurator it was still broken. Starting a new save repaired it, good thing I'm just doing disposable saves for now! Module manager download page Edited March 30, 2016 by narvster Quote Link to comment Share on other sites More sharing options...
EldrinFal Posted March 30, 2016 Share Posted March 30, 2016 Hello, I receive an error in game that asked me to post it here. Below is the error: Spoiler Exception occured while loading contract 'Giving Aircraft a Purpose 1.2.2.SSI-Ford': System.OverflowException: Number overflow. at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Double.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Convert.ToDouble (System.String value, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.String.System.IConvertible.ToDouble (IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0 at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfigNodeUtil.ParseSingleValue[Double] (System.String key, System.String stringValue, Boolean allowExpression) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[Double] (.ConfigNode configNode, System.String key, Boolean allowExpression) [0x00000] in <filename unknown>:0 at ContractConfigurator.FundsRequirement.LoadFromPersistence (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 Thanks for your hard work! Quote Link to comment Share on other sites More sharing options...
Brigadier Posted March 30, 2016 Share Posted March 30, 2016 10 minutes ago, EldrinFal said: Hello, I receive an error in game that asked me to post it here. Below is the error: Thanks for posting. As a general rule, it would certainly help if you could provide the mod author with your KSP and mod version number, and maybe a link to your complete output log file. Quote Link to comment Share on other sites More sharing options...
nightingale Posted March 30, 2016 Author Share Posted March 30, 2016 28 minutes ago, EldrinFal said: Hello, I receive an error in game that asked me to post it here. Below is the error: Hide contents Exception occured while loading contract 'Giving Aircraft a Purpose 1.2.2.SSI-Ford': System.OverflowException: Number overflow. at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Double.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Convert.ToDouble (System.String value, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.String.System.IConvertible.ToDouble (IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0 at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfigNodeUtil.ParseSingleValue[Double] (System.String key, System.String stringValue, Boolean allowExpression) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfigNodeUtil.ParseValue[Double] (.ConfigNode configNode, System.String key, Boolean allowExpression) [0x00000] in <filename unknown>:0 at ContractConfigurator.FundsRequirement.LoadFromPersistence (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 Thanks for your hard work! Ah, that's a problem with some of the new functionality in 1.10.0. It's save-breaking, so I'll release a fix right away. To fix your save, you'll need to go in and find the REQUIREMENT node with the line maxFunds = <somereallybignumber> and just change it to maxFunds = 10000000. 9 minutes ago, Brigadier said: Thanks for posting. As a general rule, it would certainly help if you could provide the mod author with your KSP and mod version number, and maybe a link to your complete output log file. Although this is always good advice, the stack trace is usually enough info for Contract Configurator bugs. --- New release to unbreak GAP in KSP 1.1. Download here. Contract Configurator 1.10.1 Fixed exception on requirement load of FundsRequirement (thanks EldrinFal). 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.