AccidentalDisassembly Posted May 26, 2020 Share Posted May 26, 2020 (edited) Been trying to make a simple BDA contract that spawns a vessel that you need to go kill. However, I can't seem to get the thing to spawn, and when it tries to spawn, there's apparently a cascade of errors in the log. Here's the contract config: Spoiler CONTRACT_TYPE { name = BDATestContract1 title = BDA Test Contract 1 description = A single fighter aircraft from a rival Kerbal Space Program is inbound to the KSC! Stop it before it can shoot down any of our rockets that don't explode on the pad. Our tracking suggests it's about 20km away and closing very slowly. notes = Intercept and destroy the aircraft. genericTitle = Intercept an Enemy genericDescription = Our early warning signal fires have detected a threat. synopsis = We want you to blow up a plane. completedMessage = Target eliminated! Thank goodness. minExpiry = 1.0 maxExpiry = 2.0 cancellable = true declinable = true autoAccept = false prestige = Trivial targetBody = Kerbin maxCompletions = 0 // 0 means unlimited maxSimultaneous = 1 rewardScience = 1 rewardReputation = 3 rewardFunds = 12500 PARAMETER //Ensure the vessel is manned { name = HasCrew type = HasCrew trait = Pilot minCrew = 1 title = Has a pilot } PARAMETER //Ensure it's a flying vehicle { name = ReachState type = ReachState minTerrainAltitude = 100 situation = FLYING title = Takes off and flies } PARAMETER //Have at least one weapon { name = PartValidation type = PartValidation partModule = ModuleWeapon title = Can shoot things } PARAMETER { name = TargetDestroyed type = TargetDestroyed vessel = LightInterceptorToKill } BEHAVIOUR { name = SpawnVessel type = SpawnVessel deferVesselCreation = true VESSEL { name = LightInterceptorToKill craftURL = ContractPacks/SpaceForce/Vessels/BDA_Light_Stumpy.craft //flagURL = ContractPacks/SpaceForce/Flags/x-KSP vesselType = Ship owned = false pqsCity = KSC pqsOffset = -19264.6381413034, 3470.53135633345, 2500 heading = 95.0 CREW { count = 1 addToRoster = false } } } } Here's the errors from the log: Spoiler [ERR 14:40:59.844] Exception handling event onGameSceneLoadRequested in class SpawnVessel:System.NullReferenceException: Object reference not set to an instance of an object at ProtoPartModuleSnapshot..ctor (PartModule module) [0x00031] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) [0x0033f] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () [0x003f9] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) [0x00014] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at EventData`1[T].Fire (T data) [0x000b0] in <55ba45dc3a43403382024deac8dcd0be>:0 [EXC 14:40:59.847] NullReferenceException: Object reference not set to an instance of an object ProtoPartModuleSnapshot..ctor (PartModule module) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) (at <55ba45dc3a43403382024deac8dcd0be>:0) ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) EventData`1[T].Fire (T data) (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`1:Fire(GameScenes) HighLogic:SetLoadSceneEventsAndFlags(GameScenes, Boolean) HighLogic:LoadScene(GameScenes) FlightDriver:StartAndFocusVessel(String, Int32) KSP.UI.Screens.KSCVesselMarkers:FlyVessel(Vessel) <DelayedCallback>d__4`1:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) [LOG 14:40:59.850] [UIMasterController]: HideUI [LOG 14:40:59.858] [HighLogic]: =========================== Scene Change : From SPACECENTER to FLIGHT (Async) ===================== [ERR 14:40:59.973] Module RadarWarningReceiver threw during OnStart: System.NullReferenceException: Object reference not set to an instance of an object at BDArmory.Modules.RadarWarningReceiver.OnStart (PartModule+StartState state) [0x00178] in <5e78411038524e878e91ad3c520ea848>:0 at Part.ModulesOnStart () [0x00120] in <55ba45dc3a43403382024deac8dcd0be>:0 [EXC 14:40:59.975] NullReferenceException: Object reference not set to an instance of an object BDArmory.Modules.ModuleWingCommander+<StartupRoutine>d__15.MoveNext () (at <5e78411038524e878e91ad3c520ea848>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) BDArmory.Modules.ModuleWingCommander:OnStart(StartState) Part:ModulesOnStart() <Start>d__297:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) [EXC 14:40:59.979] NullReferenceException: Object reference not set to an instance of an object Part+<Start>d__297.MoveNext () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) [EXC 14:40:59.983] NullReferenceException: Object reference not set to an instance of an object Part+<Start>d__297.MoveNext () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) [ERR 14:40:59.996] Module ModuleWheelBase threw during OnStart: System.NullReferenceException: Object reference not set to an instance of an object at ModuleWheelBase.ActionUIUpdate () [0x0008f] in <55ba45dc3a43403382024deac8dcd0be>:0 at ModuleWheelBase.OnStart (PartModule+StartState state) [0x00252] in <55ba45dc3a43403382024deac8dcd0be>:0 at Part.ModulesOnStart () [0x00120] in <55ba45dc3a43403382024deac8dcd0be>:0 Anyone able to tell what I'm doing wrong, by chance? KSP 1.9.1 with the latest release of CC... Edited May 26, 2020 by AccidentalDisassembly Quote Link to comment Share on other sites More sharing options...
Morphisor Posted May 26, 2020 Share Posted May 26, 2020 15 hours ago, kirmie44 said: Hello. I'm having a glitch where all my contracts completely reset. Like a completely empty archive and I get the "leave the launch pad" mission again. I don't know what's causing it but I this of a contract pack is my best guess. KSP Log: https://drive.google.com/file/d/1hzfoj7xVsr-0k0vROBqV08CLG-sZQndK/view?usp=sharing Reveal hidden contents [ERR 23:22:16.096] Input is null for field 'agent' in config node 'CONTRACT' at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at ConfigNode.AddValue (System.String name, System.String value) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Contracts.Contract.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Contracts.ContractSystem.OnSave (ConfigNode gameNode) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioModule.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoScenarioModule..ctor (ScenarioModule module) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.UpdateModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Game.Updated (GameScenes startSceneOverride) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at KSCPauseMenu.<draw>b__20_9 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.OptionSelected () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.<Create>b__23_1 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.UI.Button.Press () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 [ERR 23:22:16.097] Input is null for field 'agent' in config node 'CONTRACT' at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at ConfigNode.AddValue (System.String name, System.String value) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Contracts.Contract.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.ContractPreLoader.OnSave (ConfigNode node) [0x00000] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ScenarioModule.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoScenarioModule..ctor (ScenarioModule module) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.UpdateModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Game.Updated (GameScenes startSceneOverride) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at KSCPauseMenu.<draw>b__20_9 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.OptionSelected () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.<Create>b__23_1 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.UI.Button.Press () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 [ERR 23:22:16.098] Input is null for field 'agent' in config node 'CONTRACT' at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at ConfigNode.AddValue (System.String name, System.String value) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Contracts.Contract.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.ContractPreLoader.OnSave (ConfigNode node) [0x00000] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ScenarioModule.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoScenarioModule..ctor (ScenarioModule module) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.UpdateModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Game.Updated (GameScenes startSceneOverride) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at KSCPauseMenu.<draw>b__20_9 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.OptionSelected () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.<Create>b__23_1 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.UI.Button.Press () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 [ERR 23:22:16.099] Input is null for field 'agent' in config node 'CONTRACT' at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at ConfigNode.AddValue (System.String name, System.String value) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Contracts.Contract.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.ContractPreLoader.OnSave (ConfigNode node) [0x00000] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ScenarioModule.Save (ConfigNode node) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoScenarioModule..ctor (ScenarioModule module) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.UpdateModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at Game.Updated (GameScenes startSceneOverride) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at KSCPauseMenu.<draw>b__20_9 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.OptionSelected () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at DialogGUIButton.<Create>b__23_1 () [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <5aeafee3fea24f37abd1315553f2cfa6>:0 at UnityEngine.UI.Button.Press () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <e7863072d20d4124957779539fa3ff58>:0 The only obvious thing I can see in your posted log is the missing agent error, which was mentioned, including a solution, on the previous page of this thread. 1 hour ago, AccidentalDisassembly said: Been trying to make a simple BDA contract that spawns a vessel that you need to go kill. However, I can't seem to get the thing to spawn, and when it tries to spawn, there's apparently a cascade of errors in the log. Here's the contract config: Hide contents CONTRACT_TYPE { name = BDATestContract1 title = BDA Test Contract 1 description = A single fighter aircraft from a rival Kerbal Space Program is inbound to the KSC! Stop it before it can shoot down any of our rockets that don't explode on the pad. Our tracking suggests it's about 20km away and closing very slowly. notes = Intercept and destroy the aircraft. genericTitle = Intercept an Enemy genericDescription = Our early warning signal fires have detected a threat. synopsis = We want you to blow up a plane. completedMessage = Target eliminated! Thank goodness. minExpiry = 1.0 maxExpiry = 2.0 cancellable = true declinable = true autoAccept = false prestige = Trivial targetBody = Kerbin maxCompletions = 0 // 0 means unlimited maxSimultaneous = 1 rewardScience = 1 rewardReputation = 3 rewardFunds = 12500 PARAMETER //Ensure the vessel is manned { name = HasCrew type = HasCrew trait = Pilot minCrew = 1 title = Has a pilot } PARAMETER //Ensure it's a flying vehicle { name = ReachState type = ReachState minTerrainAltitude = 100 situation = FLYING title = Takes off and flies } PARAMETER //Have at least one weapon { name = PartValidation type = PartValidation partModule = ModuleWeapon title = Can shoot things } PARAMETER { name = TargetDestroyed type = TargetDestroyed vessel = LightInterceptorToKill } BEHAVIOUR { name = SpawnVessel type = SpawnVessel deferVesselCreation = true VESSEL { name = LightInterceptorToKill craftURL = ContractPacks/SpaceForce/Vessels/BDA_Light_Stumpy.craft //flagURL = ContractPacks/SpaceForce/Flags/x-KSP vesselType = Ship owned = false pqsCity = KSC pqsOffset = -19264.6381413034, 3470.53135633345, 2500 heading = 95.0 CREW { count = 1 addToRoster = false } } } } Here's the errors from the log: Reveal hidden contents [ERR 14:40:59.844] Exception handling event onGameSceneLoadRequested in class SpawnVessel:System.NullReferenceException: Object reference not set to an instance of an object at ProtoPartModuleSnapshot..ctor (PartModule module) [0x00031] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) [0x0033f] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () [0x003f9] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) [0x00014] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at EventData`1[T].Fire (T data) [0x000b0] in <55ba45dc3a43403382024deac8dcd0be>:0 [EXC 14:40:59.847] NullReferenceException: Object reference not set to an instance of an object ProtoPartModuleSnapshot..ctor (PartModule module) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) (at <55ba45dc3a43403382024deac8dcd0be>:0) ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) EventData`1[T].Fire (T data) (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`1:Fire(GameScenes) HighLogic:SetLoadSceneEventsAndFlags(GameScenes, Boolean) HighLogic:LoadScene(GameScenes) FlightDriver:StartAndFocusVessel(String, Int32) KSP.UI.Screens.KSCVesselMarkers:FlyVessel(Vessel) <DelayedCallback>d__4`1:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) [LOG 14:40:59.850] [UIMasterController]: HideUI [LOG 14:40:59.858] [HighLogic]: =========================== Scene Change : From SPACECENTER to FLIGHT (Async) ===================== [ERR 14:40:59.973] Module RadarWarningReceiver threw during OnStart: System.NullReferenceException: Object reference not set to an instance of an object at BDArmory.Modules.RadarWarningReceiver.OnStart (PartModule+StartState state) [0x00178] in <5e78411038524e878e91ad3c520ea848>:0 at Part.ModulesOnStart () [0x00120] in <55ba45dc3a43403382024deac8dcd0be>:0 [EXC 14:40:59.975] NullReferenceException: Object reference not set to an instance of an object BDArmory.Modules.ModuleWingCommander+<StartupRoutine>d__15.MoveNext () (at <5e78411038524e878e91ad3c520ea848>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) BDArmory.Modules.ModuleWingCommander:OnStart(StartState) Part:ModulesOnStart() <Start>d__297:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) [EXC 14:40:59.979] NullReferenceException: Object reference not set to an instance of an object Part+<Start>d__297.MoveNext () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) [EXC 14:40:59.983] NullReferenceException: Object reference not set to an instance of an object Part+<Start>d__297.MoveNext () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) [ERR 14:40:59.996] Module ModuleWheelBase threw during OnStart: System.NullReferenceException: Object reference not set to an instance of an object at ModuleWheelBase.ActionUIUpdate () [0x0008f] in <55ba45dc3a43403382024deac8dcd0be>:0 at ModuleWheelBase.OnStart (PartModule+StartState state) [0x00252] in <55ba45dc3a43403382024deac8dcd0be>:0 at Part.ModulesOnStart () [0x00120] in <55ba45dc3a43403382024deac8dcd0be>:0 Anyone able to tell what I'm doing wrong, by chance? KSP 1.9.1 with the latest release of CC... Try adding a height variable to the vessel parameter within the spawn behaviour; might be spawn location issue. Also, try setting deferVesselCreation to false instead - according to the docs, this function may be buggy if set to true. Quote Link to comment Share on other sites More sharing options...
AccidentalDisassembly Posted May 26, 2020 Share Posted May 26, 2020 2 hours ago, Morphisor said: The only obvious thing I can see in your posted log is the missing agent error, which was mentioned, including a solution, on the previous page of this thread. Try adding a height variable to the vessel parameter within the spawn behaviour; might be spawn location issue. Also, try setting deferVesselCreation to false instead - according to the docs, this function may be buggy if set to true. Hmmm, nothing seemed to work - I even created my own agent, just in case, complete with icons and whatnot. Unless it was set to deferVesselCreation = true, I could not even accept the contract - clicking on the green check mark at first caused a slight pause (but didn't accept the contract), then clicking on accept a second time made the contract disappear from the offered list, but not appear in the active list. Changing it back to deferVesselCreation = true allowed accepting the contract, but the vessel still doesn't spawn. I tried spawning using lat = X, lon = <number>, height = whatever, too; no dice. Made a new craft called SpawnTester, simply a drone core, battery, and some structural parts/wings, and that produced a similar error (although it did not then also cascade into BDArmory stuff, it seems): Spoiler [LOG 18:39:50.109] SpawnTester loaded! [ERR 18:39:50.113] Exception handling event onGameSceneLoadRequested in class SpawnVessel:System.NullReferenceException: Object reference not set to an instance of an object at ProtoPartModuleSnapshot..ctor (PartModule module) [0x00031] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) [0x0033f] in <55ba45dc3a43403382024deac8dcd0be>:0 at ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 at ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () [0x003f9] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) [0x00014] in <43a2e7cbd59545c6b9206fcd382ecb64>:0 at EventData`1[T].Fire (T data) [0x000b0] in <55ba45dc3a43403382024deac8dcd0be>:0 [EXC 18:39:50.117] NullReferenceException: Object reference not set to an instance of an object ProtoPartModuleSnapshot..ctor (PartModule module) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) (at <55ba45dc3a43403382024deac8dcd0be>:0) ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) (at <55ba45dc3a43403382024deac8dcd0be>:0) ContractConfigurator.Behaviour.SpawnVessel.CreateVessels () (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) ContractConfigurator.Behaviour.SpawnVessel.OnGameSceneLoad (GameScenes gameScene) (at <43a2e7cbd59545c6b9206fcd382ecb64>:0) EventData`1[T].Fire (T data) (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`1:Fire(GameScenes) HighLogic:SetLoadSceneEventsAndFlags(GameScenes, Boolean) HighLogic:LoadScene(GameScenes) FlightDriver:StartWithNewLaunch(String, String, String, VesselCrewManifest) LaunchSiteFacility:launchVessel() PreFlightCheck:Complete() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:runNextTest() PreFlightCheck:RunTests() LaunchSiteFacility:launchChecks() LaunchSiteFacility:shipSelected(String, String, VesselCrewManifest) KSP.UI.Screens.VesselSpawnDialog:LaunchSelectedVessel() KSP.UI.Screens.VesselSpawnDialog:onPipelineFinished(ConfigNode, Callback) KSP.UI.Screens.VesselSpawnDialog:<ConfirmLaunch>b__129_0(ConfigNode) KSPUpgradePipeline:Process(ConfigNode, String, LoadContext, Callback`1, Callback`2) KSP.UI.Screens.VesselSpawnDialog:ConfirmLaunch() KSP.UI.Screens.VesselSpawnDialog:ButtonLaunch() UnityEngine.EventSystems.EventSystem:Update() [LOG 18:39:50.120] [UIMasterController]: HideUI [LOG 18:39:50.131] [HighLogic]: =========================== Scene Change : From SPACECENTER to FLIGHT (Async) ===================== [EXC 18:39:50.198] NullReferenceException: Object reference not set to an instance of an object ModuleCommand.Start () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) [EXC 18:39:50.261] NullReferenceException: Object reference not set to an instance of an object Vessel.RebuildCrewList () (at <55ba45dc3a43403382024deac8dcd0be>:0) Vessel.Start () (at <55ba45dc3a43403382024deac8dcd0be>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) Strange... it appears that either A) SpawnVessel is just plain broken, it doesn't work at all, or B) Something with PhysicsRangeExtender and/or BDA is preventing it from working, maybe? I removed any other mods (VesselMover and HyperEdit) that I thought could conceivably have some impact on spawning; the only other mods in the install are Engineer and Editor Extensions Redux. Poop. Just out of curiosity - I assumed I need these contracts only on game startup? I have been restarting KSP with each change to the config, but wondered if I could avoid having to do that... Quote Link to comment Share on other sites More sharing options...
Morphisor Posted May 27, 2020 Share Posted May 27, 2020 @AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB. Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now. -- As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff... Quote Link to comment Share on other sites More sharing options...
AccidentalDisassembly Posted May 27, 2020 Share Posted May 27, 2020 35 minutes ago, Morphisor said: @AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB. Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now. -- As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff... Unfortunately I don't know of any contract packs that spawn vessels... maybe this is why! I did see that Vessel Mover has a method for spawning vessels in the flight scene that works (I tried it), I don't know if maybe that could be incorporated into CC... then remains the problem of figuring out how to get the game to activate BDArmory's autopilot and Wing Commander commands (e.g. telling the plane to go to guard mode and move to a point, attack near a point, etc. like you can when controlling a craft or group of crafts)... Quote Link to comment Share on other sites More sharing options...
Morphisor Posted May 27, 2020 Share Posted May 27, 2020 21 minutes ago, AccidentalDisassembly said: Unfortunately I don't know of any contract packs that spawn vessels... maybe this is why! I did see that Vessel Mover has a method for spawning vessels in the flight scene that works (I tried it), I don't know if maybe that could be incorporated into CC... then remains the problem of figuring out how to get the game to activate BDArmory's autopilot and Wing Commander commands (e.g. telling the plane to go to guard mode and move to a point, attack near a point, etc. like you can when controlling a craft or group of crafts)... Welp, figured I should've looked on Github first thing, but seems it's a genuine CC issue yeah: https://github.com/jrossignol/ContractConfigurator/issues/682 Unfortunately, Nightingale doesn't seem to have time anymore to do anything about this mod, which is a real shame considering how much it could do with all the issues ironed out. We'll have to make the best of it I guess. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2020 Share Posted May 28, 2020 10 hours ago, Morphisor said: Welp, figured I should've looked on Github first thing, but seems it's a genuine CC issue yeah: https://github.com/jrossignol/ContractConfigurator/issues/682 Unfortunately, Nightingale doesn't seem to have time anymore to do anything about this mod, which is a real shame considering how much it could do with all the issues ironed out. We'll have to make the best of it I guess. Happens to me too with vessel spawning contracts such as BDA-related contracts. Quote Link to comment Share on other sites More sharing options...
Bombaatu Posted May 29, 2020 Share Posted May 29, 2020 On 5/27/2020 at 9:15 AM, Morphisor said: @AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB. Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now. -- As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff... I'm unsure if it currently works correctly, but Kerbal Academy would spawn vessels. You might try it & see if it still works. Notes on the last page say version 1.10 is the latest working version; subsequent versions have issues. Quote Link to comment Share on other sites More sharing options...
Critter79606 Posted June 3, 2020 Share Posted June 3, 2020 On 5/29/2020 at 9:23 AM, Bombaatu said: I'm unsure if it currently works correctly, but Kerbal Academy would spawn vessels. You might try it & see if it still works. Notes on the last page say version 1.10 is the latest working version; subsequent versions have issues. Spawning vessels hasn't worked for KACP since 1.6 or 1.7. When it would spawn the engineering can, it would spawn under ground and blow up or get ejected into space. I don't think it has worked reliably since 1.4 or so. Quote Link to comment Share on other sites More sharing options...
SaphireFalcon Posted June 7, 2020 Share Posted June 7, 2020 I'm trying to create my own contract pack, to create a real career. On the wiki is defined how to disable contracts, though how to disable the world first contracts? Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted June 14, 2020 Share Posted June 14, 2020 (edited) Is it possible to implement a way to randomly select an agency from a subpool of agencies? From what I understand, we can either specify an agent or leave it blank - in which case a random agency will be picked for the contract. I'm trying to make it so that contract groups have a subset of agencies their children can pick from. For instance, we could have something like this: Exploration (landings, rovers, flybys, etc.): NASA, ESA, Roscosmos, JAXA, ISRO... Commercial satellites: Intelsat, Eutelsat, Hispasat, Iridium, Al Yah... This could be achieved if contracts were able to pick agents at random from a subset of all of the game's agencies (possibly those assigned to a group) vs. the full pool. Is there currently a way to do it, or is it even possible to write this into ContractConfigurator?... EDIT: looking at the source code, this should be possible by adding a dummy field to an AGENT config node specifying its group. Afterwards, ContractConfigurator could loop through all of the agencies assigned to the contract's group, randomly picking one. Am I correct? EDIT EDIT: would a simple Random() function applied to a list work? EDIT^3: why isn't this working? Spoiler @agent = [Horizons, RASCOM, Nilesat, NIGCOMSAT, Chinasat, ChinaStar, APT_Satellite_Holdings_Limited, AsiaSat, CMMB_Vision, Bangabandhu, SPARRSO, BCSC, Agrani, Antrix, DECU, PT_Datakom, PT_Pasifik_Satelit_Nusantara, PT_Telkom, Bank_Rakyat_Indonesia, Iranian_Space_Agency, RRsat, Station711, Spacecom, Broadcasting_Satellite_System_Corporation, NTT_DoCoMo, SKY_Perfect_JSAT_Corporation, JSC_KazSat, KT, MEASAT, SUPARCO, Pak_Datacom_Ltd, Es'hailSat, Arabsat, Singapore_Telecommunications, NSSLGlobal_Ltd, SupremeSAT, Chunghwa_Telecom, Mu_Space, Thaicom, Thuraya, Al_Yah_Satellite_Communications, VNPT, Azercosmos, Bulgaria_Sat, Eutelsat, Orange_Business_Services, Deutsche_Telekom, Hellas-Sat, Telespazio, Intelsat, SES, Fibersat, Astra, Telenor, Vizada, Russia_Space_Telecommunications_Company, Gazprom_Space_Systems, Gonets, Hisdesat, Hispasat, Turksat, Avanti_Communications, InmarSat, iSat_LTD, Kepler, Ciel_Space_Group, Telesat, Mexsat, DirecTV, EchoStar, Globalstar, Iridium_Communications, Ligado_Networks, Orbcomm, Sirius_XM_Holdings, ViaSat, XTAR, MTN, PanAmSat, Verizon, SingTel_Optus, Speedcast, INVAP, Satellogic, ARSAT, ABE, Star_One, INPE].Random() Edited June 16, 2020 by Tonas1997 Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted June 20, 2020 Share Posted June 20, 2020 Also, possible UI bug: contracts that have have more than a simultaneous instance (maxSimultaneous > 1) will have their HasResource parameter displaying incoherent values: Spoiler This is the first contract on the list: notice how both lines display the same value: 2400 units However, the second contract displays 4800 on the first paragraph, but the 2400 value remains on the second: This also happens on subsequent contracts: Quote Link to comment Share on other sites More sharing options...
nightingale Posted July 2, 2020 Author Share Posted July 2, 2020 Release time. Get it here, but only for KSP 1.8. Contract Configurator 1.28.1 Added new AgentParser (allows for assigning a random agency through expressions). Merged change to improve accuracy of great circle distance in contract distance calculations (thanks pap1723). Merged change to fix issues with certain celestial body progress requirements not working correctly for the manned/unmanned checks (thanks SirMortimer). Fixed issue with planet packs that renamed Kerbin displaying the name in lower case (thanks TheSpaceDad). Fixed incorrect requirement text when FacilityRequirement and maxLevel are used (thanks histalonia). So here's the plan. I did a quick build with the random Agent support requested by @Tonas1997 above against KSP 1.8.1. I also included a bunch of pull requests, and fixed some easy bugs. Next step I will compile against KSP 1.9, and see if I can fix some of the issues that are being reported (I'll need to read through a bunch of threads that I've ignored for a while). Hopefully that will be in the next week. After that, I'll take a look and see what KSP 1.10 looks like. Quote Link to comment Share on other sites More sharing options...
Morphisor Posted July 2, 2020 Share Posted July 2, 2020 Great to see you back at it @nightingale! If you need help testing any changes, let me know, I'll try to be of use. Quote Link to comment Share on other sites More sharing options...
nightingale Posted July 2, 2020 Author Share Posted July 2, 2020 @Tonas1997 - I wasn't able to reproduce the issue you posted about the maxSimultaneous/hasResource. Could you post the contract config that causes the issue? Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted July 2, 2020 Share Posted July 2, 2020 41 minutes ago, nightingale said: @Tonas1997 - I wasn't able to reproduce the issue you posted about the maxSimultaneous/hasResource. Could you post the contract config that causes the issue? Weirdly enough, neither could I. It seems like a quite random glitch, appearing and disappearing regardless of contract. Don't worry about that Quote Link to comment Share on other sites More sharing options...
Morphisor Posted July 3, 2020 Share Posted July 3, 2020 @nightingale I'm running into a pretty significant issue after updating to CC 1.28.1. My own 'History of Spaceflight' contract pack is no longer loaded ingame, after the update. Meaning, none of its contracts show up. Not even in the debug menu. It appears related to the new agent parser; it is somehow interfering with loading in certain agents. I suspect a number of contract groups related to these agents therefore fail to load as a result. The logs give virtually no info on this at all - the only thing I could tell from them in my test install was that it's loading 47 agents. History of Spaceflight defines 65 agents all by itself, so that's a problem. I have no idea why it won't load some agents while others are fine - it's hard to tell which ones it doesn't load, only process of elimination works here. HoSf has a lot of groups nested within other groups, and if any sub-nodes fail to parse, the entire lot ends up disabled. I came to these conclusions after a lot of testing and moving around contract groups, with the help of @severedsolo. Separating the main group from the sub-groups resulted in most of those groups loading, only some still fail - presumably the ones affected. Yet, even the groups that DID load had a warning added to them in the CC debug menu: "providing agent field for all contract_group nodes is highly recommended". Yet they all evidently have defined agent fields. I hope this is sufficient information, you can have a look at the group and agent definitions here: https://github.com/Frylovespi/History-of-Spaceflight/blob/M_dev/Stock/GameData/ContractPacks/HistoryofSpaceflight/HistoryofSpaceflight.cfg I'll also add a github issue with this same info to the tracker. Quote Link to comment Share on other sites More sharing options...
nightingale Posted July 3, 2020 Author Share Posted July 3, 2020 Thanks for the heads up, @Morphisor. I've fixed this and re-released, please let me know if you have any more issues. Contract Configurator 1.28.2 Allowed a wider range of Agent names to be parsed by the AgentParser (thanks Morphisor244). Add ModuleManager patch to fix old Agent definitions with a missing title (thanks Tonka Crash). Quote Link to comment Share on other sites More sharing options...
Morphisor Posted July 3, 2020 Share Posted July 3, 2020 2 hours ago, nightingale said: Thanks for the heads up, @Morphisor. I've fixed this and re-released, please let me know if you have any more issues. Contract Configurator 1.28.2 Allowed a wider range of Agent names to be parsed by the AgentParser (thanks Morphisor244). Add ModuleManager patch to fix old Agent definitions with a missing title (thanks Tonka Crash). Wow that was quick! Had a quick look and all seems to be well, many thanks! And now we can rid ourselves of the mandatory agent fix patch for forgotten titles too hehe. Quote Link to comment Share on other sites More sharing options...
HoneyBadger Posted July 3, 2020 Share Posted July 3, 2020 22 minutes ago, Morphisor said: Wow that was quick! Had a quick look and all seems to be well, many thanks! And now we can rid ourselves of the mandatory agent fix patch for forgotten titles too hehe. @Morphisor and @nightingale thanks for the update. I was having same problem for EpicSpace Program just tested it. It works fine with new update. Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted July 3, 2020 Share Posted July 3, 2020 (edited) On 7/2/2020 at 9:20 PM, nightingale said: @Tonas1997 - I wasn't able to reproduce the issue you posted about the maxSimultaneous/hasResource. Could you post the contract config that causes the issue? That problem striked yet again. Here is an example of a contract with incoherent resource requirements. I took the liberty of highlighting the relevant sections. This is an instance of the problematic contract, as found on the persist.sfs file: Spoiler CONTRACT { guid = 256d31fc-6866-4702-8651-4141b43f5054 type = ConfiguredContract prestige = 0 seed = 487954272 state = Active viewed = Read agent = DirecTV agentName = DirecTV deadlineType = Floating expiryType = Floating ignoresWeight = True values = 691500,31536000,66528,99792,133056,0,100,150,1055831874.58272,1055163101.40272,1086699101.40272,0 subtype = RepeatComSats title = Commercial Communications Satellite description = We have a customer requesting a new Communications Satellite. Design a satellite within their specs and launch into an orbit with the proper orbital parameters as outlined in the contract.&br;&br;This contract can be completed as many times as you would like. The orbits will be chosen randomly from Tundra, Geostationary, Molniya and Geosynchronous orbits.&br;&br;<b><color=red>NOTE: The satellite will be destroyed upon completion of the contract. This simulates transfer of the payload back to the customer.</color></b>&br;&br;<b>Number of Contracts Completed: 1</b> synopsis = Launch a new Commercial Communications Satellite completedMessage = Congratulations! The customer has reported the satellite is in the proper orbit. hash = -479492652 targetBody = Earth BEHAVIOUR { type = ContractConfigurator.Behaviour.OrbitGenerator ORBIT_DETAIL { type = RANDOM_ORBIT ORBIT { SMA = 26561764.157429829 ECC = 0.74261686989312115 INC = 116.59999999999999 LPE = 90 LAN = 89.462938313122436 MNA = 3.0021610046532716 EPH = 0 REF = 1 } } ORBIT_DETAIL { type = RANDOM_ORBIT ORBIT { SMA = 42164172.365635365 ECC = 1.5141427275348879E-16 INC = 0 LPE = 210.36780231190465 LAN = 0 MNA = -0.39918917661015146 EPH = 0 REF = 1 } } ORBIT_DETAIL { type = RANDOM_ORBIT ORBIT { SMA = 42164172.365635328 ECC = 0.83785878824525617 INC = 116.59999999999999 LPE = 270 LAN = 56.436214734071996 MNA = -0.23679029545501373 EPH = 0 REF = 1 } } } BEHAVIOUR { type = ContractConfigurator.Behaviour.Expression CONTRACT_OFFERED { } CONTRACT_ACCEPTED { } CONTRACT_COMPLETED_SUCCESS { type = Double RepeatComSats_Count = $RepeatComSats_Count + 1 } CONTRACT_COMPLETED_FAILURE { } } BEHAVIOUR { type = ContractConfigurator.Behaviour.DestroyVessel onState = CONTRACT_SUCCESS vessel = AdvComSatellite } BEHAVIOUR { type = ContractConfigurator.Behaviour.DialogBox DIALOG_BOX { condition = CONTRACT_SUCCESS position = CENTER width = 0.5 height = 0 title = Vessel Ownership Transferred titleColor = #FFFFFFFF TextSection { text = The contract has been completed successfully and the satellite has been transferred back to the customer. textColor = #FFCCCCCC fontSize = 20 } } } PARAM { name = AlwaysTrue state = Complete disableOnStateChange = False values = 0,0,0,0,0 } PARAM { name = VesselParameterGroup id = AdvComSat state = Incomplete values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Commercial Communications Satellite notes = completedMessage = define = AdvComSatellite duration = 0 trackedVessel = 1d208353-80ae-4d5c-8f93-d9dbd639ffd3 dissassociateVesselsOnContractFailure = True dissassociateVesselsOnContractCompletion = True PARAM { name = NewVessel id = NewVessel state = Complete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Launch a New Vessel notes = completedMessage = hideChildren = True allowStateReset = True launchID = 122 VESSEL_STATS { vessel = 1d208353-80ae-4d5c-8f93-d9dbd639ffd3 state = Complete strength = STRONG completionTime = 1066975772.0216141 } DOCKED_SUB_VESSEL { hash = 1299841286 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 575656711 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 4133345166 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 407830691 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 2952366262 strength = STRONG completionTime = 1056888922.2648787 } } PARAM { name = HasCrew id = Crewmembers state = Complete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Uncrewed notes = completedMessage = hideChildren = True allowStateReset = True minCrew = 0 maxCrew = 0 minExperience = 0 maxExperience = 5 VESSEL_STATS { vessel = 1d208353-80ae-4d5c-8f93-d9dbd639ffd3 state = Complete strength = STRONG completionTime = 1066975772.0216141 } DOCKED_SUB_VESSEL { hash = 1299841286 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 575656711 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 4133345166 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 407830691 strength = STRONG completionTime = 1056888922.2648787 } DOCKED_SUB_VESSEL { hash = 2952366262 strength = STRONG completionTime = 1056888922.2648787 } PARAM { name = ParameterDelegate`1 id = Unmanned state = Complete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Unmanned notes = completedMessage = } } PARAM { name = HasResource id = HasComSatPayload state = Incomplete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Have a ComSatPayload of at least 600 units on the craft notes = completedMessage = allowStateReset = True capacity = False RESOURCE { resource = ComSatPayload minQuantity = 1100 } PARAM { name = ParameterDelegate`1 id = Resource: ComSatPayload: At least 1100 units state = Failed disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Resource: ComSatPayload: At least 1100 units notes = completedMessage = } } PARAM { name = OrbitParameter id = ReachSpecificOrbit state = Incomplete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = notes = completedMessage = allowStateReset = True situation = 0 targetBody = Earth minAltitude = 0 minApoapsis = 0 minPeriapsis = 0 minEccentricity = 0 minInclination = 0 maxInclination = 180 minArgumentOfPeriapsis = 0 maxArgumentOfPeriapsis = 0 minPeriod = 0 displayNotes = True deviationWindow = 4 ORBIT { SMA = 42164172.365635365 ECC = 1.5141427275348879E-16 INC = 0 LPE = 210.36780231190465 LAN = 0 MNA = -0.39918917661015146 EPH = 0 REF = 1 } PARAM { name = ParameterDelegate`1 id = Destination: Earth state = Complete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Destination: Earth notes = completedMessage = } PARAM { name = ParameterDelegate`1 id = Reach the specified orbit state = Incomplete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = Reach the specified orbit notes = completedMessage = } PARAM { name = Duration id = Duration state = Incomplete disableOnStateChange = False values = 0,0,0,0,0 ContractIdentifier = AdvSatellites.RepeatComSats title = notes = completedMessage = duration = 120 preWaitText = Check for Stable Orbit waitingText = Checking for Stable Orbit completionText = Stable Orbit: Confirmed endTime = 0 startCriteria = CONTRACT_ACCEPTANCE triggered = True } } } } And here's the contract root config: Spoiler CONTRACT_TYPE { name = RepeatComSats title = Commercial Communications Satellite group = AdvSatellites agent = Satellites description = We have a customer requesting a new Communications Satellite. Design a satellite within their specs and launch into an orbit with the proper orbital parameters as outlined in the contract.&br;&br;This contract can be completed as many times as you would like. The orbits will be chosen randomly from Tundra, Geostationary, Molniya and Geosynchronous orbits.&br;&br;<b><color=red>NOTE: The satellite will be destroyed upon completion of the contract. This simulates transfer of the payload back to the customer.</color></b>&br;&br;<b>Number of Contracts Completed: $RepeatComSats_Count</b> genericDescription = Put a satellite into the requested orbit. synopsis = Launch a new Commercial Communications Satellite completedMessage = Congratulations! The customer has reported the satellite is in the proper orbit. sortKey = 900 cancellable = true declinable = true autoAccept = false minExpiry = 5 maxExpiry = 10 maxCompletions = 0 maxSimultaneous = 11 deadline = 365 // 1 year targetBody = HomeWorld() prestige = Trivial // 1.0x advanceFunds = ((12000 + ((@AdvComSat/HasComSatPayload/minQuantity)*2)) * (1 + Max(@AdvComSat/ReachSpecificOrbit/index, 1) * 0.4)) * 3.6 rewardScience = 0 rewardReputation = Round(1 + (@advanceFunds / 500),100) rewardFunds = (@advanceFunds * 1.5) failureReputation = @rewardReputation * 1.5 failureFunds = @advanceFunds // ************ REQUIREMENTS ************ REQUIREMENT { name = CompleteContract type = CompleteContract contractType = FirstMolniyaSat title = Complete @contractType Contract } REQUIREMENT { name = CompleteContract type = CompleteContract contractType = FirstTundraSat title = Complete @contractType Contract } REQUIREMENT { name = CompleteContract type = CompleteContract contractType = first_GEOUncrewed title = Complete @contractType Contract } REQUIREMENT { name = CompleteContract type = CompleteContract contractType = EarlyComSat minCount = 3 title = Complete @contractType Contract at least 3 times } BEHAVIOUR { name = OrbitGenerator type = OrbitGenerator RANDOM_ORBIT { type = KOLNIYA // index = 0 } RANDOM_ORBIT { type = STATIONARY // index = 1 } RANDOM_ORBIT { type = TUNDRA // index = 2 } } BEHAVIOUR { name = IncrementTheCount type = Expression CONTRACT_COMPLETED_SUCCESS { RepeatComSats_Count = $RepeatComSats_Count + 1 } } // ************ PARAMETERS ************ PARAMETER { name = AdvComSat type = VesselParameterGroup define = AdvComSatellite dissassociateVesselsOnContractCompletion = true title = Commercial Communications Satellite PARAMETER { name = NewVessel type = NewVessel title = Launch a New Vessel hideChildren = true } PARAMETER { name = Crewmembers type = HasCrew minCrew = 0 maxCrew = 0 title = Uncrewed hideChildren = true } PARAMETER { name = HasComSatPayload type = HasResource resource = ComSatPayload minQuantity = Round((Pow(Random(0.5,1.5) * (0.3 + UnlockedTech().Count() / 100),2)*2500)/2,100) // for 10 nodes, 78~703 kg title = Have a ComSatPayload of at least @minQuantity units on the craft } PARAMETER { name = ReachSpecificOrbit type = ReachSpecificOrbit displayNotes = true index = int(Min(2, Random(0, 3))) deviationWindow = 4 PARAMETER { name = Duration type = Duration duration = 2m preWaitText = Check for Stable Orbit waitingText = Checking for Stable Orbit completionText = Stable Orbit: Confirmed } } } BEHAVIOUR { name = TransferVessel type = DestroyVessel onState = CONTRACT_SUCCESS vessel = AdvComSatellite } BEHAVIOUR { name = VesselDestroyed type = DialogBox DIALOG_BOX { title = Vessel Ownership Transferred condition = CONTRACT_SUCCESS position = CENTER width = 0.5 TEXT { text = The contract has been completed successfully and the satellite has been transferred back to the customer. } } } } Perhaps this is caused by some race condition when CC parses the minQuantity expression...? Edited July 5, 2020 by Tonas1997 Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted July 5, 2020 Share Posted July 5, 2020 (edited) Disregard my previous post. I had a duplicate ContractConfigurator folder in my GameData Edited July 5, 2020 by Tonas1997 Quote Link to comment Share on other sites More sharing options...
HawkEngineer Posted July 7, 2020 Share Posted July 7, 2020 Quick Question: I am trying to use a conditional OR in a "where" statement. According to the Wiki, the conditional OR operator is ` but when I use it, I keep getting an error. Can someone confirm the correct syntax for a conditional OR? Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted July 7, 2020 Share Posted July 7, 2020 (edited) 1 hour ago, HawkEngineer said: Quick Question: I am trying to use a conditional OR in a "where" statement. According to the Wiki, the conditional OR operator is ` but when I use it, I keep getting an error. Can someone confirm the correct syntax for a conditional OR? Got an example of code where you use it? Nevermind, I found your answer. There are no functions/methods that operator on boolean values. https://github.com/jrossignol/ContractConfigurator/wiki/Boolean-Type Where() is a method. Edited July 7, 2020 by TranceaddicT Quote Link to comment Share on other sites More sharing options...
nightingale Posted July 7, 2020 Author Share Posted July 7, 2020 4 hours ago, HawkEngineer said: Quick Question: I am trying to use a conditional OR in a "where" statement. According to the Wiki, the conditional OR operator is ` but when I use it, I keep getting an error. Can someone confirm the correct syntax for a conditional OR? OR is ||. Looks like the wiki is a bit messed up, I'll fix 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.