Skip to content

Commit

Permalink
- Added module controls for room theme synthesizer on new OTEX module…
Browse files Browse the repository at this point in the history
… and resource pack module.
  • Loading branch information
GTD-Carthage committed Aug 16, 2024
1 parent fe3ac1d commit 0c06670
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
30 changes: 28 additions & 2 deletions modules/zdoom_armaetus_epic_textures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ end


function OBS_RESOURCE_PACK_EPIC_TEXTURES.synthesize_procedural_themes()
if PARAM.bool_orp_room_theme_synthesizer == false then
return
end

local function pick_element(lev_theme, texture_type)
local t, RT = {}
local result
Expand Down Expand Up @@ -702,7 +706,7 @@ function OBS_RESOURCE_PACK_EPIC_TEXTURES.synthesize_procedural_themes()
end

t.env = "building"
t.prob = rand.pick({20,30,40,50,60})
t.prob = rand.pick({20,30,40,50,60}) * PARAM.orp_room_theme_synth_mult

t.floors[pick_element(theme, "floors")] = 5
t.floors[pick_element(theme, "floors")] = 5
Expand Down Expand Up @@ -1316,7 +1320,29 @@ OB_MODULES["armaetus_epic_textures"] =
valuator = "button",
default = 0,
tooltip = _("Renders hell theme maps to never use snow or desert environment themes regardless of theme assignment."),
priority= -3
priority= -3,
gap = 1
},

{
name = "bool_orp_room_theme_synthesizer",
label = _("Room Theme Synthesizer [Experimental]"),
valuator = "button",
default = 1,
priority = -4,
tooltip = _("Creates synthetic room themes by combining walls and flats from existing entries.")
},
{
name = "orp_room_theme_synth_mult",
label = _("Synth Room Theme Multiplier"),
valuator = "slider",
units="x",
min=0,
max=20,
increment = 0.1,
default = 1,
tooltip = _("Multiplier for all synthesized Resource Pack room themes."),
priority = -5,
}
}
}
36 changes: 33 additions & 3 deletions modules/zdoom_otex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function OTEX_PROC_MODULE.synthesize_procedural_themes()
end

-- try to create a consistent theme
for i = 1, 8 do
for i = 1, PARAM.otex_num_themes / 2 do
local grouping = {}
local room_theme = {}
while grouping and not grouping.has_all == true do
Expand All @@ -101,7 +101,7 @@ function OTEX_PROC_MODULE.synthesize_procedural_themes()
{
name = "any_OTEX_cons_" .. i,
env = "building",
prob = rand.pick({40,50,60}),
prob = rand.pick({40,50,60}) * PARAM.otex_rt_prob_mult
}
room_theme.walls = {}
room_theme.floors = {}
Expand Down Expand Up @@ -131,7 +131,7 @@ function OTEX_PROC_MODULE.synthesize_procedural_themes()
end

-- try a completely random theme
for i = 1, 8 do
for i = 1, PARAM.otex_num_themes / 2 do
local RT_name = "any_OTEX_rand_" .. i
local room_theme, tab_pick = {}

Expand Down Expand Up @@ -199,4 +199,34 @@ OB_MODULES["otex_proc_module"] =
"OTEX must be manually loaded in the sourceport. " ..
"Includes textures and flats only, no patches.\n\n" ..
"Currently does not make any kind of sensibly curated room themes."),

options =
{
{
name="otex_num_themes",
label=_("Room Themes Count"),
valuator = "slider",
min = 2,
max = 40,
increment = 2,
default = 8,
tooltip = _("How many OTEX room themes to synthesize."),
longtip = _("Not all room themes may show up in levels as appearance " ..
"is reliant on use probability. Use multipler below to increase " ..
"or decrease further"),
priority = 2
},
{
name="otex_rt_prob_mult",
label=_("Probability Multiplier"),
valuator="slider",
units="x",
min = 0,
max = 20,
increment = 0.1,
default = 1,
tooltip = _("Multiplier for all synthesized OTEX room themes."),
priority = 1
}
}
}

0 comments on commit 0c06670

Please sign in to comment.