Skip to content

Commit

Permalink
Showing 9 changed files with 183 additions and 1,192 deletions.
1 change: 1 addition & 0 deletions GameData/RP-0/Contracts/Groups.cfg
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ CONTRACT_GROUP
{
name = SoundingRockets
displayName = Sounding Rocket Contracts
maxSimultaneous = 2
minVersion = 1.22.2
sortKey = 20
}
48 changes: 3 additions & 45 deletions GameData/RP-0/Contracts/Records/AltRecord.cfg
Original file line number Diff line number Diff line change
@@ -27,30 +27,17 @@ CONTRACT_TYPE
maxSimultaneous = 1

// Contract rewards
rewardFunds = @rewardFundsInternal
rewardReputation = @rewardReputationInternal
rewardFunds = 200.0 + @uncrewedTargetAltitude*0.005
rewardReputation = 4.0 + @uncrewedTargetAltitude*0.00001

DATA
{
type = List<float>

//NOTE: SoundingRocket contracts refer into this list by index, to track reached altitude. If you change this list, you must also update them.
soundingAlts = [ 10000, 20000, 30000, 40000, 50000, 60000, 80000, 100000, 120000, 140000, 160000, 180000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 2000000, 3000000, 4000000, 5000000, 6000000 ]
soundingAlts = [ 10000, 20000, 30000, 40000, 50000, 60000, 80000, 100000, 120000, 140000, 160000, 180000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000 ]
}

DATA
{
type = float
rewardFundsInternal = 200.0 + Min(@uncrewedTargetAltitude*0.005, 5000 + @uncrewedTargetAltitude*0.0005)
}


DATA
{
type = float
rewardReputationInternal = 3.0 + Min(@uncrewedTargetAltitude*0.00001, 10 + @uncrewedTargetAltitude*0.000001)
}

// Break this into two steps to work around ContractConfigurator#260
DATA
{
@@ -71,13 +58,6 @@ CONTRACT_TYPE

uncrewedTargetAltitudeKM = @uncrewedTargetAltitude*0.001
}

DATA
{
type = float
newMaxSoundingDifficulty = Max($RP0_SoundingDifficulty, @uncrewedTargetAltitudeKM * 60)

}

PARAMETER
{
@@ -97,29 +77,7 @@ CONTRACT_TYPE
RP0_SoundingAltitudeIndex = RP0_SoundingAltitudeIndex + 1
}
}

BEHAVIOUR
{
name = SetMaxSoundingDifficulty
type = Expression

CONTRACT_COMPLETED_SUCCESS
{
RP0_SoundingDifficulty = @/newMaxSoundingDifficulty
}
}

BEHAVIOUR
{
name = SetMaxSoundingAltitude
type = Expression

CONTRACT_COMPLETED_SUCCESS
{
RP0_SoundingMaxAltitudeKM = @/uncrewedTargetAltitudeKM
}
}

REQUIREMENT
{
type = Expression
267 changes: 0 additions & 267 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingAltitude.cfg

This file was deleted.

309 changes: 0 additions & 309 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingDifficult.cfg

This file was deleted.

273 changes: 0 additions & 273 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingEasy.cfg

This file was deleted.

101 changes: 101 additions & 0 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingHigh.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
CONTRACT_TYPE
{
name = SoundingRocketHigh
group = SoundingRockets

title = Sounding Rocket (High)

description = Design, build and launch a sounding rocket to attain @/altHigh.Print() km.
genericDescription = Design, build and launch a sounding rocket to attain high altitude

synopsis = Launch a sounding rocket to @/altHigh.Print() km.

completedMessage = Congratulations on a successful launch! The rocket has reached @/altHigh.Print() km.

minExpiry = 1.0
maxExpiry = 30.0
deadline = 90
cancellable = true
declinable = true
autoAccept = false

targetBody = HomeWorld()

maxCompletions = 0
maxSimultaneous = 1
prestige = Trivial

// reward block
// 1500 to 2000
advanceFunds = 1400.0 + @VesselGroup/ReachAlt/minAltitude*0.0001
rewardFunds = @advanceFunds + 1000
failureFunds = @advanceFunds

DATA
{
type = int
altHigh = @/VesselGroup/ReachAlt/minAltitude / 1000
title = Get high altitude
}

// Break this into two steps to work around ContractConfigurator#260
DATA
{
type = float
soundingAltIndex = RP0_SoundingAltitudeIndex
title = Get Sounding Altitude
}

REQUIREMENT
{
name = Any
type = Any
REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = first_OrbitUncrewed
title = Complete @contractType Contract
}
REQUIREMENT
{
//It would be nice if this were an AltitudeRecord requirement. But it can't be,
//because AltitudeRecord stops tracking at the space boundry. So we track which
//sounding rocket contract we've reached. 13 refers to the 300Km line.
name = AltitudeRecord300k
title = Altitude Record 300k
type = Expression
expression = @/soundingAltIndex > 13
}
}

PARAMETER
{
name = VesselGroup
type = VesselParameterGroup
title = Reach @/altHigh.Print() km with a sounding rocket.

PARAMETER
{
name = NewVessel
type = NewVessel
title = Launch a New Vessel
hideChildren = true
}
PARAMETER
{
name = Crewmembers
type = HasCrew
minCrew = 0
maxCrew = 0
title = Uncrewed
hideChildren = true
}
PARAMETER
{
name = ReachAlt
type = ReachState
minAltitude = 1000000 + Round(Random(0, 5000000), 100000)
}
}
}
273 changes: 0 additions & 273 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingIntermediate.cfg

This file was deleted.

78 changes: 78 additions & 0 deletions GameData/RP-0/Contracts/Sounding Rockets/SoundingMed.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
CONTRACT_TYPE
{
name = SoundingRocketMedium
group = SoundingRockets

title = Sounding Rocket (Medium)

description = Design, build and launch a sounding rocket to attain @/altMed.Print() km.
genericDescription = Design, build and launch a sounding rocket to attain medium altitude

synopsis = Launch a sounding rocket to @/altMed.Print() km.

completedMessage = Congratulations on a successful launch! The rocket has reached @/altMed.Print() km.

minExpiry = 1.0
maxExpiry = 30.0
deadline = 90
cancellable = true
declinable = true
autoAccept = false

targetBody = HomeWorld()

maxCompletions = 0
maxSimultaneous = 1
prestige = Trivial

// reward block
// 600 to 1000
advanceFunds = 500.0 + @VesselGroup/ReachAlt/minAltitude*0.001
rewardFunds = @advanceFunds + 500
failureFunds = @advanceFunds

DATA
{
type = int
altMed = @/VesselGroup/ReachAlt/minAltitude / 1000
title = Get Altitude
}

REQUIREMENT
{
name = AltitudeRecord100k // Karman line
type = AltitudeRecord
minAltitude = 100000
title = Must have reached 100 km
}

PARAMETER
{
name = VesselGroup
type = VesselParameterGroup
title = Reach @/altMed.Print() km with a sounding rocket.

PARAMETER
{
name = NewVessel
type = NewVessel
title = Launch a New Vessel
hideChildren = true
}
PARAMETER
{
name = Crewmembers
type = HasCrew
minCrew = 0
maxCrew = 0
title = Uncrewed
hideChildren = true
}
PARAMETER
{
name = ReachAlt
type = ReachState
minAltitude = 100000 + Round(Random(0, 400000), 10000)
}
}
}
25 changes: 0 additions & 25 deletions GameData/RP-0/RP0_Resources.cfg

This file was deleted.

0 comments on commit 715f96d

Please sign in to comment.