diff --git a/test/AwardExperience.cfg b/test/Behaviour/AwardExperience.cfg similarity index 58% rename from test/AwardExperience.cfg rename to test/Behaviour/AwardExperience.cfg index 7215e95a1..a13f6f03e 100644 --- a/test/AwardExperience.cfg +++ b/test/Behaviour/AwardExperience.cfg @@ -1,23 +1,22 @@ +// Contract for behaviour test CONTRACT_TYPE { - name = AwardExperience - - title = AwardExperience test - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. + // Unique name of the contract (required) + name = TestBehaviour_AwardExperience + group = BehaviourTest maxSimultaneous = 1 - targetBody = Kerbin - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 + // Contract text + title = AwardExperience Behaviour + description = description + synopsis = synopsis + completedMessage = completedMessage PARAMETER { - name = VesselParameterGroup + name = ParameterToComplete type = VesselParameterGroup PARAMETER @@ -34,7 +33,7 @@ CONTRACT_TYPE { type = AwardExperience - parameter = VesselParameterGroup + parameter = ParameterToComplete experience = 4 diff --git a/test/ExperimentalPart.cfg b/test/Behaviour/ExperimentalPart.cfg similarity index 100% rename from test/ExperimentalPart.cfg rename to test/Behaviour/ExperimentalPart.cfg diff --git a/test/Behaviour/Orbit.cfg b/test/Behaviour/Orbit.cfg new file mode 100644 index 000000000..29d22dc94 --- /dev/null +++ b/test/Behaviour/Orbit.cfg @@ -0,0 +1,73 @@ +// Contract for behaviour test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestBehaviour_OrbitGenerator + + group = BehaviourTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = OrbitGenerator Behaviour + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = VesselParameterGroup + + duration = 10d 2h + + PARAMETER + { + type = ReachSpecificOrbit + index = 0 + } + } + + PARAMETER + { + type = ReachSpecificOrbit + index = 1 + } + + BEHAVIOUR + { + type = OrbitGenerator + + // Use this to generate an orbit with specific parameters + FIXED_ORBIT + { + // Actual orbit details. Note that REF represents the reference + // body - but will be overriden by the targetBody. + ORBIT + { + SMA = 1449999.99996286 + ECC = 1.07570816555399E-05 + INC = 0 + LPE = 270.690311604893 + LAN = 1.93635924563296 + MNA = 1.55872660382504 + EPH = 31.3999999999994 + REF = 1 + } + } + + RANDOM_ORBIT + { + type = KOLNIYA + } + + RANDOM_ORBIT + { + type = POLAR + } + + RANDOM_ORBIT + { + type = TUNDRA + } + } +} diff --git a/test/Behaviour/SpawnPassengers.cfg b/test/Behaviour/SpawnPassengers.cfg new file mode 100644 index 000000000..03fdf6bea --- /dev/null +++ b/test/Behaviour/SpawnPassengers.cfg @@ -0,0 +1,28 @@ +// Contract for behaviour test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestBehaviour_SpawnPassengers + + group = BehaviourTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = SpawnPassengers Behaviour + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = HasPassengers + } + + BEHAVIOUR + { + type = SpawnPassengers + + count = 10 + } +} diff --git a/test/UnlockTech.cfg b/test/Behaviour/UnlockTech.cfg similarity index 100% rename from test/UnlockTech.cfg rename to test/Behaviour/UnlockTech.cfg diff --git a/test/Behaviour/WaypointGenerator.cfg b/test/Behaviour/WaypointGenerator.cfg new file mode 100644 index 000000000..ab5c8f2e7 --- /dev/null +++ b/test/Behaviour/WaypointGenerator.cfg @@ -0,0 +1,102 @@ +// Contract for behaviour test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestBehaviour_WaypointGenerator + + group = BehaviourTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = WaypointGenerator Behaviour + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = VisitWaypoint + + index = 0 + disableOnStateChange = false + } + + PARAMETER + { + type = VisitWaypoint + + index = 1 + } + + PARAMETER + { + type = VisitWaypoint + + index = 2 + } + + BEHAVIOUR + { + type = WaypointGenerator + + // Use this to generate a waypoint with fixed coordinates + WAYPOINT + { + name = Kerbal Space Center + + icon = thermometer + altitude = 0.0 + latitude = -0.102668048654 + longitude = -74.5753856554 + } + + // Use this to generate a waypoint relative to a PQS City + PQS_CITY + { + name = LaunchPad + + icon = thermometer + altitude = 0.0 + pqsCity = KSC + pqsOffset = 447.307865750742, 5.14341771520321E-05, 24.9700656982985 + parameter = VisitWaypoint1 + } + + // Use this to generate a waypoint with random coordinates + RANDOM_WAYPOINT + { + name = A waypoint on Kerbin + + count = 1 + icon = thermometer + altitude = 0.0 + waterAllowed = false + forceEquatorial = false + } + + // Use this to generate a waypoint with random coordinates, but near + // another waypoint. + RANDOM_WAYPOINT_NEAR + { + name = A random waypoint near + + count = Random(2,5) + icon = thermometer + altitude = 0.0 + waterAllowed = false + nearIndex = 2 + minDistance = 500.0 + maxDistance = 25000.0 + } + + RANDOM_WAYPOINT + { + name = An underwater waypoint + + count = 1 + icon = thermometer + underwater = true + } + } +} diff --git a/test/CollectScience.cfg b/test/CollectScience.cfg deleted file mode 100644 index e51466958..000000000 --- a/test/CollectScience.cfg +++ /dev/null @@ -1,238 +0,0 @@ -CONTRACT_TYPE -{ - name = CollectScience - group = TestGroup - - // Contract text - title = CollectScience test - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - targetBody = Kerbin - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - PARAMETER - { - name = VesselParameterGroup - type = VesselParameterGroup - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = LaunchPad - situation = SrfLanded - - // Valid values for stock KSP are: - // asteroidSample - // crewReport - // evaReport - // mysteryGoo - // surfaceSample - // mobileMaterialsLab - // temperatureScan - // barometerScan - // seismicScan - // gravityScan - // atmosphereAnalysis - experiment = crewReport - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - location = Space - recoveryMethod = Transmit - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - location = Surface - recoveryMethod = Recover - } - } -} - - -CONTRACT_TYPE -{ - name = CollectScienceRandom - group = TestGroup - - // Contract text - title = CollectScience - Random subject - description = Get some science. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - targetBody = @scienceSubject.CelestialBody() - - // Contract rewards - rewardScience = 1.0 - - DATA - { - type = ScienceSubject - scienceSubject = AllScienceSubjects().Random() - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject.Biome() - situation = @/scienceSubject.Situation() - experiment = @/scienceSubject.Experiment() - } -} - - -CONTRACT_TYPE -{ - name = CollectScience20Kerbin - group = TestGroup - - // Contract text - title = CollectScience - At least 20 from Kerbin - description = Get some science. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - targetBody = Kerbin - - // Contract rewards - rewardScience = 1.0 - - DATA - { - type = ScienceSubject - scienceSubject = AllScienceSubjectsByBody([@targetBody]).Where(ss => ss.RemainingScience() >= 20).Random() - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject.Biome() - situation = @/scienceSubject.Situation() - experiment = @/scienceSubject.Experiment() - } -} - - -CONTRACT_TYPE -{ - name = CollectScienceNoBiome - group = TestGroup - - // Contract text - title = CollectScience - No Biome - description = Get some science. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - targetBody = @scienceSubject.CelestialBody() - - // Contract rewards - rewardScience = 1.0 - - DATA - { - type = ScienceSubject - scienceSubject = AllScienceSubjectsByBody(OrbitedBodies()).Where(ss => ss.Biome() == null).Random() - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject.Biome() - situation = @/scienceSubject.Situation() - experiment = @/scienceSubject.Experiment() - } -} - - -CONTRACT_TYPE -{ - name = CollectScience3Random - group = TestGroup - - // Contract text - title = CollectScience - 3 Things - description = Get some science. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - targetBody = OrbitedBodies().Random() - - // Contract rewards - rewardScience = 1.0 - - DATA - { - type = List - scienceSubjects = AllScienceSubjectsByBody([@targetBody]).Where(ss => ss.RemainingScience() >= 1.0).Random(3) - } - - DATA - { - type = ScienceSubject - scienceSubject0 = @scienceSubjects.ElementAt(0) - scienceSubject1 = @scienceSubjects.ElementAt(1) - scienceSubject2 = @scienceSubjects.ElementAt(2) - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject0.Biome() - situation = @/scienceSubject0.Situation() - experiment = @/scienceSubject0.Experiment() - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject1.Biome() - situation = @/scienceSubject1.Situation() - experiment = @/scienceSubject1.Experiment() - } - - PARAMETER - { - name = CollectScience - type = CollectScience - - biome = @/scienceSubject2.Biome() - situation = @/scienceSubject2.Situation() - experiment = @/scienceSubject2.Experiment() - } -} diff --git a/test/Groups.cfg b/test/Groups.cfg index a76852fd5..e83996077 100644 --- a/test/Groups.cfg +++ b/test/Groups.cfg @@ -9,7 +9,18 @@ CONTRACT_GROUP CONTRACT_GROUP { name = RequirementTest - minVersion = 1.29.0 displayName = Requirement Tests } + + CONTRACT_GROUP + { + name = ParameterTest + displayName = Parameter Tests + } + + CONTRACT_GROUP + { + name = BehaviourTest + displayName = Behaviour Tests + } } diff --git a/test/Orbit.cfg b/test/Orbit.cfg deleted file mode 100644 index 853d43462..000000000 --- a/test/Orbit.cfg +++ /dev/null @@ -1,215 +0,0 @@ -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = OrbitGenerator - - // Contract text - title = OrbitGenerator - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardFunds = 1000000.0 - rewardScience = 100.0 - - maxSimultaneous = 1 - - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - // The duration that the conditions must be satisfied for. Can specify values in - // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. - duration = 10d 2h - - - PARAMETER - { - name = ReachSpecificOrbit1 - type = ReachSpecificOrbit - - // The index (0-based) in the OrbitGenerator behaviour of the orbit we - // wish to reference. - // Default = 0 - index = 0 - } - - } - - BEHAVIOUR - { - name = OrbitGenerator - type = OrbitGenerator - - // Use this to generate an orbit with specific parameters - FIXED_ORBIT - { - // Body for the orbit - defaulted from the contract if not supplied - targetBody = Kerbin - - // Actual orbit details. Note that REF represents the reference - // body - but will be overriden by the targetBody. - ORBIT - { - SMA = 1449999.99996286 - ECC = 1.07570816555399E-05 - INC = 0 - LPE = 270.690311604893 - LAN = 1.93635924563296 - MNA = 1.55872660382504 - EPH = 31.3999999999994 - REF = 1 - } - } - - // Use this to generate an orbit with some randomization - RANDOM_ORBIT - { - // Body for the orbit - defaulted from the contract if not supplied - targetBody = Kerbin - - // Type of orbit to generate. Valid values are from - // FinePrint.Utilities.OrbitType: - // EQUATORIAL - // KOLNIYA - // POLAR - // RANDOM - // STATIONARY - // SYNCHRONOUS - // TUNDRA - type = KOLNIYA - - // Difficulty multiplier - generally makes the orbits harder to - // reach if you increase it. - // Default = 1.0 - difficulty = 10.0 - } - - // Use this to generate an orbit with some randomization - RANDOM_ORBIT - { - // Body for the orbit - defaulted from the contract if not supplied - targetBody = Kerbin - - // Type of orbit to generate. Valid values are from - // FinePrint.Utilities.OrbitType: - // EQUATORIAL - // KOLNIYA - // POLAR - // RANDOM - // STATIONARY - // SYNCHRONOUS - // TUNDRA - type = POLAR - } - - // Use this to generate an orbit with some randomization - RANDOM_ORBIT - { - // Body for the orbit - defaulted from the contract if not supplied - targetBody = Kerbin - - // Type of orbit to generate. Valid values are from - // FinePrint.Utilities.OrbitType: - // EQUATORIAL - // KOLNIYA - // POLAR - // RANDOM - // STATIONARY - // SYNCHRONOUS - // TUNDRA - type = TUNDRA - } - } -} - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = OrbitTest - - // Contract text - title = OrbitTest - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardFunds = 1000000.0 - rewardScience = 100.0 - - maxSimultaneous = 1 - - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - // The duration that the conditions must be satisfied for. Can specify values in - // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. - duration = 10d 2h - - PARAMETER - { - name = Orbit - type = Orbit - - // Target body, defaulted from the contract if not supplied. - targetBody = Kerbin - - // Minimum apoapsis in meters. - // Default = 0 - minApA = 100000 - - // Maximum apoapsis in meters. - // Default = double.MaxValue - maxApA = 250000 - - // Minimum periapsis in meters. - // Default = 0 - minPeA = 100000 - - // Maximum periapsis in meters. - // Default = double.MaxValue - maxPeA = 250000 - - // Minimum eccentricity. - // Default = 0 - minEccentricity = 0.0 - - // Maximum eccentricity. - // Default = double.MaxValue - maxEccentricity = 0.1 - - // Minimum inclination in degrees - // Default = 0 - minInclination = 0 - - // Maximum inclination in degrees - // Default = 180 - maxInclination = 1 - - minPeriod = 5h 0m 0s - maxPeriod = 7h 0m 0s - } - - } -} diff --git a/test/Parameter/Kerbal.cfg b/test/Parameter/Kerbal.cfg new file mode 100644 index 000000000..cde29e9f4 --- /dev/null +++ b/test/Parameter/Kerbal.cfg @@ -0,0 +1,58 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Kerbal + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Kerbal Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = HasAstronaut + + trait = Pilot + minExperience = 1 + maxExperience = 2 + minCount = 2 + maxCount = 10 + } + + PARAMETER + { + type = HasAstronaut + + trait = Scientist + maxExperience = 2 + maxCount = 10 + } + + PARAMETER + { + type = HasAstronaut + + trait = Engineer + minCount = 5 + } + + PARAMETER + { + type = HasAstronaut + + minExperience = 1 + } + + PARAMETER + { + type = RecoverKerbal + + kerbal = Jebediah Kerman + } +} diff --git a/test/Parameter/Miscellaneous.cfg b/test/Parameter/Miscellaneous.cfg new file mode 100644 index 000000000..4e9e35681 --- /dev/null +++ b/test/Parameter/Miscellaneous.cfg @@ -0,0 +1,61 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Miscellaneous + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Miscellaneous Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = Duration + + duration = 10d 4h 16m 53s + startCriteria = NEXT_LAUNCH + + preWaitText = Waiting for launch... + waitingText = Countdown + completionText = Blastoff! + } + + PARAMETER + { + type = MissionTimer + } + + // PartTest is for testing parts (or just activating them, for staged parts). This parameter + // supports child parameters - you will only be able to complete the part test if all child + // parameters are also completed. + PARAMETER + { + type = PartTest + + part = SmallGearBay + notes = Test this part anywhere, no other requirements! + } + + PARAMETER + { + type = TargetDestroyed + + vessel = Target 1 + vessel = Target 2 + vessel = Target 3 + } + + PARAMETER + { + type = Timer + + duration = 10d 30m + failContract = false + } +} diff --git a/test/Parameter/Negative.cfg b/test/Parameter/Negative.cfg new file mode 100644 index 000000000..217c8a3c4 --- /dev/null +++ b/test/Parameter/Negative.cfg @@ -0,0 +1,43 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Negative + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Negative Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = KerbalDeaths + + countMax = 2 + } + + PARAMETER + { + type = KerbalDeaths + + vessel = Kerbal Vessel + } + + PARAMETER + { + type = KerbalDeaths + + kerbal = Jebediah Kerman + kerbal = Valentina Kerman + } + + PARAMETER + { + type = NoStaging + } +} diff --git a/test/Parameter/Planetary.cfg b/test/Parameter/Planetary.cfg new file mode 100644 index 000000000..45f217e9b --- /dev/null +++ b/test/Parameter/Planetary.cfg @@ -0,0 +1,34 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Planetary + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Planetary Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = PerformOrbitalSurvey + } + + PARAMETER + { + type = PlantFlag + } + + PARAMETER:NEEDS[SCANsat] + { + type = SCANsatCoverage + + coverage = 60.0 + scanType = ResourceLoRes + } +} diff --git a/test/Parameter/Progression.cfg b/test/Parameter/Progression.cfg new file mode 100644 index 000000000..09b23885a --- /dev/null +++ b/test/Parameter/Progression.cfg @@ -0,0 +1,21 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Progression + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Progression Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = ReachSpace + } +} diff --git a/test/Parameter/RemoteTech.cfg b/test/Parameter/RemoteTech.cfg new file mode 100644 index 000000000..036a17dd1 --- /dev/null +++ b/test/Parameter/RemoteTech.cfg @@ -0,0 +1,59 @@ +// Contract for RemoteTech parameter test +CONTRACT_TYPE:NEEDS[RemoteTech] +{ + // Unique name of the contract (required) + name = TestParameter_RemoteTech + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = RemoteTech Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = VesselParameterGroup + + PARAMETER + { + type = KSCConnectivity + + hasConnectivity = true + + disableOnStateChange = false + } + + PARAMETER + { + type = SignalDelay + + minSignalDelay = 1.0 + maxSignalDelay = 70.0 + + disableOnStateChange = false + } + + PARAMETER + { + type = HasAntenna + + minCount = 1 + maxCount = 3 + + targetBody = Duna + + antennaType = Dish + + minRange = 36000000000 + } + } + + PARAMETER + { + type = CelestialBodyCoverage + } +} diff --git a/test/Parameter/Set.cfg b/test/Parameter/Set.cfg new file mode 100644 index 000000000..caf9ee13f --- /dev/null +++ b/test/Parameter/Set.cfg @@ -0,0 +1,165 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_Set + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = Set Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = All + + PARAMETER + { + type = ReachState + + minAltitude = 20000 + maxAltitude = 50000 + + minSpeed = 1000 + maxSpeed = 5000 + } + + PARAMETER + { + type = Duration + + duration = 12m 30s + startCriteria = NEXT_LAUNCH + + preWaitText = Waiting for launch + waitingText = Countdown + completionText = Blastoff! + } + } + + PARAMETER + { + type = Any + + PARAMETER + { + type = ReachSpace + } + + PARAMETER + { + type = ReachState + + minSpeed = 1000 + maxSpeed = 5000 + } + } + + PARAMETER + { + type = AtLeast + + count = 2 + + PARAMETER + { + type = ReachSpace + } + + PARAMETER + { + type = ReachState + + minSpeed = 4000 + maxSpeed = 5000 + } + + PARAMETER + { + type = CollectScience + } + } + + PARAMETER + { + type = AtMost + + count = 1 + + PARAMETER + { + type = ReachState + + minAltitude = 5000 + } + + PARAMETER + { + type = CollectScience + } + } + + PARAMETER + { + type = None + + PARAMETER + { + type = HasResource + + resource = LiquidFuel + minQuantity = 1000 + } + + PARAMETER + { + type = HasCrew + trait = Scientist + } + } + + PARAMETER + { + type = Not + + PARAMETER + { + type = ReachState + + situation = LANDED + } + } + + // In this example of the Sequence parameter, the player must orbit the Mun, + // then orbit Minmus. If the player orbits Minmus first, the parameter fails. + PARAMETER + { + type = Sequence + + hiddenParameter = OrbitMinmus + failWhenCompleteOutOfOrder = true + + PARAMETER + { + name = OrbitMun + type = ReachState + + situation = ORBITING + targetBody = Mun + } + + PARAMETER + { + name = OrbitMinmus + type = ReachState + + situation = ORBITING + targetBody = Minmus + } + } +} diff --git a/test/Parameter/VesselAttributes.cfg b/test/Parameter/VesselAttributes.cfg new file mode 100644 index 000000000..a19d5bc60 --- /dev/null +++ b/test/Parameter/VesselAttributes.cfg @@ -0,0 +1,329 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_VesselAttributes + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = VesselAttributes Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = HasAntenna + + minAntennaPower = 100.0 + maxAntennaPower = 1000.0 + antennaType = TRANSMIT + } + + PARAMETER + { + type = HasAntenna + + maxAntennaPower = 1000.0 + antennaType = RELAY + } + + PARAMETER + { + type = HasAntenna + + minAntennaPower = 100.0 + antennaType = RELAY + } + + PARAMETER + { + type = HasCrew + + trait = Pilot + minExperience = 1 + maxExperience = 2 + minCrew = 2 + maxCrew = 10 + + excludeKerbal = Bill Kerman + } + + PARAMETER + { + type = HasCrew + + trait = Scientist + maxExperience = 2 + maxCrew = 10 + } + + PARAMETER + { + type = HasCrew + + trait = Engineer + minCrew = 5 + } + + PARAMETER + { + type = HasCrew + + minExperience = 1 + } + + PARAMETER + { + type = HasCrew + + kerbal = Jebediah Kerman + } + + PARAMETER + { + type = HasCrewCapacity + + maxCapacity = 0 + } + + PARAMETER + { + type = HasCrewCapacity + + minCapacity = 1 + } + + PARAMETER + { + type = HasCrewCapacity + + maxCapacity = 10 + } + + PARAMETER + { + type = HasCrewCapacity + + minCapacity = 3 + maxCapacity = 3 + } + + PARAMETER + { + type = HasCrewCapacity + + minCapacity = 3 + maxCapacity = 7 + } + + PARAMETER + { + type = HasResource + + resource = Ablator + } + + PARAMETER + { + type = HasResource + + RESOURCE + { + resource = LiquidFuel + maxQuantity = 0.0 + } + + RESOURCE + { + resource = Oxidizer + minQuantity = 10.0 + } + + RESOURCE + { + resource = Oxidizer + maxQuantity = 1000.0 + } + } + + PARAMETER + { + type = HasResourceCapacity + + RESOURCE + { + resource = Oxidizer + minQuantity = 10.0 + maxQuantity = 1000.0 + } + } + + PARAMETER + { + type = IsNotVessel + + vessel = Vessel Key + } + + PARAMETER + { + type = PartValidation + + // The required part. Optional. If not specified, other values + // to determine whether the parts are valid. + part = mk1pod + } + + PARAMETER + { + type = PartValidation + + part = parachuteSingle + minCount = 0 + maxCount = 0 + } + + PARAMETER + { + type = PartValidation + + partModule = ModuleReactionWheel + + NONE + { + partModule = ModuleSAS + manufacturer = Nightingale Engineering + } + } + + PARAMETER + { + type = PartValidation + + VALIDATE_ALL + { + manufacturer = Kerlington Model Rockets and Paper Products Inc + } + } + + PARAMETER + { + type = PartValidation + + category = Engine + maxCount = 1 + } + + PARAMETER + { + type = PartValidation + + VALIDATE + { + part = fuelTank3-2 + minCount = 1 + } + + VALIDATE + { + part = largeSolarPanel + minCount = 4 + } + + VALIDATE + { + part = cupola + minCount = 2 + maxCount = 2 + } + } + + PARAMETER + { + type = PartValidation + + FILTER + { + category = Engine + } + + VALIDATE_ALL + { + part = liquidEngine2 + part = radialLiquidEngine1-2 + } + } + + PARAMETER + { + type = PartValidation + + FILTER + { + MODULE + { + name = ModuleScienceExperiment + + label = Experiment: Mystery Goo + experimentID = mysteryGoo + } + } + + minCount = 1 + } + + PARAMETER + { + type = PartValidation + + partModuleType = Wheel + } + + PARAMETER + { + type = PartValidation + + FILTER + { + partModuleType = Wheel + } + + NONE + { + manufacturer = LightYear Tire Company + } + } + + PARAMETER + { + type = VesselIsType + + vesselType = EVA + } + + PARAMETER + { + type = VesselMass + + maxMass = 10.0 + } + + PARAMETER + { + type = VesselMass + + minMass = 1.0 + } + + PARAMETER + { + type = VesselMass + + minMass = 1.0 + maxMass = 10.0 + } +} diff --git a/test/Parameter/VesselHistory.cfg b/test/Parameter/VesselHistory.cfg new file mode 100644 index 000000000..aa8b47217 --- /dev/null +++ b/test/Parameter/VesselHistory.cfg @@ -0,0 +1,104 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_VesselHistory + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = VesselHistory Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = CollectScience + + biome = Shores + situation = SrfLanded + location = Surface + experiment = evaReport + recoveryMethod = Ideal + } + + PARAMETER + { + name = VesselParameterGroup + type = VesselParameterGroup + + PARAMETER + { + type = CollectScience + + biome = LaunchPad + situation = SrfLanded + experiment = crewReport + } + + PARAMETER + { + type = CollectScience + + location = Space + recoveryMethod = Transmit + } + + PARAMETER + { + type = CollectScience + + location = Surface + recoveryMethod = Recover + } + } + + DATA + { + type = ScienceSubject + + title = Science stuff required + + scienceSubject = AllScienceSubjects().Random() + scienceSubject2 = AllScienceSubjectsByBody([@targetBody]).Where(ss => ss.RemainingScience() >= 20).Random() + scienceSubjectNoBiome = AllScienceSubjectsByBody(OrbitedBodies()).Where(ss => ss.Biome() == null).Random() + } + + PARAMETER + { + name = CollectScience + type = CollectScience + + biome = @/scienceSubject.Biome() + situation = @/scienceSubject.Situation() + experiment = @/scienceSubject.Experiment() + } + + PARAMETER + { + name = CollectScience + type = CollectScience + + biome = @/scienceSubject2.Biome() + situation = @/scienceSubject2.Situation() + experiment = @/scienceSubject2.Experiment() + } + + PARAMETER + { + name = CollectScience + type = CollectScience + + biome = @/scienceSubjectNoBiome.Biome() + situation = @/scienceSubjectNoBiome.Situation() + experiment = @/scienceSubjectNoBiome.Experiment() + } + + PARAMETER + { + type = NewVessel + } +} diff --git a/test/Parameter/VesselParameterGroup.cfg b/test/Parameter/VesselParameterGroup.cfg new file mode 100644 index 000000000..0adaf2d6f --- /dev/null +++ b/test/Parameter/VesselParameterGroup.cfg @@ -0,0 +1,164 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_VesselParameterGroup + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = VesselParameterGroup: General Test + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = VesselParameterGroup + + // The duration that the conditions must be satisfied for. Can specify values in + // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. + duration = 10d 2h + + PARAMETER + { + type = ReachState + + situation = FLYING + minDeltaVeeActual = 500 + maxDeltaVeeActual = 1000 + targetBody = Kerbin + } + + PARAMETER + { + type = HasCrew + + trait = Pilot + disableOnStateChange = false + } + + PARAMETER + { + type = HasResource + + resource = LiquidFuel + minQuantity = 100.0 + } + + PARAMETER + { + type = VesselMass + + maxMass = 10.0 + } + } + + PARAMETER + { + name = OriginAndDestination + type = VesselParameterGroup + + PARAMETER + { + name = Origin + type = ReachState + + situation = PRELAUNCH + biome = Shores + + disableOnStateChange = true + } + + PARAMETER + { + name = Destination + type = ReachState + + situation = FLYING + biome = Water + } + } +} + +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_VesselParameterGroup_Defined + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = VesselParameterGroup: Define Test + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = VesselParameterGroup + define = High Orbiter + + PARAMETER + { + name = Orbit + type = Orbit + + minPeA = 500000 + targetBody = Kerbin + } + } + + PARAMETER + { + type = VesselParameterGroup + vessel = High Orbiter + + PARAMETER + { + type = HasCrew + + minCrew = 1 + } + + PARAMETER + { + type = Duration + + duration = 5m + + preWaitText = Waiting time required + waitingText = Time to completion + completionText = Wait time over + } + } + + PARAMETER + { + type = VesselParameterGroup + vessel = High Orbiter + vessel = Some Vessel + + PARAMETER + { + type = HasCrew + + minCrew = 1 + } + + PARAMETER + { + type = Duration + + duration = 5m + + preWaitText = Waiting time required + waitingText = Time to completion + completionText = Wait time over + } + } +} diff --git a/test/Parameter/VesselState.cfg b/test/Parameter/VesselState.cfg new file mode 100644 index 000000000..6fad6e484 --- /dev/null +++ b/test/Parameter/VesselState.cfg @@ -0,0 +1,271 @@ +// Contract for parameter test +CONTRACT_TYPE +{ + // Unique name of the contract (required) + name = TestParameter_VesselState + + group = ParameterTest + maxSimultaneous = 1 + targetBody = Kerbin + + // Contract text + title = VesselState Parameters + description = description + synopsis = synopsis + completedMessage = completedMessage + + PARAMETER + { + type = Orbit + + situation = SUB_ORBITAL + + maxAltitude = 250000 + maxEccentricity = 4.0 + maxInclination = 10 + maxPeriod = 6h 0m 52s + } + + PARAMETER + { + type = Orbit + + situation = SUB_ORBITAL + + minAltitude = 100000 + minEccentricity = 1.0 + minInclination = 1 + minPeriod = 6h 0m 50s + } + + PARAMETER + { + type = Orbit + + minAltitude = 100000 + maxAltitude = 250000 + + minEccentricity = 1.0 + maxEccentricity = 4.0 + + minInclination = 1 + maxInclination = 10 + + minArgumentOfPeriapsis = 30 + maxArgumentOfPeriapsis = 270.0 + + minPeriod = 6h 0m 50s + maxPeriod = 6h 0m 52s + } + + PARAMETER + { + type = Orbit + + situation = SUB_ORBITAL + + maxApA = 250000 + maxPeA = 250000 + } + + PARAMETER + { + type = Orbit + + situation = SUB_ORBITAL + + minApA = 100000 + minPeA = 100000 + } + + PARAMETER + { + type = Orbit + + minApA = 100000 + maxApA = 250000 + + minPeA = 100000 + maxPeA = 250000 + } + + PARAMETER + { + type = ReachState + + maxAltitude = 50000 + + maxTerrainAltitude = 1000 + + maxSpeed = 5000 + + maxRateOfClimb = 5000 + + maxAcceleration = 5.0 + + maxDeltaVeeActual = 5000 + + maxDeltaVeeVacuum = 5000 + } + + PARAMETER + { + type = ReachState + + minAltitude = 20000 + + minTerrainAltitude = 500 + + minSpeed = 1000 + + minRateOfClimb = 1000 + + minAcceleration = 0.0 + + minDeltaVeeActual = 1000 + + minDeltaVeeVacuum = 1000 + } + + PARAMETER + { + type = ReachState + + minAltitude = 20000 + maxAltitude = 50000 + + minTerrainAltitude = 500 + maxTerrainAltitude = 1000 + + minSpeed = 1000 + maxSpeed = 5000 + + minRateOfClimb = 1000 + maxRateOfClimb = 5000 + + biome = Shores + + situation = FLYING + + minAcceleration = 0.0 + maxAcceleration = 5.0 + + minDeltaVeeActual = 1000 + maxDeltaVeeActual = 5000 + + minDeltaVeeVacuum = 1000 + maxDeltaVeeVacuum = 5000 + } + + PARAMETER + { + type = RecoverVessel + } + + PARAMETER + { + type = Rendezvous + + vessel = First Vessel + vessel = Second Vessel + distance = 2500.0 + } + + PARAMETER + { + type = VesselParameterGroup + vessel = SomeVessel + + PARAMETER + { + type = Rendezvous + + vessel = First Vessel + distance = 2500.0 + } + } + + PARAMETER + { + type = ResourceConsumption + + resource = Ablator + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + minRate = 0.0 + maxRate = 1000.0 + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + minRate = 10.0 + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + minRate = 10.0 + maxRate = 1000.0 + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + maxRate = -1000.0 + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + minRate = -10.0 + maxRate = 0.0 + } + + PARAMETER + { + type = ResourceConsumption + + resource = LiquidFuel + minRate = -10.0 + maxRate = -1000.0 + } + + PARAMETER + { + type = ReturnHome + } + + PARAMETER + { + type = VesselDestroyed + + mustImpactTerrain = true + } + + PARAMETER + { + type = VesselNotDestroyed + + vessel = Vessel not to be destroyed + vessel = Another vessel that should not be destroyed + } + + PARAMETER + { + type = VesselNotDestroyed + } +} diff --git a/test/PartValidation.cfg b/test/PartValidation.cfg deleted file mode 100644 index e81433277..000000000 --- a/test/PartValidation.cfg +++ /dev/null @@ -1,232 +0,0 @@ -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = PartValidator - - // Contract text - title = PartValidator - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - maxSimultaneous = 1 - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - DATA - { - type = List - - requiredValue = false - thrustyParts = AllParts().Where(p => p.EngineVacuumThrust() > 500.0) - atmoParts = AllParts().Where(p => p.EngineVacuumISP() < p.EngineAtmosphereISP()) - } - - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - // The duration that the conditions must be satisfied for. Can specify values in - // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. - duration = 10d - - PARAMETER - { - name = PartValidation - type = PartValidation - - // The required part. Optional. If not specified, other values - // to determine whether the parts are valid. - part = mk1pod - } - - PARAMETER - { - name = PartValidation2 - type = PartValidation - - part = parachuteSingle - minCount = 0 - maxCount = 0 - } - - PARAMETER - { - name = PartValidation3 - type = PartValidation - - partModule = ModuleReactionWheel - - NONE - { - partModule = ModuleSAS - manufacturer = Nightingale Engineering - } - } - - PARAMETER - { - name = PartValidation4 - type = PartValidation - - VALIDATE_ALL - { - manufacturer = Kerlington Model Rockets and Paper Products Inc - } - } - - PARAMETER - { - name = PartValidation5 - type = PartValidation - - category = Engine - maxCount = 1 - } - - PARAMETER - { - name = PartValidation6 - type = PartValidation - - VALIDATE - { - part = fuelTank3-2 - minCount = 1 - } - - VALIDATE - { - part = largeSolarPanel - minCount = 4 - } - - VALIDATE - { - part = cupola - minCount = 2 - maxCount = 2 - } - } - - PARAMETER - { - name = PartValidation7 - type = PartValidation - - FILTER - { - category = Engine - } - - VALIDATE_ALL - { - part = liquidEngine2 - part = radialLiquidEngine1-2 - } - } - - PARAMETER - { - name = PartValidation8 - type = PartValidation - - FILTER - { - MODULE - { - name = ModuleScienceExperiment - - label = Experiment - experimentID = mysteryGoo - } - } - - minCount = 1 - } - - PARAMETER - { - name = PartValidation9 - type = PartValidation - - partModuleType = Wheel - } - - PARAMETER - { - name = PartValidation10 - type = PartValidation - - FILTER - { - partModuleType = Wheel - } - - NONE - { - manufacturer = LightYear Tire Company - } - } - } -} - - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = ResourceTest - - // Contract text - title = ResourceTest - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - maxSimultaneous = 1 - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - PARAMETER - { - type = HasResource - - resource = LiquidFuel - } - - PARAMETER - { - type = HasResource - - RESOURCE - { - resource = LiquidFuel - - minQuantity = 100.0 - } - - RESOURCE - { - resource = Oxidizer - - maxQuantity = 1000.0 - } - } -} diff --git a/test/RemoteTechTest.cfg b/test/RemoteTechTest.cfg deleted file mode 100644 index e966a4469..000000000 --- a/test/RemoteTechTest.cfg +++ /dev/null @@ -1,97 +0,0 @@ -CONTRACT_TYPE:NEEDS[RemoteTech] -{ - name = RemoteTechVesselTest - - // Contract text - title = RemoteTech Vessel Test - description = Test for RemoteTech Vessel parameters. - synopsis = Stuff - completedMessage = You have done it! - - // Controls for whether a contract can be declined or cancelled, default is true for both - cancellable = true - declinable = true - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardScience = 5000.0 - rewardReputation = 20.0 - rewardFunds = 1000000.0 - - PARAMETER - { - name = VesselParameterGroup - type = VesselParameterGroup - - PARAMETER - { - name = HasResource - type = HasResource - - resource = LiquidFuel - minQuantity = 100000.0 - - disableOnStateChange = false - } - - PARAMETER - { - name = KSCConnectivity - type = KSCConnectivity - - // Whether to check for connectivity or the lack of connectivity. - // Default = true - hasConnectivity = true - - // Text to use for the parameter's title. - // Default = Connected to KSC - //title = - - disableOnStateChange = false - } - - PARAMETER - { - name = SignalDelay - type = SignalDelay - - // Minimum signal delay in seconds. - // Default = 0.0 - minSignalDelay = 1.0 - - // Maximum signal delay in seconds. - // Default = double.MaxValue - maxSignalDelay = 70.0 - - // Text to use for the parameter's title. - // Default = Signal delay: Between and . - //title = - - disableOnStateChange = false - } - - PARAMETER - { - name = HasAntenna - type = HasAntenna - - minCount = 1 - maxCount = 3 - - targetBody = Duna - - antennaType = Dish - - minRange = 36000000000 - } - } - - PARAMETER - { - name = CelestialBodyCoverage - type = CelestialBodyCoverage - } -} diff --git a/test/RequirementTests.cfg b/test/RequirementTests.cfg deleted file mode 100644 index 8d33f3541..000000000 --- a/test/RequirementTests.cfg +++ /dev/null @@ -1,1006 +0,0 @@ -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractBaseConstruction - - // Contract text - title = RTC - BaseConstruction - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for completing a docking at the specified celestial body. - REQUIREMENT - { - name = BaseConstruction1 - type = BaseConstruction - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractDocking - - // Contract text - title = RTC - Docking - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for completing a docking at the specified celestial body. - REQUIREMENT - { - name = Docking1 - type = Docking - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractEscape - - // Contract text - title = RTC - Escape - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for escaping the specified celestial body. - REQUIREMENT - { - name = Escape1 - type = Escape - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractFlyBy - - // Contract text - title = RTC - FlyBy - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for performing a fly-by of the specified celestial body. - REQUIREMENT - { - name = FlyBy1 - type = FlyBy - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractLanding - - // Contract text - title = RTC - Landing - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for landing on the specified celestial body. - REQUIREMENT - { - name = Landing1 - type = Landing - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractOrbit - - // Contract text - title = RTC - Orbit - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for orbiting the specified celestial body. - REQUIREMENT - { - name = Orbit1 - type = Orbit - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractRendezvous - - // Contract text - title = RTC - Rendezvous - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for completing a rendezvous near the specified celestial body. - REQUIREMENT - { - name = Rendezvous1 - type = Rendezvous - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractReturnFromFlyBy - - // Contract text - title = RTC - ReturnFromFlyBy - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for returning from a fly-by of the specified celestial body. - REQUIREMENT - { - name = ReturnFromFlyBy1 - type = ReturnFromFlyBy - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractReturnFromOrbit - - // Contract text - title = RTC - ReturnFromOrbit - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for returning from orbit of the specified celestial body. - REQUIREMENT - { - name = ReturnFromOrbit1 - type = ReturnFromOrbit - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractReturnFromSurface - - // Contract text - title = RTC - ReturnFromSurface - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for returning from orbit of the specified celestial body. - REQUIREMENT - { - name = ReturnFromSurface1 - type = ReturnFromSurface - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Duna - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractSplashDown - - // Contract text - title = RTC - SplashDown - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for splashing down on the specified celestial body. - REQUIREMENT - { - name = SplashDown1 - type = SplashDown - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractSurfaceEVA - - // Contract text - title = RTC - SurfaceEVA - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for completing a surface EVA on the specified celestial body. - REQUIREMENT - { - name = SurfaceEVA1 - type = SurfaceEVA - - // Target celestial body. Defaults to the targetBody of the contract. - targetBody = Kerbin - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractPartUnlocked - - // Contract text - title = RTC - PartUnlocked - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having a certain part unlocked from the tech tree - REQUIREMENT - { - name = PartUnlocked1 - type = PartUnlocked - - // Part name that needs to be unlocked. - part = SmallGearBay - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractPartModuleUnlocked - - // Contract text - title = RTC - PartModuleUnlocked - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having a certain part unlocked from the tech tree - REQUIREMENT - { - name = PartModuleUnlocked1 - type = PartModuleUnlocked - - // PartModule that needs to be unlocked - partModule = ModuleReactionWheel - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractAltitudeRecord - - // Contract text - title = RTC - AltitudeRecord - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having reached a minimum launch altitude - REQUIREMENT - { - name = AltitudeRecord1 - type = AltitudeRecord - - // Minimum altitude that must have been reached - minAltitude = 30000 - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractFirstCrewToSurvive - - // Contract text - title = RTC - FirstCrewToSurvive - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having had a crew return successfully. - REQUIREMENT - { - name = FirstCrewToSurvive1 - type = FirstCrewToSurvive - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractFirstLaunch - - // Contract text - title = RTC - FirstLaunch - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having made the first launch - REQUIREMENT - { - name = FirstLaunch1 - type = FirstLaunch - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractKSCLanding - - // Contract text - title = RTC - KSCLanding - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having landed at the KSC - REQUIREMENT - { - name = KSCLanding1 - type = KSCLanding - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractRunwayLanding - - // Contract text - title = RTC - RunwayLanding - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having landed on the runway - REQUIREMENT - { - name = RunwayLanding1 - type = RunwayLanding - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractReachSpace - - // Contract text - title = RTC - ReachSpace - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having reached space - REQUIREMENT - { - name = ReachSpace1 - type = ReachSpace - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractSpaceCrewTransfer - - // Contract text - title = RTC - SpaceCrewTransfer - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having done a crew transfer in space - REQUIREMENT - { - name = SpaceCrewTransfer1 - type = SpaceCrewTransfer - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractSpacewalk - - // Contract text - title = RTC - Spacewalk - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having done a spacewalk - REQUIREMENT - { - name = Spacewalk1 - type = Spacewalk - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractTechResearched - - // Contract text - title = RTC - TechResearched - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Requirement for having researched a technology - REQUIREMENT - { - name = TechResearched1 - type = TechResearched - - // The technology that needs to have been researched. Take special note that this does not - // get validated - if you make a typo, the requirement will always return false. - tech = basicRocketry - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractCompleteContract - - // Contract text - title = RTC - CompleteContract - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = Param - type = ReachAltitudeEnvelope - - minAltitude = 5000 - maxAltitude = 10000 - } - - // Requirement for having a certain number of contracts completed of the given type. - REQUIREMENT - { - name = CompleteContract1 - type = CompleteContract - - // The type of contract being checked. This can either be a ContractConfigurator contract - // type or a standard contract type (class). - contractType = SimpleTestContract - - // The minimum number of times the given contract type must have been completed before - // the requirement is met. - // Default = 1 - minCount = 1 - - // The maximum number of times the given contract type can be completed before the - // requirement will no longer be met. - // Default = Infinite - maxCount = 5 - } - - REQUIREMENT - { - name = CompleteContract2 - type = CompleteContract - - // The type of contract being checked. This can either be a ContractConfigurator contract - // type or a standard contract type (class). - contractType = RequirementTestContractCompleteContract - - minCount = 0 - - // The amount of time after the last instance of the contract was - // complete before we can attempt again. - cooldownDuration = 10d - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractAny - - // Contract text - title = RTC - Any - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Set requirement - is met if any child requirement is met. - REQUIREMENT - { - name = Any1 - type = Any - - REQUIREMENT - { - name = ReachSpace1 - type = ReachSpace - } - - REQUIREMENT - { - name = TechResearched1 - type = TechResearched - - tech = basicRocketry - } - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestContractAll - - // Contract text - title = RTC - All - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Set requirement - is met if all child requirements are met. - REQUIREMENT - { - name = All1 - type = All - - REQUIREMENT - { - name = ReachSpace1 - type = ReachSpace - } - - REQUIREMENT - { - name = TechResearched1 - type = TechResearched - - tech = basicRocketry - } - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestHasKerbal - - // Contract text - title = RTC - HasKerbal - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Checks if the player has Kerbals matching the parameters on the roster. - REQUIREMENT - { - name = HasAstronaut - type = HasAstronaut - - // (Optional) The type of trait required. Valid values are: - // Pilot - // Engineer - // Scientist - trait = Engineer - - // (Optional) Minimum and maximum experience level. Default values are - // 0 and 5 (for min/max). - minExperience = 2 - maxExperience = 5 - - // (Optional) Minimum and maximum count. Default values are 1 and - // int.MaxValue (for min/max). - minCount = 1 - maxCount = 5 - } -} - -// Contract for requirement test -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestFacility - - // Contract text - title = RTC - Facility - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Checks if the player has Kerbals matching the parameters on the roster. - REQUIREMENT - { - name = Facility - type = Facility - - // The facility. Valid values are: - // LaunchPad - // Runway - // VehicleAssemblyBuilding - // SpaceplaneHangar - // TrackingStation - // AstronautComplex - // MissionControl - // ResearchAndDevelopment - // Administration - facility = Administration - - // (Optional) Minimum and maximum facility level. Default values are - // 0 and 2 (for min/max). - minLevel = 2 - maxLevel = 2 - } -} - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestFunds - - // Contract text - title = RTC - Funds - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Checks the player's funds. - REQUIREMENT - { - name = Funds - type = Funds - - // Minimum amount of funds the player must have before this contract - // can show up. - // Default = 0.0 - minFunds = 100000 - - // Maximum amount of funds the player can have before this contract - // no longer shows up. - // Default = double.MaxValue - maxFunds = 1000000 - } -} - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestReputation - - // Contract text - title = RTC - Reputation - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Checks the player's reputation. - REQUIREMENT - { - name = Reputation - type = Reputation - - // Minimum amount of reputation the player must have before this - // contract can show up. - // Default = -1000.0 - minReputation = 0 - - // Maximum amount of reputation the player can have before this - // contract no longer shows up. - // Default = 1000.0 - maxReputation = 500.0 - } -} - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = RequirementTestScience - - // Contract text - title = RTC - Science - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Need at least one parameter. - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - // Checks the player's science. - REQUIREMENT - { - name = Science - type = Science - - // Minimum amount of science the player must have before this contract - // can show up. - // Default = 0.0 - minScience = 100 - - // Maximum amount of science the player can have before this contract - // no longer shows up. - // Default = float.MaxValue - maxScience = 10000 - } -} diff --git a/test/SCANsatTest.cfg b/test/SCANsatTest.cfg deleted file mode 100644 index e5ca78627..000000000 --- a/test/SCANsatTest.cfg +++ /dev/null @@ -1,130 +0,0 @@ -CONTRACT_TYPE:NEEDS[SCANsat] -{ - name = CoverageTest - - // Contract text - title = SCANsat Coverage Test - description = Test Coverage, yay! - synopsis = [content] - completedMessage = You have done it! - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - maxSimultaneous = 1 - - // Contract rewards - rewardScience = 5000.0 - rewardReputation = 20.0 - rewardFunds = 1000000.0 - - PARAMETER - { - name = SCANsatCoverage1 - type = SCANsatCoverage - targetBody = Kerbin - coverage = 65.0 - // Examples: Altimetry, AltimetryHiRes, AltimetryLoRes, Anomaly, Biome - scanType = Altimetry - } - - PARAMETER - { - name = SCANsatCoverage2 - type = SCANsatCoverage - targetBody = Kerbin - coverage = 65.0 - // Examples: Altimetry, AltimetryHiRes, AltimetryLoRes, Anomaly, Biome - scanType = AltimetryLoRes - } - - PARAMETER - { - name = SCANsatCoverage3 - type = SCANsatCoverage - targetBody = Kerbin - coverage = 65.0 - // Examples: Altimetry, AltimetryHiRes, AltimetryLoRes, Anomaly, Biome - scanType = AltimetryHiRes - } - - PARAMETER - { - name = SCANsatCoverage4 - type = SCANsatCoverage - targetBody = Kerbin - coverage = 65.0 - // Examples: Altimetry, AltimetryHiRes, AltimetryLoRes, Anomaly, Biome - scanType = Anomaly - } - - PARAMETER - { - name = SCANsatCoverage5 - type = SCANsatCoverage - - // Target body - if not supplied will be defaulted from the contract. - targetBody = Kerbin - - // Coverage percentage that must be reached - coverage = 65.0 - - // The type of scan to perform. Valid values are from SCANdata.SCANtype. - // Some possible values are: - // AltimetryLoRes - // AltimetryHiRes - // Altimetry - // Biome - // Anomaly - // AnomalyDetail - // Kethane - // Ore - // Uranium - // Thorium - // Alumina - // Water - // Aquifer - // Minerals - // Substrate - // Karbonite - scanType = Biome - } - - REQUIREMENT - { - name = SCANsatCoverage - type = SCANsatCoverage - - // Target body - if not supplied will be defaulted from the contract. - targetBody = Kerbin - - // Minimum coverage that must be reached before the contract is valid. - // Default = 0.0 - minCoverage = 0.0 - - // Maximum coverage that must be reached before the contract is valid. - // Default = 100.0 - maxCoverage = 0.0 - - // The type of scan to perform. Valid values are from SCANdata.SCANtype. - // Some possible values are: - // AltimetryLoRes - // AltimetryHiRes - // Altimetry - // Biome - // Anomaly - // AnomalyDetail - // Kethane - // Ore - // Uranium - // Thorium - // Alumina - // Water - // Aquifer - // Minerals - // Substrate - // Karbonite - scanType = Biome - } -} diff --git a/test/TestContracts.cfg b/test/TestContracts.cfg deleted file mode 100644 index 276daebca..000000000 --- a/test/TestContracts.cfg +++ /dev/null @@ -1,566 +0,0 @@ -// Each CONTRACT_TYPE node represents a type of contract that can be offered -CONTRACT_TYPE -{ - // Unique name of the contract type (required) - name = SimpleTestContract - - // Group the contract belongs to, optional - group = TestGroup - - // Contract title is displayed in the window in the corner, shoudl be short - // and descritive - title = Simple Test Contract - - // Two options for specifying the description: - // 1) Supply the full text here in the description field - //description = A more detailed description of the contract. - - // 2) Supply the following fields, which will be fed into the text - // generator. Use of the CoherentContracts mod is highly recommended, - // as it generates far more meaningful text. - topic = ContractConfigurator // Topic of the contract. Should be a - // singular noun. - subject = Kerbal // Subject of the contract. See - // CoherentContracts for some possible values. - // Includes stuff like Kerbal, Experiment, - // Parts, Mun, MunSrf, etc. - motivation = test // Motivation for why we are doing the - // contract. See CoherentContracts for some - // possible values. Some values used are: - // flags, test, rescue. - - // Contract notes are displayed in mission control. Use it to give - // any special instructions. - // - // Optional - notes = These are the contract level notes. - - // The contract synopsis appears in bold. Give a quick summary of the - // contract objective. - synopsis = We want you to do a thing. - - // The completedMessage is the message that is displayed when the contract - // completes. - completedMessage = You have done the thing. - - // Agent (agency). If not populated, a random agent will be selected. - agent = Integrated Integrals - - // Contract min/max expiry in days. Default is a contract that does not expire. - minExpiry = 500.0 - maxExpiry = 1000.0 - - // Contract deadline in days. Default is no deadline. - deadline = 500 - - // Controls for whether a contract can be declined or cancelled, default is true for both - cancellable = true - declinable = true - - // Prestige. If not specified, this contract type will be available at any prestige level. - // Otherwise, locked to the level specified. Values from Contract.ContractPrestige: - // Trivial - // Significant - // Exceptional - prestige = Significant - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric values (increasing science, etc.). Also gets used in some of the - // parameter classes. - // - // Default = null (no celestial body) - targetBody = Kerbin - - // The maximum number of times this contract type can be completed (0 being unlimited). - // Default = 0 - maxCompletions = 3 - - // The maximum instances of this contract that can be active at one time (0 being unlimited). - // Default = 0 - maxSimultaneous = 1 - - // Contract rewards - rewardScience = 100.0 - rewardReputation = 20.0 - rewardFunds = 100000.0 - failureReputation = 10.0 - failureFunds = 10000.0 - advanceFunds = 10000.0 - - // The weight is used in the contract generation process. Each contract - // type that is available to be offered is added to a weighted list. - // Contract types with a higher value are more likely to be chosen. - // - // Default = 1.0 - weight = 10.0 - - // The PARAMETER node defines a contract parameter. The following parameter displays all the - // fields that are supported for a parameter across all types. See the ParameterTestContract - // for examples of all supported parameters. - PARAMETER - { - // The parameter name is not used, but should be provided to allow for the possibility of - // other mods modifying contracts via ModuleManager. - name = CollectScience - - // The type defines the type of Parameter. See below for all supported - // ContractConfigurator parameters - type = CollectScience - - // This is a parameter specific to the CollectScience parameter type. Each parameter type - // can have include its own custom fields. - location = Surface - - // Target celestial body. Defaults to the targetBody of the contract. For most - // parameters this only has an impacton the reward/failure amounts - targetBody = Kerbin - - // Parameter rewards - rewardScience = 100.0 - rewardReputation = 20.0 - rewardFunds = 100000.0 - failureReputation = 10.0 - failureFunds = 10000.0 - - // When the parameter's state changes to completed or failed, disable the parameter. Use - // a value of false if you are trying to make something behave like the Squad part test - // contract. Example, if the parameter says you need to be between 1000 and 2000 meters - // altitude then setting this to false will make the parameter go back to incomplete if you - // enter and leave the altitude window. - // - // Default = true - disableOnStateChange = true - - // Optional parameters do not need to be completed (mainly for use with composite - // parameters) - optional = false - } - - REQUIREMENT - { - // The requirement name is not used, but should be provided to allow for the possibility of - // other mods modifying contracts via ModuleManager. - name = Requirement1 - - // The type defines the type of Requirement. See below for all supported - // ContractConfigurator requirements. - type = ReachSpace - - // The invertRequirement is a logical NOT. In this example, the requirement becomes that - // the player must not yet have reached space. - // - // Default = false - invertRequirement = true - } -} - - -// This contract shows all the different parameters that can be used. -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = ParameterTestContract - - group = TestGroup - - // Contract text - title = Parameter Test Contract - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - maxSimultaneous = 1 - - DATA - { - type = double - - prestigeMultiplier = Prestige().Multiplier() - bodyMultiplier = @targetBody.Multiplier() - multiplier = ContractMultiplier() - - dunaMultiplier = CelestialBody(Duna).Multiplier() - } - - // - // PARAMETERS - // - // The following sections lists all the valid ContractConfigurator parameters. Others can - // be added outside of ContractConfigurator by subclassing ParameterFactory. - - PARAMETER - { - name = PlantFlag - type = PlantFlag - - REQUIREMENT - { - // The requirement name is not used, but should be provided to allow for the possibility of - // other mods modifying contracts via ModuleManager. - name = Requirement1 - - // The type defines the type of Requirement. See below for all supported - // ContractConfigurator requirements. - type = ReachSpace - - // The invertRequirement is a logical NOT. In this example, the requirement becomes that - // the player must not yet have reached space. - // - // Default = false - invertRequirement = true - } - } - - // The CollectScience parameter is met when science is sent home from the given location - // and celestial body - PARAMETER - { - name = CollectScience1 - type = CollectScience - - // Valid values are "Surface" and "Space" - location = Space - - REQUIREMENT - { - // The requirement name is not used, but should be provided to allow for the possibility of - // other mods modifying contracts via ModuleManager. - name = Requirement1 - - // The type defines the type of Requirement. See below for all supported - // ContractConfigurator requirements. - type = ReachSpace - } - } - - PARAMETER - { - name = AtMost - type = AtMost - - count = 1 - completeInSequence = true - - PARAMETER - { - name = ReachState - type = ReachState - - minAltitude = 5000 - } - - PARAMETER - { - name = CollectScience - type = CollectScience - } - } - - - // The KerbalDeaths parameter *fails* if more Kerbals than the countMax die - PARAMETER - { - type = KerbalDeaths - - // Maximum Number of Kerbals that can die before this contract is considered failed - // Default = 0 - countMax = 2 - } - - // The KerbalDeaths parameter *fails* if more Kerbals than the countMax die - PARAMETER - { - type = KerbalDeaths - - kerbal = Jebediah Kerman - } - - // The KerbalDeaths parameter *fails* if more Kerbals than the countMax die - PARAMETER - { - type = KerbalDeaths - - kerbal = Jebediah Kerman - kerbal = Valentina Kerman - } - - // The PlantFlag parameter is met when planting a flag on the given body - PARAMETER - { - name = PlantFlag1 - type = PlantFlag - - // This can be inherited from the the contract type if necessary - targetBody = Kerbin - } - - PARAMETER - { - name = ReachState - type = ReachState - - minAltitude = 20000 - maxAltitude = 50000 - - minSpeed = 1000 - maxSpeed = 5000 - - minAcceleration = 0.5 - maxAcceleration = 2.0 - - biome = Shores - - targetBody = Kerbin - - situation = FLYING - } - - // Return home - PARAMETER - { - name = ReturnHome1 - type = ReturnHome - - disableOnStateChange = false - } - - // The RecoverKerbal parameter is met when the named Kerbal is "recovered" (ie. goes back - // in to the available list at the astronaut complex). This is from the Squad "rescue" - // contracts. - PARAMETER - { - name = RecoverKerbal1 - type = RecoverKerbal - - // The Kerbal to be recovered - kerbal = Jebediah Kerman - - // Text to use for the parameter - // Default = : Recovered - //title = - } - - // PartTest is for testing parts (or just activating them, for staged parts). This parameter - // supports child parameters - you will only be able to complete the part test if all child - // parameters are also completed. - PARAMETER - { - name = PartTest1 - type = PartTest - - // The Kerbal to be recovered - part = SmallGearBay - - // Additional notes to display (in the Squad PartTest contract, this is where they say - // "Activate through the staging system", etc. - // Optional -// notes = Test this part anywhere, no other requirements! - } - - // The Any parameter doesn't provide anything on its own. It will be completed if any one - // of its child parameters are completed. - PARAMETER - { - name = Any1 - type = Any - - // The text to display. Highly recommended that you do not use the default - when the - // parameter is complete the text of the children disappears (and the default text doesn't - // give the player a very good idea what the parameter was about). - // - // Default - Complete any ONE of the following - title = Do this or that - - // Child parameters look just like a regular parameter (and can be infinitely nested) - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - PARAMETER - { - name = ReachState - type = ReachState - - minSpeed = 1000 - maxSpeed = 5000 - } - } - - PARAMETER - { - name = AtLeast - type = AtLeast - - count = 2 - - PARAMETER - { - name = ReachSpace1 - type = ReachSpace - } - - PARAMETER - { - name = ReachState - type = ReachState - - minSpeed = 4000 - maxSpeed = 5000 - } - - PARAMETER - { - name = CollectScience - type = CollectScience - } - } - - // The All parameter doesn't provide anything on its own. It is completed once all its child - // parameters are completed. Use it with disableOnStateChange = false to build conditions - // similar to those in the Squad part test contracts. - PARAMETER - { - name = All1 - type = All - - // The text to display. Highly recommended that you do not use the default - when the - // parameter is complete the text of the children disappears (and the default text doesn't - // give the player a very good idea what the parameter was about). - // - // Default - Complete ALL of the following - title = Do these things - - // Child parameters look just like a regular parameter (and can be infinitely nested) - PARAMETER - { - name = ReachState - type = ReachState - - minAltitude = 20000 - maxAltitude = 50000 - - minSpeed = 1000 - maxSpeed = 5000 - } - } - - // The Duration parameter is similar to the All parameter, with the extra requirement that the - // player must keep the child parameters satisfied for the specified duration. Use it with - // disableOnStateChange = false for the child parameters - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - // The duration that the conditions must be satisfied for. Can specify values in - // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. - duration = 10d 2h - - // Child parameters look just like a regular parameter (and can be infinitely nested) - PARAMETER - { - name = ReachState - type = ReachState - - situation = ORBITING - } - - PARAMETER - { - name = ReachState - type = ReachState - - targetBody = Kerbin - } - } - - PARAMETER - { - name = VesselDestroyed - type = VesselDestroyed - - mustImpactTerrain = true - } - - PARAMETER - { - name = HasCrew - type = HasCrew - - minCrew = 0 - maxCrew = 0 - } - - PARAMETER - { - name = ReachStateHidden - type = ReachState - - hideChildren = true - title = Reach the hidden state - - situation = ORBITING - } - - PARAMETER - { - name = PerformOrbitalSurvey - type = PerformOrbitalSurvey - } - - // The Timer parameter is a simple timer. When the timer hits zero, the contract fails. - PARAMETER - { - name = Timer1 - type = Timer - - duration = 10d 30m - - failContract = false - } - - PARAMETER - { - type = MissionTimer - } - - PARAMETER - { - name = ReachState - type = ReachState - - maxAcceleration = 2.0 - } - - PARAMETER - { - name = ReachState - type = ReachState - - situation = SPLASHED - maxAltitude = -50.0 - - } - - PARAMETER - { - type = Duration - - duration = 10d - startCriteria = NEXT_LAUNCH - } -} diff --git a/test/TypeDisable.cfg b/test/TypeDisable.cfg deleted file mode 100644 index a1304e1c1..000000000 --- a/test/TypeDisable.cfg +++ /dev/null @@ -1,11 +0,0 @@ - CONTRACT_CONFIGURATOR - { - disabledContractType = AltitudeRecord - disabledContractType = CollectScience - disabledContractType = FirstLaunch - disabledContractType = OrbitKerbin - disabledContractType = PartTest - disabledContractType = PlantFlag - disabledContractType = ReachSpace - disabledContractType = RescueKerbal - } diff --git a/test/VesselParameterGroup.cfg b/test/VesselParameterGroup.cfg deleted file mode 100644 index 617003bed..000000000 --- a/test/VesselParameterGroup.cfg +++ /dev/null @@ -1,257 +0,0 @@ -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = VesselParameterGroupTest - - // Contract text - title = VPG: General Test - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - // The duration that the conditions must be satisfied for. Can specify values in - // years (y), days (d), hours (h), minutes (m), seconds (s) or any combination of those. - duration = 10d 2h - - PARAMETER - { - name = ReachState - type = ReachState - - situation = FLYING - minDeltaVeeActual = 500 - maxDeltaVeeActual = 1000 - targetBody = Kerbin - } - - PARAMETER - { - name = HasCrew1 - type = HasCrew - - // (Optional) The type of trait required. Valid values are: - // Pilot - // Engineer - // Scientist - trait = Pilot - - // (Optional) Minimum and maximum experience level. Default values are - // 0 and 5 (for min/max). - minExperience = 1 - maxExperience = 2 - - // (Optional) Minimum and maximum count. Default values are 1 and - // int.MaxValue (for min/max). - minCrew = 1 - maxCrew = 1 - - disableOnStateChange = false - } - - PARAMETER - { - name = HasResource1 - type = HasResource - - resource = LiquidFuel - minQuantity = 100.0 - } - - PARAMETER - { - name = VesselMass - type = VesselMass - - minMass = 1.0 - maxMass = 10.0 - } - } - - PARAMETER - { - name = OriginAndDestination - type = VesselParameterGroup - - PARAMETER - { - name = Origin - type = ReachState - - situation = PRELAUNCH - biome = Shores - - disableOnStateChange = true - } - - PARAMETER - { - name = Destination - type = ReachState - - situation = FLYING - biome = Water - } - } -} - -CONTRACT_TYPE -{ - name = VPG_define - - // Contract text - title = VPG: Define Test - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - PARAMETER - { - name = VPG_Define - type = VesselParameterGroup - define = High Orbiter - - PARAMETER - { - name = Orbit - type = Orbit - - minPeA = 500000 - targetBody = Kerbin - } - } - - PARAMETER - { - name = VPG_Vessel1 - type = VesselParameterGroup - vessel = High Orbiter - - PARAMETER - { - type = HasCrew - - minCrew = 1 - } - - PARAMETER - { - type = Duration - - duration = 5m - - preWaitText = Waiting time required - waitingText = Time to completion - completionText = Wait time over - } - } - - PARAMETER - { - name = VPG_Vessel2 - type = VesselParameterGroup - vessel = High Orbiter - vessel = Some Vessel - - PARAMETER - { - type = HasCrew - - minCrew = 1 - } - - PARAMETER - { - type = Duration - - duration = 5m - - preWaitText = Waiting time required - waitingText = Time to completion - completionText = Wait time over - } - } -} - -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = Passenger Test - - // Contract text - title = Passenger Test - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - maxSimultaneous = 1 - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardScience = 100.0 - rewardFunds = 100000.0 - - PARAMETER - { - name = VesselParameterGroup1 - type = VesselParameterGroup - - // The text to display. - // Default - Do the following for - //title = - - PARAMETER - { - name = ReachState - type = ReachState - - situation = FLYING - targetBody = Duna - } - - PARAMETER - { - name = HasPassengers - type = HasPassengers - } - } - - BEHAVIOUR - { - name = SpawnPassengers - type = SpawnPassengers - - count = 10 - } -} diff --git a/test/WaypointGenerator.cfg b/test/WaypointGenerator.cfg deleted file mode 100644 index 9d2fdab46..000000000 --- a/test/WaypointGenerator.cfg +++ /dev/null @@ -1,216 +0,0 @@ -CONTRACT_TYPE -{ - // Unique name of the contract (required) - name = WaypointGenerator - - // Contract text - title = WaypointGenerator - description = A more detailed description of the contract. This is where you come in. - synopsis = We want you to do a thing. - completedMessage = You have done the thing. - - // Target Celestial body - controls where the contract must be completed, has some automated - // effects on numeric parameters (increasing science, etc.) - targetBody = Kerbin - - // Contract rewards - rewardFunds = 1000000.0 - rewardScience = 100.0 - - maxSimultaneous = 1 - - PARAMETER - { - name = VisitWaypoint1 - type = VisitWaypoint - - // Index of the waypoint in the WaypointGenerator behaviour. - // Default = 0 - index = 0 - - // Distance tolerance to be considered at the waypoint. - // Default = 500.0 (if on the surface). - // = / 5.0 (if in the air). - - disableOnStateChange = false - - // Text to use for the parameter - // Default = : Recovered - //title = - } - - PARAMETER - { - name = VisitWaypoint2 - type = VisitWaypoint - - index = 1 - - // Text to use for the parameter - // Default = : Recovered - //title = - } - - PARAMETER - { - name = VisitWaypoint3 - type = VisitWaypoint - - index = 2 - - // Text to use for the parameter - // Default = : Recovered - //title = - } - - BEHAVIOUR - { - name = WaypointGenerator - type = WaypointGenerator - - // Use this to generate a waypoint with fixed coordinates - WAYPOINT - { - // The name of the waypoint - displayed on the marker - name = Kerbal Space Center - - // Body for the waypoint - defaulted from the contract if not - // supplied. - targetBody = Kerbin - - // The icon to use when displaying the waypoint. At the moment - // (0.90), this can only be icons under Squad/Contracts/Icons. - // Perhaps that will change in a future release. - icon = thermometer - - // The altitude of the waypoint. - // Default: A random value between 0.0 and the atmosphere ceiling. - // If there's no atmosphere, then always 0.0 - altitude = 0.0 - - // The coordinates. - latitude = -0.102668048654 - longitude = -74.5753856554 - } - - // Use this to generate a waypoint relative to a PQS City - PQS_CITY - { - // The name of the waypoint - displayed on the marker - name = LaunchPad - - // Body for the waypoint - defaulted from the contract if not - // supplied. - targetBody = Kerbin - - // The icon to use when displaying the waypoint. At the moment - // (0.90), this can only be icons under Squad/Contracts/Icons. - // Perhaps that will change in a future release. - icon = thermometer - - // The altitude of the waypoint. - // Default: A random value between 0.0 and the atmosphere ceiling. - // If there's no atmosphere, then always 0.0 - altitude = 0.0 - - // The coordinates. - pqsCity = KSC - pqsOffset = 447.307865750742, 5.14341771520321E-05, 24.9700656982985 - - parameter = VisitWaypoint1 - } - - // Use this to generate a waypoint with random coordinates - RANDOM_WAYPOINT - { - // The name of the waypoint - displayed on the marker - name = A waypoint on Kerbin - - // Body for the waypoint - defaulted from the contract if not - // supplied. - targetBody = Kerbin - - // The number of waypoints to generate. - // Default = 1 - count = 1 - - // The icon to use when displaying the waypoint. At the moment - // (0.90), this can only be icons under Squad/Contracts/Icons. - // Perhaps that will change in a future release. - icon = thermometer - - // The altitude of the waypoint. - // Default: A random value between 0.0 and the atmosphere ceiling. - // If there's no atmosphere, then always 0.0 - altitude = 0.0 - - // Whether the waypoint generated can be on water - // Default = true - waterAllowed = false - - // Force the waypoint to fall along the equator. For boring - // contracts. - // Default = false - forceEquatorial = false - } - - // Use this to generate a waypoint with random coordinates, but near - // another waypoint. - RANDOM_WAYPOINT_NEAR - { - name = A random waypoint near - - // Body for the waypoint - defaulted from the contract if not - // supplied. - targetBody = Kerbin - - // The number of waypoints to generate. - // Default = 1 - count = Random(2,5) - - // The icon to use when displaying the waypoint. At the moment - // (0.90), this can only be icons under Squad/Contracts/Icons. - // Perhaps that will change in a future release. - icon = thermometer - - // The altitude of the waypoint. - // Default: A random value between 0.0 and the atmosphere ceiling. - // If there's no atmosphere, then always 0.0 - altitude = 0.0 - - // Whether the waypoint generated can be on water - // Default = true - waterAllowed = false - - // Zero based index of the waypoint to generate near. Must be a - // waypoint with index < this waypoint. Start counting from the - // first waypoint in the BEHAVIOUR, and count 1 for each value of - // the count parameter (if it exists). - nearIndex = 2 - - // Maximum distance in meters from the 'near' waypoint. - minDistance = 500.0 - maxDistance = 25000.0 - } - - RANDOM_WAYPOINT - { - name = An underwater waypoint - - // Body for the waypoint - defaulted from the contract if not - // supplied. - targetBody = Kerbin - - // The number of waypoints to generate. - // Default = 1 - count = 1 - - // The icon to use when displaying the waypoint. At the moment - // (0.90), this can only be icons under Squad/Contracts/Icons. - // Perhaps that will change in a future release. - icon = thermometer - - underwater = true - } - } -}