inigma Posted October 10, 2024 Share Posted October 10, 2024 Thanks for keeping this mod alive. With the downfall of KSP 2, my org has spun up a KSP 1 LMP server and we're finding we need to make money. I am looking to fully update my Giving Aircraft a Purpose pack to the new CC so peeps can use it again. Quote Link to comment Share on other sites More sharing options...
eschnak1472 Posted November 4, 2024 Share Posted November 4, 2024 I'm using version 2.11.0.0 of this mod, and I get this error occasionally (seems to happen on certain crewed vessels when quicksaving): Exception occured while saving ScenarioModule 'ContractVesselTracker': System.NullReferenceException: Object reference not set to an instance of an object at ContractConfigurator.Extensions+<>c__DisplayClass5_1.<GetHashes>b__1 (ProtoPartSnapshot childPart) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) [0x00045] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ContractConfigurator.Extensions+<GetHashes>d__5.MoveNext () [0x00320] in <0ac19348e13c43e280580b62f08ea2eb>:0 at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00015] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ContractConfigurator.ContractVesselTracker.OnSave (ConfigNode node) [0x0007c] in <0ac19348e13c43e280580b62f08ea2eb>:0 The error pop up said to post it here, along with the message "The ScenarioModule data was not correctly save - reloading the save may result in further errors." Is there a fix for this? Quote Link to comment Share on other sites More sharing options...
TriggeredSnake Posted November 28, 2024 Share Posted November 28, 2024 At some point Harmony was added as a dependency, but nothing says it on the forums as far as I can tell. It’s listed on CKAN, but not for manual install. This really ought to be rectified as I had a lot of trouble due to the lack of Harmony with no idea how to fix it until a Redditor could point it out to me. Quote Link to comment Share on other sites More sharing options...
Lisias Posted December 22, 2024 Share Posted December 22, 2024 On 11/28/2024 at 5:51 PM, TriggeredSnake said: At some point Harmony was added as a dependency, but nothing says it on the forums as far as I can tell. It’s listed on CKAN, but not for manual install. This really ought to be rectified as I had a lot of trouble due to the lack of Harmony with no idea how to fix it until a Redditor could point it out to me. The Contract Configuration that added Harmony as dependency is not this one. There's no mention for Harmony on the repo: https://github.com/search?q=repo%3Ajrossignol%2FContractConfigurator Harmony&type=code Quote Link to comment Share on other sites More sharing options...
waynemorrow23 Posted December 26, 2024 Share Posted December 26, 2024 Got this error when loading into a new save after installing Giving Aircraft a Purpose. Any idea what I should do? I've uninstalled and reinstalled the pack and still got this message. Thanks! Exception occured while attempt to generate contract of type 'GAP.Wright-FirstFlight': System.NullReferenceException: Object reference not set to an instance of an object at ContractConfigurator.Parameters.ReachState+<>c.<BodyList>b__94_0 (CelestialBody cb) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.LocalizationUtil._LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable`1[T] values, System.Func`2[T,TResult] strFunc) [0x0001c] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.LocalizationUtil.LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable`1[T] values, System.Func`2[T,TResult] strFunc) [0x00005] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState.BodyList () [0x00007] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState.CreateDelegates () [0x0001f] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState..ctor (System.Collections.Generic.List`1[T] targetBodies, System.String biome, System.Collections.Generic.List`1[T] situation, System.Single minAltitude, System.Single maxAltitude, System.Single minTerrainAltitude, System.Single maxTerrainAltitude, System.Double minSpeed, System.Double maxSpeed, System.Nullable`1[T] speedMode, System.Double minRateOfClimb, System.Double maxRateOfClimb, System.Single minAcceleration, System.Single maxAcceleration, System.Double minDeltaVeeActual, System.Double maxDeltaVeeActual, System.Double minDeltaVeeVacuum, System.Double maxDeltaVeeVacuum, System.String title, System.Single updateFrequency) [0x0009d] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ReachStateFactory.Generate (Contracts.Contract contract) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.Generate (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost) [0x00016] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0007e] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0008c] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ContractType.GenerateParameters (ContractConfigurator.ConfiguredContract contract) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ConfiguredContract.Initialize (ContractConfigurator.ContractType contractType) [0x00221] in <0ac19348e13c43e280580b62f08ea2eb>:0 Quote Link to comment Share on other sites More sharing options...
Fizzlebop Smith Posted December 26, 2024 Share Posted December 26, 2024 (edited) 3 hours ago, waynemorrow23 said: Got this error when loading into a new save after installing Giving Aircraft a Purpose. Any idea what I should do? I've uninstalled and reinstalled the pack and still got this message. Thanks! Exception occured while attempt to generate contract of type 'GAP.Wright-FirstFlight': System.NullReferenceException: Object reference not set to an instance of an object at ContractConfigurator.Parameters.ReachState+<>c.<BodyList>b__94_0 (CelestialBody cb) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.LocalizationUtil._LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable`1[T] values, System.Func`2[T,TResult] strFunc) [0x0001c] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.LocalizationUtil.LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable`1[T] values, System.Func`2[T,TResult] strFunc) [0x00005] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState.BodyList () [0x00007] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState.CreateDelegates () [0x0001f] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.Parameters.ReachState..ctor (System.Collections.Generic.List`1[T] targetBodies, System.String biome, System.Collections.Generic.List`1[T] situation, System.Single minAltitude, System.Single maxAltitude, System.Single minTerrainAltitude, System.Single maxTerrainAltitude, System.Double minSpeed, System.Double maxSpeed, System.Nullable`1[T] speedMode, System.Double minRateOfClimb, System.Double maxRateOfClimb, System.Single minAcceleration, System.Single maxAcceleration, System.Double minDeltaVeeActual, System.Double maxDeltaVeeActual, System.Double minDeltaVeeVacuum, System.Double maxDeltaVeeVacuum, System.String title, System.Single updateFrequency) [0x0009d] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ReachStateFactory.Generate (Contracts.Contract contract) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.Generate (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost) [0x00016] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0007e] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0008c] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ContractType.GenerateParameters (ContractConfigurator.ConfiguredContract contract) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at ContractConfigurator.ConfiguredContract.Initialize (ContractConfigurator.ContractType contractType) [0x00221] in <0ac19348e13c43e280580b62f08ea2eb>:0 There is a certain method to the madness of troubleshooting a modded install. When coming to the forums for help, the gracious mod authors that give us the keys ask we take certain efforts in packaging the help request in a way that 1) I clear and easy to understand 2) provides a set of minimum resources required to assist you Edited December 26, 2024 by Fizzlebop Smith Quote Link to comment Share on other sites More sharing options...
MusicByVano Posted December 26, 2024 Share Posted December 26, 2024 Getting this error every time on auto save Exception occured while saving ScenarioModule 'ContractVesselTracker': System.NullReferenceException: Object reference not set to an instance of an object at ContractConfigurator.Extensions+<>c__DisplayClass5_1.<GetHashes>b__1 (ProtoPartSnapshot childPart) [0x00000] in <0ac19348e13c43e280580b62f08ea2eb>:0 at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) [0x00045] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ContractConfigurator.Extensions+<GetHashes>d__5.MoveNext () [0x00320] in <0ac19348e13c43e280580b62f08ea2eb>:0 at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00036] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) [0x0000a] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ContractConfigurator.ContractVesselTracker+<>c__DisplayClass17_0.<OnSave>b__1 (Vessel v) [0x0000f] in <0ac19348e13c43e280580b62f08ea2eb>:0 at System.Collections.Generic.List`1[T].Find (System.Predicate`1[T] match) [0x0000d] in <9577ac7a62ef43179789031239ba8798>:0 at ContractConfigurator.ContractVesselTracker.OnSave (ConfigNode node) [0x00060] in <0ac19348e13c43e280580b62f08ea2eb>:0 Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 03:09 AM Share Posted Friday at 03:09 AM (edited) I'm reviewing some old contract packs, and have a problem. The contract in question is in the spoiler below: Spoiler ONTRACT_TYPE { name = RoverDeployWhyren title = Rover Deployment group = RoverScience description = Much of @/targetBody is a mystery to us still. We could learn a lot by deploying a new rover there. genericDescription = Deloy a new rover notes = Launch a new rover to @/targetBody. Include all the scientific instrumentation you can! synopsis = Launch a new rover to @/targetBody completedMessage = The rover is on location and ready for research! deadline = 10000 targetBody = @/planet maxSimultaneous = 1 rewardReputation = 2 rewardFunds = 10000 failureReputation = 4 failureFunds = 20000 advanceFunds = 10000 DATA { type = CelestialBody planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random() title = Planetary body } DATA { type = CelestialBody home = HomeWorld() } DATA { type = List<CelestialBody> easyPlanets = HomeWorld().Children() mediumPlanets = OrbitedBodies().Where(b => b.HasSurface()).ExcludeAll(@easyPlanets).Exclude(HomeWorld()) hardPlanetsTemp = AllBodies().Where(b => b.HasSurface()).ExcludeAll(@mediumPlanets) hardPlanets = HomeWorld().Children() title = Planetary body orbited } REQUIREMENT { name = PartModuleTypeUnlocked type = PartModuleTypeUnlocked partModuleType = Antenna partModuleType = Wheel } PARAMETER { name = NewVessel type = NewVessel title = Launch a new rover } PARAMETER { name = ReachState type = ReachState situation = LANDED } PARAMETER { name = VesselIsType type = VesselIsType vesselType = Rover title = Set vessel type to Rover } } The problem is with this part of the contract: DATA { type = List<CelestialBody> easyPlanets = HomeWorld().Children() mediumPlanets = OrbitedBodies().Where(b => b.HasSurface()).ExcludeAll(@easyPlanets).Exclude(HomeWorld()) hardPlanetsTemp = AllBodies().Where(b => b.HasSurface()).ExcludeAll(@mediumPlanets) hardPlanets = HomeWorld().Children() title = Planetary body orbited } It seems that if any of the values are null, then the contract is considered as not being ready to be generated; in the Mission Control, it say that Planetary body orbited is unmet). However, the contract is using those in the earler DATA stanza: DATA { type = CelestialBody planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random() title = Planetary body } The final result is the value for planet. The problem is with the mediumPlanets = OrbitedBodies(). If I change that to AllBodies, it works, but then it selects ANY body, including those which haven't yet been reached. Can anyone suggest a solution? Edited Friday at 03:14 AM by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 04:24 AM Share Posted Friday at 04:24 AM (edited) deleted Edited Friday at 04:26 AM by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
darthgently Posted Friday at 10:43 AM Share Posted Friday at 10:43 AM 6 hours ago, linuxgurugamer said: I'm reviewing some old contract packs, and have a problem. The contract in question is in the spoiler below: Hide contents ONTRACT_TYPE { name = RoverDeployWhyren title = Rover Deployment group = RoverScience description = Much of @/targetBody is a mystery to us still. We could learn a lot by deploying a new rover there. genericDescription = Deloy a new rover notes = Launch a new rover to @/targetBody. Include all the scientific instrumentation you can! synopsis = Launch a new rover to @/targetBody completedMessage = The rover is on location and ready for research! deadline = 10000 targetBody = @/planet maxSimultaneous = 1 rewardReputation = 2 rewardFunds = 10000 failureReputation = 4 failureFunds = 20000 advanceFunds = 10000 DATA { type = CelestialBody planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random() title = Planetary body } DATA { type = CelestialBody home = HomeWorld() } DATA { type = List<CelestialBody> easyPlanets = HomeWorld().Children() mediumPlanets = OrbitedBodies().Where(b => b.HasSurface()).ExcludeAll(@easyPlanets).Exclude(HomeWorld()) hardPlanetsTemp = AllBodies().Where(b => b.HasSurface()).ExcludeAll(@mediumPlanets) hardPlanets = HomeWorld().Children() title = Planetary body orbited } REQUIREMENT { name = PartModuleTypeUnlocked type = PartModuleTypeUnlocked partModuleType = Antenna partModuleType = Wheel } PARAMETER { name = NewVessel type = NewVessel title = Launch a new rover } PARAMETER { name = ReachState type = ReachState situation = LANDED } PARAMETER { name = VesselIsType type = VesselIsType vesselType = Rover title = Set vessel type to Rover } } The problem is with this part of the contract: DATA { type = List<CelestialBody> easyPlanets = HomeWorld().Children() mediumPlanets = OrbitedBodies().Where(b => b.HasSurface()).ExcludeAll(@easyPlanets).Exclude(HomeWorld()) hardPlanetsTemp = AllBodies().Where(b => b.HasSurface()).ExcludeAll(@mediumPlanets) hardPlanets = HomeWorld().Children() title = Planetary body orbited } It seems that if any of the values are null, then the contract is considered as not being ready to be generated; in the Mission Control, it say that Planetary body orbited is unmet). However, the contract is using those in the earler DATA stanza: DATA { type = CelestialBody planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random() title = Planetary body } The final result is the value for planet. The problem is with the mediumPlanets = OrbitedBodies(). If I change that to AllBodies, it works, but then it selects ANY body, including those which haven't yet been reached. Can anyone suggest a solution? It stands out to me that hardPlanets uses a two step process using hardPlanetsTemp an intermediary and I can’t see why mediumPlanets wouldn’t also need this analogous approach if it is needed for hardPlanets. But now I see that hardPlanetsTemp isn’t used and hardPlanets is just the same as easyPlanets. Mkay. Looks like the creator was maybe trying to resolve this very issue and left it hanging. What are the symptoms of the user facing bug you are addressing? Does the contract show when it shouldn’t or not show when it should or emit garbage? Should OrbitedBodies() be returning something but it isn’t? Is the problem that the DATA statement is failing in an ugly way and not simply resulting in the contract not being available when no bodies match? If so, is there some test (blah?foo:bar) for null that can be applied in the data statement tests for that null and assigns an empty list instead of the null or similar? Shotgun blast completed Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 11:54 AM Share Posted Friday at 11:54 AM (edited) First, the hardPlanetsTemp was part of my trying to get this to work, I tried to clean up all my unused statements, I guess it got through. Second, the symptoms are shown in the image below: Even this stanza: planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random() was met (second line, Must bean orbited body), and it relies on the stanza which is unmet to succeed. It seems to me that CC thinks that if any value in a DATA block is empty that it's an unmet condition. even if it's intended for use in a different DATA block. I tried making it hidden, but that only hides the result, but it still affects the outcome. There doesn't seem to be a way to tell CC that the results are intermediate and should not affect the conditions And of course, 5 minutes after typing that, I found this: Quote requiredValue (Optional, default = true) If true, the expression needs to return a valid (non-null) value for the contract to be offered. If false, the contract will be offered even if the expression returns null. I just added the requiredValue = false, and it's now working Edited Friday at 12:19 PM by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 01:49 PM Share Posted Friday at 01:49 PM New question, this time regarding Waypoints. Currrently the contract is accessing a single waypoint near the rover. Full contract is in the spoiler below: Spoiler CONTRACT_TYPE { name = RoverExploreWhyren title = Rover Expedition group = RoverScience description = The science team has identified an area of scientific interest and believes that @/targetVessel on @/targetBody should be directed to investigate. genericDescription = Search for science with a rover notes = Pilot your rover to the indicated location and perform all the science you can at that site. synopsis = Drive @/targetVessel on @/targetBody to this location. completedMessage = Research complete! Good work. deadline = 50 targetBody = @/targetVessel.CelestialBody() maxSimultaneous = 2 rewardReputation = 1.0 rewardFunds = 10000.0 failureReputation = 5.0 failureFunds = 20000.0 advanceFunds = 0 DATA { type = Vessel requiredValue = true targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random() title = Must have a landed rover } DATA { type = double targetRadius = @/targetBody.Radius() homeRadius = HomeWorld().Radius() distanceFactorTemp = @targetRadius == 0 ? 1 : @targetRadius/@homeRadius + 0.3 distanceFactor = @distanceFactorTemp / 2 TrivialMin = 3000 * @distanceFactor SignificantMin = 5000 * @distanceFactor ExceptionalMin = 7000 * @distanceFactor TrivialMax = 4000 * @distanceFactor SignificantMax = 6000 * @distanceFactor ExceptionalMax = 8000 * @distanceFactor } DATA { type = bool isTrivial = Prestige() == Trivial isSignificant = Prestige() == Significant isExceptional = Prestige() == Exceptional hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0 hasBar = @/targetVessel.Parts().Where(p => p == sensorBarometer).Count() > 0 hasAccel = @/targetVessel.Parts().Where(p => p == sensorAccelerometer).Count() > 0 hasGrav = @/targetVessel.Parts().Where(p => p == sensorGravimeter).Count() > 0 hasGoo = @/targetVessel.Parts().Where(p => p == GooExperiment).Count() > 0 hasMat = @/targetVessel.Parts().Where(p => p == science_module).Count() > 0 hasAtmo = @/targetVessel.Parts().Where(p => p == sensorAtmosphere).Count() > 0 hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == "Scientist").Count() > 0 hasAtmosphere = @/targetBody.HasAtmosphere() title = Must all required experiments } // May make the following optional in the future REQUIREMENT { name = PartModuleUnlocked type = PartModuleUnlocked // PartModule that needs to be unlocked. // // Type: string // Required: Yes (multiples allowed) // partModule = RoverScience } PARAMETER { name = Location1AllObjectives type = Sequence disableOnStateChange = false title = Rover Expedition hiddenParameter = Location1AllResearch PARAMETER { name = Location1Arrival type = VisitWaypoint index = 1 title = Direct rover to the Interesting Place } PARAMETER { name = Location1AllResearch type = All title = Conduct research at the Interesting Place PARAMETER { name = AtLeast type = AtLeast // The minimum number that must be completed. // // Type: int // Required: Yes // count = 3 title = At least 3 experiments must be completed PARAMETER { name = Location1RoverScience type = CollectScience experiment = RoverScienceExperiment //recoveryMethod = @/recoveryMethod //experimentSituation = SrfLanded rewardScience = 0.25 } PARAMETER { name = Location1TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1TemperatureScanRequirement type = Expression expression = @/hasTherm } } PARAMETER { name = Location1PressureScan type = CollectScience experiment = barometerScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1BarometerScanRequirement type = Expression expression = @/hasBar } } PARAMETER { name = Location1AccelerometerScan type = CollectScience experiment = seismicScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AccelScanRequirement type = Expression expression = @/hasAccel } } PARAMETER { name = Location1GravityScan type = CollectScience experiment = gravityScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1GravScanRequirement type = Expression expression = @/hasGrav } } PARAMETER { name = Location1CrewReport type = CollectScience experiment = crewReport experiment = evaReport experiment = surfaceSample recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1CrewReportRequirement type = Expression expression = @/hasScientist } } PARAMETER { name = Location1Goo type = CollectScience experiment = mysteryGoo recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1GooRequirement type = Expression expression = @/hasScientist && @/hasGoo } } PARAMETER { name = Location1Mat type = CollectScience experiment = mobileMaterialsLab recoveryMethod = None rewardScience = 1.0 REQUIREMENT { name = Location1MatRequirement type = Expression expression = @/hasScientist && @/hasMat } } PARAMETER { name = Location1AtmoScan type = CollectScience experiment = atmosphereAnalysis recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AtmoScanRequirement type = Expression expression = @/hasAtmo && @/hasAtmosphere } } } } } BEHAVIOUR { name = WaypointGenerator type = WaypointGenerator WAYPOINT { name = Rover Location hidden = true icon = report altitude = 0.0 latitude = @/targetVessel.Location().Latitude() longitude = @/targetVessel.Location().Longitude() } RANDOM_WAYPOINT_NEAR { name = Interesting Place icon = report hidden = false altitude = 0.0 waterAllowed = false nearIndex = 0 minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax } } } Not sure if this is possible, but .... I'd like to be able to generate a random number of waypoints within a range (ie: 2-5). It's easy enough to create the 5 random waypoints in the WaypointGenerator block, but I'd like the main contract to be able to iterate over the available waypoints. It's a rather big contract, I don't want to simply copy/paste the sections 5 times. I am guessing it might need to be a list of indexes, and then have the index for the location arrival point to that, but not sure (yet) how to do it. Pointers would be appreciated. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 04:37 PM Share Posted Friday at 04:37 PM Found either a bug or something had changed. The field for the agent name in the agent config used to allow spaces in the agent name. It doesn't anymore, so I'm going to have to update all my contracts to fix this :-( Quote Link to comment Share on other sites More sharing options...
4x4cheesecake Posted Friday at 05:40 PM Share Posted Friday at 05:40 PM 42 minutes ago, linuxgurugamer said: Found either a bug or something had changed. The field for the agent name in the agent config used to allow spaces in the agent name. It doesn't anymore, so I'm going to have to update all my contracts to fix this :-( You sure about this one? Maybe I misunderstood something but other contract packs actually still use spaces for the agent name field and it works fine. Spoiler AGENT { name = Research Advancement Division title = Research Advancement Division description = Research Advancement Division is a company funded by some well-off so-called 'philantropic' Kerbals who became impatient with scientific progress being dependent on whichever random direction our rockets are exploding towards. They decided to take matters into their own hands by providing us with funds if we crash things in places they tell us to. And preferably in a specific way too. We're not complaining, we can use the cash. logoURL = ContractPacks/RAD/RAD_logo logoScaledURL = ContractPacks/RAD/RAD_logo_scaled mentality = NoRandomContractMentality } For your multi-waypoint issue: I got no idea for myself but maybe take a look at JNSQ-KSRGAP (probably applies to every GAP contract pack but its the one I'm using and know about) since it offers "Multi Flights" where you start at one airport and continue to two different airports while also creating a waypoint for each airport. This works just on bases you have opened, so there must be some kind of progress tracking list in the background of which 2 airports can be picked at random. I personally don't understand these configs on a level to derive a solution to your problem but maybe you do Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted Friday at 06:26 PM Share Posted Friday at 06:26 PM (edited) @4x4cheesecake For the GAP contracts I cheated a little by creating arrays of waypoint information for each of the Airports and connecting flights. I then used the persistent data store to record the current index of value of explored (opened) airports. Each success of an "open airport mission" it added 1 to the value of the persistent data store index until all supported airports were opened. After that It was just a random number from 1 to the index to determine where a mission went to. For Multi-flights The array contained waypoint information for 2 possible destinations which were selected at random again. In all instances, the actual waypoints were set well in advance and they were never changing. Not really a solution for the random interesting place for a rover to go. @linuxgurugamer I did have issues when trying to get the Waypoint Generator behaviour to correctly set co-ordinates that were the output of a generated function. My solution was to scatter a bunch of fixed waypoints in an index and then create a interesting place waypoint near the fixed waypoint. Again useful for an interesting fixed area, but not useful for planet side scale exploration. Edited Friday at 06:33 PM by Caerfinon Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 07:51 PM Share Posted Friday at 07:51 PM (edited) 2 hours ago, 4x4cheesecake said: You sure about this one? Maybe I misunderstood something but other contract packs actually still use spaces for the agent name field and it works fine. I was, and then I tested and see that it's working with spaces. I had a comma in there, I'll have to test to see if that's the issue Edit: Looks like it's the comma which was causing the issue. I put the comma in and found this in the log file: 35899 [INFO] ContractConfigurator.ContractConfigurator: Loading CONTRACT_GROUP: 'RoverScienceMod' 35902 ContractConfigurator.ContractGroup: CONTRACT_GROUP 'RoverScienceMod': Providing the agent field for all CONTRACT_GROUP nodes is highly recommended, as the agent is used to group contracts in Mission Control. And yes, I did update the agent file as well as the contracts. Edited Friday at 07:57 PM by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 08:03 PM Share Posted Friday at 08:03 PM 1 hour ago, Caerfinon said: @4x4cheesecake For the GAP contracts I cheated a little by creating arrays of waypoint information for each of the Airports and connecting flights. I then used the persistent data store to record the current index of value of explored (opened) airports. Each success of an "open airport mission" it added 1 to the value of the persistent data store index until all supported airports were opened. After that It was just a random number from 1 to the index to determine where a mission went to. For Multi-flights The array contained waypoint information for 2 possible destinations which were selected at random again. In all instances, the actual waypoints were set well in advance and they were never changing. Not really a solution for the random interesting place for a rover to go. @linuxgurugamer I did have issues when trying to get the Waypoint Generator behaviour to correctly set co-ordinates that were the output of a generated function. My solution was to scatter a bunch of fixed waypoints in an index and then create a interesting place waypoint near the fixed waypoint. Again useful for an interesting fixed area, but not useful for planet side scale exploration. I solved this by using the DATA_EXPAND block. This does have the number of locations static, but it's a reasonable solution. Using this method you can't change the name of each individual waypoint, but that's ok for now. You can see the contract below, the DATA_EXPAND block has the name of the field as waypointIndex , and it's referenced in the parameter below Spoiler CONTRACT_GROUP { name = RoverScienceMod displayName = Rover Science agent = Space Penguins Inc minVersion = 1.15.0 maxSimultaneous = 4 } CONTRACT_TYPE { name = RoverExploreWhyren title = Rover Expedition group = RoverScienceMod description = The science team has identified an area of scientific interest and believes that @/targetVessel on @/targetBody should be directed to investigate. genericDescription = Search for science with a rover notes = Pilot your rover to the indicated location and perform all the science you can at that site. synopsis = Drive @/targetVessel on @/targetBody to this location. completedMessage = Research complete! Good work. deadline = 50 targetBody = @/targetVessel.CelestialBody() maxSimultaneous = 2 rewardReputation = 1.0 rewardFunds = 10000.0 failureReputation = 5.0 failureFunds = 20000.0 advanceFunds = 0 DATA { type = Vessel requiredValue = true targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random() title = Must have a landed rover } DATA { type = double targetRadius = @/targetBody.Radius() homeRadius = HomeWorld().Radius() distanceFactorTemp = @targetRadius == 0 ? 1 : @targetRadius/@homeRadius + 0.3 distanceFactor = @distanceFactorTemp / 2 TrivialMin = 3000 * @distanceFactor SignificantMin = 5000 * @distanceFactor ExceptionalMin = 7000 * @distanceFactor TrivialMax = 4000 * @distanceFactor SignificantMax = 6000 * @distanceFactor ExceptionalMax = 8000 * @distanceFactor } DATA { type = bool isTrivial = Prestige() == Trivial isSignificant = Prestige() == Significant isExceptional = Prestige() == Exceptional hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0 hasBar = @/targetVessel.Parts().Where(p => p == sensorBarometer).Count() > 0 hasAccel = @/targetVessel.Parts().Where(p => p == sensorAccelerometer).Count() > 0 hasGrav = @/targetVessel.Parts().Where(p => p == sensorGravimeter).Count() > 0 hasGoo = @/targetVessel.Parts().Where(p => p == GooExperiment).Count() > 0 hasMat = @/targetVessel.Parts().Where(p => p == science_module).Count() > 0 hasAtmo = @/targetVessel.Parts().Where(p => p == sensorAtmosphere).Count() > 0 hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == "Scientist").Count() > 0 hasAtmosphere = @/targetBody.HasAtmosphere() title = Must all required experiments } DATA_EXPAND { type = int waypointIndex = [1,2,3] } // May make the following optional in the future REQUIREMENT { name = PartModuleUnlocked type = PartModuleUnlocked // PartModule that needs to be unlocked. // // Type: string // Required: Yes (multiples allowed) // partModule = RoverScience } PARAMETER { name = Location1AllObjectives type = Sequence disableOnStateChange = false title = Rover Expedition hiddenParameter = Location1AllResearch PARAMETER { name = Location1Arrival type = VisitWaypoint index = @/waypointIndex //index = 1 title = Direct rover to the Interesting Place } PARAMETER { name = Location1AllResearch type = All title = Conduct research at the Interesting Place PARAMETER { name = AtLeast type = AtLeast // The minimum number that must be completed. // // Type: int // Required: Yes // count = 3 title = At least 3 experiments must be completed PARAMETER { name = Location1RoverScience type = CollectScience experiment = RoverScienceExperiment //recoveryMethod = @/recoveryMethod //experimentSituation = SrfLanded rewardScience = 0.25 } PARAMETER { name = Location1TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1TemperatureScanRequirement type = Expression expression = @/hasTherm } } PARAMETER { name = Location1PressureScan type = CollectScience experiment = barometerScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1BarometerScanRequirement type = Expression expression = @/hasBar } } PARAMETER { name = Location1AccelerometerScan type = CollectScience experiment = seismicScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AccelScanRequirement type = Expression expression = @/hasAccel } } PARAMETER { name = Location1GravityScan type = CollectScience experiment = gravityScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1GravScanRequirement type = Expression expression = @/hasGrav } } PARAMETER { name = Location1CrewReport type = CollectScience experiment = crewReport experiment = evaReport experiment = surfaceSample recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1CrewReportRequirement type = Expression expression = @/hasScientist } } PARAMETER { name = Location1Goo type = CollectScience experiment = mysteryGoo recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1GooRequirement type = Expression expression = @/hasScientist && @/hasGoo } } PARAMETER { name = Location1Mat type = CollectScience experiment = mobileMaterialsLab recoveryMethod = None rewardScience = 1.0 REQUIREMENT { name = Location1MatRequirement type = Expression expression = @/hasScientist && @/hasMat } } PARAMETER { name = Location1AtmoScan type = CollectScience experiment = atmosphereAnalysis recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AtmoScanRequirement type = Expression expression = @/hasAtmo && @/hasAtmosphere } } } } } BEHAVIOUR { name = WaypointGenerator type = WaypointGenerator WAYPOINT { name = Rover Location hidden = true icon = report altitude = 0.0 latitude = @/targetVessel.Location().Latitude() longitude = @/targetVessel.Location().Longitude() } RANDOM_WAYPOINT_NEAR { name = Interesting Place icon = report hidden = false altitude = 0.0 waterAllowed = false nearIndex = 0 clustered = true count = 3 minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax } // RANDOM_WAYPOINT_NEAR // { // name = Another interesting Place // icon = report // hidden = false // altitude = 0.0 // waterAllowed = false // nearIndex = 1 // clustered = true // minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin // maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax // } } } Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted Friday at 08:26 PM Share Posted Friday at 08:26 PM @linuxgurugamer That's a nice way to do it! Huzzah! Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Friday at 09:50 PM Share Posted Friday at 09:50 PM 1 hour ago, Caerfinon said: @linuxgurugamer That's a nice way to do it! Huzzah! Yes, but I'm not done testing, and the latest test shows that all 3 waypoints are shown with no indiciation of which one needs to be the first; apparently they need to be completed in order More work :-( Quote Link to comment Share on other sites More sharing options...
Caerfinon Posted Friday at 10:47 PM Share Posted Friday at 10:47 PM 56 minutes ago, linuxgurugamer said: More work :-( Always Quote Link to comment Share on other sites More sharing options...
The Brazilian Luigi Posted Sunday at 11:23 AM Share Posted Sunday at 11:23 AM Spoiler Exception occured while attempt to generate contract of type 'KSRGAP.KSRGAP03-CommercialFlights1': System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0000d] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ContractConfigurator.Behaviour.WaypointGenerator+WaypointData..ctor (ContractConfigurator.Behaviour.WaypointGenerator+WaypointData orig, Contracts.Contract contract) [0x00048] in <50aaafcd0dae43489715b7c388f819df>:0 at ContractConfigurator.Behaviour.WaypointGenerator..ctor (ContractConfigurator.Behaviour.WaypointGenerator orig, ContractConfigurator.ConfiguredContract contract) [0x00031] in <50aaafcd0dae43489715b7c388f819df>:0 at ContractConfigurator.Behaviour.WaypointGeneratorFactory.Generate (ContractConfigurator.ConfiguredContract contract) [0x00000] in <50aaafcd0dae43489715b7c388f819df>:0 at ContractConfigurator.BehaviourFactory.GenerateBehaviours (ContractConfigurator.ConfiguredContract contract, System.Collections.Generic.List`1[T] behaviourNodes) [0x00019] in <50aaafcd0dae43489715b7c388f819df>:0 at ContractConfigurator.ContractType.GenerateBehaviours (ContractConfigurator.ConfiguredContract contract) [0x00000] in <50aaafcd0dae43489715b7c388f819df>:0 at ContractConfigurator.ConfiguredContract.Initialize (ContractConfigurator.ContractType contractType) [0x00211] in <50aaafcd0dae43489715b7c388f819df>:0 So uh, had error, please help, all I did was complete a contract from Kerbin Side Remastered GAP Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Sunday at 09:57 PM Share Posted Sunday at 09:57 PM Is it possible to hide a waypoint after reaching it ? The following code hides it after contract completion (according to the docs), but doesn't seem to hide it after reaching the waypoint. PARAMETER { name = Location3Arrival type = VisitWaypoint index = 3 title = Direct rover to the third Interesting Place completeInSequence = true disableOnStateChange = true horizontalDistance = 250.0 hideOnCompletion = true disableOnStateChange = true showMessages = true completeInSequence = true } Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted Sunday at 10:52 PM Share Posted Sunday at 10:52 PM It seems that if an experiment is run (for example, the thermometer) at a waypoint, it will be considered to have been run when the next waypoint is reached. I'm trying to have a contract which requires an experiment to be run at three different locations, however, even though I have seperate blocks for each location with a block for the experiment, the experiment is considered run at the second and third waypoints. I've included the entire contract below, looking for any suggestions, if it's at all possible: Spoiler CONTRACT_GROUP { name = RoverScienceMod displayName = Rover Science agent = Space Penguins Inc minVersion = 1.15.0 maxSimultaneous = 4 } CONTRACT_TYPE { name = RoverExploreWhyren title = Rover Expedition group = RoverScienceMod description = The science team has identified an area of scientific interest and believes that @/targetVessel on @/targetBody should be directed to investigate. genericDescription = Search for science with a rover notes = Pilot your rover to the indicated location and perform all the science you can at that site. synopsis = Drive @/targetVessel on @/targetBody to this location. completedMessage = Research complete! Good work. deadline = 50 targetBody = @/targetVessel.CelestialBody() maxSimultaneous = 2 rewardReputation = 1.0 rewardFunds = 10000.0 failureReputation = 5.0 failureFunds = 20000.0 advanceFunds = 0 DATA { type = Vessel requiredValue = true targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random() title = Must have a landed rover } DATA { type = double targetRadius = @/targetBody.Radius() homeRadius = HomeWorld().Radius() distanceFactorTemp = @targetRadius == 0 ? 1 : @targetRadius/@homeRadius + 0.3 distanceFactor = @distanceFactorTemp / 2 TrivialMin = 3000 * @distanceFactor SignificantMin = 5000 * @distanceFactor ExceptionalMin = 7000 * @distanceFactor TrivialMax = 4000 * @distanceFactor SignificantMax = 6000 * @distanceFactor ExceptionalMax = 8000 * @distanceFactor //TrivialMin = 600 * @distanceFactor //SignificantMin = 1000 * @distanceFactor //ExceptionalMin = 1400 * @distanceFactor //TrivialMax = 800 * @distanceFactor //SignificantMax = 1200 * @distanceFactor //ExceptionalMax = 1600 * @distanceFactor } DATA { type = bool isTrivial = Prestige() == Trivial isSignificant = Prestige() == Significant isExceptional = Prestige() == Exceptional hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0 hasBar = @/targetVessel.Parts().Where(p => p == sensorBarometer).Count() > 0 hasAccel = @/targetVessel.Parts().Where(p => p == sensorAccelerometer).Count() > 0 hasGrav = @/targetVessel.Parts().Where(p => p == sensorGravimeter).Count() > 0 hasGoo = @/targetVessel.Parts().Where(p => p == GooExperiment).Count() > 0 hasMat = @/targetVessel.Parts().Where(p => p == science_module).Count() > 0 hasAtmo = @/targetVessel.Parts().Where(p => p == sensorAtmosphere).Count() > 0 hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == "Scientist").Count() > 0 hasAtmosphere = @/targetBody.HasAtmosphere() title = Must all required experiments } // May make the following optional in the future REQUIREMENT { name = PartModuleUnlocked type = PartModuleUnlocked partModule = RoverScience } PARAMETER { name = Sequence type = Sequence hiddenParameter = Location2Arrival hiddenParameter = Location2AllObjectives hiddenParameter = Location3Arrival hiddenParameter = Location3AllObjectives PARAMETER { name = Location1Arrival type = VisitWaypoint index = 1 title = i. Direct rover to the first Interesting Place horizontalDistance = 250.0 distance = 250.0 hideOnCompletion = true disableOnStateChange = true showMessages = true completeInSequence = true } PARAMETER { name = Location1AllObjectives type = All title = Rover Expedition PARAMETER { name = Location1AllResearch type = All title = Conduct research at the Interesting Place hideOnCompletion = true disableOnStateChange = true PARAMETER { name = AtLeast type = AtLeast // The minimum number that must be completed. // // Type: int // Required: Yes // count = 3 title = Complete at least <count> of the following PARAMETER { name = Location1RoverScience type = CollectScience experiment = RoverScienceExperiment //recoveryMethod = @/recoveryMethod recoveryMethod = None rewardScience = 0.25 } PARAMETER { name = Location1TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1TemperatureScanRequirement type = Expression expression = @/hasTherm } } PARAMETER { name = Location1PressureScan type = CollectScience experiment = barometerScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1BarometerScanRequirement type = Expression expression = @/hasBar } } PARAMETER { name = Location1AccelerometerScan type = CollectScience experiment = seismicScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AccelScanRequirement type = Expression expression = @/hasAccel } } PARAMETER { name = Location1GravityScan type = CollectScience experiment = gravityScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1GravScanRequirement type = Expression expression = @/hasGrav } } PARAMETER { name = Location1CrewReport type = CollectScience experiment = crewReport experiment = evaReport experiment = surfaceSample recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1CrewReportRequirement type = Expression expression = @/hasScientist } } PARAMETER { name = Location1Goo type = CollectScience experiment = mysteryGoo recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location1GooRequirement type = Expression expression = @/hasScientist && @/hasGoo } } PARAMETER { name = Location1Mat type = CollectScience experiment = mobileMaterialsLab recoveryMethod = None rewardScience = 1.0 REQUIREMENT { name = Location1MatRequirement type = Expression expression = @/hasScientist && @/hasMat } } PARAMETER { name = Location1AtmoScan type = CollectScience experiment = atmosphereAnalysis recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1AtmoScanRequirement type = Expression expression = @/hasAtmo && @/hasAtmosphere } } } } } PARAMETER { name = Location2Arrival type = VisitWaypoint index = 2 title = ii. Direct rover to the next Interesting Place disableOnStateChange = true horizontalDistance = 250.0 distance = 250.0 hideOnCompletion = true disableOnStateChange = true showMessages = true completeInSequence = true } PARAMETER { name = Location2AllObjectives type = All disableOnStateChange = false title = Rover Expedition hideOnCompletion = true //completeInSequence = true PARAMETER { name = Location2AllResearch type = All title = Conduct research at the second Interesting Place disableOnStateChange = true PARAMETER { name = AtLeast type = AtLeast // The minimum number that must be completed. // // Type: int // Required: Yes // count = 3 title = At least 3 experiments must be completed PARAMETER { name = Location2RoverScience type = CollectScience experiment = RoverScienceExperiment //recoveryMethod = @/recoveryMethod //experimentSituation = SrfLanded rewardScience = 0.25 } PARAMETER { name = Location2TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location2TemperatureScanRequirement type = Expression expression = @/hasTherm } } PARAMETER { name = Location2PressureScan type = CollectScience experiment = barometerScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location2BarometerScanRequirement type = Expression expression = @/hasBar } } PARAMETER { name = Location2AccelerometerScan type = CollectScience experiment = seismicScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location2AccelScanRequirement type = Expression expression = @/hasAccel } } PARAMETER { name = Location2GravityScan type = CollectScience experiment = gravityScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location2GravScanRequirement type = Expression expression = @/hasGrav } } PARAMETER { name = Location2CrewReport type = CollectScience experiment = crewReport experiment = evaReport experiment = surfaceSample recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location2CrewReportRequirement type = Expression expression = @/hasScientist } } PARAMETER { name = Location2Goo type = CollectScience experiment = mysteryGoo recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location2GooRequirement type = Expression expression = @/hasScientist && @/hasGoo } } PARAMETER { name = Location2Mat type = CollectScience experiment = mobileMaterialsLab recoveryMethod = None rewardScience = 1.0 REQUIREMENT { name = Location2MatRequirement type = Expression expression = @/hasScientist && @/hasMat } } PARAMETER { name = Location2AtmoScan type = CollectScience experiment = atmosphereAnalysis recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location2AtmoScanRequirement type = Expression expression = @/hasAtmo && @/hasAtmosphere } } } } } PARAMETER { name = Location3Arrival type = VisitWaypoint index = 3 title = iii. Direct rover to the third Interesting Place completeInSequence = true disableOnStateChange = true horizontalDistance = 250.0 distance = 250.0 hideOnCompletion = true disableOnStateChange = true showMessages = true completeInSequence = true } PARAMETER { name = Location3AllObjectives type = Sequence disableOnStateChange = false title = Rover Expedition hideOnCompletion = true completeInSequence = true PARAMETER { name = Location3AllResearch type = All title = Conduct research at the third Interesting Place completeInSequence = true disableOnStateChange = true PARAMETER { name = AtLeast type = AtLeast // The minimum number that must be completed. // // Type: int // Required: Yes // count = 3 title = At least 3 experiments must be completed PARAMETER { name = Location3RoverScience type = CollectScience experiment = RoverScienceExperiment //recoveryMethod = @/recoveryMethod //experimentSituation = SrfLanded rewardScience = 0.25 } PARAMETER { name = Location3TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location3TemperatureScanRequirement type = Expression expression = @/hasTherm } } PARAMETER { name = Location3PressureScan type = CollectScience experiment = barometerScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location3BarometerScanRequirement type = Expression expression = @/hasBar } } PARAMETER { name = Location3AccelerometerScan type = CollectScience experiment = seismicScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location3AccelScanRequirement type = Expression expression = @/hasAccel } } PARAMETER { name = Location3GravityScan type = CollectScience experiment = gravityScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location3GravScanRequirement type = Expression expression = @/hasGrav } } PARAMETER { name = Location3CrewReport type = CollectScience experiment = crewReport experiment = evaReport experiment = surfaceSample recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location3CrewReportRequirement type = Expression expression = @/hasScientist } } PARAMETER { name = Location3Goo type = CollectScience experiment = mysteryGoo recoveryMethod = None rewardScience = 0.5 REQUIREMENT { name = Location3GooRequirement type = Expression expression = @/hasScientist && @/hasGoo } } PARAMETER { name = Location3Mat type = CollectScience experiment = mobileMaterialsLab recoveryMethod = None rewardScience = 1.0 REQUIREMENT { name = Location3MatRequirement type = Expression expression = @/hasScientist && @/hasMat } } PARAMETER { name = Location3AtmoScan type = CollectScience experiment = atmosphereAnalysis recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location3AtmoScanRequirement type = Expression expression = @/hasAtmo && @/hasAtmosphere } } } } } } BEHAVIOUR { name = WaypointGenerator type = WaypointGenerator WAYPOINT { name = Rover Location hidden = true icon = report altitude = 0.0 latitude = @/targetVessel.Location().Latitude() longitude = @/targetVessel.Location().Longitude() } RANDOM_WAYPOINT_NEAR { name = Interesting Place icon = report hidden = false altitude = 0.0 waterAllowed = false nearIndex = 0 //clustered = true chained = true minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax } RANDOM_WAYPOINT_NEAR { name = Another interesting Place icon = report hidden = false altitude = 0.0 waterAllowed = false nearIndex = 1 parameter = Location1AllObjectives minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax } RANDOM_WAYPOINT_NEAR { name = Yet another interesting Place icon = report hidden = false altitude = 0.0 waterAllowed = false nearIndex = 2 parameter = Location2AllObjectives minDistance = Prestige() == Trivial ? @/TrivialMin : Prestige() == Significant ? @/SignificantMin : @/ExceptionalMin maxDistance = Prestige() == Trivial ? @/TrivialMax : Prestige() == Significant ? @/SignificantMax : @/ExceptionalMax } } } Quote Link to comment Share on other sites More sharing options...
darthgently Posted Sunday at 11:41 PM Share Posted Sunday at 11:41 PM 1 hour ago, linuxgurugamer said: Is it possible to hide a waypoint after reaching it ? The following code hides it after contract completion (according to the docs), but doesn't seem to hide it after reaching the waypoint. PARAMETER { name = Location3Arrival type = VisitWaypoint index = 3 title = Direct rover to the third Interesting Place completeInSequence = true disableOnStateChange = true horizontalDistance = 250.0 hideOnCompletion = true disableOnStateChange = true showMessages = true completeInSequence = true } I know I’ve completed contracts for surface readings over multiple waypoints and the waypoints disappear after being there and completing the experiment. I’m not sure when they disappeared. Maybe it was after arrival at next point but I recall it was right after the experiment. So maybe looking at a variety of contract packs and looking for how they did it is the best approach and it seems clear you are already doing that Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted 19 hours ago Share Posted 19 hours ago I'm beginning to think it's a bug in Waypoint Manager, when I removed it, things worked mostly as expected. Not sure if it's just a bug, or an oddity, where the first waypont stays in the dialog even after the second is shown 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.