Skip to content

Commit 77f18bf

Browse files
author
dashodanger
committed
Some transition away from sliders
1 parent 10c9fb9 commit 77f18bf

File tree

9 files changed

+200
-182
lines changed

9 files changed

+200
-182
lines changed

modules/procedural_gotcha_zdoom.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ function PROCEDURAL_GOTCHA_FINE_TUNE_ZDOOM.syntaxize(str, str2)
14611461
end
14621462

14631463
function PROCEDURAL_GOTCHA_FINE_TUNE_ZDOOM.check_monsters_enabled()
1464-
if PARAM.float_mons == 0 and PARAM.boss_gen == "yes" then
1464+
if PARAM.mons_qty == "0" and PARAM.boss_gen == "yes" then
14651465
error("Monsters must be enabled for boss generator!")
14661466
end
14671467
end
@@ -1538,7 +1538,7 @@ function PROCEDURAL_GOTCHA_FINE_TUNE_ZDOOM.all_done()
15381538
return
15391539
end
15401540

1541-
if PARAM.float_mons == 0 then
1541+
if PARAM.mons_qty == "0" then
15421542
-- no monsters, no boss, duh
15431543
warning("No monsters found by boss generator")
15441544
PARAM.boss_count = -1

modules/ui_arch.lua

Lines changed: 55 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,37 @@ UI_ARCH.ZDOOM_SKYBOX_CHOICES =
3636
"disable", _("Disable")
3737
}
3838

39+
UI_ARCH.SIZES =
40+
{
41+
"epi", _("Episodic"),
42+
"prog", _("Progressive"),
43+
"mixed", _("Mix It Up"),
44+
"10", _("Microscopic"),
45+
"16", _("Miniscule"),
46+
"22", _("Tiny"),
47+
"30", _("Small"),
48+
"36", _("Average"),
49+
"42", _("Large"),
50+
"48", _("Huge"),
51+
"58", _("Colossal"),
52+
"66", _("Gargantuan"),
53+
"75", _("Transcendent"),
54+
}
55+
56+
UI_ARCH.SIZE_BOUNDS =
57+
{
58+
"10", _("Microscopic"),
59+
"16", _("Miniscule"),
60+
"22", _("Tiny"),
61+
"30", _("Small"),
62+
"36", _("Average"),
63+
"42", _("Large"),
64+
"48", _("Huge"),
65+
"58", _("Colossal"),
66+
"66", _("Gargantuan"),
67+
"75", _("Transcendent"),
68+
}
69+
3970
UI_ARCH.MIXIN_CHOICES =
4071
{
4172

@@ -44,7 +75,6 @@ UI_ARCH.MIXIN_CHOICES =
4475
"less", _("Mostly Other Themes"),
4576
}
4677

47-
4878
UI_ARCH.RAMP_FACTOR =
4979
{
5080
"0.5", _("Very Fast Curve"),
@@ -54,6 +84,15 @@ UI_ARCH.RAMP_FACTOR =
5484
"2", _("Very Slow Curve"),
5585
}
5686

