Forums » Community Projects

closure on customhud

Mar 31, 2011 Jorthas link
I've modified customhud to show closure rate, red is toward you and green is away.

Pic:
http://farm6.static.flickr.com/5060/5577780711_f52dae8750_z.jpg

http://rapidshare.com/files/455337784/customHUD.zip
Mar 31, 2011 Scuba Steve 9.0 link
Dang man, use standard doppler colors! It helps sidestep that whole red/green colorblind unfriendlyness thing that plagues VO. You even have a doppler indicator in the center of your HUD already!
Mar 31, 2011 Jorthas link
Eh you mean the red, white blue little bar under the range? It's really hard to see.

Anyone wants to edit the colors you can edit the main.lua line 47:

if (curDiff>0) then
curDiffSign = '+'
customhud.ui.targetdistance.FGCOLOR = '0 255 0'
else
curDiffSign = ''
customhud.ui.targetdistance.FGCOLOR = '255 0 0'
end

I like red meaning incoming and green meaning getting farther away. I don't even have to look at it and can see it out of the corner of my eye.

Also, if you want the colors to gradient smootly going through white:

function customhud.update()
local name,health,dist,factionid,guild,ship=GetTargetInfo()
if dist then
local curDist = dist
local curDiff = curDist-customhud.vars.lastDist
local curDiffSign = ''
local curDiffColor = 255-math.abs(math.floor(curDiff*50))
if (curDiff>0) then
curDiffSign = '+'
customhud.ui.targetdistance.FGCOLOR = curDiffColor .. ' 255 ' .. curDiffColor
else
curDiffSign = ''
customhud.ui.targetdistance.FGCOLOR = '255 ' .. curDiffColor .. ' ' .. curDiffColor
end

if (dist ~= customhud.vars.lastDist) then
customhud.ui.targetdistance.title=math.floor(curDist)..'m : ' .. curDiffSign .. round((curDiff*8),2)
customhud.vars.lastDist = dist
else
customhud.ui.targetdistance.FGCOLOR = '0 255 0'
customhud.ui.targetdistance.title=math.floor(curDist)..'m : ' .. curDiffSign .. '0'
end
else
customhud.ui.targetdistance.title=nil
customhud.vars.lastDist = 0
end
end
Mar 31, 2011 Jorthas link
Also if you use basic Infiniturbo speed/stacking you can hack it to enter a stacking speed based on your speed +/- the closure to match your target's speed.

Your speed 60 m/s your closure is +10 m/s so set stacking to 70 (by default stacking is 80 for bombing)

/alias SetStacking "Prompt Infiniturbo Stacking "
/blind "SOMEKEY" SetStacking

Press SOMEKEY, type 70 <enter>
engage turbo!

edit:

main.lua for infiniturbo:

elseif args[1] == "stacking" then
-- set missile stacking mode
infiniturbo.mode = "stacking"
if args[2] then
local setStack = args[2]
infiniturbo.stackingSpeed = tonumber(setStack)
HUD:PrintSecondaryMsg("\127cd5c00Stacking speed:" .. infiniturbo.stackingSpeed .. " m/s\127o")
else
HUD:PrintSecondaryMsg("\127cd5c00Stacking turbo mode.\127o")
end