Warhammer 40,000: Darktide
0 of 0

File information

Last updated

Original upload

Created by

redbeardt

Uploaded by

Redbeardt

Virus scan

Safe to use

Tags for this mod

Remove tag icon from new Veteran keystone "Focus target!" (9 comments)

  1. TheHorizonfall
    TheHorizonfall
    • member
    • 0 kudos
    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
    1. varkas
      varkas
      • supporter
      • 0 kudos
      Thank you for this. Very helpful.
  2. trasen56
    trasen56
    • member
    • 0 kudos
    +1
  3. mitchewawa
    mitchewawa
    • member
    • 0 kudos
    +1
  4. boxdynomite3
    boxdynomite3
    • member
    • 0 kudos
    Glad there are others who want the same. 
  5. TRexx16
    TRexx16
    • member
    • 0 kudos
    yes plz 
  6. PinoIsReading
    PinoIsReading
    • supporter
    • 30 kudos
    +1
  7. petrosky
    petrosky
    • member
    • 0 kudos
    Yes seconded, please add this option.
  8. Kenshiken
    Kenshiken
    • member
    • 1 kudos
    Subject

    Can you please add it as option too?