Skip to content

Commit

Permalink
Add optional orbit contract to Crewed Lunar (#2280)
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav authored Oct 21, 2023
1 parent ae31891 commit 291813c
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 283 deletions.
4 changes: 2 additions & 2 deletions GameData/RP-1/Contracts/Lunar Crewed/CrewedLunarFlyby.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONTRACT_TYPE
group = CrewedLunar
agent = Federation Aeronautique Internationale

tag = CrewedLunarOrbitRequired

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=green>Required</color></b><br><br>Design, build, and launch a crewed spacecraft into lunar space (with a periselene under 5000 km) and return safely to Earth.

synopsis = Launch a crewed ship to flyby the Moon
Expand Down Expand Up @@ -34,8 +36,6 @@ CONTRACT_TYPE
rewardReputation = 300 // was 300
failureReputation = 0 // was @rewardReputation // was 300



// ************ REQUIREMENTS ************

REQUIREMENT
Expand Down
184 changes: 184 additions & 0 deletions GameData/RP-1/Contracts/Lunar Crewed/CrewedLunarOrbitRepeat.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
CONTRACT_TYPE
{
name = CrewedLunarOrbitRepeat
title = Crewed Lunar Orbit
group = CrewedLunar

tag = CrewedLunarOrbitOptional

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=blue>Optional</color></b><br><br>Launch a crewed spacecraft into lunar orbit for a routine mission of the specified duration and return safely to Earth.&br;&br;<b>Number of Contracts Completed: @index / 2</b>

synopsis = Fly a Crewed Lunar Orbital mission

completedMessage = Crew alive and well after the mission--congratulations!

sortKey = 709

cancellable = true
declinable = true
autoAccept = false
minExpiry = 0
maxExpiry = 0
maxCompletions = 2
maxSimultaneous = 1
deadline = 0

targetBody = Moon


// ************ REWARDS ************
prestige = Trivial // 1.0x
advanceFunds = 0
rewardScience = 0
rewardFunds = 0
failureFunds = 0
rewardReputation = 500
failureReputation = 0

// ************ REQUIREMENTS ************

REQUIREMENT
{
name = ProgramActive
type = ProgramActive
program = CrewedLunar
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = FirstCrewedLunarOrbit
title = Complete 'First Crewed Lunar Orbit' contract
}

REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitOptional
invertRequirement = true
title = Don't have another active optional Crewed Lunar Exploration contract.
}
REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitRequired
invertRequirement = true
title = Don't have active required Crewed Lunar Exploration contract.
}

// ************ DATA BLOCKS ************

DATA
{
type = List<Duration>
durations = [ 36h, 72h ]
}

DATA
{
type = Duration
Duration = @durations.ElementAt(@index)
title = Duration of Mission
}

DATA
{
type = int
startPeA = 30000
title = First Periselene
}

DATA
{
type = int
startApA = 75000 + Round(Random(0, 225000), 25000)
title = First Aposelene
}

DATA
{
type = int
index = $HSFOrbitalMoonGenRepeatable_Count + 0
}

BEHAVIOUR
{
name = IncrementTheCount
type = Expression

CONTRACT_COMPLETED_SUCCESS
{
HSFOrbitalMoonGenRepeatable_Count = $HSFOrbitalMoonGenRepeatable_Count + 1
}
}

// ************ PARAMETERS ************

PARAMETER
{
name = VesselGroup
type = VesselParameterGroup
title = Crewed Orbit of @targetBody

PARAMETER
{
name = NewVessel
type = NewVessel
title = Launch a New Vessel
hideChildren = true
}

PARAMETER
{
name = HasCrew
type = HasCrew
minCrew = 1
crewOnly = true
title = Have at least 1 crewmember on board
hideChildren = true
}

PARAMETER
{
name = OrbitWrapper
title = Stay in specified orbit for the duration
type = All
disableOnStateChange = true
completeInSequence = true

PARAMETER
{
name = MoonOrbit
type = Orbit
situation = ORBITING
minPeA = @/startPeA
maxApA = @/startApA
targetBody = Moon
title = Reach Orbit of the Moon within the provided parameters
}

PARAMETER
{
name = Duration
type = Duration
duration = @/Duration
preWaitText = Reach specified orbit
waitingText = Orbiting...
completionText = Orbits are complete, you may return to Earth when ready
}
}

PARAMETER
{
name = ReturnHome
type = RP1ReturnHome
title = Return Home Safely
hideChildren = true
completeInSequence = true
}
}
}
20 changes: 20 additions & 0 deletions GameData/RP-1/Contracts/Lunar Crewed/CrewedMoonLandingRover.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CONTRACT_TYPE
title = Crewed Moon Landing & Rover Exploration
group = CrewedLunar

tag = CrewedLunarOrbitOptional

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=blue>Optional</color></b><br><br>Design and launch a spacecraft with at least one crew member to land on the Moon. This will be a targeted landing near a randomly generated waypoint. We will also require you to take a crewed rover to explore an additional two waypoints. Once you have explored the waypoints, return safely to Earth.&br;&br;<b>Number of Contracts Completed: @index / @maxCompletions</b>
genericDescription = Land crew on the Moon and explore with a rover.

