Subversion Repository Public Repository

Nextrek

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
{
    "uid": "5FDD1950K9FA1A4BCCSB00CEE54C8BC8AE54",
    "isLoaded": true,
    "lastModificationTime": 1424021629456,
    "items": {
        "name": "Show Save Game Image",
        "type": "data_record",
        "order": 4,
        "category": "commonEvents",
        "data": {
            "name": "Show Save Game Image",
            "startCondition": 0,
            "conditionEnabled": false,
            "parallel": false,
            "parameters": [
                {
                    "label": "Picture ID",
                    "type": 1,
                    "numberVariable": {
                        "name": "Picture ID",
                        "index": 0,
                        "scope": 0
                    },
                    "numberValueType": "number"
                },
                {
                    "label": "Save Slot",
                    "type": 1,
                    "numberVariable": {
                        "name": "Slot Area",
                        "index": 1,
                        "scope": 0
                    },
                    "numberValueType": "number"
                },
                {
                    "label": "Page",
                    "type": 1,
                    "numberVariable": {
                        "name": "Page",
                        "index": 2,
                        "scope": 0
                    },
                    "numberValueType": "number"
                }
            ],
            "commands": [
                {
                    "id": "gs.Comment",
                    "params": {
                        "text": "This Common Event shows the correct snapshot-image for the specified save game slot. The picture ID to use as well as the slot-area and page are passed via parameters.\n\nWith the help of the page-number and slot-area we calculate the actual save game slot number using the following formula:\n\n(Page - 1) * NumberOfSlotAreas + Slot-Area = Actual Save Game Slot Number\n\nFor Example: If the user clicks on the 2. Slot-Area on Page 3 the actual save game slot number is: \n\n(3 - 1) * 8 + 2 = 18\n\nAfter that, we use a script call to assign the snapshot-image to the picture with the specified picture ID. That is necessary because VN Maker has no command to access the screenshot of a save-game."
                    },
                    "indent": 0,
                    "uid": "BCBE63A47E9437410F8A15090310DA56E207",
                    "expanded": true
                },
                {
                    "id": "gs.ChangeNumberVariables",
                    "params": {
                        "target": 0,
                        "targetVariable": {
                            "name": "Slot",
                            "index": 3,
                            "scope": 0
                        },
                        "targetScope": 0,
                        "targetRange": {
                            "start": 0,
                            "end": 0
                        },
                        "targetReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "operation": 0,
                        "source": 0,
                        "sourceValue": 8,
                        "sourceRandom": {
                            "start": 0,
                            "end": 0
                        },
                        "sourceScope": 0,
                        "sourceVariable": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "sourceReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "previewBackground": {
                            "name": "$live_preview_snapshot"
                        },
                        "targetReferenceDomain": "com.degica.vnm.default",
                        "sourceReferenceDomain": "com.degica.vnm.default"
                    },
                    "indent": 0,
                    "uid": "0BE0D3D62B01E4404E696176758CFDDC04E4"
                },
                {
                    "id": "gs.ChangeNumberVariables",
                    "params": {
                        "target": 0,
                        "targetVariable": {
                            "name": "Page",
                            "index": 2,
                            "scope": 0
                        },
                        "targetScope": 0,
                        "targetRange": {
                            "start": 0,
                            "end": 0
                        },
                        "targetReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "operation": 2,
                        "source": 0,
                        "sourceValue": 1,
                        "sourceRandom": {
                            "start": 0,
                            "end": 0
                        },
                        "sourceScope": 0,
                        "sourceVariable": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "sourceReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "previewBackground": {
                            "name": "$live_preview_snapshot"
                        },
                        "targetReferenceDomain": "com.degica.vnm.default",
                        "sourceReferenceDomain": "com.degica.vnm.default"
                    },
                    "indent": 0,
                    "uid": "460CBD4E2E2D164ABF4984E439C864B96519"
                },
                {
                    "id": "gs.ChangeNumberVariables",
                    "params": {
                        "target": 0,
                        "targetVariable": {
                            "name": "Slot",
                            "index": 3,
                            "scope": 0
                        },
                        "targetScope": 0,
                        "targetRange": {
                            "start": 0,
                            "end": 0
                        },
                        "targetReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "operation": 3,
                        "source": 0,
                        "sourceValue": {
                            "name": "Page",
                            "index": 2,
                            "scope": 0
                        },
                        "sourceRandom": {
                            "start": 0,
                            "end": 0
                        },
                        "sourceScope": 0,
                        "sourceVariable": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "sourceReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "previewBackground": {
                            "name": "$live_preview_snapshot"
                        },
                        "targetReferenceDomain": "com.degica.vnm.default",
                        "sourceReferenceDomain": "com.degica.vnm.default"
                    },
                    "indent": 0,
                    "uid": "A4AB3D53744FF34ECB68A1218D46B4BCF91B"
                },
                {
                    "id": "gs.ChangeNumberVariables",
                    "params": {
                        "target": 0,
                        "targetVariable": {
                            "name": "Slot",
                            "index": 3,
                            "scope": 0
                        },
                        "targetScope": 0,
                        "targetRange": {
                            "start": 0,
                            "end": 0
                        },
                        "targetReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "operation": 1,
                        "source": 0,
                        "sourceValue": {
                            "name": "Slot Area",
                            "index": 1,
                            "scope": 0
                        },
                        "sourceRandom": {
                            "start": 0,
                            "end": 0
                        },
                        "sourceScope": 0,
                        "sourceVariable": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "sourceReference": {
                            "scope": 1,
                            "index": 0,
                            "domain": "com.degica.vnm.default"
                        },
                        "previewBackground": {
                            "name": "$live_preview_snapshot"
                        },
                        "targetReferenceDomain": "com.degica.vnm.default",
                        "sourceReferenceDomain": "com.degica.vnm.default"
                    },
                    "indent": 0,
                    "uid": "32F1C8F82EA43345887A8D2733FCE51B7477"
                },
                {
                    "id": "gs.Script",
                    "params": {
                        "script": "/*\n* This script call is used to assign the correct screenshot image for the slot to the correct picture object. That is necessary because VN Maker has no command by default\n* to access save game date. But feel free to create your own commands for it via plugins!\n*/\n\n/* \n * Here we access tempNumbers which is an array containing all local number variables for this common event.\n * So store the Picture ID, Slot-Area in two local variables \"id\" and \"slotNumber\" to access them later in a shorter way. We also subtract\n * 1 from the slot-number because the internal counting starts at 0 and not at 1. \n*/\nvar id = GameManager.variableStore.tempNumbers[0];\nvar slotNumber = GameManager.variableStore.tempNumbers[3] - 1;\n\n/*\n* Here we use the Picture ID to get the corresponding picture object and store into \"picture\" variable so we can modify the picture object later. We also\n* use the slotNumber to get the corresponding slot-object which contains more info about the save-game slot. So we can check later if that slot is actually used and if yes we\n* can access the screenshot image.\n*/\nvar picture = SceneManager.scene.pictures[id];\nvar slot = GameManager.saveGameSlots[slotNumber];\n\n/* Here we check if the save game slot is used. If so, we can access the screenshot image and\n*  set it as bitmap for the picture-object so it is display on screen.\n*/\nif(slot && slot.date) \n{\n    // Let's check if there already a cached bitmap-object for our save game slot.\n    var bitmap = ResourceManager.getCustomBitmap(\"$slot_\"+slotNumber);\n\n    // If there is a cached bitmap-object but it is different from the current slot-image then\n    // we have to dispose/destroy the old cached bitmap.\n    if(bitmap && bitmap.filePath != slot.image)\n    {\n         bitmap.dispose();\n         bitmap = null;\n    }\n\n    // If not, so bitmap is null, then we have to create it\n    if(!bitmap) \n    {\n        /* Create a new bitmap-object from slot.image. The slot.image property stores the screenshot image for the\n        * save game slot as data url.\n        */\n        bitmap = new gs.Bitmap(slot.image);\n        // Put the new created bitmap object into the cache so we don't need to re-create it everytime.\n        ResourceManager.setCustomBitmap(\"$slot_\"+slotNumber, bitmap);\n        // Set a callback function called if the bitmap is loaded/ready.\n        bitmap.onload = function() \n        {\n            // We set the image name to \"null\" because we want to set an in-memory bitmap.\n            picture.image = null;\n            // Set the bitmap object for the picture to display it on screen.\n            picture.bitmap = bitmap;\n            // Set the size of the picture so it matches the size of the new assigned bitmap\n            picture.dstRect.width = bitmap.width;\n            picture.dstRect.height = bitmap.height;\n            // Set the source-rectangle so it matches the size of the new assigned bitmap.\n            picture.srcRect.set(0, 0, bitmap.width, bitmap.height);\n        };\n    }\n    // Otherwise, we can just use the cached bitmap object.\n    else\n    {\n        // We set the image name to \"null\" because we want to set an in-memory bitmap.\n        picture.image = null;\n        // Set the bitmap object for the picture to display it on screen.\n        picture.bitmap = bitmap;\n        // Set the size of the picture so it matches the size of the new assigned bitmap\n        picture.dstRect.width = bitmap.width;\n        picture.dstRect.height = bitmap.height;\n        // Set the source-rectangle so it matches the size of the new assigned bitmap.\n        picture.srcRect.set(0, 0, bitmap.width, bitmap.height);\n    }\n}\n// If the slot is a free unused save game slot, we make the picture invisible by assigning nothing \"null\" to it.\nelse\n{\n    // Set bitmap-property and image-property to null so nothing is displayed on screen for this picture.\n    picture.bitmap = null\n    picture.image = null\n}"
                    },
                    "indent": 0,
                    "expanded": true,
                    "uid": "C0DBFDB1877AF54D7B7B99988A03F5C83413"
                }
            ],
            "index": "5FDD1950K9FA1A4BCCSB00CEE54C8BC8AE54",
            "booleanVariables": [
                {
                    "name": "",
                    "index": 0,
                    "scope": 0
                }
            ],
            "singleInstance": false,
            "numberVariables": [
                {
                    "name": "Picture ID",
                    "index": 0,
                    "scope": 0
                },
                {
                    "name": "Slot Area",
                    "index": 1,
                    "scope": 0
                },
                {
                    "name": "Page",
                    "index": 2,
                    "scope": 0
                },
                {
                    "name": "Slot",
                    "index": 3,
                    "scope": 0
                }
            ],
            "stringVariables": [
                {
                    "name": "",
                    "index": 0,
                    "scope": 0
                }
            ],
            "defaultExpressionId": "BF7CB12110894142C299D341A545C910AA86"
        },
        "id": "5FDD1950K9FA1A4BCCSB00CEE54C8BC8AE54",
        "parentId": "72A65D9D3FA5C349F70A8EB8E315DC45F796",
        "localizableStrings": {}
    },
    "summary": [
        "name",
        "type",
        "order"
    ]
}

Commits for Nextrek/s2s/data/5FDD1950K9FA1A4BCCSB00CEE54C8BC8AE54.json

Diff revisions: vs.
Revision Author Commited Message
1086 Diff Diff ASorrentino picture ASorrentino Fri 11 May, 2018 21:50:37 +0000
1084 MOliva picture MOliva Fri 11 May, 2018 12:41:55 +0000