How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Your forum for all discussions around Modding.
User avatar
cwattyeso
Posts: 1760
Joined: Tue Nov 27, 2018 3:58 pm
Location: United Kingdom
Contact:

How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by cwattyeso »

Trying to figure out where in files of the mods Def Pack and Guidance Steering that the position information for the HUD Icons is located, so I can try to move either or both icon positions to prevent their overlap and make the information on screen readable again.

Image

The screenshot above shows my HUD and the issue with the DEF Blue Icons and Info being overlapped by the Guidance Steering GPS Icons. I have been able to move the Enhanced Vehicle Info Boxes, as that mod very conveniently puts all the hud position stuff into the modsettings xml, so is easy to change. However neither the Def Mod or Guidance Steering do this, so I'm assuming their positions are buried somewhere in the mod's lua scripts and I'm not really a lua expert, so am having a hard time figuring this out.

Ideally I want to shift the Def Hud Icons up a fraction to get them away from the default fuel gauge and then want to shift the Guidance Steering Icons up probably an inch or so on my screen so they are well clear of all the other hud stuff.
Check out my YouTube Channel for Farming Simulator and other Gaming Let's Plays and Videos at https://www.youtube.com/c/CwattyesoGamingforFun :D

Also be sure to check out my Kick Channel for my Farming Simulator Live Streams and Multiplayer Server at https://www.kick.com/cwattyeso :gamer:

GIANTS SOFTWARE Personal Partner Code: CWATTYESO *thumbsup*
ZedVarg
Posts: 1
Joined: Tue May 05, 2020 2:52 am

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by ZedVarg »

Hi, i was with the same problem.
it's in the lua
TSX_EnhancedVehicle.lua
its the line 345 for left to right and 346 for up and down.
the bigger the number the higher and to the left i goes respectively}
a good value is 345 at 30.3 and 346 at 2.0.

REMEMBER TO IT Numpad / WHEN LOAD THE GAME AN WILE IN A VEHICLE, that will render again the hud with the new values.

the same can apply with the other parts of the hud
hope that helps
User avatar
cwattyeso
Posts: 1760
Joined: Tue Nov 27, 2018 3:58 pm
Location: United Kingdom
Contact:

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by cwattyeso »

I figured out how to move the Enhanced Vehicle HUD Elements and make them compatible with Guidance Steering. However the DEF Hud Element comes from a completely separate mod the Def Addon Mod. I can't see in that how to move the DEF Fill Level and Icon.
Check out my YouTube Channel for Farming Simulator and other Gaming Let's Plays and Videos at https://www.youtube.com/c/CwattyesoGamingforFun :D

Also be sure to check out my Kick Channel for my Farming Simulator Live Streams and Multiplayer Server at https://www.kick.com/cwattyeso :gamer:

GIANTS SOFTWARE Personal Partner Code: CWATTYESO *thumbsup*
User avatar
cwattyeso
Posts: 1760
Joined: Tue Nov 27, 2018 3:58 pm
Location: United Kingdom
Contact:

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by cwattyeso »

I've been looking at the script in the DEF Hud mod, I've found a section in there:

function DEFUsage:createDefIcon(posX, posY)
local width, height = getNormalizedScreenValues(unpack(SpeedMeterDisplay.SIZE.FUEL_LEVEL_ICON))
width = width * 0.88
height = height * 0.88

local defIcon = g_fillTypeManager.nameToFillType['DEF'].hudOverlayFilenameSmall
local iconOverlay = Overlay:new(defIcon, posX, posY, width, height)
iconOverlay:setColor(unpack(self.overlayFillColor))
return iconOverlay
end

function DEFUsage:setDefIconPosition(icon, posX, posY)
local width, height = getNormalizedScreenValues(unpack(SpeedMeterDisplay.SIZE.FUEL_LEVEL_ICON))
width = width * 0.88
height = height * 0.88
posX = posX - width
posY = posY - height
icon:setPosition(posX, posY)
end

However changing those values either up or down is having no effect in game on where the Hud Icons appear. So wonder if something else is dictating where those icons are placed on screen.
Check out my YouTube Channel for Farming Simulator and other Gaming Let's Plays and Videos at https://www.youtube.com/c/CwattyesoGamingforFun :D

Also be sure to check out my Kick Channel for my Farming Simulator Live Streams and Multiplayer Server at https://www.kick.com/cwattyeso :gamer:

GIANTS SOFTWARE Personal Partner Code: CWATTYESO *thumbsup*
buck2202
Posts: 5
Joined: Tue Sep 15, 2020 10:58 pm

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by buck2202 »

The DEF pack HUD is positioned relative to the default fuel gauge. In FS19_DefPack/scripts/DefUsage.lua change (currently line #55)

Code: Select all

local posY = fuelIcon.y + fuelIcon.height
The guidance steering is a little more dense. The easiest thing seems to be adjusting the constants in the GuidanceSteeringHUD.SIZE.BOX_MARGIN constant near the end of the file FS19_guidanceSteering/src/gui/hud/GuidanceSteeringHUD.lua (currently line #215)

Code: Select all

GuidanceSteeringHUD.SIZE = {
    BOX = { 54, 162 },
    BOX_MARGIN = { 11, 44 },
    ICON = { 54, 54 },
    SEPARATOR = { 54, 1 },
}

Just trial and error after that. I couldn't get the display to reflect LUA changes without fully exiting to the main screen and reloading the save game, but this is what mine looks like currently with

Code: Select all

local posY = fuelIcon.y + 3*fuelIcon.height
and

Code: Select all

BOX_MARGIN = { 11, -20 }
Image
User avatar
ninjayx02
Posts: 44
Joined: Wed Jul 26, 2017 11:03 pm

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by ninjayx02 »

Buck

Thank you for sharing this

Phill
chaseydog
Posts: 532
Joined: Sun Sep 28, 2014 6:32 pm

Re: How to move DEF Hud and Guidance Steering Icons on Hud so they don't overlap.

Post by chaseydog »

Cheers,
I had to change

Code: Select all

local posY = fuelIcon.y + 3*fuelIcon.height
to

Code: Select all

local posY = fuelIcon.y + 2*fuelIcon.height
but it worked well
Post Reply