-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgame_config.yml
375 lines (329 loc) Β· 11.3 KB
/
game_config.yml
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
---
player_config:
# The distribution model used when spawning players on the grid.
# Griduniverse provides a pre-defined set of distribution options:
# - random
# - sinusoidal
# - horizontal
# - vertical
# - edge_bias
# - center_bias
#
# See the distributions.py module for their implementations
probability_distribution: "random"
# Griduniverse uses different colors to represent player groups or teams
available_colors:
BLUE: [0.50, 0.86, 1.00]
YELLOW: [1.00, 0.86, 0.50]
ORANGE: [0.91, 0.50, 0.02]
RED: [0.64, 0.11, 0.31]
PURPLE: [0.85, 0.60, 0.85]
TEAL: [0.77, 0.96, 0.90]
item_defaults:
# Each item definition must include a unique item_id. This actual value doesn't matter,
# though an easily identifiable label can be helpful in developing and
# debugging your experiment.
item_id: default
# How many instances of this item should the world initially include?
# If "respawn" (see below) is true, consumed items will be replaced to maintain
# this number of instances. Note that this value may increase over the course
# of a game depending on the values of seasonal_growth_rate and spawn_rate (see below).
item_count: 8
# How many calories does a single instance provide when a player consumes it?
# In the simple case, the consuming player will get all the caloric benefit from
# items they consume, but there are also options for dividing this benefit among
# other players (see public_good_multiplier, below).
calories: 0
# Can a player co-occupy the grid block this item is sitting on?
crossable: true
# Does a player need to explicitly interact with this item via the action button
# when they co-occupy its grid block, or do the immediately consume the item
# without needing to take any explicit action?
interactive: true
# How rapidly this item progresses through its maturation lifecycle
maturation_speed: 0.0
# Level of maturity ("ripeness") at which this item ready for consumption.
# Prior to reaching this threshold, a player may be able to co-occupy the same
# grid block, but not consume the item.
maturation_threshold: 0.0
# Some items can be consumed (or otherwise used) more than once; for example,
# a berry bush might provide multiple "servings" of berries before it's exhausted.
# On the last use, a special transition may be triggered (see note on last_use
# in transition_defaults configuration below), which may transform this item into
# another. For example, a berry bush may be transformed into an empty berry bush,
# which might have different properties (different sprint, perhaps non-crossable,
# etc.)
n_uses: 1
# Friendly name of the item that may be displayed to players.
name: Generic Item
# Controls whether this item be "planted" (added to the gridworld) by the players
# themselves.
plantable: false
# If this item is plantable (see above), specifies how many points/calories are
# deducted from the player's score each time they plant one.
planting_cost: 1
# Controls whether this item be picked up and carried to another location by the player.
portable: true
# The distribution model used when spawning instances of this item on the grid.
# Griduniverse provides a pre-defined set of distribution options:
# - random
# - sinusoidal
# - horizontal
# - vertical
# - edge_bias
# - center_bias
#
# See the distributions.py module for their implementations.
#
# To implement a custom distribution option, add a function to distributions.py,
# with a name following the pattern [some_name]_probability_distribution(), with
# a signature matching the other functions in the module (rows, columns, *args),
# and returning an two-item array of integers representing a [row, column] grid position.
#
# To use your custom distibution for an item, specify only the prefix portion as the
# configuration value here (if your function name is "amazing_probability_distribution",
# the value to use here would be "amazing").
probability_distribution: "random"
# Basis from computing calories credited to all *other players* when a player
# consumes an instance of this item. The credit will be equal to:
# calories * public_good_multiplier / number of players
public_good_multiplier: 0.0
# Controls whether a replacement of this same item should be immediately added to the
# gridworld when an existing item is consumed.
respawn: false
# If the current number of instances of this item in the gridworld exceeds the
# configured item_count (because players are planting additional instances, for example),
# should we prune items to limit the total to item_count?
#
# Note that item_count is potentially dynamic, changing over time based on
# seasonal_growth_rate and spawn_rate (see below).
limit_quantity: false
# Degree to which the quantity of this item should fluctuate based on "seasons"
# (expressed as alternating rounds of the game, so there are just two seasons).
# This value is an *exponential* multiplier.
seasonal_growth_rate: 1.0
# At what rate should additional instances of this item be added to the gridworld?
# A rate of 1.0 means that the target number of items (item_count) will not grow over
# time, but a value greater than 1.0 will result in a steadily growing number of items
# of this type.
spawn_rate: 1.0
# Visual representation of this item in the UI. This value can be any of:
# - A single hex color value, prefixed with "color:". Example:
# "color:#8a9b0f"
# - A comma-separated pair of hex colors representing the items immature
# and mature states (rendered color will be along a continuum between
# these colors based on current maturity), also prefixed with "color:"
# Example: "color:#8a9b0f,#7a6b54"
# - A unicode emoji, prefixed with "emoji:". Example: "emoji:π"
# - A url for an image or a path to an image in within the static/images/
# folder, prefixed with "image:". Example
# ("image:sprites/strawberry.png")
sprite: "color:#8a9b0f,#7a6b54"
transition_defaults:
# Can be set to "never", "always", or "seen" for transitions that become
# visible to a player after they have been executed for the first time
visible: seen
# item_id for the item that will exist in the player's hand after the transition
# has executed
actor_end: null
# item_id for the item that must be in the player's hand in order to execute
# the transition
actor_start: null
# item_id for the item that will exist in the player's grid block after the transition
# has executed
target_end: null
# item_id for the item that must exist at the player's current position in order
# to execute the transition
target_start: null
# For items that have an n_uses value greater than 1, if last_use is true,
# the transition will be executed when the final use is exhausted. For example,
# a gooseberry bush with 5 uses could be transitioned to an empty bush when the
# last serving of berries has been harvested. In this case, the target_start
# would be the item_id of the gooseberry bush, and the target_end would be the
# item_id of the item representing the empty bush.
last_use: false
# How should the number of uses for the actor and target be changed by the transition.
# These can be positive or negative integers: -1 would decrement n_uses, 1 would add
# an additional use.
modify_uses: [0, 0]
items:
# One Hour, One Life items
- crossable: true
interactive: true
name: Wild Carrot Plant
item_id: wild_carrot_plant
portable: true
spawn_rate: 0.15
item_count: 100
sprite: "emoji:π₯"
- crossable: true
interactive: true
name: Stone
item_id: stone
portable: true
spawn_rate: 0.05
item_count: 50
sprite: "image:https://github.githubassets.com/images/icons/emoji/unicode/1faa8.png?v8"
- crossable: true
interactive: true
name: Big Hard Rock
item_id: big_hard_rock
portable: false
spawn_rate: 0
item_count: 20
sprite: "emoji:πΏ"
- crossable: true
interactive: true
n_uses: 6
name: Gooseberry Bush
item_id: gooseberry_bush
portable: false
spawn_rate: 0.1
item_count: 50
sprite: "emoji:π³"
- crossable: true
interactive: true
name: Sharp Stone
item_id: sharp_stone
portable: true
spawn_rate: 0.05
item_count: 20
sprite: "emoji:π"
- calories: 5
crossable: true
interactive: true
n_uses: 1
name: Wild Carrot
item_id: wild_carrot
portable: true
spawn_rate: 0
item_count: 0
sprite: "emoji:π₯"
- calories: 3
crossable: true
interactive: true
n_uses: 1
name: Gooseberry
item_id: gooseberry
portable: true
spawn_rate: 0
item_count: 0
sprite: "emoji:π«"
- crossable: false
interactive: true
n_uses: 1
name: Empty Gooseberry Bush
item_id: empty_gooseberry_bush
portable: false
spawn_rate: 0
item_count: 0
sprite: "emoji:π΄"
- name: Stag
item_id: stag
n_uses: 1
sprite: "emoji:π¦"
spawn_rate: 0.05
item_count: 5
portable: false
crossable: true
interactive: true
- name: Fallen Stag
item_id: fallen_stag
n_uses: 1
sprite: "emoji:π"
interactive: true
spawn_rate: 0
item_count: 0
portable: false
crossable: true
- name: Sunflower sprout
item_id: sunflower_sprout
n_uses: 1
sprite: "emoji:π±"
interactive: true
spawn_rate: 0.9
item_count: 90
portable: false
crossable: true
auto_transition_time: 5
auto_transition_target: sunflower_bud
- name: Sunflower bud
item_id: sunflower_bud
n_uses: 1
sprite: "emoji:πΌ"
interactive: true
spawn_rate: 0
item_count: 0
portable: false
crossable: true
auto_transition_time: 5
auto_transition_target: sunflower_bloom
- name: Sunflower bloom
item_id: sunflower_bloom
n_uses: 1
sprite: "emoji:π»"
interactive: true
spawn_rate: 0
item_count: 0
portable: false
crossable: true
auto_transition_time: 5
auto_transition_target: sunflower_dried
- name: Sunflower dried
item_id: sunflower_dried
n_uses: 1
sprite: "emoji:π₯"
interactive: true
spawn_rate: 0
item_count: 0
portable: false
crossable: true
transitions:
- actor_start: stone
actor_end: sharp_stone
target_start: big_hard_rock
target_end: big_hard_rock
visible: always
last_use: false
modify_uses:
- 0
- 0
- actor_start: sharp_stone
actor_end: sharp_stone
target_start: wild_carrot_plant
target_end: wild_carrot
visible: seen
last_use: false
modify_uses:
- 0
- 0
- actor_end: gooseberry
actor_start: null
last_use: false
visible: never
modify_uses:
- 0
- -1
target_end: gooseberry_bush
target_start: gooseberry_bush
- actor_end: gooseberry
actor_start: null
last_use: true
visible: always
modify_uses:
- 0
- -1
target_end: empty_gooseberry_bush
target_start: gooseberry_bush
# At least two players can use a sharp stone to consume a stag
- actor_start: sharp_stone
actor_end: sharp_stone
required_actors: 2
target_start: stag
target_end: fallen_stag
visible: always
last_use: false
calories: 20
modify_uses:
- 0
- -1