87+
UI_ARCH.LIGHT_FACTOR =
88+
{
89+
"0.5", _("Doom 3"),
90+
"0.75", _("Darker"),
91+
"1.0", _("Default"),
92+
"1.25", _("Brighter"),
93+
"1.5", _("GG Retinas"),
94+
}
95+
5796
UI_ARCH.SIZE_BIAS =
5897
{
5998
"small", _("Smaller"),
@@ -64,36 +103,6 @@ UI_ARCH.SIZE_BIAS =
64103
function UI_ARCH.setup(self)
65104

66105
module_param_up(self)
67-
68-
if OB_CONFIG.batch == "yes" and type(PARAM.float_size) ~= "string" then
69-
SEED_W = 90
70-
SEED_H = 90
71-
else
72-
if type(PARAM.float_size) == "string" then -- Use upper bound for Mix It Up, Progressive, and Episodic level sizes - Dasho
73-
-- MSSP: the absolute maximum size is tightened down to the largest
74-
-- agreed map size for performance's sake. Current agreed maximum is 74 W.
75-
-- any higher will cause skyboxes and teleporter rooms to start merging with
76-
-- the main map.
77-
78-
-- Dasho: This shifts the default value of 90 for SEED_W and SEED_H to here instead of defs.lua. It will remain 90 unless someone
79-
-- who is using slider overrides sets extremely high values for Level Size, then it is changed to prevent assertion errors later on.
80-
if (PARAM.float_level_upper_bound > 86) then
81-
SEED_W = PARAM.float_level_upper_bound + 4
82-
SEED_H = PARAM.float_level_upper_bound + 4
83-
else
84-
SEED_W = 90
85-
SEED_H = 90
86-
end
87-
else
88-
if (PARAM.float_size > 86) then
89-
SEED_W = PARAM.float_size + 4
90-
SEED_H = PARAM.float_size + 4
91-
else
92-
SEED_W = 90
93-
SEED_H = 90
94-
end
95-
end
96-
end
97106
end
98107

99108
OB_MODULES["ui_arch"] =
@@ -115,61 +124,44 @@ OB_MODULES["ui_arch"] =
115124
{
116125

117126
{
118-
name="float_size",
127+
name="level_size",
119128
label=_("Level Size"),
120-
valuator = "slider",
121-
min = 10,
122-
max = 75,
123-
increment = 1,
124-
default = 36,
125-
nan = _("Mix It Up,Episodic,Progressive"),
126-
presets = _("10:10 (Microscopic),16:16 (Miniature),22:22 (Tiny),30:30 (Small),36:36 (Average),42:42 (Large),48:48 (Huge),58:58 (Colossal),66:66 (Gargantuan),75:75 (Transcendent)"),
129+
choices = UI_ARCH.SIZES,
130+
default = "epi",
127131
tooltip = _("Determines size of map (Width x Height) in grid squares."),
128132
longtip = _("If you are planning to generate Binary format maps at sizes of 50 and above, Autodetailing will be enabled by default. The stability of maps with sizes 60 and beyond is not predictable unless using UDMF map format (supported engines only)."),
129133
priority = 100,
130-
randomize_group="architecture"
131134
},
132135

133-
134136
{
135-
name = "float_level_upper_bound",
137+
name = "level_size_upper_bound",
136138
label = _("Upper Bound"),
137-
valuator = "slider",
138-
min = 10,
139-
max = 75,
140-
increment = 1,
141-
default = 75,
142-
presets = _("10:10 (Microscopic),16:16 (Miniature),22:22 (Tiny),30:30 (Small),36:36 (Average),42:42 (Large),48:48 (Huge),58:58 (Colossal),66:66 (Gargantuan),75:75 (Transcendent)"),
139+
choices = UI_ARCH.SIZE_BOUNDS,
140+
default = "75",
143141
tooltip = _("Fine tune upper limit when Level Size is set to Episodic, Progressive or Mixed."),
144142
priority = 99,
145143
},
146144

147145

148146
{
149-
name = "float_level_lower_bound",
147+
name = "level_size_lower_bound",
150148
label = _("Lower Bound"),
151-
valuator = "slider",
152-
min = 10,
153-
max = 75,
154-
increment = 1,
155-
default = 10,
156-
presets = _("10:10 (Microscopic),16:16 (Miniature),22:22 (Tiny),30:30 (Small),36:36 (Average),42:42 (Large),48:48 (Huge),58:58 (Colossal),66:66 (Gargantuan),75:75 (Transcendent)"),
149+
choices = UI_ARCH.SIZE_BOUNDS,
150+
default = "10",
157151
tooltip = _("Fine tune lower limit when Level Size is set to Episodic, Progressive or Mixed."),
158152
priority = 98,
159153
gap = 1,
160154
},
161155

162156

163-
{
157+
{
164158
name = "level_size_ramp_factor",
165159
label = _("Ramp Factor"),
166160
tooltip = _("Determines how fast or slow larger level sizes are reached in Progressive/Episodic mode."),
167161
longtip = _("Very Fast Curve: Reach half-size at 1/4th of the game.\nFast Curve: Reach half-size at 1/3rds.\nLinear: Reach half-size at half the game.\nSlow Curve: Reach half-size at 2/3rds.\nVery Slow Curve: Reach half-size at 3/4ths.\n\nObsidian default is Fast Curve."),
168162
choices = UI_ARCH.RAMP_FACTOR,
169163
default = "0.66",
170-
priority = 97,
171-
randomize_group="architecture",
172-
164+
priority = 97,
173165
},
174166

175167

@@ -212,18 +204,13 @@ OB_MODULES["ui_arch"] =
212204
},
213205

214206
{
215-
name = "float_overall_lighting_mult",
207+
name = "overall_lighting_mult",
216208
label = _("Lighting Multiplier"),
217-
valuator = "slider",
218-
units = _("x"),
219-
min = 0.5,
220-
max = 1.5,
221-
increment = .05,
222-
default = 1.0,
223209
priority = 80,
224-
randomize_group="architecture",
210+
choices = UI_ARCH.LIGHT_FACTOR,
211+
default = "1.0",
225212
tooltip = _("Adjust overall map lighting"),
226-
longtip = _("This will apply a multiplier to the values in the default lighting tables when determining the brightness level of a room. If control over the minimum or maximum brightness values is desired, please use the Minimum/Maximum Brightness sliders in the Advanced Architecture module.")
213+
longtip = _("This will apply a multiplier to the values in the default lighting tables when determining the brightness level of a room.")
227214
},
228215

229216
{ name="outdoors",

modules/ui_mons.lua

Lines changed: 84 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,72 @@
2020

2121
UI_MONS = { }
2222

23+
UI_MONS.QUANTITIES =
24+
{
25+
"0", _("None"),
26+
"0.15", _("Trivial"),
27+
"0.35", _("Sporadic"),
28+
"0.7", _("Meager"),
29+
"1.0", _("Default"),
30+
"1.3", _("Modest"),
31+
"1.5", _("Bearable"),
32+
"2.0", _("Rough"),
33+
"2.5", _("Strenuous"),
34+
"3.0", _("Formidable"),
35+
"3.5", _("Harsh"),
36+
"4.0", _("Painful"),
37+
"4.5", _("Unforgiving"),
38+
"5.0", _("Punishing"),
39+
"5.5", _("Brutal"),
40+
"6.0", _("Draconian"),
41+
"6.66", _("Merciless"),
42+
"mixed", _("Mix It Up"),
43+
"prog", _("Progressive"),
44+
}
45+
46+
UI_MONS.QUANTITY_BOUNDS =
47+
{
48+
"0", _("None"),
49+
"0.15", _("Trivial"),
50+
"0.35", _("Sporadic"),
51+
"0.7", _("Meager"),
52+
"1.0", _("Default"),
53+
"1.3", _("Modest"),
54+
"1.5", _("Bearable"),
55+
"2.0", _("Rough"),
56+
"2.5", _("Strenuous"),
57+
"3.0", _("Formidable"),
58+
"3.5", _("Harsh"),
59+
"4.0", _("Painful"),
60+
"4.5", _("Unforgiving"),
61+
"5.0", _("Punishing"),
62+
"5.5", _("Brutal"),
63+
"6.0", _("Draconian"),
64+
"6.66", _("Merciless"),
65+
}
66+
67+
UI_MONS.STRENGTHS =
68+
{
69+
"0.59", _("Weak"),
70+
"0.77", _("Easier"),
71+
"1.0", _("Default"),
72+
"1.3", _("Harder"),
73+
"1.7", _("Tough"),
74+
"2.5", _("Fierce"),
75+
"12", _("CRAZY"),
76+
}
77+
78+
UI_MONS.RAMPS =
79+
{
80+
"0.5", _("Very Slow"),
81+
"0.75", _("Slow"),
82+
"1.0", _("Average"),
83+
"1.5", _("Fast"),
84+
"2.0", _("Very Fast"),
85+
"3.0", _("Extremely Fast"),
86+
"epi", _("Episodic"),
87+
}
88+
2389
UI_MONS.BOSSES =
2490
{
2591
"none", _("NONE"),
@@ -99,71 +165,46 @@ OB_MODULES["ui_mons"] =
99165
options =
100166
{
101167
{
102-
name="float_mons",
168+
name="mons_qty",
103169
label=_("Monster Quantity"),
104-
valuator = "slider",
105-
min = 0,
106-
max = 10.00,
107-
increment = .05,
108-
default = 1.0,
109-
nan = _("Mix It Up,Progressive"),
110-
presets = _("0:None,0.15:0.15 (Trivial),0.35:0.35 (Sporadic),0.7:0.7 (Meager),1.0:1.0 (Normal),1.3:1.3 (Modest),1.5:1.5 (Bearable),2.0:2.0 (Rough),2.5:2.5 (Strenuous),3.0:3.0 (Formidable),3.5:3.5 (Harsh),4.0:4.0 (Painful),4.5:4.5 (Ferocious),5.0:5.0 (Unforgiving),5.5:5.5 (Punishing),6.0:6.0 (Murderous),6.5:6.5 (Grueling),7.0:7.0 (Unrelenting),7.5:7.5 (Arduous),8.0:8.0 (Barbaric),8.5:8.5 (Savage),9.0:9.0 (Brutal),9.5:9.5 (Draconian),10.0:10.00 (Merciless)"),
170+
choices=UI_MONS.QUANTITIES,
171+
default = "1.0",
111172
tooltip=_("Changes the number of monsters placed in a map. Scales with level size."),
112-
longtip=_("For reference: Obsidian's default for normal is 1.0.\n\nMix It Up: Selects quantities specified between Upper and Lower Bound choices on a chosen by the user.\n\nProgressive: creates a curve of increasing monster population also based on the Fine Tune options below.\n\nIt does not matter if your Upper/Lower Bound selections are reversed. Progressive will pick the min VS max quantities selected.\n\nNone: No monsters. Why would you choose this option? \nTrivial: Very, very few monsters. Almost nothing to kill.\nSporadic: Very few monsters. Not many things to kill.\nMeager: Fewer monsters. Not challenging for the average player.\nEasy: Obsidian default quantity. Not too bad for casual players.\nModest: Slightly above default. Still pretty easy for most. \nBearable: Above average opposition. Getting warmer! \nRough: Slightly difficult. Equivalent to late 90s megawads. \nStrenuous: Baby steps into big boy difficulty. Lots to kill! \nFormidable/Harsh: 'Easy' level of difficult. Considerable opposition. \nPainful/Ferocious: Getting into slaughterwad territory. Difficult! \nUnforgiving/Punishing: Slaughterwad level difficulty. Skill needed. \nMurderous/Grueling: Extremely high monster count. \nUnrelenting/Arduous: An uphill battle. Expect to reload saves often! \nBarbaric/Savage: Up into the hardest slaughterwads out there. \nBrutal/Draconian: Legions of demons await you on this setting. \nMerciless: Hell will throw everything at you at this setting, you masochist."),
113-
randomize_group="monsters",
173+
longtip=_("For reference: Mix It Up: Selects quantities specified between Upper and Lower Bound choices on a chosen by the user.\n\nProgressive: creates a curve of increasing monster population also based on the Fine Tune options below.\n\nIt does not matter if your Upper/Lower Bound selections are reversed. Progressive will pick the min VS max quantities selected.\n\nNone: No monsters. Why would you choose this option? \nTrivial: Very, very few monsters. Almost nothing to kill.\nSporadic: Very few monsters. Not many things to kill.\nMeager: Fewer monsters. Not challenging for the average player.\nEasy: Obsidian default quantity. Not too bad for casual players.\nModest: Slightly above default. Still pretty easy for most. \nBearable: Above average opposition. Getting warmer! \nRough: Slightly difficult. Equivalent to late 90s megawads. \nStrenuous: Baby steps into big boy difficulty. Lots to kill! \nFormidable/Harsh: 'Easy' level of difficult. Considerable opposition. \nPainful/Ferocious: Getting into slaughterwad territory. Difficult! \nUnforgiving/Punishing: Slaughterwad level difficulty. Skill needed. \nMurderous/Grueling: Extremely high monster count. \nUnrelenting/Arduous: An uphill battle. Expect to reload saves often! \nBarbaric/Savage: Up into the hardest slaughterwads out there. \nBrutal/Draconian: Legions of demons await you on this setting. \nMerciless: Hell will throw everything at you at this setting, you masochist."),
174+
114175
},
115176
{
116-
name="float_mix_it_up_upper_range",
177+
name="mons_qty_upper_range",
117178
label=_("Upper Bound"),
118-
valuator = "slider",
119-
min = 0,
120-
max = 10.00,
121-
increment = .05,
122-
default = 10,
123-
presets = _("0:None,0.15:0.15 (Trivial),0.35:0.35 (Sporadic),0.7:0.7 (Meager),1.0:1.0 (Normal),1.3:1.3 (Modest),1.5:1.5 (Bearable),2.0:2.0 (Rough),2.5:2.5 (Strenuous),3.0:3.0 (Formidable),3.5:3.5 (Harsh),4.0:4.0 (Painful),4.5:4.5 (Ferocious),5.0:5.0 (Unforgiving),5.5:5.5 (Punishing),6.0:6.0 (Murderous),6.5:6.5 (Grueling),7.0:7.0 (Unrelenting),7.5:7.5 (Arduous),8.0:8.0 (Barbaric),8.5:8.5 (Savage),9.0:9.0 (Brutal),9.5:9.5 (Draconian),10.0:10.00 (Merciless)"),
179+
choices=UI_MONS.QUANTITY_BOUNDS,
180+
default = "6.66",
124181
longtip=_("For reference: Obsidian's default for normal is 1.0.\n\nMix It Up: Selects quantities specified between Upper and Lower Bound choices on a chosen by the user.\n\nProgressive: creates a curve of increasing monster population also based on the Fine Tune options below.\n\nIt does not matter if your Upper/Lower Bound selections are reversed. Progressive will pick the min VS max quantities selected.\n\nNone: No monsters. Why would you choose this option? \nTrivial: Very, very few monsters. Almost nothing to kill.\nSporadic: Very few monsters. Not many things to kill.\nMeager: Fewer monsters. Not challenging for the average player.\nEasy: Obsidian default quantity. Not too bad for casual players.\nModest: Slightly above default. Still pretty easy for most. \nBearable: Above average opposition. Getting warmer! \nRough: Slightly difficult. Equivalent to late 90s megawads. \nStrenuous: Baby steps into big boy difficulty. Lots to kill! \nFormidable/Harsh: 'Easy' level of difficult. Considerable opposition. \nPainful/Ferocious: Getting into slaughterwad territory. Difficult! \nUnforgiving/Punishing: Slaughterwad level difficulty. Skill needed. \nMurderous/Grueling: Extremely high monster count. \nUnrelenting/Arduous: An uphill battle. Expect to reload saves often! \nBarbaric/Savage: Up into the hardest slaughterwads out there. \nBrutal/Draconian: Legions of demons await you on this setting. \nMerciless: Hell will throw everything at you at this setting, you masochist."),
125182
tooltip=_("If you have Mix It Up or Progressive selected, you can define the upper bound here. Otherwise, this option is simply ignored."),
126183
},
127184
{
128-
name="float_mix_it_up_lower_range",
185+
name="mons_qty_lower_range",
129186
label=_("Lower Bound"),
130-
valuator = "slider",
131-
min = 0,
132-
max = 10.00,
133-
increment = .05,
134-
default = 0,
135-
presets = _("0:None,0.15:0.15 (Trivial),0.35:0.35 (Sporadic),0.7:0.7 (Meager),1.0:1.0 (Normal),1.3:1.3 (Modest),1.5:1.5 (Bearable),2.0:2.0 (Rough),2.5:2.5 (Strenuous),3.0:3.0 (Formidable),3.5:3.5 (Harsh),4.0:4.0 (Painful),4.5:4.5 (Ferocious),5.0:5.0 (Unforgiving),5.5:5.5 (Punishing),6.0:6.0 (Murderous),6.5:6.5 (Grueling),7.0:7.0 (Unrelenting),7.5:7.5 (Arduous),8.0:8.0 (Barbaric),8.5:8.5 (Savage),9.0:9.0 (Brutal),9.5:9.5 (Draconian),10.0:10.00 (Merciless)"),
187+
choices=UI_MONS.QUANTITY_BOUNDS,
188+
default = "0.15",
136189
longtip=_("For reference: Obsidian's default for normal is 1.0.\n\nMix It Up: Selects quantities specified between Upper and Lower Bound choices on a chosen by the user.\n\nProgressive: creates a curve of increasing monster population also based on the Fine Tune options below.\n\nIt does not matter if your Upper/Lower Bound selections are reversed. Progressive will pick the min VS max quantities selected.\n\nNone: No monsters. Why would you choose this option? \nTrivial: Very, very few monsters. Almost nothing to kill.\nSporadic: Very few monsters. Not many things to kill.\nMeager: Fewer monsters. Not challenging for the average player.\nEasy: Obsidian default quantity. Not too bad for casual players.\nModest: Slightly above default. Still pretty easy for most. \nBearable: Above average opposition. Getting warmer! \nRough: Slightly difficult. Equivalent to late 90s megawads. \nStrenuous: Baby steps into big boy difficulty. Lots to kill! \nFormidable/Harsh: 'Easy' level of difficult. Considerable opposition. \nPainful/Ferocious: Getting into slaughterwad territory. Difficult! \nUnforgiving/Punishing: Slaughterwad level difficulty. Skill needed. \nMurderous/Grueling: Extremely high monster count. \nUnrelenting/Arduous: An uphill battle. Expect to reload saves often! \nBarbaric/Savage: Up into the hardest slaughterwads out there. \nBrutal/Draconian: Legions of demons await you on this setting. \nMerciless: Hell will throw everything at you at this setting, you masochist."),
137190
tooltip=_("If you have Mix It Up or Progressive selected, you can define the lower bound here. Otherwise, this option is simply ignored."),
138191
gap = 1,
139192
},
140193

141194
{
142-
name="float_strength",
195+
name="mons_strength",
143196
label=_("Monster Strength"),
144-
valuator = "slider",
145-
min = 0.55,
146-
max = 12,
147-
increment = .05,
148-
default = 1,
149-
tooltip = _("Affects level of selected monsters for a level's monster palette."),
150-
presets = _("0.55:0.55 (Weak),0.75:0.75 (Easier),1:1 (Average),1.3:1.3 (Harder),1.7:1.7 (Tough),2.5:2.5 (Fierce),12:12 (CRAZY)"),
151-
randomize_group="monsters",
197+
choices=UI_MONS.STRENGTHS,
198+
default = "1.0",
199+
tooltip = _("Affects level of selected monsters for a level's monster palette."),
152200
},
153201
{
154-
name="float_ramp_up",
202+
name="mons_strength_ramp_up",
155203
label=_("Ramp Up"),
156-
valuator = "slider",
157-
min = 0.5,
158-
max = 3,
159-
increment = .05,
160-
default = 1,
161-
nan = _("Episodic"),
162-
presets = _("0.5:0.5 (Very Slow),0.75:0.75 (Slow),1:1 (Average),1.5:1.5 (Fast),2:2 (Very Fast),3:3 (Extra Fast)"),
204+
choices=UI_MONS.RAMPS,
205+
default = "1.0",
163206
tooltip = _("Rate at which monster strength increases as you progress through levels."),
164207
gap = 1,
165-
randomize_group="monsters",
166-
167208
},
168209

169210
{

scripts/defs.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ LENGTH_CHOICES =
115115
-- size of each seed square
116116
SEED_SIZE = 128
117117

118+
SEED_W = 90
119+
SEED_H = 90
120+
118121
-- highest possible Z coord (and lowest, when negative)
119122
EXTREME_H = 32000
120123

scripts/item.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ function Item_pickups_for_class(LEVEL, CL)
901901
end
902902
end
903903

904-
if PARAM.float_strength == 12 then
904+
if OB_CONFIG.mons_strength == "12" then
905905
bonus = bonus * 2
906906
end
907907

0 commit comments

Comments
 (0)