Expand Down Expand Up @@ -52,6 +54,24 @@ CONTRACT_TYPE
contractType = RepeatMoonLandingCrew
}

REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitOptional
invertRequirement = true
title = Don't have an active optional Crewed Lunar Exploration contract.
}
REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitRequired
invertRequirement = true
title = Don't have active required Crewed Lunar Exploration contract.
}

DATA
{
type = double
Expand Down
22 changes: 17 additions & 5 deletions GameData/RP-1/Contracts/Lunar Crewed/CrewedMoonLandingTargeted.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ CONTRACT_TYPE
title = Crewed Targeted Moon Landing
group = CrewedLunar

tag = CrewedLunarOrbitRequired

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=red>CAPSTONE</color></b><br><br>Design and launch a spacecraft with at least one crew member to land at a specific location on the Moon. Explore the area for at least @/LandDur and then return safely to Earth.&br;&br;<b>Number of Contracts Completed: @index / @maxCompletions</b>

genericDescription = Launch a crewed single-person spacecraft and land it on a specific lunar biome. Explore the area for the specified amount of time and then return safely to Earth.

synopsis = Land a crew on a specific biome on the Moon and return safely to Earth
Expand All @@ -31,8 +33,8 @@ CONTRACT_TYPE
rewardScience = 0
rewardFunds = 0
failureFunds = 0
rewardReputation = 1000+(250 * @/index) // was 200.0 * (2.75+(double(@/LandDur)/172800))
failureReputation = 0 // was @rewardReputation // was 200.0 * (2.75+(double(@/LandDur)/172800))
rewardReputation = 1000+(250 * @/index)
failureReputation = 0



Expand All @@ -51,12 +53,21 @@ CONTRACT_TYPE
type = CompleteContract
contractType = first_MoonLandingCrewed
}

REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitOptional
invertRequirement = true
title = Don't have an active optional Crewed Lunar Exploration contract.
}
DATA
{
type = Duration
LandDur = @specifiedTime.ElementAt(@index)
title= Duration
title = Duration
}
DATA
Expand Down Expand Up @@ -105,7 +116,8 @@ CONTRACT_TYPE
type = int
index = $RepeatMoonLandingCrew_Count + 0
}
DATA
DATA
{
type = List<Duration>
specifiedTime = [ 48h, 72h ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONTRACT_TYPE
title = First Crewed Lunar Orbit
group = CrewedLunar

tag = CrewedLunarOrbitRequired

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=green>Required</color></b><br><br>Design and launch a spacecraft with at least one crew member to orbit close to the Moon for at least 20 hours and return safely to Earth. Historically, Apollo 8 was the first to do this, flying to the Moon over Christmas, 1968.

Expand Down Expand Up @@ -61,7 +62,7 @@ CONTRACT_TYPE

PARAMETER
{
name = TwoCrew
name = HasCrew
type = HasCrew
minCrew = 1
crewOnly = true
Expand Down
11 changes: 11 additions & 0 deletions GameData/RP-1/Contracts/Lunar Crewed/FirstMoonLandingCrewed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONTRACT_TYPE
group = CrewedLunar
agent = Federation Aeronautique Internationale

tag = CrewedLunarOrbitRequired

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=green>Required</color></b><br><br>We are ready to finally put Humans on the surface of the Moon! Good luck to you in your design and execution of this complex mission!&br;&br;You must put at least one Human on the Moon and return them safely to the Earth.&br;&br;<color=green>NOTE: The contract asks you to plant a flag on the Moon. Be sure that you have updated your Astronaut Complex to level five to unlock that ability.</color>

synopsis = Land a crew on the Moon and Return them safely to Earth
Expand Down Expand Up @@ -74,6 +76,15 @@ CONTRACT_TYPE
contractType = first_MoonLandingCrewedDirect
invertRequirement = true
}

REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitOptional
invertRequirement = true
title = Don't have an active optional Crewed Lunar Exploration contract.
}
PARAMETER
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONTRACT_TYPE
group = CrewedLunar
agent = Federation Aeronautique Internationale

tag = CrewedLunarOrbitRequired

description = <b>Program: Crewed Lunar Exploration<br>Type: <color=green>Required</color></b><br><br>We are ready to finally put Humans on the surface of the Moon! Good luck to you in your design and execution of this complex mission!&br;&br;You must put at least one Human on the Moon and return them safely to the Earth. You may not perform any dockings or this contract will fail. &br;&br;<color=green>NOTE: The contract asks you to plant a flag on the Moon. Be sure that you have updated your Astronaut Complex to level five to unlock that ability.</color>

synopsis = Land a crew on the Moon and Return them safely to Earth
Expand Down Expand Up @@ -67,6 +69,15 @@ CONTRACT_TYPE
contractType = first_MoonLandingCrewed
invertRequirement = true
}

REQUIREMENT
{
name = AcceptContract
type = AcceptContract
tag = CrewedLunarOrbitOptional
invertRequirement = true
title = Don't have an active optional Crewed Lunar Exploration contract.
}
PARAMETER
{
Expand Down
Loading

0 comments on commit 291813c

Please sign in to comment.