-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathKerbalAcademyEngineeringSchool.cfg
238 lines (206 loc) · 5.64 KB
/
KerbalAcademyEngineeringSchool.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
CONTRACT_TYPE
{
name = KerbalAcademyEngineeringSchool
title = Kerbal Academy: Engineering School
group = KerbalAcademy
description = @/newLevel <4 ? @/repairString : @/tourString
genericDescription = Take an Engineer through the Advanced Training Program.
synopsis = Complete the training course with @/trainee.
completedMessage = Congratulations, @/trainee is feeling more experienced already.
notes = @/newLevel <4 ? "This is just a simulation. The malfunctioning part will appear to be working." :
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 = 0
advanceFunds = @/trainingCost
DATA
{
type = Kerbal
uniquenessCheck = CONTRACT_ACTIVE
trainee = AllKerbals().Where(m => m.ExperienceTrait() == Engineer && m.Type() == Crew && m.RosterStatus() == Available && m.ExperienceLevel()>0 && m.ExperienceLevel()<5).Random()
mentor = AllKerbals().Where(m => m.ExperienceTrait() == Engineer && m.ExperienceLevel()>=2 && m.Type() == Crew && m.RosterStatus() == Available).Random()
title = Must have an engineer available in the roster.
}
DATA
{
type = CelestialBody
homeworld = HomeWorld()
hidden = true
}
DATA
{
type = List<Kerbal>
requiredValue = false
aliveKerbals = AllKerbals().Where(a => a.RosterStatus() == Available || a.RosterStatus() == Assigned)
mentorList = @aliveKerbals.Where(m => m.ExperienceTrait() == Engineer && m.Type() == Crew && m.ExperienceLevel() > @/mentorLevel)
hidden = true
}
DATA
{
type = double
newLevel = @/trainee.ExperienceLevel()+1
levelGain = @/trainee.ExperienceLevel()+1
mentorLevel = @/trainee.ExperienceLevel()+1
expAward = @newLevel == 5 ? 32 : @newLevel == 4 ? 16 : @newLevel == 3 ? 8 : @newLevel == 2 ? 6 : 2
}
DATA
{
type = double
rewardMultiplier = Random(@/trainee.ExperienceLevel(), @/newLevel)
trainingCost = @/rewardMultiplier*-100000
}
DATA
{
type = string
requiredValue = false
broken = @/newLevel == 2 ? "landing legs" : "wheels"
repairString = "@/trainee is ready to improve their skills. Perform a simulated repair the @/broken on @/craft and they will advance a level."
tourString = "@/trainee is ready to improve their skills. Complete a training mission on board @/craft and they will advance a level."
hidden = true
}
DATA
{
type = List<Vessel>
requiredValue = false
l2Craft = AllVessels().Where(v => v.VesselType() == Lander)
l3Craft = AllVessels().Where(v => v.VesselType() == Rover)
l4Craft = AllVessels().Where(v => v.VesselType() == Station)
l5Craft = AllVessels().Where(v => v.VesselType() == Base && v.CelestialBody() != @/homeworld)
hidden = true
}
DATA
{
type = Vessel
craft = @/newLevel == 5 ? @/l5Craft.Random() : @/newLevel == 4 ? @/l4Craft.Random() : @/newLevel == 3 ? @/l3Craft.Random() : @/l2Craft.Random()
title = Must have a craft that meets the training course's requirements.
}
DATA
{
type = Location
VesselLocation = @/craft.Location()
hidden = true
}
BEHAVIOUR
{
name = AwardExperience
type = AwardExperience
kerbal = @/trainee
experience = @/expAward
}
PARAMETER
{
name = FirstCheck
type = All
title = Bring @/trainee to @/craft
hideChildren = true
PARAMETER
{
name = Rendezvous
type = Rendezvous
vessel = @/craft
}
PARAMETER
{
name = HasCrew
type = HasCrew
kerbal = @/trainee
}
}
PARAMETER
{
name = Repair
type = All
hideChildren = true
completeInSequence = true
title = Go on EVA to repair the @/broken
PARAMETER
{
name = HasCrew
type = HasCrew
kerbal = @/trainee
}
PARAMETER
{
name = VesselIsType
type = VesselIsType
vesselType = EVA
}
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/newLevel <4)
}
}
PARAMETER
{
name = Tour
type = VesselParameterGroup
vessel = @/craft
hideChildren = true
completeInSequence = true
title = Do a 30 day tour on @/craft
PARAMETER
{
name = HasCrew
type = HasCrew
kerbal = @/trainee
}
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/newLevel >3)
}
}
PARAMETER
{
name = RepairTimer
type = Duration
duration = 2m
preWaitText = Repair Pending
waitingText = Repair in Progress
completionText = Repair Complete
startCriteria = PARAMETER_COMPLETION
parameter = Repair
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/newLevel <4)
}
}
PARAMETER
{
name = TourTimer
type = Duration
duration = 30d
preWaitText = Waiting for tour to start
waitingText = Doing tour of @/craft
completionText = Tour finished!
startCriteria = PARAMETER_COMPLETION
parameter = Tour
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/newLevel >3)
}
}
REQUIREMENT
{
name = Expression
type = Expression
expression = (@/trainee.RosterStatus() == Available && @/mentorList.Count() == 0 && @/trainee.ExperienceLevel() < @/newLevel)
title = Must qualify for the Advanced Program (if this fails, but a valid trainee is found, the Kerbal is eligible for Engineering 101)
}
}