-
Notifications
You must be signed in to change notification settings - Fork 5
/
KerbalAcademyBootCamp.cfg
247 lines (219 loc) · 5.91 KB
/
KerbalAcademyBootCamp.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
CONTRACT_TYPE
{
name = KerbalAcademyBootCamp
title = Kerbal Academy: Boot Camp
group = KerbalAcademy
description = Your space program is suffering from a lack of @/roleString . Take a kerbal through basic training.
genericDescription = We are lacking Kerbals of a certain role. Kerbal Academy are willing to fund their training.
synopsis = Take a @/roleStringsingle through Boot Camp.
notes = Your new recruit will be advanced to level 1 for a reasonable cost. A third of the cost will be refunded in the event of a mission failure.
completedMessage = Excellent. Your new recruit now has basic knowledge of their role.
agent = Kerbal Academy
minExpiry = 1
maxExpiry = 7
maxSimultaneous = 1
cancellable = true
declinable = true
prestige = Significant
targetBody = HomeWorld()
rewardScience = 0.0
rewardReputation = 0.0
rewardFunds = 0
failureReputation = 0
failureFunds = NextKerbalHireCost()*(4/5)/3
advanceFunds = NextKerbalHireCost()*(-4/5)
DATA
{
type = List<Kerbal>
requiredValue = false
pilots = AllKerbals().Where(k => k.ExperienceTrait() == Pilot && k.RosterStatus() == Available && k.Type() == Crew)
scientists = AllKerbals().Where(k => k.ExperienceTrait() == Scientist && k.RosterStatus() == Available && k.Type() == Crew)
engineers = AllKerbals().Where(k => k.ExperienceTrait() == Engineer && k.RosterStatus() == Available && k.Type() == Crew)
}
DATA
{
type = string
roleString = @/pilots.Count() == 0 ? "pilots." : @/scientists.Count() == 0 ? "scientists." : "engineers."
hidden = true
}
DATA
{
type = string
roleStringsingle = @/pilots.Count() == 0 ? "pilot" : @/scientists.Count() == 0 ? "scientist" : "engineer"
hidden = true
}
DATA
{
type = Biome
biome = MainKSCBiomes().Where(b => b.RemainingScience()>0).Random()
fallbackBiome = MainKSCBiomes().Random()
hidden = true
}
DATA
{
type = List<ScienceSubject>
requiredValue = false
experimentList = AllScienceSubjectsByBiome([@biome]).Where(s => s.RemainingScience()>0)
fallbackList = AllScienceSubjectsByBiome([@fallbackBiome])
}
DATA
{
type = ScienceSubject
uniquenessCheck = GROUP_ACTIVE
experiment = @/experimentList.Count() >0 ? @/experimentList.Random() : @/fallbackList.Random()
title = Must have an experiment for scientists to complete.
}
BEHAVIOUR
{
name = AwardExperience
type = AwardExperience
parameter = BootCamp
experience = 1
}
BEHAVIOUR
{
name = WaypointGenerator
type = WaypointGenerator
PQS_CITY
{
name = The Island Training Facility
hidden = @/roleString == "pilots." ? false : true
icon = pressure
pqsCity = IslandAirfield
}
}
BEHAVIOUR
{
name = SpawnVessel
type = SpawnVessel
VESSEL
{
name = Training Drill
craftURL = ContractPacks/KerbalAcademy/Ships/TrainingDrillMk2.craft
flagURL = ContractPacks/KerbalAcademy/Agents/FrequentExplosions
vesselType = Base
owned = true
pqsCity = KSC
pitch = 180
}
}
BEHAVIOUR
{
name = DestroyVessel
type = DestroyVessel
onState = PARAMETER_COMPLETED
parameter = PilotBootCamp
parameter = ScientistBootCamp
vessel = Training Drill
}
PARAMETER
{
name = BootCamp
type = VesselParameterGroup
define = BootCamp
disableOnStateChange = true
dissassociateVesselsOnContractCompletion = true
title = Recruit @/roleString Then place them in a vessel capable of completing this mission.
notes = If your new recruit is not an Engineer, please ignore the Training Drill.
PARAMETER
{
name = HasCrew
type = HasCrew
trait = @/roleString == "pilots." ? "Pilot" : @/roleString == "scientists." ? "Scientist" : "Engineer"
maxExperience = 0
minCrew = 1
}
PARAMETER
{
name = PilotBootCamp
type = All
hideChildren = true
title = Land within 500m of the waypoint at the Island Training Facility.
disableOnStateChange = true
PARAMETER
{
name = PilotBootCamp
type = VisitWaypoint
index = 0
}
PARAMETER
{
name = ReachState
type = ReachState
situation = LANDED
}
REQUIREMENT
{
name = PilotCheck
type = Expression
expression = (@/roleString == "pilots.")
}
}
PARAMETER
{
name = ScientistBootCamp
type = CollectScience
subject = @/experiment
recoveryMethod = None
REQUIREMENT
{
name = ScientistCheck
type = Expression
expression = (@/roleString == "scientists.")
}
}
}
PARAMETER
{
name = EngineerBootCamp
type = VesselParameterGroup
title = Perform Drilling Simulations on board the Training Drill.
vessel = Training Drill
PARAMETER
{
name = HasCrew
type = HasCrew
trait = Engineer
maxExperience = 0
minCrew = 1
}
REQUIREMENT
{
name = EngineerCheck
type = Expression
expression = (@/roleString == "engineers.")
}
}
PARAMETER
{
name = Duration
type = Duration
duration = 5m
preWaitText = Waiting for Simulation to begin.
waitingText = Simulation in Progress
completionText = Simulation Complete
startCriteria = PARAMETER_COMPLETION
parameter = EngineerBootCamp
REQUIREMENT
{
name = EngineerCheck
type = Expression
expression = (@/roleString == "engineers.")
}
}
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/pilots.Count() == 0 || @/scientists.Count() == 0 || @/engineers.Count() == 0)
title = Must be lacking in Kerbals of a certain role.
}
REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = KerbalAcademyBootCamp
minCount = 0
cooldownDuration = 30d
}
}