From c382c0bbcee2e87ec8b2ce8f96cef4c03e07dcdb Mon Sep 17 00:00:00 2001 From: Luci <57868183+Its-Just-Luci@users.noreply.github.com> Date: Fri, 21 Feb 2025 08:39:24 -0600 Subject: [PATCH] more sensible hypersonics progression --- .../AdvXPlanesHypersonicOptional.cfg | 2 +- .../AdvXPlanesUncrewedHypersonic.cfg | 174 ++++++++++++++++++ 2 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesUncrewedHypersonic.cfg diff --git a/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesHypersonicOptional.cfg b/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesHypersonicOptional.cfg index 9b977c17bd..22d7f29db1 100644 --- a/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesHypersonicOptional.cfg +++ b/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesHypersonicOptional.cfg @@ -72,7 +72,7 @@ CONTRACT_TYPE { name = CompleteContract type = CompleteContract - contractType = AdvXPlanesSupersonicHeavy + contractType = AdvXPlanesUncrewedHypersonic } REQUIREMENT diff --git a/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesUncrewedHypersonic.cfg b/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesUncrewedHypersonic.cfg new file mode 100644 index 0000000000..aba4803176 --- /dev/null +++ b/GameData/RP-1/Contracts/X-Plane Research Adv/AdvXPlanesUncrewedHypersonic.cfg @@ -0,0 +1,174 @@ +CONTRACT_TYPE +{ + name = AdvXPlanesUncrewedHypersonic + group = AdvXPlanes + + title = Advanced X-Planes (Uncrewed Hypersonic) + + tag = exclude_Supersonic + + description = Program: Advanced X-Plane Research
Type: Optional


Design, build, and fly a crewed jet aircraft to maintain @VesselGroup/HoldSituation/minSpeed m/s in level flight, then return home safely. Optionally, landing back at the runway will award extra reputation. If playing from the Cape, the Space Shuttle runway provided by the RSS-CanaveralHD mod is also a valid landing target.

The reward of this contract will slowly increase over time but will be reset to 0 after each completion.
Current reward is at @rewardFactorPercent % of its nominal value. Elapsed/Expected Days: @elapsedDays / @RP0:expectedDays_XPlanesSupersonicOptional

This is a series of @maxCompletions contracts, of which @completions have been completed. + genericDescription = Design, build, and fly a crewed jet aircraft to maintain a specific speed in level flight, then return home safely. + + synopsis = Fly a crewed jet aircraft to maintain @VesselGroup/HoldSituation/minSpeed m/s in level flight and hold, then return safely. + + completedMessage = Congratulations on a successful flight! + + sortKey = 4503 + + deadline = 0 + cancellable = true + declinable = true + autoAccept = false + minExpiry = 1 + maxExpiry = 1 + + targetBody = HomeWorld() + + maxCompletions = 7 + maxSimultaneous = 1 + prestige = Trivial + + // ************ REWARDS ************ + prestige = Trivial // 1.0x + advanceFunds = 0 + rewardScience = 0 + rewardFunds = 0 + failureFunds = 0 + rewardReputation = (30 + @completions * 5) * @rewardFactor + failureReputation = 0 // was @rewardReputation + + DATA + { + type = int + antiGrindCompletion = $XPSS_Completion == 0 ? (UniversalTime() - @RP0:expectedDays_XPlanesSupersonicOptional * 86400) : $XPSS_Completion + } + + DATA + { + type = int + index = $RP0_XPSS_High_Difficulty + completions = $RP0_XPSS_High_Difficulty + } + + DATA + { + type = float + elapsedDays = Round((UniversalTime() - @antiGrindCompletion) / 86400.0) + rewardFactor = Log(Max(@elapsedDays / @RP0:expectedDays_XPlanesSupersonicOptional * 20 - 9, 1), 2) / 3.46 + rewardFactorPercent = Round(@rewardFactor * 100, 1) + } + + // ************* REQUIREMENTS **************** + + REQUIREMENT + { + name = ProgramActive + type = ProgramActive + program = AdvXPlanes + } + + REQUIREMENT + { + name = AcceptContract + type = AcceptContract + tag = exclude_Supersonic + invertRequirement = true + } + + BEHAVIOUR + { + name = IncrementTheCount + type = Expression + + CONTRACT_OFFERED + { + + XPSS_Completion = ($XPSS_Completion + 0) == 0 ? (UniversalTime() - @RP0:expectedDays_XPlanesSupersonicOptional * 86400) : ($XPSS_Completion + 0) + + } + + CONTRACT_COMPLETED_SUCCESS + { + XPSS_Completion = UniversalTime() + } + } + + BEHAVIOUR + { + name = SetSSDifficulty + type = Expression + + + CONTRACT_COMPLETED_SUCCESS + { + RP0_XPSS_High_Difficulty = $RP0_XPSS_High_Difficulty + 1 + } + } + + + PARAMETER + { + name = VesselGroup + type = VesselParameterGroup + title = Maintain between @HoldSituation/minSpeed m/s and @HoldSituation/maxSpeed m/s in level flight with a crewed jet aircraft. + define = supersonicCraft + dissassociateVesselsOnContractCompletion = true + resetChildrenWhenVesselDestroyed = true + + PARAMETER + { + name = BuiltAtSPH + type = VesselBuiltAt + builtAt = SPH + } + + PARAMETER + { + name = NoCrew + type = HasCrew + minCrew = 0 + maxCrew = 0 + title = Uncrewed vessel + hideChildren = true + } + + PARAMETER + { + name = NoRocket + type = PartValidation + title = Vessel is a jet (no rocket engines allowed) + hideChildren = true + NONE + { + partModule = ModuleEnginesRF + partModule = ModuleEnginesAJEPropeller + } + } + + PARAMETER + { + name = HoldSituation + type = ReachState + minSpeed = 1625 + maxSpeed = 1787.5 + minRateOfClimb = -10 + maxRateOfClimb = 10 + situation = FLYING + + title = Hold between @minSpeed m/s to @maxSpeed m/s in level flight. + + disableOnStateChange = true + + PARAMETER + { + name = Duration + type = Duration + duration = 3m + preWaitText = Reach specified speed. + waitingText = Testing highspeed flight + completionText = Flight completed, you are cleared to land. + } + } + } +}