forked from obsidian-level-maker/Obsidian
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebugger.lua
More file actions
247 lines (208 loc) · 7.99 KB
/
Copy pathdebugger.lua
File metadata and controls
247 lines (208 loc) · 7.99 KB
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
------------------------------------------------------------------------
-- MODULE: Debug Statement Control
------------------------------------------------------------------------
--
-- Copyright (C) 2019-2022 MsrSgtShooterPerson
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2,
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-------------------------------------------------------------------
DEBUG_CONTROL = { }
DEBUG_CONTROL.MISSING_MAT_CHOICES =
{
"ignore", _("Ignore"),
"warn", _("Warn"),
"abort", _("Abort"),
}
DEBUG_CONTROL.TITLE_SCREEN_CHOICES =
{
"titlegen", _("Default"),
"filename", _("Filename"),
"randomwords", _("Random Word List"),
}
DEBUG_CONTROL.NAME_GEN_CHOICES =
{
"32l", _("Test Level Names"),
"32t", _("Test Title Names"),
"none", _("None"),
}
DEBUG_CONTROL.GROWTH_STEP_CHOICES =
{
"showmore", _("Show All Steps"),
"show", _("Show Successful Steps Only"),
"no", _("No"),
}
DEBUG_CONTROL.LIVEMAP_CHOICES =
{
"step", _("Per Step (Very Slow)"),
"room", _("Per Room (Slightly Slow)"),
"none", _("No Live Minimap"),
}
function DEBUG_CONTROL.setup(self)
module_param_up(self)
end
function DEBUG_CONTROL.get_levels()
if PARAM.custom_error_texture and PARAM.bool_custom_error_texture == 1 then
GAME.MATERIALS._ERROR.t = "ZZWOLF7"
end
end
function DEBUG_CONTROL.all_done()
--[[if PARAM.attach_debug_info and PARAM.bool_attach_debug_info == 1 then
local log_text = {}
gui.wad_add_text_lump("OBLOGS", log_text)
end]]
if PARAM.custom_error_texture and PARAM.bool_custom_error_texture == 1 then
gui.wad_merge_sections("games/doom/data/error_wall.wad")
end
end
----------------------------------------------------------------
OB_MODULES["debugger"] =
{
name = "debugger",
label = _("Miscellaneous Options"),
side = "left",
engine = "!idtech_0",
port = "!limit_enforcing",
priority = 5,
tooltip = _("Provides options for printing out more verbose log information. Unusual or experimental features can also be found here."),
hooks =
{
setup = DEBUG_CONTROL.setup,
get_levels = DEBUG_CONTROL.get_levels
},
options =
{
{
name = "title_screen_source",
label=_("Title Screen Source"),
choices=DEBUG_CONTROL.TITLE_SCREEN_CHOICES,
default = "titlegen",
tooltip = _("Choose how the WAD title is determined"),
longtip = _("Default: Will use Obsidian's regular naming tables.\n\nFilename: Will use the filename provided for the WAD (minus file extension).\n\nRandom Word List: Will randomly pick from the internal random word list.\n\nNOTE: Only EN locale characters are supported at this time, other languages may result in a blank title!"),
priority=107,
},
{
name = "bool_sub_titles",
label=_("Disable Sub-Titles"),
valuator = "button",
default = 0,
tooltip = _("Disable sub-titles on the Title Screen."),
priority=106,
},
{
name = "bool_scale_items_with_map_size",
label=_("Alternate Item Quantities"),
valuator = "button",
default = 0,
tooltip = _("Scales item distribution with map size (Experimental)"),
priority=105,
},
{
name = "bool_print_fab_materials",
label=_("Print Fab Materials"),
valuator = "button",
default = 0,
tooltip = _("Print list of textures/flats present in each fab"),
longtip = _("Print the names of all textures/flats preset in a prefab WAD. This will also list values like _FLOOR, _WALL, etc, prior to their conversion."),
priority=104,
},
{
name = "missing_material_behavior",
label=_("Missing Fab Material Behavior"),
choices=DEBUG_CONTROL.MISSING_MAT_CHOICES,
default = "ignore",
tooltip = _("Choose what to do when encountering a missing material"),
longtip = _("Provides the following options if a material definition isn't present in a game's MATERIALS table: \n\nIgnore: Silently continue; missing materials are usually replaced by an _ERROR or _DEFAULT texture.\n\nWarn: Continue, but write the name of the fab and the missing material to the logfile.\n\nAbort: Throw an error and halt generation, with an error message explaining which fab and material are causing the issue. Will also write this information to the logfile."),
priority=103,
},
{
name = "bool_non_vanilla_as_missing",
label=_("Check For Non-Vanilla Materials"),
valuator = "button",
default = 0,
tooltip = _("Choose what to do when encountering a non-vanilla material"),
longtip = _("If checked, will compare all flats/textures used against a list of vanilla materials for that IWAD, and treat non-vanilla materials as missing for the purposes of logging and throwing errors."),
priority=102,
gap = 1
},
{
name = "bool_whole_names_only",
label=_("Whole Name Gen Names Only"),
valuator = "button",
default = 0,
tooltip = _("Use only complete names from the Name Generator"),
longtip = _("Uses name generator names that are already complete phrases/sentences \ninstead of trying to procedurally generate them."),
priority=101,
},
{
name = "bool_shape_rule_stats",
label = _("Shape Rule Stats"),
valuator = "button",
default = 0,
tooltip = _("Displays usage statistics for shape grammar rules."),
priority=95,
},
{
name = "bool_save_svg",
label = _("Save Map Previews"),
valuator = "button",
default = 0,
tooltip = _("Saves SVG format images of generated map thumbnails."),
priority=94,
gap = 1,
},
{
name = "bool_save_gif",
label = _("Save Minimap GIF"),
valuator = "button",
default = 0,
tooltip = _("Save an animated GIF of the building process. Recommended in combination with the Live Growth Minimap."),
priority=94,
gap = 1,
},
{
name = "bool_suppress_nolimit_warning",
label = _("Suppress NoLimit Warning"),
valuator = "button",
default = 0,
tooltip = _("Suppress warning dialog when using Limit-Removing with the Doom family of games."),
longtip = _("This warning only applies to the Doom series of games, as other supported games may only have Limit-Removing as a feasible choice."),
priority = 61,
},
{
name = "bool_experimental_games",
label = _("Experimental Games"),
valuator = "button",
default = 0,
tooltip = _("Enables building of levels for experimental games."),
longtip = _("The following games are in an experimental status, meaning that they may have errors when building levels, or support for certain gameplay features has not been implemented yet:\n\nDuke Nukem 3D (currently disabled)\n\nQuake (currently disabled)"),
priority = 60,
gap = 1,
},
{
name = "bool_custom_error_texture",
label = _("Custom Error Texture"),
valuator = "button",
default = 0,
tooltip = _("Replaces Obsidian's default texture with a high visibility version for easier detection of broken level geometry or missing textures."),
priority = 50,
gap = 1,
},
{
name="live_minimap",
label=_("Live Growth Minimap"),
choices=DEBUG_CONTROL.LIVEMAP_CHOICES,
default="none",
tooltip= _("Controls the granularity of steps shown on the GUI minimap as a level is built."),
longtip= _("Higher levels of detail will increase the amount of time that it takes to generate a WAD. If saving an animated GIF of the build process, its animation speed will also be affected by this setting (less detail=slower, more detail=faster).")
},
},
}