Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONTRACT_TYPE
- {
- name = KLOSat
- group = SCORE_Satellites
- DATA_EXPAND
- {
- type = int
- index = [0, 1, 2]
- }
- BEHAVIOUR
- {
- name = OrbitGenerator
- type = OrbitGenerator
- FIXED_ORBIT
- {
- ORBIT
- {
- SMA = (Prestige() == Trivial ? Random(50000, 200000) : (Prestige() == Significant ? Random(200000, 1000000) : Random(1000000, 10000000))) + @/targetBody.Radius() + @/targetBody.AtmosphereAltitude()
- ECC = Prestige() == Trivial ? Random(0, 0.05) : (Prestige() == Significant ? Random(0, 0.1) : Random(0, 0.3))
- INC = Prestige() == Trivial ? 0 : (Prestige() == Significant ? Random(-30, 30) : Random(-90, 90))
- LPE = Random(-180, 180)
- LAN = Random(-180, 180)
- MNA = 0
- EPH = 0
- REF = 1
- }
- deviationWindow = Prestige() == Trivial ? 10 : (Prestige() == Significant ? 5 : 2.5)
- }
- }
- DATA
- {
- type = AvailablePart
- thermometer = AvailablePart(sensorThermometer)
- barometer = AvailablePart(sensorBarometer)
- gravimeter = AvailablePart(sensorGravimeter)
- accelerometer = AvailablePart(sensorAccelerometer)
- goo = AvailablePart(GooExperiment)
- materialBay = AvailablePart(science_module)
- }
- DATA
- {
- type = int
- partMultipler = Prestige() == Trivial ? 1 : (Prestige() == Significant ? 2 : 3)
- partMultipler2 = @partMultipler * @partMultipler
- t1 = Random(0, 4)
- t2 = Random(0, 4)
- t3 = Random(0, 4)
- t4 = Random(0, 4)
- t5 = Random(0, 10)
- t6 = Random(0, 10)
- hasThermometer = @/thermometer.IsUnlocked() ? (@t1 < @partMultipler ? 1 : 0) : 0
- hasBarometer = @/barometer.IsUnlocked() ? (@t2 < @partMultipler ? 1 : 0) : 0
- hasGravimeter = @/gravimeter.IsUnlocked() ? (@t3 < @partMultipler ? 1 : 0) : 0
- hasAccelerometer = @/accelerometer.IsUnlocked() ? (@t4 < @partMultipler ? 1 : 0) : 0
- hasGoo = @/goo.IsUnlocked() ? (@t5 < @partMultipler2 ? 1 : 0) : 0
- hasMaterialBay = @/materialBay.IsUnlocked() ? (@t6 < @partMultipler2 ? 1 : 0) : 0
- thermometerCost = @hasThermometer * @/thermometer.Cost()
- barometerCost = @hasBarometer * @/barometer.Cost()
- gravimeterCost = @hasGravimeter * @/gravimeter.Cost()
- accelerometerCost = @hasAccelerometer * @/accelerometer.Cost()
- gooCost = @hasGoo * @/goo.Cost()
- materialBayCost = @hasMaterialBay * @/materialBay.Cost()
- totalExtraCost = @thermometerCost + @barometerCost + @gravimeterCost + @accelerometerCost + @gooCost + @materialBayCost
- }
- DATA
- {
- type = int
- deadline_days = Prestige() == Exceptional ? 15 : (Prestige() == Significant ? 30 : 60)
- }
- title = Put a satellite onto a specific orbit of @targetBody.
- description = We hope to put a satellite onto a specific orbit of @targetBody for scientific and communication purposes.
- genericTitle = Put a satellite onto a specific orbit of our planet.
- genericDescription = We hope to put a satellite onto a specific orbit of our planet for scientific and communication purposes.
- synopsis = Put a satellite onto a specific orbit of @targetBody.
- completedMessage = Mission accomplished! The satellite is working well and moving.
- maxSimultaneous = 1
- minExpiry = 3
- maxExpiry = 5
- deadline = @/deadline_days * 2 * Random(0.9, 1.1)
- prestige = @d_prestige
- targetBody = HomeWorld()
- advanceFunds = 24000 * Random(0.9, 1.1) + @/totalExtraCost * 1.1
- rewardFunds = 48000 * Random(0.9, 1.1) + @/totalExtraCost * 2.2
- rewardReputation = 5.33 * Random(0.9, 1.1)
- rewardScience = 10.67 * Random(0.9, 1.1)
- failureFunds = 12000 * Random(0.9, 1.1) + @/totalExtraCost * 0.55
- failureReputation = 24 * Random(0.9, 1.1)
- PARAMETER
- {
- name = VesselParameterGroup
- type = VesselParameterGroup
- duration = Round(Random(6d, 18d), 1d)
- defineList = SCORE_KLOSat
- PARAMETER
- {
- name = NewVessel
- type = NewVessel
- }
- PARAMETER
- {
- name = HasCrewCapacity
- type = HasCrewCapacity
- maxCapacity = 0
- }
- PARAMETER
- {
- name = hasAntenna
- type = PartValidation
- partModuleType = Antenna
- minCount = 1
- title = The vessel must have an antenna
- }
- PARAMETER
- {
- name = hasPanels
- type = PartValidation
- partModule = ModuleDeployableSolarPanel
- minCount = 1
- title = The vessel must have solar panels.
- }
- PARAMETER
- {
- name = ReachSpecificOrbit
- type = ReachSpecificOrbit
- index = 0
- deviationWindow = Prestige() == Trivial ? 10 : (Prestige() == Significant ? 5 : 2.5)
- }
- PARAMETER
- {
- name = NeedThermometer
- type = PartValidation
- part = @/thermometer
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedThermometer
- type = Expression
- expression = @/hasThermometer == 1
- }
- }
- PARAMETER
- {
- name = NeedBarometer
- type = PartValidation
- part = @/barometer
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedBarometer
- type = Expression
- expression = @/hasBarometer == 1
- }
- }
- PARAMETER
- {
- name = NeedGravimeter
- type = PartValidation
- part = @/gravimeter
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedGravimeter
- type = Expression
- expression = @/hasGravimeter == 1
- }
- }
- PARAMETER
- {
- name = NeedAccelerometer
- type = PartValidation
- part = @/accelerometer
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedAccelerometer
- type = Expression
- expression = @/hasAccelerometer == 1
- }
- }
- PARAMETER
- {
- name = NeedGoo
- type = PartValidation
- part = @/goo
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedGoo
- type = Expression
- expression = @/hasGoo == 1
- }
- }
- PARAMETER
- {
- name = NeedMaterialBay
- type = PartValidation
- part = @/materialBay
- minCount = 1
- REQUIREMENT
- {
- name = checkVarNeedMaterialBay
- type = Expression
- expression = @/hasMaterialBay == 1
- }
- }
- }
- REQUIREMENT
- {
- name = HasAntennaUnlocked
- type = PartModuleTypeUnlocked
- partModuleType = Antenna
- }
- REQUIREMENT
- {
- name = Orbit
- type = Orbit
- }
- DATA
- {
- type = int
- rng = Random(1, 100)
- rng2 = Random(1, 100)
- t_p1 = (Reputation() - -400) / 10
- t_p2 = (Reputation() - 100) / 10
- t_pres = @rng < @t_p2 ? 3 : (@rng < @t_p1 ? 2 : 1)
- }
- DATA
- {
- type = ContractPrestige
- d_prestige = @/t_pres == 1 ? Trivial : (@/t_pres == 2 ? Significant : Exceptional)
- }
- DATA
- {
- type = int
- reputationReq = Prestige() == Trivial ? -900 : (Prestige() == Significant ? -400 : 100)
- }
- REQUIREMENT
- {
- name = Reputation
- type = Reputation
- minReputation = @/reputationReq
- title = Agency must be reputable.
- }
- DATA
- {
- type = int
- thr = Min((Reputation() - @/reputationReq) / 10, @/index * 50 + 50) - ($SCORE_Progress - 5) * 20
- }
- REQUIREMENT
- {
- name = rngCheck
- type = Expression
- expression = @SCORE_Satellites:rng2 < @/thr
- checkOnActiveContract = false
- title = The RNG must like you.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement