-
Notifications
You must be signed in to change notification settings - Fork 23
/
content.json
311 lines (249 loc) · 9.32 KB
/
content.json
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
{
"Format": "2.0.0",
"Changes": [
{
"Action": "Load",
"Target": "Mods/{{ModId}}/Icons",
"FromFile": "assets/Icons.png"
},
{
"Action": "Load",
"Target": "Mods/{{ModId}}/TV",
"FromFile": "assets/TV.png"
},
{
"Action": "Load",
"Target": "Mods/{{ModId}}/Clouds",
"FromFile": "assets/Clouds.png"
},
{
"Action": "EditData",
"Target": "Mods/leclair.cloudyskies/WeatherData",
"Entries": {
// First, a replication of sunny weather.
"Sun": {
"Id": "Sun",
// First, our display name. This is shown as a tool-tip
// and exposed via the API for other mods to use.
"DisplayName": "Sunny",
// The forecast text is displayed when the player checks
// tomorrow's forecast on a TV.
"Forecast": "It's going to be a beautiful, sunny day tomorrow!",
// You can override the forecast on a per location context
// basis, in case you want to.
"ForecastByContext": {
"Island": "It's going to be clear and sunny all day."
},
// The texture + top-left corner of the clock menu's
// icon for this weather condition. The icon is 12 by 8 pixels.
"IconTexture": "LooseSprites/Cursors",
"IconSource": {"X": 321, "Y": 421},
// The texture + top-left corner of the TV's animated image
// for this weather condition. Each frame is 13 by 13 pixels,
// and they're arranged as a horizontal strip.
"TVTexture": "LooseSprites/Cursors",
"TVSource": {"X": 413, "Y": 333},
// By default, each animation has 4 frames, but you can change that.
"TVFrames": 4,
// If this is set to a non-null value, this weather condition will
// override music like how rainy weather does in the base game.
"MusicOverride": null,
// This next set of flags controls internal game flags for various
// weather behaviors. These are all independent of our rendering, and
// let you tweak behaviors like NPC scheduling and anything else that
// changes based on the weather without referencing exact weather
// conditions by their Ids.
//
// These all default to false, so you can leave them out unless you
// are overwriting them with true.
"IsRaining": false,
"IsSnowing": false,
"IsLightning": false,
"IsDebrisWeather": false,
"IsGreenRain": false,
// Whether or not this weather condition should cause maps to display
// their night tiles / dark windows during the day, like rainy weather does.
"UseNightTiles": false,
// Whether or not critters should be spawned when outside in this weather.
"SpawnCritters": true,
// Whether or not frogs should be spawned. This requires SpawnCritters to
// be true, and if left as null it uses the default logic.
"SpawnFrogs": null,
// Whether or not cloud shadows should be spawned. This requires SpawnCritters
// to be true, and if left as null it uses the default logic.
"SpawnClouds": null,
// The ambient light color used for this weather, if this weather
// should have a different ambient light.
"AmbientColor": null,
// A tint that's applied after the draw lightmap stage of lighting.
// This is drawn with lighting blending.
"LightingTint": null,
// A tint that's applied after the world is drawn.
// This is drawn with normal blending.
"PostLightingTint": null,
"Layers": [
]
},
// A slightly more interesting weather condition...
"Rain": {
"Id": "Rain",
"DisplayName": "Rain",
"Forecast": "It's going to rain all day tomorrow.",
"IconTexture": "LooseSprites/Cursors",
"IconSource": {"X": 365, "Y": 421},
"TVTexture": "LooseSprites/Cursors",
"TVSource": {"X": 465, "Y": 333},
"MusicOverride": "rain",
// If MusicOverride is set, you can change the frequency the audio
// plays at while outside with this. Note: This only affects some
// audio cues, and not others. Default is 100 for rainy weather.
"MusicFrequencyOutside": 100,
// The same as Outside, but for Inside locations.
// Default is 15 for rainy weather.
"MusicFrequencyInside": 15,
"IsRaining": true,
// Rainy weather makes it dark outside.
"UseNightTiles": true,
// The frog spawn condition check is "is rainy". Or you can
// just set this to true.
"SpawnFrogs": true,
// Conversely, clouds can't spawn if it's rainy. (And only spawn in summer.)
"SpawnClouds": false,
// This is the default ambient color of rainy weather.
"AmbientColor": "255, 200, 80",
"LightingTint": "orangered",
// These opacity values do pre-multiplication of alpha to
// properly do transparency for these values. Use this
// rather than an alpha channel on the color itself.
"LightingTintOpacity": 0.45,
"PostLightingTint": "blue",
"PostLightingTintOpacity": 0.22,
// Finally, the good stuff.
"Layers": [
{
// These first values are available on ALL layer types.
// This Id just needs to be unique within this
// weather condition's layers.
"Id": "Rain",
// The available types are: Rain, Snow, Debris, TextureScroll, Color
// For obvious reasons, we're using: rain
"Type": "Rain",
// Specifying a group is optional, but if you do, then only
// the first layer in the group with a passing condition
// will be rendered.
"Group": "Rain",
// Each layer can have a condition to control its visibility.
// Here, for example, we are respecting the way that rain
// specifically does not display in in-game events.
"Condition": "!IS_EVENT",
// There are two modes you can use. Normal, and Lighting.
// This changes the blending mode. Lighting can be used to
// apply things like shadows, while Normal just draws things
// all... normal like. Default is Normal.
"Mode": "Normal",
// Alright. From now on, these values only work on Rain layers.
// The texture we should load our rain sprites from.
// If this is not set, we used the default rain sprites.
"Texture": "TileSheets/rain",
// The source location of the first sprite in the rain
// animation. This must be set if you're using a Texture
// or weird things may happen.
"Source": {"X": 0, "Y": 0, "Width": 16, "Height": 16},
// How many frames of animation does the rain have.
"Frames": 5,
// What scale should the rain be drawn at.
"Scale": 4,
// Should the rain be drawn flipped.
"FlipHorizontal": false,
"FlipVertical": false,
// The horizontal and vertical speed the rain falls
// (or rises...?) at.
"Speed": "-16, 32",
// How many rain particles to spawn. Careful with this.
"Count": 70,
// What color should the rain be? Defaults to White for
// uncolored, which uses different sprites if you're
// using the default texture.
"Color": null,
// What opacity should the rain be drawn with? Does
// pre-multiplied alpha with Color, like the game expects.
"Opacity": 1,
// A weird thing the base game uses for green rain (where
// this is set to 2). Just draws the same rain drop
// multiple times. Leave this at 1 probably.
"Vibrancy": 1
}
]
},
// How about something not in the base game?
"{{ModId}}_Test": {
"Id": "{{ModId}}_Test",
"DisplayName": "It's Gonna Rain",
"Forecast": "The rain is coming down hard today.",
"UseNightTiles": true,
"MusicOverride": "tropical_island_day_ambient",
"IconTexture": "Mods/{{ModId}}/Icons",
"TVTexture": "Mods/{{ModId}}/TV",
"Layers": [
{
// Here, we're using a rain group to display
// much lighter rain if the player is in
// the woods.
"Id": "RainLight",
"Group": "Rain",
"Condition": "LOCATION_NAME Target Woods",
"Type": "Rain",
"Speed": "-16, 32",
"Count": 10
},
{
"Id": "RainHeavy",
"Condition": "!IS_EVENT",
"Group": "Rain",
"Type": "Rain",
"Speed": "-16, 32",
"Count": 200
},
{
"Id": "RainTint",
// We want to show a tint whenever we're
// not in the woods.
"Condition": "!IS_EVENT, !LOCATION_NAME Target Woods",
// Look ma, it's a color layer!
"Type": "Color",
"Mode": "Lighting",
// With such properties as:
"Color": "orangered",
"Opacity": 0.6
// ... what did you expect?
},
{
"Id": "CloudOne",
// Texture Scroll layers are a little more interesting.
"Type": "TextureScroll",
"Mode": "Lighting",
// They accept a Texture and Source
// like rain. If you leave out the
// Source, they used the whole texture.
"Texture": "Mods/{{ModId}}/Clouds",
"Scale": 4,
"Opacity": 0.3,
// How fast should this layer scroll.
"Speed": "0.1, 0.14"
},
{
"Id": "CloudTwo",
"Type": "TextureScroll",
"Mode": "Lighting",
"Texture": "Mods/{{ModId}}/Clouds",
"Speed": "0.1, 0.1",
"Scale": 4,
"Color": "orangered",
"Opacity": 0.3
}
]
}
}
}
]
}