-
Notifications
You must be signed in to change notification settings - Fork 0
/
import_ddlc.rpy
261 lines (96 loc) · 4.37 KB
/
import_ddlc.rpy
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
init python:
def dumpPersistentToFile(dumped_persistent,dumppath):
dumped_persistent=vars(dumped_persistent)
fo = open(dumppath, "w")
for key in sorted(dumped_persistent.iterkeys()):
fo.write(str(key) + ' - ' + str(type(dumped_persistent[key])) + ' >>> '+ str(dumped_persistent[key]) + '\n\n')
fo.close()
label import_ddlc_persistent:
python:
from renpy.loadsave import dump, loads
import glob
if renpy.macintosh:
rv = "~/Library/RenPy/"
check_path = os.path.expanduser(rv)
elif renpy.windows:
if 'APPDATA' in os.environ:
check_path = os.environ['APPDATA'] + "/RenPy/"
else:
rv = "~/RenPy/"
check_path = os.path.expanduser(rv)
else:
rv = "~/.renpy/"
check_path = os.path.expanduser(rv)
save_path=glob.glob(check_path + 'DDLC/persistent')
if not save_path:
save_path=glob.glob(check_path + 'DDLC-*/persistent')
$ quick_menu = False
scene black
with Dissolve(1.0)
if save_path:
$ save_path=save_path[0]
"Save data for Doki Doki Literature Club was found at [save_path]."
menu:
"Would you like to import Doki Doki Literature Club save data into [config.name]?\n(DDLC will not be affected)"
"Yes, import DDLC save data.":
pause 0.3
pass
"No, do not import.":
pause 0.3
return
else:
$ quick_menu = False
"Save data from Doki Doki Literature Club could not be found."
menu:
"[config.name] will begin with a new save."
"Okay":
pause 0.3
pass
return
python:
f=file(save_path,"rb")
s=f.read().decode("zlib")
f.close()
old_persistent=loads(s)
if old_persistent.playthrough is not None:
persistent.playthrough = old_persistent.playthrough
if old_persistent._chosen is not None:
persistent._chosen=old_persistent._chosen
if old_persistent._seen_audio is not None:
persistent._seen_audio=old_persistent._seen_audio
if old_persistent._seen_ever is not None:
persistent._seen_ever=old_persistent._seen_ever
if old_persistent._chosen is not None:
persistent._seen_images=old_persistent._seen_images
if old_persistent._seen_translates is not None:
persistent._seen_translates=old_persistent._seen_translates
if old_persistent.clear is not None:
persistent.clear=old_persistent.clear
if old_persistent.clearall is not None:
persistent.clearall=old_persistent.clearall
if old_persistent.ghost_menu is not None:
persistent.ghost_menu=old_persistent.ghost_menu
persistent.seen_ghost_menu = old_persistent.seen_ghost_menu
if old_persistent.monika_kill is not None:
persistent.monika_kill=old_persistent.monika_kill
if old_persistent.monika_reload is not None:
persistent.monika_reload=old_persistent.monika_reload
if old_persistent.monikatopics is not None:
persistent.monikatopics=old_persistent.monikatopics
if old_persistent.playername is not None:
persistent.playername=old_persistent.playername
player=persistent.playername
if old_persistent.seen_eyes is not None:
persistent.seen_eyes=old_persistent.seen_eyes
if old_persistent.seen_sticker is not None:
persistent.seen_sticker=old_persistent.seen_sticker
if old_persistent.special_poems is not None:
persistent.special_poems=old_persistent.special_poems
if persistent.steam is not None:
persistent.steam=old_persistent.steam
if old_persistent.tried_skip is not None:
persistent.tried_skip=old_persistent.tried_skip
if old_persistent.yuri_kill is not None:
persistent.yuri_kill=old_persistent.yuri_kill
return
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc