make-mp-data 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gcloudignore +17 -0
- package/.vscode/launch.json +37 -14
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +12 -0
- package/components/ai.js +93 -0
- package/components/chart.js +14 -0
- package/components/cli.js +7 -1
- package/components/project.js +11 -0
- package/components/prompt.txt +98 -0
- package/components/utils.js +101 -5
- package/{schemas → dungeons}/adspend.js +1 -1
- package/{schemas → dungeons}/anon.js +1 -1
- package/{schemas → dungeons}/big.js +1 -1
- package/{schemas → dungeons}/business.js +1 -1
- package/{schemas → dungeons}/complex.js +9 -9
- package/dungeons/foobar.js +241 -0
- package/{schemas → dungeons}/funnels.js +2 -3
- package/dungeons/gaming.js +314 -0
- package/{schemas → dungeons}/mirror.js +1 -1
- package/{schemas → dungeons}/sanity.js +1 -1
- package/dungeons/scd.js +205 -0
- package/dungeons/session-replay.js +175 -0
- package/{schemas → dungeons}/simple.js +1 -1
- package/dungeons/userAgent.js +190 -0
- package/env.yaml +1 -0
- package/index.js +449 -151
- package/package.json +9 -5
- package/scripts/deploy.sh +11 -0
- package/scripts/new-dungeon.sh +10 -4
- package/tests/benchmark/concurrency.mjs +2 -2
- package/tests/cli.test.js +121 -0
- package/tests/e2e.test.js +134 -186
- package/tests/int.test.js +3 -2
- package/tests/jest.config.js +8 -0
- package/tests/unit.test.js +1 -1
- package/tsconfig.json +1 -1
- package/types.d.ts +40 -9
- package/schemas/foobar.js +0 -125
- package/schemas/session-replay.js +0 -136
- /package/dungeons/{.gitkeep → customers/.gitkeep} +0 -0
|
@@ -11,14 +11,14 @@ const chance = new Chance();
|
|
|
11
11
|
const { weighNumRange, date, integer } = require('../components/utils.js');
|
|
12
12
|
const u = require('ak-tools');
|
|
13
13
|
|
|
14
|
-
/** @type {import('../types.js').
|
|
14
|
+
/** @type {import('../types.js').Dungeon} */
|
|
15
15
|
const config = {
|
|
16
|
-
token: "",
|
|
17
|
-
seed: "quite
|
|
16
|
+
token: "4a68e9ff118e595172b6478dfa88da7c",
|
|
17
|
+
seed: "quite complexus",
|
|
18
18
|
numDays: 30, //how many days worth of data
|
|
19
|
-
numEvents:
|
|
19
|
+
numEvents: 100_000, //how many events
|
|
20
20
|
numUsers: 1000, //how many users
|
|
21
|
-
format: '
|
|
21
|
+
format: 'json', //csv or json
|
|
22
22
|
region: "US",
|
|
23
23
|
hasAnonIds: true, //if true, anonymousIds are created for each user
|
|
24
24
|
hasSessionIds: true, //if true, hasSessionIds are created for each user
|
|
@@ -31,13 +31,13 @@ const config = {
|
|
|
31
31
|
hasCampaigns: true,
|
|
32
32
|
isAnonymous: false,
|
|
33
33
|
hasAdSpend: true,
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
hasAvatar: true,
|
|
36
36
|
makeChart: false,
|
|
37
37
|
|
|
38
38
|
batchSize: 500_000,
|
|
39
39
|
concurrency: 500,
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
funnels: [],
|
|
42
42
|
events: [
|
|
43
43
|
{
|
|
@@ -289,7 +289,7 @@ function makeProducts(maxItems = 10) {
|
|
|
289
289
|
data.push(item);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
return [data];
|
|
292
|
+
return () => [data];
|
|
293
293
|
};
|
|
294
294
|
};
|
|
295
295
|
|
|
@@ -339,7 +339,7 @@ function deviceAttributes(isMobile = false) {
|
|
|
339
339
|
language
|
|
340
340
|
};
|
|
341
341
|
|
|
342
|
-
return
|
|
342
|
+
return chosen;
|
|
343
343
|
|
|
344
344
|
};
|
|
345
345
|
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the default configuration file for the data generator in SIMPLE mode
|
|
3
|
+
* notice how the config object is structured, and see it's type definition in ./types.d.ts
|
|
4
|
+
* feel free to modify this file to customize the data you generate
|
|
5
|
+
* see helper functions in utils.js for more ways to generate data
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
function integer(min = 1, max = 100) {
|
|
12
|
+
// If min equals max, just return the value
|
|
13
|
+
if (min === max) {
|
|
14
|
+
return min;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Swap min and max if min is greater than max
|
|
18
|
+
if (min > max) {
|
|
19
|
+
[min, max] = [max, min];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Generate a random integer between min and max (inclusive)
|
|
23
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const dates = [
|
|
28
|
+
"2024-09-18T21:48:28.173Z",
|
|
29
|
+
"2024-12-09T03:17:46.661Z",
|
|
30
|
+
"2024-02-26T07:52:14.943Z",
|
|
31
|
+
"2024-04-22T08:35:17.647Z",
|
|
32
|
+
"2024-11-25T17:03:58.061Z",
|
|
33
|
+
"2024-01-14T21:46:58.982Z",
|
|
34
|
+
"2024-06-20T12:47:25.687Z",
|
|
35
|
+
"2024-08-13T22:18:08.665Z",
|
|
36
|
+
"2024-08-09T07:47:18.321Z",
|
|
37
|
+
"2024-06-21T19:04:43.432Z",
|
|
38
|
+
"2024-03-09T00:18:37.705Z",
|
|
39
|
+
"2024-08-02T09:23:41.699Z",
|
|
40
|
+
"2024-11-26T13:25:08.673Z",
|
|
41
|
+
"2024-05-23T11:51:34.238Z",
|
|
42
|
+
"2024-10-24T20:14:05.106Z",
|
|
43
|
+
"2024-10-01T18:52:32.463Z",
|
|
44
|
+
"2024-10-15T19:22:40.675Z",
|
|
45
|
+
"2024-06-13T21:29:11.962Z",
|
|
46
|
+
"2024-08-29T12:02:48.632Z",
|
|
47
|
+
"2024-12-22T12:11:40.809Z",
|
|
48
|
+
"2024-01-03T03:39:19.446Z",
|
|
49
|
+
"2024-06-28T10:05:43.908Z",
|
|
50
|
+
"2024-12-01T18:49:00.447Z",
|
|
51
|
+
"2024-12-30T05:44:23.418Z",
|
|
52
|
+
"2024-03-14T22:38:40.833Z",
|
|
53
|
+
"2024-12-28T06:45:31.946Z",
|
|
54
|
+
"2024-07-20T21:40:19.498Z",
|
|
55
|
+
"2024-12-26T06:44:41.982Z",
|
|
56
|
+
"2024-10-28T13:45:35.409Z",
|
|
57
|
+
"2024-02-28T00:11:54.916Z",
|
|
58
|
+
"2024-07-08T10:01:57.834Z",
|
|
59
|
+
"2024-02-23T08:00:59.386Z",
|
|
60
|
+
"2024-08-20T05:23:33.024Z",
|
|
61
|
+
"2024-02-10T20:52:46.564Z",
|
|
62
|
+
"2024-08-24T21:32:15.202Z",
|
|
63
|
+
"2024-06-17T03:51:35.142Z",
|
|
64
|
+
"2024-04-09T13:13:45.218Z",
|
|
65
|
+
"2024-07-26T16:31:51.091Z",
|
|
66
|
+
"2024-05-26T04:06:33.013Z",
|
|
67
|
+
"2024-11-05T17:15:37.412Z",
|
|
68
|
+
"2024-10-20T17:01:38.205Z",
|
|
69
|
+
"2024-01-08T05:09:18.692Z",
|
|
70
|
+
"2024-08-24T13:52:14.774Z",
|
|
71
|
+
"2024-06-26T13:47:07.276Z",
|
|
72
|
+
"2024-06-19T15:05:53.246Z",
|
|
73
|
+
"2024-05-01T04:06:52.028Z",
|
|
74
|
+
"2024-05-26T22:45:59.626Z",
|
|
75
|
+
"2024-04-17T20:50:58.460Z",
|
|
76
|
+
"2024-07-28T04:32:04.578Z",
|
|
77
|
+
"2024-01-29T05:31:48.744Z",
|
|
78
|
+
"2024-08-06T18:47:29.190Z",
|
|
79
|
+
"2024-04-03T23:12:20.415Z",
|
|
80
|
+
"2024-09-13T08:47:35.938Z",
|
|
81
|
+
"2024-07-27T15:12:15.145Z",
|
|
82
|
+
"2024-10-24T00:39:21.835Z",
|
|
83
|
+
"2024-10-08T16:50:36.591Z",
|
|
84
|
+
"2024-02-27T15:53:19.204Z",
|
|
85
|
+
"2024-04-21T08:24:05.883Z",
|
|
86
|
+
"2024-03-08T10:07:46.720Z",
|
|
87
|
+
"2024-01-10T08:36:19.554Z",
|
|
88
|
+
"2024-02-17T12:56:00.562Z",
|
|
89
|
+
"2024-10-03T07:54:46.486Z",
|
|
90
|
+
"2024-05-29T10:18:36.289Z",
|
|
91
|
+
"2024-05-06T23:27:07.145Z",
|
|
92
|
+
"2024-05-27T08:41:47.787Z",
|
|
93
|
+
"2024-09-16T12:22:09.573Z",
|
|
94
|
+
"2024-05-03T00:31:06.036Z",
|
|
95
|
+
"2024-11-24T19:38:43.380Z",
|
|
96
|
+
"2024-06-03T04:01:56.328Z",
|
|
97
|
+
"2024-05-04T02:25:25.455Z",
|
|
98
|
+
"2024-12-19T18:35:25.052Z",
|
|
99
|
+
"2024-05-07T21:54:28.113Z",
|
|
100
|
+
"2024-11-24T09:58:08.766Z",
|
|
101
|
+
"2024-03-17T02:46:20.903Z",
|
|
102
|
+
"2024-09-04T09:20:24.930Z",
|
|
103
|
+
"2024-02-04T10:23:33.624Z",
|
|
104
|
+
"2024-01-26T02:42:06.668Z",
|
|
105
|
+
"2024-08-11T02:26:21.969Z",
|
|
106
|
+
"2024-07-11T13:34:51.283Z",
|
|
107
|
+
"2024-12-20T00:09:10.080Z",
|
|
108
|
+
"2024-05-28T00:20:07.079Z",
|
|
109
|
+
"2024-01-13T14:54:03.339Z",
|
|
110
|
+
"2024-08-10T17:18:12.759Z",
|
|
111
|
+
"2024-10-06T15:05:11.437Z",
|
|
112
|
+
"2024-11-18T03:53:12.932Z",
|
|
113
|
+
"2024-02-19T18:06:13.680Z",
|
|
114
|
+
"2024-08-03T11:48:00.207Z",
|
|
115
|
+
"2024-11-22T15:19:47.316Z",
|
|
116
|
+
"2024-06-30T19:56:49.636Z",
|
|
117
|
+
"2024-12-03T00:25:23.926Z",
|
|
118
|
+
"2024-07-30T15:27:18.198Z",
|
|
119
|
+
"2024-09-07T01:40:58.245Z",
|
|
120
|
+
"2024-05-16T05:24:14.727Z",
|
|
121
|
+
"2024-11-14T03:46:49.323Z",
|
|
122
|
+
"2024-02-16T09:18:23.473Z",
|
|
123
|
+
"2024-10-19T14:07:11.462Z",
|
|
124
|
+
"2024-02-09T08:52:04.735Z",
|
|
125
|
+
"2024-06-06T09:41:11.810Z",
|
|
126
|
+
"2024-05-07T23:14:05.114Z",
|
|
127
|
+
"2024-06-03T06:52:21.652Z"
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
const billionsOfEvents = 2
|
|
131
|
+
|
|
132
|
+
const numEvents = billionsOfEvents * 1_000_000_000;
|
|
133
|
+
const eventPerUser = 1_000;
|
|
134
|
+
const numUsers = Math.floor(numEvents / eventPerUser);
|
|
135
|
+
const seed = Math.random().toString()
|
|
136
|
+
|
|
137
|
+
/** @type {import('../types').Dungeon} */
|
|
138
|
+
const config = {
|
|
139
|
+
token: "3cd6d9fb43b02f8fd731a6d814ac4b8f",
|
|
140
|
+
seed: seed,
|
|
141
|
+
numDays: 30, //how many days worth of data
|
|
142
|
+
numEvents: numEvents, //how many events
|
|
143
|
+
numUsers: numUsers, //how many users
|
|
144
|
+
format: 'json', //csv or json
|
|
145
|
+
region: "US",
|
|
146
|
+
hasAnonIds: false, //if true, anonymousIds are created for each user
|
|
147
|
+
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
148
|
+
batchSize: 2_500_000,
|
|
149
|
+
hasAdSpend: false,
|
|
150
|
+
hasAvatar: false,
|
|
151
|
+
hasBrowser: false,
|
|
152
|
+
hasCampaigns: false,
|
|
153
|
+
hasIOSDevices: false,
|
|
154
|
+
hasLocation: false,
|
|
155
|
+
isAnonymous: true,
|
|
156
|
+
hasAndroidDevices: false,
|
|
157
|
+
hasDesktopDevices: false,
|
|
158
|
+
writeToDisk: false,
|
|
159
|
+
concurrency: 500,
|
|
160
|
+
|
|
161
|
+
events: [
|
|
162
|
+
{
|
|
163
|
+
event: "foo",
|
|
164
|
+
weight: 10,
|
|
165
|
+
properties: {}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
event: "bar",
|
|
169
|
+
weight: 9,
|
|
170
|
+
properties: {}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
event: "baz",
|
|
174
|
+
weight: 8,
|
|
175
|
+
properties: {}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
event: "qux",
|
|
179
|
+
weight: 7,
|
|
180
|
+
properties: {}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
event: "garply",
|
|
184
|
+
weight: 6,
|
|
185
|
+
properties: {}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
event: "durtle",
|
|
189
|
+
weight: 5,
|
|
190
|
+
properties: {}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
event: "linny",
|
|
194
|
+
weight: 4,
|
|
195
|
+
properties: {}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
event: "fonk",
|
|
199
|
+
weight: 3,
|
|
200
|
+
properties: {}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
event: "crumn",
|
|
204
|
+
weight: 2,
|
|
205
|
+
properties: {}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
event: "yak",
|
|
209
|
+
weight: 1,
|
|
210
|
+
properties: {}
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
superProps: {
|
|
214
|
+
string: ["red", "orange", "yellow", "green", "blue", "indigo", "violet"],
|
|
215
|
+
number: integer,
|
|
216
|
+
boolean: [true, false],
|
|
217
|
+
date: dates,
|
|
218
|
+
|
|
219
|
+
},
|
|
220
|
+
userProps: {
|
|
221
|
+
luckyNumber: integer,
|
|
222
|
+
spiritAnimal: ["duck", "dog", "otter", "penguin", "cat", "elephant", "lion", "cheetah", "giraffe", "zebra", "rhino", "hippo", "whale", "dolphin", "shark", "octopus", "squid", "jellyfish", "starfish", "seahorse", "crab", "lobster", "shrimp", "clam", "snail", "slug", "butterfly", "moth", "bee", "wasp", "ant", "beetle", "ladybug", "caterpillar", "centipede", "millipede", "scorpion", "spider", "tarantula", "tick", "mite", "mosquito", "fly", "dragonfly", "damselfly", "grasshopper", "cricket", "locust", "mantis", "cockroach", "termite", "praying mantis", "walking stick", "stick bug", "leaf insect", "lacewing", "aphid", "cicada", "thrips", "psyllid", "scale insect", "whitefly", "mealybug", "planthopper", "leafhopper", "treehopper", "flea", "louse", "bedbug", "flea beetle", "weevil", "longhorn beetle", "leaf beetle", "tiger beetle", "ground beetle", "lady beetle", "firefly", "click beetle", "rove beetle", "scarab beetle", "dung beetle", "stag beetle", "rhinoceros beetle", "hercules beetle", "goliath beetle", "jewel beetle", "tortoise beetle"],
|
|
223
|
+
created: dates,
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
scdProps: {},
|
|
227
|
+
mirrorProps: {},
|
|
228
|
+
lookupTables: [],
|
|
229
|
+
groupKeys: [
|
|
230
|
+
],
|
|
231
|
+
groupProps: {
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
hook: function (record, type, meta) {
|
|
235
|
+
return record;
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
module.exports = config;
|
|
@@ -20,7 +20,7 @@ const itemCategories = ["Books", "Movies", "Music", "Games", "Electronics", "Com
|
|
|
20
20
|
|
|
21
21
|
const videoCategories = ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"];
|
|
22
22
|
|
|
23
|
-
/** @type {import('../types').
|
|
23
|
+
/** @type {import('../types').Dungeon} */
|
|
24
24
|
const config = {
|
|
25
25
|
token: "",
|
|
26
26
|
seed: "simple is best",
|
|
@@ -187,8 +187,7 @@ const config = {
|
|
|
187
187
|
},
|
|
188
188
|
|
|
189
189
|
scdProps: {
|
|
190
|
-
|
|
191
|
-
mrr: () => { weighNumRange(10, 1000, .25); },
|
|
190
|
+
|
|
192
191
|
},
|
|
193
192
|
mirrorProps: {
|
|
194
193
|
isBot: { events: "*", values: [false, false, false, false, true] },
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
|
|
2
|
+
const SEED = "my-seed";
|
|
3
|
+
const dayjs = require("dayjs");
|
|
4
|
+
const utc = require("dayjs/plugin/utc");
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
require("dotenv").config();
|
|
7
|
+
const u = require("../components/utils.js");
|
|
8
|
+
const v = require("ak-tools");
|
|
9
|
+
const chance = u.initChance(SEED);
|
|
10
|
+
const num_users = 25_000;
|
|
11
|
+
const days = 180;
|
|
12
|
+
|
|
13
|
+
/** @typedef {import("../types.js").Dungeon} Config */
|
|
14
|
+
|
|
15
|
+
/** @type {Config} */
|
|
16
|
+
const config = {
|
|
17
|
+
token: "17f327eeb2217278f5b2c42a54aafe96",
|
|
18
|
+
seed: "sdgsdfgdfgkfj dfgkjh",
|
|
19
|
+
numDays: days,
|
|
20
|
+
numEvents: num_users * 90,
|
|
21
|
+
numUsers: num_users,
|
|
22
|
+
hasAnonIds: false,
|
|
23
|
+
hasSessionIds: false,
|
|
24
|
+
format: "json",
|
|
25
|
+
alsoInferFunnels: true,
|
|
26
|
+
hasLocation: true,
|
|
27
|
+
hasAndroidDevices: true,
|
|
28
|
+
hasIOSDevices: true,
|
|
29
|
+
hasDesktopDevices: true,
|
|
30
|
+
hasBrowser: false,
|
|
31
|
+
hasCampaigns: true,
|
|
32
|
+
isAnonymous: false,
|
|
33
|
+
hasAdSpend: false,
|
|
34
|
+
percentUsersBornInDataset: 35,
|
|
35
|
+
|
|
36
|
+
hasAvatar: true,
|
|
37
|
+
makeChart: false,
|
|
38
|
+
|
|
39
|
+
batchSize: 1_500_000,
|
|
40
|
+
concurrency: 1,
|
|
41
|
+
writeToDisk: false,
|
|
42
|
+
funnels: [
|
|
43
|
+
{
|
|
44
|
+
"sequence": ["app install", "character creation", "join party"],
|
|
45
|
+
"isFirstFunnel": true,
|
|
46
|
+
"conversionRate": 0.8,
|
|
47
|
+
"timeToConvert": .25,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"sequence": ["start quest", "gameplay summary", "complete quest"],
|
|
51
|
+
conversionRate: 0.99,
|
|
52
|
+
timeToConvert: 1,
|
|
53
|
+
props: {
|
|
54
|
+
"quest type": u.pickAWinner([
|
|
55
|
+
"Rescue",
|
|
56
|
+
"Retrieve",
|
|
57
|
+
"Explore",
|
|
58
|
+
"Destroy",
|
|
59
|
+
"Investigate",
|
|
60
|
+
]),
|
|
61
|
+
"quest difficulty": u.pickAWinner([
|
|
62
|
+
"Easy",
|
|
63
|
+
"Medium",
|
|
64
|
+
"Hard",
|
|
65
|
+
"Legendary",
|
|
66
|
+
]),
|
|
67
|
+
"quest location": u.pickAWinner([
|
|
68
|
+
"Forest",
|
|
69
|
+
"Dungeon",
|
|
70
|
+
"Mountain",
|
|
71
|
+
"City",
|
|
72
|
+
"Desert",
|
|
73
|
+
])
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
events: [
|
|
78
|
+
{ event: "app install", weight: 10, isFirstEvent: true },
|
|
79
|
+
{
|
|
80
|
+
event: "character creation",
|
|
81
|
+
weight: 2,
|
|
82
|
+
properties: {
|
|
83
|
+
mode: u.pickAWinner(["fast", "slow", "template"]),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
event: "join party",
|
|
88
|
+
weight: 8,
|
|
89
|
+
properties: {
|
|
90
|
+
"party size": u.weighNumRange(1, 6),
|
|
91
|
+
"party leader": u.pickAWinner([
|
|
92
|
+
"Bard",
|
|
93
|
+
"Cleric",
|
|
94
|
+
"Fighter",
|
|
95
|
+
"Rogue",
|
|
96
|
+
"Wizard",
|
|
97
|
+
"Paladin",
|
|
98
|
+
"Ranger",
|
|
99
|
+
"Sorcerer",
|
|
100
|
+
"Warlock",
|
|
101
|
+
]),
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
event: "start quest",
|
|
106
|
+
weight: 12,
|
|
107
|
+
properties: {},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
event: "complete quest",
|
|
111
|
+
weight: 12,
|
|
112
|
+
properties: {},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"event": "gameplay summary",
|
|
116
|
+
"weight": 14,
|
|
117
|
+
"properties": {
|
|
118
|
+
"# enemies defeated": u.weighNumRange(0, 100),
|
|
119
|
+
"# respawns": u.weighNumRange(0, 10, 5),
|
|
120
|
+
"# attacks": u.weighNumRange(0, 100, 6, 12),
|
|
121
|
+
"# gold found": u.weighNumRange(0, 1000),
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"event": "in-game purchase",
|
|
126
|
+
"weight": 2,
|
|
127
|
+
"properties": {
|
|
128
|
+
"purchase type": u.pickAWinner([
|
|
129
|
+
"Gold",
|
|
130
|
+
"Gems",
|
|
131
|
+
"Items: Weapons",
|
|
132
|
+
"Items: Armor",
|
|
133
|
+
"Items: Potions",
|
|
134
|
+
"Items: Scrolls",
|
|
135
|
+
"Boosts",
|
|
136
|
+
"Currency",
|
|
137
|
+
]),
|
|
138
|
+
"purchase amount": u.weighNumRange(1, 50, 1, 20),
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
event: "fight boss",
|
|
143
|
+
weight: 3,
|
|
144
|
+
properties: {
|
|
145
|
+
"boss type": u.pickAWinner([
|
|
146
|
+
"Dragon",
|
|
147
|
+
"Demon",
|
|
148
|
+
"Lich",
|
|
149
|
+
"Vampire",
|
|
150
|
+
"Beholder",
|
|
151
|
+
]),
|
|
152
|
+
"boss level": u.weighNumRange(10, 20),
|
|
153
|
+
"boss difficulty": u.pickAWinner([
|
|
154
|
+
"Hard",
|
|
155
|
+
"Legendary",
|
|
156
|
+
"Impossible",
|
|
157
|
+
]),
|
|
158
|
+
"fight duration (mins)": u.weighNumRange(1, 60),
|
|
159
|
+
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
event: "level up",
|
|
164
|
+
weight: 1,
|
|
165
|
+
properties: {
|
|
166
|
+
"new abilities": u.pickAWinner([
|
|
167
|
+
"Attack",
|
|
168
|
+
"Spell",
|
|
169
|
+
"Feat",
|
|
170
|
+
"Skill",
|
|
171
|
+
]),
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
event: "generic event (common)",
|
|
176
|
+
weight: 5,
|
|
177
|
+
properties: {
|
|
178
|
+
generic_prop: u.pickAWinner(["foo", "bar", "baz", "qux"]),
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
event: "generic event (uncommon)",
|
|
183
|
+
weight: 3,
|
|
184
|
+
properties: {
|
|
185
|
+
generic_prop: u.pickAWinner(["foo", "bar", "baz", "qux"]),
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
superProps: {
|
|
190
|
+
platform: u.pickAWinner([
|
|
191
|
+
"Mobile",
|
|
192
|
+
"Xbox",
|
|
193
|
+
"Playstation",
|
|
194
|
+
"Switch",
|
|
195
|
+
"Web"
|
|
196
|
+
]),
|
|
197
|
+
"game mode": u.pickAWinner([
|
|
198
|
+
"Single Player",
|
|
199
|
+
"Multiplayer",
|
|
200
|
+
], 1),
|
|
201
|
+
language: u.pickAWinner([
|
|
202
|
+
"English",
|
|
203
|
+
"Spanish",
|
|
204
|
+
"French",
|
|
205
|
+
"German",
|
|
206
|
+
"Japanese",
|
|
207
|
+
"Korean",
|
|
208
|
+
"Chinese",
|
|
209
|
+
], 0),
|
|
210
|
+
|
|
211
|
+
},
|
|
212
|
+
scdProps: {
|
|
213
|
+
// "subscription MRR" : {
|
|
214
|
+
// "frequency": "week",
|
|
215
|
+
// "type": "number",
|
|
216
|
+
// values: u.weighNumRange(0, 250, 1, 200),
|
|
217
|
+
// timing: "fixed",
|
|
218
|
+
// max: 250,
|
|
219
|
+
// }
|
|
220
|
+
},
|
|
221
|
+
userProps: {
|
|
222
|
+
experiment: u.pickAWinner([
|
|
223
|
+
"fast leveling",
|
|
224
|
+
"tension economy",
|
|
225
|
+
"free trial",
|
|
226
|
+
]),
|
|
227
|
+
variant: ["A", "B", "C", "Control"],
|
|
228
|
+
|
|
229
|
+
race: u.pickAWinner([
|
|
230
|
+
"Human",
|
|
231
|
+
"Elf",
|
|
232
|
+
"Dwarf",
|
|
233
|
+
"Halfling",
|
|
234
|
+
"Dragonborn",
|
|
235
|
+
"Gnome",
|
|
236
|
+
"Half-Elf",
|
|
237
|
+
"Half-Orc",
|
|
238
|
+
"Tiefling",
|
|
239
|
+
]),
|
|
240
|
+
class: u.pickAWinner([
|
|
241
|
+
"Barbarian",
|
|
242
|
+
"Bard",
|
|
243
|
+
"Cleric",
|
|
244
|
+
"Druid",
|
|
245
|
+
"Fighter",
|
|
246
|
+
"Monk",
|
|
247
|
+
"Paladin",
|
|
248
|
+
"Ranger",
|
|
249
|
+
"Rogue",
|
|
250
|
+
"Sorcerer",
|
|
251
|
+
"Warlock",
|
|
252
|
+
"Wizard",
|
|
253
|
+
]),
|
|
254
|
+
alignment: u.pickAWinner([
|
|
255
|
+
"Lawful Good",
|
|
256
|
+
"Neutral Good",
|
|
257
|
+
"Chaotic Good",
|
|
258
|
+
"Lawful Neutral",
|
|
259
|
+
"True Neutral",
|
|
260
|
+
"Chaotic Neutral",
|
|
261
|
+
"Lawful Evil",
|
|
262
|
+
"Neutral Evil",
|
|
263
|
+
"Chaotic Evil",
|
|
264
|
+
]),
|
|
265
|
+
level: u.weighNumRange(1, 20),
|
|
266
|
+
background: u.pickAWinner([
|
|
267
|
+
"Acolyte",
|
|
268
|
+
"Charlatan",
|
|
269
|
+
"Criminal",
|
|
270
|
+
"Entertainer",
|
|
271
|
+
"Folk Hero",
|
|
272
|
+
"Guild Artisan",
|
|
273
|
+
"Hermit",
|
|
274
|
+
"Noble",
|
|
275
|
+
"Outlander",
|
|
276
|
+
"Sage",
|
|
277
|
+
"Sailor",
|
|
278
|
+
"Soldier",
|
|
279
|
+
"Urchin",
|
|
280
|
+
]),
|
|
281
|
+
"subscription MRR": u.weighNumRange(0, 250, 1, 200)
|
|
282
|
+
},
|
|
283
|
+
hook: function (record, type, meta) {
|
|
284
|
+
// const NOW = dayjs();
|
|
285
|
+
|
|
286
|
+
if (type === "event") {
|
|
287
|
+
// const EVENT_TIME = dayjs(record.time);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (type === "user") {
|
|
291
|
+
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (type === "funnel-post") {
|
|
295
|
+
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (type === "funnel-pre") {
|
|
299
|
+
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (type === "scd") {
|
|
303
|
+
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (type === "everything") {
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return record;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
module.exports = config;
|
|
@@ -17,7 +17,7 @@ const { uid, comma } = require('ak-tools');
|
|
|
17
17
|
const { pickAWinner, weighNumRange, date, integer } = require('../components/utils');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
/** @type {import('../types').
|
|
20
|
+
/** @type {import('../types').Dungeon} */
|
|
21
21
|
const config = {
|
|
22
22
|
token: "",
|
|
23
23
|
seed: "mirror me",
|