JonnyOThan Posted May 14, 2022 Share Posted May 14, 2022 5 hours ago, Lijazos said: This mod destroyed my save. Awesome. Right after finishing the KSC Tour, I got the Hotel contract. Now, as stated in messages above, I can't switch to on orbit vessels, the camera on launch pad vessels is broken and the vessel is completely uncontrollable. Please someone tell me there is a way to fix this hell. Declining the remaining contracts doesn't fix it. You should probably post your log files for issues like that. Quote Link to comment Share on other sites More sharing options...
WelshSteW Posted May 15, 2022 Share Posted May 15, 2022 It's also been discussed in this thread previously. Quote Link to comment Share on other sites More sharing options...
flart Posted August 4, 2022 Share Posted August 4, 2022 (edited) Can I know what vessel spams this CONTRACT_TYPE 'Tourism_Base' error ? Spoiler [ERR 14:14:05.713] ContractConfigurator.VesselParameterGroupFactory: CONTRACT_TYPE 'Tourism_Base', PARAMETER 'VesselParameterGroup' of type 'VesselParameterGroup': Error parsing vessel [EXC 14:14:05.716] NullReferenceException: Object reference not set to an instance of an object ContractConfigurator.Extensions+<>c__DisplayClass5_1.<GetHashes>b__1 (ProtoPartSnapshot childPart) (at <3f35055287d9495681be8185e69ae773>:0) System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) ContractConfigurator.Extensions+<GetHashes>d__5.MoveNext () (at <3f35055287d9495681be8185e69ae773>:0) System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) ContractConfigurator.ContractVesselTracker+VesselInfo..ctor (Vessel v) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ContractVesselTracker.AssociateVessel (System.String key, Vessel vessel) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.VesselParser.ConvertType (Vessel value) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T]._ConvertType (U value) (at <3f35055287d9495681be8185e69ae773>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ConvertType (System.Object value, System.Type type) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].CompleteIdentifierParsing (U value) (at <3f35055287d9495681be8185e69ae773>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseSpecialIdentifier (ContractConfigurator.ExpressionParser.BaseParser+Token token) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseSimpleStatement[TResult] () (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatementInner[TResult] () (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatement[TResult] () (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <3f35055287d9495681be8185e69ae773>:0) Rethrow as Exception: Error parsing statement. Error occurred near '*': @/targetVessel ..............* <-- HERE ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ExecuteExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) (at <3f35055287d9495681be8185e69ae773>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0) ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Boolean allowExpression) (at <3f35055287d9495681be8185e69ae773>:0) ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Action`1[T] setter, ContractConfigurator.IContractConfiguratorFactory obj, T defaultValue, System.Func`2[T,TResult] validation) (at <3f35055287d9495681be8185e69ae773>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) 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, Func`2) ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1) System.Reflection.MethodBase:Invoke(Object, Object[]) ContractConfigurator.<UpdateNonDeterministicValuesIterator>d__31:MoveNext() System.Linq.ConcatIterator`1:MoveNext() ContractConfigurator.<GenerateContract>d__33:MoveNext() ContractConfigurator.<ContractEnumerator>d__32:MoveNext() ContractConfigurator.ContractPreLoader:Update() ksp.log: https://file.io/9fOu2EJ3h9pb Edited August 4, 2022 by flart Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 4, 2022 Share Posted August 4, 2022 36 minutes ago, flart said: 'Tourism_Base' error ? The @/targetVessel parameter check is based on the following data object; DATA { type = Vessel uniquenessCheck = CONTRACT_ACTIVE title = Must have a base with sufficient empty space targetVessel = AllVessels().Where(v => v.VesselType() == Base).Where(v => HomeWorld().Children().Contains(v.CelestialBody()) && v.IsLanded() && v.EmptyCrewSpace() > @Tourism:touristCount).Random() } If the check for empty crew space on a base on the moons of the homeworld is not greater than the tourism count, then the variable targetVessel will be null and generally a Null Reference Exception will be thrown. This will continue until the the uniqueness check is completed successfully. Do you have any bases on the moons that have empty crew space greater than your tourism count? You can fined the value by searching the persistent.sfs file for the game and searching for the PersistentDataStore section and seeing what the tourism count is. Quote Link to comment Share on other sites More sharing options...
flart Posted August 4, 2022 Share Posted August 4, 2022 4 hours ago, Caerfinon said: ... bases on the moons .... PersistentDataStore ... Moons vessels: Spoiler SCENARIO { name = PersistentDataStore scene = 7, 8, 5 DATA { ourHome = CelestialBody:Kerbin SatList = List<VesselIdentifier>:[ Vesselbf769d9c-62f5-42a1-82e6-544f6a601e09, Vessel0ab2365e-72f9-424f-ae1e-e56b1f69dd9e ] TouristCount = Double:111 TouristLowOrbitCount = Double:20 firstSpaceStation = List<VesselIdentifier>:[ Vesseld04addb6-c27e-44a7-a6d3-bf311449a7d2 ] TouristStationCount = Double:13 Tourism_HotelConstruction = Double:0 BaseConstruction = Boolean:False TouristAsteroidCount = Double:55 Tourism_Hotels = List<VesselIdentifier>:[ Vessel5fc38c0d-2235-4b30-af70-b45540a487e5 ] TouristAttractionCount = Double:12 } } I'm not sure, TouristCount looks like just global counter of all tourists, why compare EmptyCrewSpace to that? Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 4, 2022 Share Posted August 4, 2022 12 minutes ago, flart said: why compare EmptyCrewSpace to that? Actually, the value Tourist Count in the persistent data store is never really referenced for lookup. It just has the same name as the variable at the Group level data from the tourism.cfg file. According to that calculation touristcount is calculated as a random number between 1-4. DATA { type = int hidden = true maxTourists = @hasFourSeatParts ? 4 : @hasTwoSeatParts ? 2 : 1 touristCount = Random(1, @maxTourists) } If possible could you turn on debugging for Contract Configurator. See the file "Kerbal Space Program\GameData\ContractConfigurator\ContractConfigurator.cfg.default" edit the file set al logLevel = VERBOSE save and remove the .default and reload KSP Then check the directory Kerbal Space Program\GameData\ContractConfigurator\log\Tourism\ and post the file Tourism_Base.log Also looking at the section in persistent.sfs that starts with SCENARIO { name = ContractSystem You should be able to see that data associated with the active Bases contract by searching for subtype = Tourism_Base. You can then look at the current values of @/targetVessel is. Debugging contracts is pretty labour intensive. Quote Link to comment Share on other sites More sharing options...
flart Posted August 4, 2022 Share Posted August 4, 2022 3 hours ago, Caerfinon said: post the file Tourism_Base.log https://pastebin.com/B29steSu 3 hours ago, Caerfinon said: section in persistent.sfs save file https://file.io/M6D1TQ8JLc2q 3 hours ago, Caerfinon said: by searching for subtype = Tourism_Base can't find Tourism_Base in the save file ksp.log : https://file.io/NJDEsES8k6MN Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 5, 2022 Share Posted August 5, 2022 1 hour ago, flart said: can't find Tourism_Base in the save file Well all this data makes things a little clearer. the Base contract is failing during evaluation by Contract configurator. It never makes it into the persistent.sfs file because it doesn't appear to be offered. Your base on Minmus, does it have 4 or more empty crew spots? The debug log shows that the Tourism:touristCount can be evaluated from 1 -4 but the initial load has the target vessel evaluated as null. The errors in the ksp.log shows the null exception gets thrown every time contract configurator tries to offer new contracts indicating that the evaluation is returning no value targetVessel = AllVessels().Where(v => v.VesselType() == Base).Where(v => HomeWorld().Children().Contains(v.CelestialBody()) && v.IsLanded() && v.EmptyCrewSpace() > @Tourism:touristCount).Random() So either the empty crew space is always evaluating lower than the @Tourism:touristcount or the syntax of the evaluation is failing in some other way. I doubt that it's always the former unless all your bases are currently full. On the other hand if the evaluation syntax is the problem then it would need to be reworked to obtain the answer in a different way with a safety check that prevents a null value from being copied into a Vessel parameter. Or simply delete the base.cfg file and the problem is swept under the rug. Quote Link to comment Share on other sites More sharing options...
flart Posted August 5, 2022 Share Posted August 5, 2022 9 hours ago, Caerfinon said: does it have 4 or more empty crew spots? yes, it has 33 empty slots, and no crew as it is now. Could that be a problem? Spoiler Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 5, 2022 Share Posted August 5, 2022 Just now, flart said: Could that be a problem? No. If the evaluation ran correctly then it would compare 33 available spaces is greater than the random 1 to 4 tourists possible. So it seems be tied to the syntax related to the AllVessels().Where(v => v.VesselType() == Base).Where(v => HomeWorld().Children().Contains(v.CelestialBody()) part of the evaluation. This attempts to create a list of all bases that are on any of the the moons of the homeworld. I suspect that this is the piece that is returning a null value and needs to be rewritten another way. This might work targetVessel = AllVessels().Where(v => v.VesselType() == Base && v.CelestialBody().Parent() == v.CelestialBody().Homeworld() && v.IsLanded() && v.EmptyCrewSpace() > @Tourism:touristCount).Random() no guarantees however. I don't have a install of KSP where I can test it. Quote Link to comment Share on other sites More sharing options...
flart Posted August 7, 2022 Share Posted August 7, 2022 On 8/5/2022 at 2:40 PM, Caerfinon said: targetVessel = AllVessels().Where(v => v.VesselType() == Base && v.CelestialBody().Parent() == v.CelestialBody().Homeworld() && v.IsLanded() && v.EmptyCrewSpace() > @Tourism:touristCount).Random() It is fixed the exception Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 7, 2022 Share Posted August 7, 2022 12 minutes ago, flart said: It is fixed the exception Good to hear! Fly safe. Quote Link to comment Share on other sites More sharing options...
Axelord FTW Posted August 26, 2022 Share Posted August 26, 2022 Investor tour contract borked the hella out the heck of a save. About 12 hours old in all, but still. Will try to work around the problem, keeping better backups along the way. I do like the mod but that was not a pleasant surprise. Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted August 26, 2022 Share Posted August 26, 2022 6 hours ago, Axelord FTW said: Investor tour contract borked the hella out the heck of a save. A common issue. Some useful workaround information starting at this post Quote Link to comment Share on other sites More sharing options...
Axelord FTW Posted August 28, 2022 Share Posted August 28, 2022 (edited) On 5/17/2021 at 9:00 PM, Kerbex said: Hey, I know it's been a few. I did try the crew transfer, but I still ended up borking the save file completing the investor tour. The only solution I've found so far is to do the investor tour, do not recover vessel or switch scenes from the investor kerbal, wait for the game to save (check in alt+f12), hit esc, quit to main menu, load the save, accept whichever casino or hotel contract (while the null refs are being spammed), wait for the game to save, quit the game completely and then reload it. So far that worked. Alright, here are the steps I took after a few other things didn't pan out. Any number (or combination) of these might do the trick for you. Or not. My game is thick-bone-modded, so YMMV. 1. From the KSC, I recovered the (hotel) investor I wasn't gonna use. 2. Walked the Casino investor to all the prescribed locations at 12x phys warp. 3. For some reasons, as soon as the contract was completed, the investor was yeeted by the kraken and disappeared in a puff of smoke. I have an inkling that whatever did this is related to the stuck-camera bug. 4. Quit to main menu directly. 5. Opened the game, loaded the save up. 6. Accepted the Build a Casino contract. Quit again. 7. Reopened the game, loaded the save once more. And now everything seems fine. I declined the second coming of the investor tour contract at this point too. Kind of a shame how getting this mod to not crap the bed has more to do with wizardry than anything else. Edited August 28, 2022 by Axelord FTW Quote Link to comment Share on other sites More sharing options...
dan1ell1ma Posted December 13, 2022 Share Posted December 13, 2022 hey @linuxgurugamer can you update this mod? Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 14, 2022 Share Posted December 14, 2022 8 hours ago, dan1ell1ma said: hey @linuxgurugamer can you update this mod? No updates needed Quote Link to comment Share on other sites More sharing options...
dan1ell1ma Posted December 14, 2022 Share Posted December 14, 2022 12 hours ago, linuxgurugamer said: No updates needed Thanks, you are amazing. Quote Link to comment Share on other sites More sharing options...
BrobDingnag Posted May 27 Share Posted May 27 I apologize for not going through 28 pages, but has any thought been put toward expanding these generic tourism contracts to bodies outside the Kerbin system? Taking tourists/colonists/astronaut candidates to Duna and beyond (for even greater monetary reward... or granting you one, two, three, four, or five star astronauts for free immediately upon their return) would be amazing. I do multi-moon flyby/landing missions while I wait for my real missions to get to their locations, but it's just something to "fill the time" and has become routine (which is great to think about from a real-world perspective!) now that I've maximally optimized my tourism vessels for minimum cost and maximum monetary return. So a further challenge for tourism beyond Kerbin would be great! Quote Link to comment Share on other sites More sharing options...
Commissar Posted September 21 Share Posted September 21 investor tour... how TF are you supposed to do this? the investors just spawn outside the SPH and are not controllable, so you cannot get them in a rover or anything. Quote Link to comment Share on other sites More sharing options...
WelshSteW Posted September 21 Share Posted September 21 8 hours ago, Commissar said: investor tour... how TF are you supposed to do this? the investors just spawn outside the SPH and are not controllable, so you cannot get them in a rover or anything. It's been a while since I did this contract, but I think they are controllable. I made a vehicle, took it out with a pilot, drove to the investors, then you can switch to one of them and get them into the vehicle for the tour. Quote Link to comment Share on other sites More sharing options...
GlitchyTypo Posted October 12 Share Posted October 12 Been having an error where after completing the hotel contract in space, the autogenerated "deliver x tourists" appears. But after completing that contract, no additional "deliver tourists" or "return tourists" contracts are shown. If I force the hotel build contract again I can force it to generate the same mission again, but this is not a viable solution. Additionally, the "must have a casino with 10 empty spaces is unmet, despite it having more than said amount of free space Any help or tips are appreciated Quote Link to comment Share on other sites More sharing options...
TrapMagic Posted November 4 Share Posted November 4 On 8/7/2022 at 6:37 PM, flart said: It is fixed the exception @linuxgurugamer "no updates needed", but looks like the contract has some edge cases tho. Guess this pack could appreciate some kind of refactor. at least that line already needs to be applied as an hotfix? 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.