not much of a scripter/modder, but darktide source is pretty accessible and lua modding is simple, so I triall and errored a few times.
Following changes will make the veteran skull copy the normal skull's settings. Probably won't do another separate option due to laziness and no self interest.
all that needs to be done is 2 changes, turning "unit_threat" into "unit_threat_veteran". In my experience of copy pastaing fixes with other mods/games, the most surefire way is often to copypasta the entire block of text, so I did it here too. Probably could trim it down, especially at the "if" statement
in the main.lua file
add the following starting at the 47th line ns.dmf_mod:hook_require("scripts/ui/hud/elements/world_markers/templates/world_marker_template_unit_threat_veteran", function(instance) default_unit_threat_max_distance = instance.max_distance ns.marker_templates.unit_threat = instance ns.update_settings_cache() end)
get the empty lines to keep format. don't know if it matters.
add the following starting at the 62nd line
for _, markers in pairs(markers_by_type) do for i = 1, #markers do local m = markers[i] if m.template and m.template.name == "unit_threat_veteran" then local dist_sq = Vector3.distance_squared(center, Vector2( m.widget.offset[1], m.widget.offset[2])) if dist_sq < distance_fade_end_sq then m.widget.style.icon.color[1] = 0 m.widget.style.text.text_color[1] = 0 elseif dist_sq < distance_fade_start_sq then local inner_distance_sq = dist_sq - distance_fade_end_sq local alpha = (inner_distance_sq / distance_fade_delta_sq) * 255 m.widget.style.icon.color[1] = alpha m.widget.style.text.text_color[1] = alpha else m.widget.style.icon.color[1] = 255 m.widget.style.text.text_color[1] = 255 end end end end
kinda working backwards with this post, hopefully didn't mess anything up. alternatively copy and paste this pastebin over the entire file, if link is still valid. https://pastebin.com/bXfvtnj8
Remove tag icon from new Veteran keystone "Focus target!" (9 comments)
Following changes will make the veteran skull copy the normal skull's settings. Probably won't do another separate option due to laziness and no self interest.
all that needs to be done is 2 changes, turning "unit_threat" into "unit_threat_veteran". In my experience of copy pastaing fixes with other mods/games, the most surefire way is often to copypasta the entire block of text, so I did it here too. Probably could trim it down, especially at the "if" statement
in the main.lua file
add the following starting at the 47th line
ns.dmf_mod:hook_require("scripts/ui/hud/elements/world_markers/templates/world_marker_template_unit_threat_veteran", function(instance)
default_unit_threat_max_distance = instance.max_distance
ns.marker_templates.unit_threat = instance
ns.update_settings_cache()
end)
get the empty lines to keep format. don't know if it matters.
add the following starting at the 62nd line
for _, markers in pairs(markers_by_type) do
for i = 1, #markers do
local m = markers[i]
if m.template and m.template.name == "unit_threat_veteran" then
local dist_sq = Vector3.distance_squared(center, Vector2(
m.widget.offset[1], m.widget.offset[2]))
if dist_sq < distance_fade_end_sq then
m.widget.style.icon.color[1] = 0
m.widget.style.text.text_color[1] = 0
elseif dist_sq < distance_fade_start_sq then
local inner_distance_sq = dist_sq - distance_fade_end_sq
local alpha = (inner_distance_sq / distance_fade_delta_sq) * 255
m.widget.style.icon.color[1] = alpha
m.widget.style.text.text_color[1] = alpha
else
m.widget.style.icon.color[1] = 255
m.widget.style.text.text_color[1] = 255
end
end
end
end
kinda working backwards with this post, hopefully didn't mess anything up. alternatively copy and paste this pastebin over the entire file, if link is still valid. https://pastebin.com/bXfvtnj8
Can you please add it as option too?