Deltarune script viewer

← back to main script listing

gml_GlobalScript_scr_gamestart_ch1

(view raw script w/o annotations or w/e)
1
function scr_gamestart_ch1
scr_gamestart_ch1

function scr_gamestart_ch1() { global.chapter = 1; global.darkzone = 0; global.filechoice = 0; global.plot = 0; global.truename = ""; global.othername[0] = ""; global.othername[1] = ""; global.othername[2] = ""; global.othername[3] = ""; global.othername[4] = ""; global.othername[5] = ""; global.othername[6] = ""; global.time = 0; global.fighting = 0; global.char[0] = 1; global.char[1] = 0; global.char[2] = 0; global.gold = 0; global.xp = 0; global.lv = 1; global.inv = 0; global.invc = 1; global.charselect = -1; global.encounterno = 1; global.specialbattle = 0; for (i = 0; i < 3; i += 1) { global.heromakex[i] = 100; global.heromakey[i] = 200; global.charauto[i] = 0; global.charmove[i] = 0; global.charcantarget[i] = 0; global.chardead[i] = 0; global.invincible[i] = 1; global.charaction[i] = 0; global.faceaction[i] = 0; global.charcond[i] = 0; } global.charauto[0] = 0; global.charauto[1] = 0; global.charauto[2] = 1; global.charauto[3] = 0; for (i = 0; i < 4; i += 1) { global.hp[i] = 200; global.maxhp[i] = 250; global.at[i] = 10; global.df[i] = 2; global.mag[i] = 0; global.guts[i] = 0; global.charweapon[i] = 1; global.chararmor1[i] = 0; global.chararmor2[i] = 0; global.weaponstyle[i] =
Normal
scr_84_get_lang_string_ch1("scr_gamestart_slash_scr_gamestart_gml_69_0")
; for (q = 0; q < 4; q += 1) { global.itemat[i][q] = 0; global.itemdf[i][q] = 0; global.itemmag[i][q] = 0; global.itembolts[i][q] = 0; global.itemgrazeamt[i][q] = 0; global.itemgrazesize[i][q] = 0; global.itemboltspeed[i][q] = 0; global.itemspecial[i][q] = 0; } for (j = 0; j < 12; j += 1) global.spell[i][j] = 0; } global.boltspeed = 100; global.grazeamt = 100; global.grazesize = 100; global.charname[0] = " "; global.charname[1] =
Kris
scr_84_get_lang_string_ch1("scr_gamestart_slash_scr_gamestart_gml_98_0")
; global.charname[2] =
Susie
scr_84_get_lang_string_ch1("scr_gamestart_slash_scr_gamestart_gml_99_0")
; global.charname[3] =
Ralsei
scr_84_get_lang_string_ch1("scr_gamestart_slash_scr_gamestart_gml_100_0")
; global.charweapon[0] = 0; global.chararmor1[0] = 0; global.chararmor2[0] = 0; global.hp[0] = 0; global.maxhp[0] = 0; global.hp[1] = 90; global.maxhp[1] = 90; global.at[1] = 10; global.charweapon[2] = 2; global.hp[2] = 110; global.maxhp[2] = 110; global.at[2] = 14; global.mag[2] = 1; global.charweapon[3] = 3; global.hp[3] = 70; global.maxhp[3] = 70; global.at[3] = 8; global.mag[3] = 7; global.spell[1][0] = 7; global.spell[2][0] = 4; global.spell[3][0] = 3; global.spell[3][1] = 2; scr_spellinfo_all_ch1(); global.item[0] = 0; ...
()
2
{
3
    global.chapter = 1;
4
    global.darkzone = 0;
5
    global.filechoice = 0;
6
    global.plot = 0;
7
    global.truename = "";
8
    global.othername[0] = "";
9
    global.othername[1] = "";
10
    global.othername[2] = "";
11
    global.othername[3] = "";
12
    global.othername[4] = "";
13
    global.othername[5] = "";
14
    global.othername[6] = "";
15
    global.time = 0;
16
    global.fighting = 0;
17
    global.char[0] = 1;
18
    global.char[1] = 0;
19
    global.char[2] = 0;
20
    global.gold = 0;
21
    global.xp = 0;
22
    global.lv = 1;
23
    global.inv = 0;
24
    global.invc = 1;
25
    global.charselect = -1;
26
    global.encounterno = 1;
27
    global.specialbattle = 0;
28
    for (i = 0; i < 3; i += 1)
29
    {
30
        global.heromakex[i] = 100;
31
        global.heromakey[i] = 200;
32
        global.charauto[i] = 0;
33
        global.charmove[i] = 0;
34
        global.charcantarget[i] = 0;
35
        global.chardead[i] = 0;
36
        global.invincible[i] = 1;
37
        global.charaction[i] = 0;
38
        global.faceaction[i] = 0;
39
        global.charcond[i] = 0;
40
    }
41
    global.charauto[0] = 0;
42
    global.charauto[1] = 0;
43
    global.charauto[2] = 1;
44
    global.charauto[3] = 0;
45
    for (i = 0; i < 4; i += 1)
46
    {
47
        global.hp[i] = 200;
48
        global.maxhp[i] = 250;
49
        global.at[i] = 10;
50
        global.df[i] = 2;
51
        global.mag[i] = 0;
52
        global.guts[i] = 0;
53
        global.charweapon[i] = 1;
54
        global.chararmor1[i] = 0;
55
        global.chararmor2[i] = 0;
56
        global.weaponstyle[i] = 
Normal
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_69_0")
;
57
        for (q = 0; q < 4; q += 1)
58
        {
59
            global.itemat[i][q] = 0;
60
            global.itemdf[i][q] = 0;
61
            global.itemmag[i][q] = 0;
62
            global.itembolts[i][q] = 0;
63
            global.itemgrazeamt[i][q] = 0;
64
            global.itemgrazesize[i][q] = 0;
65
            global.itemboltspeed[i][q] = 0;
66
            global.itemspecial[i][q] = 0;
67
        }
68
        for (j = 0; j < 12; j += 1)
69
            global.spell[i][j] = 0;
70
    }
71
    global.boltspeed = 100;
72
    global.grazeamt = 100;
73
    global.grazesize = 100;
74
    global.charname[0] = " ";
75
    global.charname[1] = 
Kris
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_98_0")
;
76
    global.charname[2] = 
Susie
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_99_0")
;
77
    global.charname[3] = 
Ralsei
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_100_0")
;
78
    global.charweapon[0] = 0;
79
    global.chararmor1[0] = 0;
80
    global.chararmor2[0] = 0;
81
    global.hp[0] = 0;
82
    global.maxhp[0] = 0;
83
    global.hp[1] = 90;
84
    global.maxhp[1] = 90;
85
    global.at[1] = 10;
86
    global.charweapon[2] = 2;
87
    global.hp[2] = 110;
88
    global.maxhp[2] = 110;
89
    global.at[2] = 14;
90
    global.mag[2] = 1;
91
    global.charweapon[3] = 3;
92
    global.hp[3] = 70;
93
    global.maxhp[3] = 70;
94
    global.at[3] = 8;
95
    global.mag[3] = 7;
96
    global.spell[1][0] = 7;
97
    global.spell[2][0] = 4;
98
    global.spell[3][0] = 3;
99
    global.spell[3][1] = 2;
100
    scr_spellinfo_all_ch1
scr_spellinfo_all_ch1

function scr_spellinfo_all_ch1() { for (j = 0; j < 4; j += 1) { for (i = 0; i < 12; i += 1) { spellid = global.spell[j][i]; scr_spellinfo_ch1(spellid); global.spellname[j][i] = spellname; global.spellnameb[j][i] = spellnameb; global.spelldescb[j][i] = spelldescb; global.spelldesc[j][i] = spelldesc; global.spellcost[j][i] = cost; global.spellusable[j][i] = spellusable; global.spelltarget[j][i] = spelltarget; } } }
();
101
    global.item[0] = 0;
102
    global.item[1] = 0;
103
    global.item[2] = 0;
104
    global.item[3] = 0;
105
    global.item[4] = 0;
106
    global.item[5] = 0;
107
    global.item[6] = 0;
108
    global.item[7] = 0;
109
    global.item[8] = 0;
110
    global.item[9] = 0;
111
    global.item[10] = 0;
112
    global.item[11] = 0;
113
    global.item[12] = 0;
114
    global.keyitem[0] = 1;
115
    global.keyitem[1] = 0;
116
    global.keyitem[2] = 0;
117
    global.keyitem[3] = 0;
118
    global.keyitem[4] = 0;
119
    global.keyitem[5] = 0;
120
    global.keyitem[6] = 0;
121
    global.keyitem[7] = 0;
122
    global.keyitem[8] = 0;
123
    global.keyitem[9] = 0;
124
    global.keyitem[10] = 0;
125
    global.keyitem[11] = 0;
126
    global.keyitem[12] = 0;
127
    global.weapon[0] = 0;
128
    global.weapon[1] = 0;
129
    global.weapon[2] = 0;
130
    global.weapon[3] = 0;
131
    global.weapon[4] = 0;
132
    global.weapon[5] = 0;
133
    global.weapon[6] = 0;
134
    global.weapon[7] = 0;
135
    global.weapon[8] = 0;
136
    global.weapon[9] = 0;
137
    global.weapon[10] = 0;
138
    global.weapon[11] = 0;
139
    global.weapon[12] = 0;
140
    global.armor[0] = 0;
141
    global.armor[1] = 0;
142
    global.armor[2] = 0;
143
    global.armor[3] = 0;
144
    global.armor[4] = 0;
145
    global.armor[5] = 0;
146
    global.armor[6] = 0;
147
    global.armor[7] = 0;
148
    global.armor[8] = 0;
149
    global.armor[9] = 0;
150
    global.armor[10] = 0;
151
    global.armor[11] = 0;
152
    global.armor[12] = 0;
153
    scr_iteminfo_all_ch1
scr_iteminfo_all_ch1

function scr_iteminfo_all_ch1() { for (i = 0; i < 12; i += 1) { itemid = global.item[i]; scr_iteminfo_ch1(itemid); global.itemnameb[i] = itemnameb; global.itemdescb[i] = itemdescb; global.itemvalue[i] = value; global.itemusable[i] = usable; } }
();
154
    global.tension = 0;
155
    global.maxtension = 250;
156
    global.grazetotal = 0;
157
    global.grazeturn = 0;
158
    for (i = 0; i < 3; i += 1)
159
    {
160
        global.monstermakex[i] = 500;
161
        global.monstermakey[i] = 240;
162
        global.monsterinstancetype[i] = 2283728;
163
        global.monster[i] = 1;
164
        global.monstername[i] = 
G BODY
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_206_0")
;
165
        global.monstertype[i] = 1Enemy (placeholder/G-BODY);
166
        global.monsterat[i] = 3;
167
        global.monsterdf[i] = 2;
168
        global.monsterhp[i] = 20;
169
        global.monstermaxhp[i] = 20;
170
        global.sparepoint[i] = 0;
171
    }
172
    global.bmenuno = 0;
173
    for (i = 0; i < 20; i += 1)
174
    {
175
        for (j = 0; j < 20; j += 1)
176
            global.bmenucoord[i][j] = 0;
177
    }
178
    global.myfight = 0;
179
    global.mnfight = 0;
180
    draw_set_color(c_white);
181
    global.fc = 0;
182
    global.fe = 0;
183
    global.typer = 5;
184
    global.msg = " ";
185
    global.msc = 0;
186
    for (i = 0; i < 10; i += 1)
187
    {
188
        global.writersnd[i] = snd_noise_ch1;
189
        global.writerimg[i] = scr_84_get_sprite_ch1
scr_84_get_sprite_ch1

function scr_84_get_sprite_ch1(arg0) { return ds_map_find_value(global.chemg_sprite_map, arg0); }
("spr_btact");
190
        global.smdir[i] = 90;
191
        global.smspeed[i] = 2;
192
        global.smface[i] = 505050;
193
        global.smsprite[i] = spr_smallface_s0_ch1;
194
        global.smalarm[i] = 20;
195
        global.smtype[i] = 0;
196
        global.smxx[i] = 100;
197
        global.smyy[i] = 110;
198
        global.smcolor[i] = c_purple;
199
        global.smstring[i] = " ";
200
    }
201
    global.smalarm[1] = 15;
202
    global.smyy[1] = 70;
203
    global.smxx[1] = 700;
204
    global.smdir[1] = 180;
205
    global.smspeed[1] = 40;
206
    global.smtype[1] = 3;
207
    global.smsprite[1] = spr_smallface_a2_ch1;
208
    global.smcolor[1] = c_white;
209
    global.smstring[1] = " ";
210
    for (i = 0; i < 100; i += 1)
211
        global.msg[i] = "%%";
212
    global.msg[0] = " ";
213
    global.msg[1] = " ";
214
    global.msg[2] = " ";
215
    global.msg[3] = " ";
216
    global.msg[4] = " ";
217
    global.currentsong[0] = snd_nosound_ch1;
218
    global.currentsong[1] = snd_nosound_ch1;
219
    global.batmusic[0] = snd_nosound_ch1;
220
    global.batmusic[1] = snd_nosound_ch1;
221
    global.fc = 0;
222
    global.fe = 0;
223
    global.choice = -1;
224
    global.seriousbattle = 0;
225
    global.interact = 0;
226
    global.entrance = 0;
227
    for (i = 0; i < 9; i += 1)
228
    {
229
        global.litem[i] = 0;
230
        global.litemname[i] = "";
231
        global.phone[i] = 0;
232
        global.phonename[i] = "";
233
    }
234
    for (i = 0; i < 20; i += 1)
235
        global.menucoord[i] = 0;
236
    for (i = 0; i < 100; i += 1)
237
        global.msg[i] = " ";
238
    global.choicemsg[0] = 
Yes
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_325_0")
;
239
    global.choicemsg[1] = 
No
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_326_0")
;
240
    global.choicemsg[2] = 
Maybe
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_327_0")
;
241
    global.choicemsg[3] = 
Don't know
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_328_0")
;
242
    for (i = 0; i < 9999; i += 1)
243
        global.flag[i] = 0;
244
    global.litem[0] = 0;
245
    global.litemname[0] = " ";
246
    global.phone[0] = 201;
247
    global.phonename[0] = 
Home
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_343_0")
;
248
    global.lcharname = 
Kris
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("scr_gamestart_slash_scr_gamestart_gml_345_0")
;
249
    global.lweapon = 2;
250
    global.larmor = 3;
251
    global.lxp = 0;
252
    global.llv = 1;
253
    global.lgold = 2;
254
    global.lhp = 20;
255
    global.lmaxhp = 20;
256
    global.lat = 10;
257
    global.ldf = 10;
258
    global.lwstrength = 1;
259
    global.ladef = 0;
260
    global.facing = 0;
261
    global.flag[15 sound_volume] = 1;
262
    global.flag[16 music_volume] = 1;
263
    global.flag[17 audio_volume] = 1;
264
    for (i = 0; i < 10; i += 1)
265
    {
266
        global.input_pressed[i] = 0;
267
        global.input_held[i] = 0;
268
        global.input_released[i] = 0;
269
    }
270
    global.currentroom = 0;
271
    global.disable_border = false;
272
}