Jump to content

HUD status Bars position problems


Leothbar

Recommended Posts

Hello again good people,

 

i'm writing this today to ask for help. I have installed a mod called Basic Primary Needs and it, in short, makes the player have need of food, drink and sleep. The mod suggests and recommends installing another mod, HUD status bars, which creates new bars, thus showing you your hunger, thirst and fatigue. I have installed that mod as well, and that's where i met a slight problem.

 

In order to have new status bars, i've used these lines that i found in the Readme of Basic Primary Needs.

 

 

set tnoHSB.hud_val to sv_Construct "BPN.HUDsleep"
set tnoHSB.hud_color to sv_Construct "HUDcolorRhubarb"
set tnoHSB.hud_max to sv_Construct "0"
set tnoHSB.hud_min to sv_Construct "100"
set tnoHSB.hud_x to HUDcompassCenter
set tnoHSB.hud_y to HUDcompassAbove
SetStage tnoHSB 10

set tnoHSB.hud_val to sv_Construct "BPN.HUDthirst"
set tnoHSB.hud_color to sv_Construct "HUDcolorCyan"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
SetStage tnoHSB 10

set tnoHSB.hud_val to sv_Construct "BPN.HUDhunger"
set tnoHSB.hud_color to sv_Construct "HUDcolorLime"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
SetStage tnoHSB 10

set tnoHSB.hud_val to sv_Construct "BPN.HUDcaffeine"
set tnoHSB.hud_color to sv_Construct "HUDcolorBrown*(tnoHSB.val>0)"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
SetStage tnoHSB 10

set tnoHSB.hud_val to sv_Construct "BPN.HUDalcohol"
set tnoHSB.hud_color to sv_Construct "HUDcolorYellow*(tnoHSB.val>0)"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
SetStage tnoHSB 10

 

The HUD status bars appeared, but there was a slight problem, they were in the middle of the screen. Now believe me when i say that i tried everything i could think of. I've tried to fiddle with the

 

 

 

set tnoHSB.hud_y to
set tnoHSB.hud_x to

 

,to no avail.
After trying many times, i have come to the conclusion that this is beyond my very basic and lacking knowledge, and now i have come seeking the help of you people who know more than i do! so my request is:

 

Help me re-position these HUD bars to the left of the screen please.

 

Thank you in advance.

 

Link to comment
Share on other sites

Here's my HUD Status Bars.ini (I have the BPN bars to the right of the screen ... there may be some other parts you don't want so pick and choose what you want from it):

 

 

 

; HUD status bars.ini
; =====================
;
; Version: 5.3.2
; Author: Ole Boe / TheNiceOne
; 
; ===================  Individual HUD status bars Settings for vanilla style
 
; To use a status bar, edit the lines for the bar the following way:
; * tnoHSB.hud_color: Bar color. Can be either a number, a script variable or a function. If the result is 0, the entire bar is hidden.
; * tnoHSB.hud_val: A script variable or function that calculates the value that is displayed in the bar
; * tnoHSB.hud_max: Set the max threshold for val that makes the bar full. Either a number, a script variable or a function.
; SetStage tnoHSB 10 Creates the bar. Must be the last line for each bar
 
; There are also more advanced settings to use, but the three above are the only three mandatory for each bar.
; The advanced settings are described in the user guide, and some of them used in the settings for Status bars below
; There are many examples at the bottom of this file. Just copy / paste to use them - but remove the at ; the start of the lines.
 
 
 
; ==== Weapon health displayed below weapon icon. Hidden if not wielding weapon. 
set tnoHSB.hud_type to  HUDbarSmall
set tnoHSB.hud_color to sv_Construct "1+4*(tnoHSB.frac<0.5)" ; green, red when below 50%
set tnoHSB.hud_ref to sv_Construct "Player.GetEquippedObject 16"  ; 16 = weapon
set tnoHSB.hud_val to sv_Construct "Player.GetEquippedCurrentHealth 16" 
set tnoHSB.hud_tmp to sv_Construct "(Player.GetAV Armorer) >= 75" ; 1 if being an expert armorer
set tnoHSB.hud_max to sv_Construct "(1+0.25*tnoHSB.tmp)*(GetObjectHealth hud_ref)"
set tnoHSB.hud_x to HUDweaponCenter ; Place beneath weapon icon, with same width
set tnoHSB.hud_y to HUDweaponBelow
set tnoHSB.hud_size to HUDweaponWidth
SetStage tnoHSB 10
 
 
; ==== Display current charge of equipped weapon above weapon icon. Hide bar if you don't have an enchanted weapon equipped.
set tnoHSB.hud_type to  HUDbarSmall
set tnoHSB.hud_visible to sv_Construct "tnoHSB.max" ; Only visible if max is non-zero, e.g. if the weapon has an enchantment
set tnoHSB.hud_color to sv_Construct "HUDcolorPurple" ; Purple color
set tnoHSB.hud_ref to sv_Construct  "Player.GetEquippedObject 16" ; Set hud_ref to equipped weapon
set tnoHSB.hud_val to sv_Construct "Player.GetEquippedCurrentCharge 16" ; Set val to current charge of player's equipped weapon
set tnoHSB.hud_max to sv_Construct   "GetObjectCharge hud_ref" ; Get object charge (max charge) of the current equipped weapon
set tnoHSB.hud_x to HUDweaponCenter ; Centered relative to weapon icon
set tnoHSB.hud_y to HUDweaponAbove ; Right above weapon icon
set tnoHSB.hud_size to HUDweaponWidth ; Same width as weapon icon
SetStage tnoHSB 10
 
 
; ==== Display current Spell effectiveness (due to wearing armor, or mods), below the magic spell icon
set tnoHSB.hud_type to  HUDbarSmall
set tnoHSB.hud_color to sv_Construct "HUDcolorBlue" 
set tnoHSB.hud_val to sv_Construct   "GetSpellEffectiveness"
set tnoHSB.hud_max to sv_Construct "1"
set tnoHSB.hud_x to HUDmagicCenter ; Centered relative to magic icon
set tnoHSB.hud_y to HUDmagicBelow ; Right above magic icon
set tnoHSB.hud_size to HUDmagicWidth ; Same width as magic icon
SetStage tnoHSB 10
 
 
; ==== Display current Encumbrance. Bar is full when you carry nothing. Color is yellow, but changes gradually to red as your encumbrance increases.
 
set tnoHSB.hud_color to sv_Construct "HUDcolorOrange" 
set tnoHSB.hud_val to sv_Construct   "GetAV Encumbrance" ; Player is default reference when hud_ref is not defined.
set tnoHSB.hud_min to sv_Construct "(GetBaseAV Encumbrance) - 4" ; Bar is at min (empty) when current encumbrance = maximum encumbrance
set tnoHSB.hud_max to sv_Construct "0" ; Bar is at max (full) when current encumrance = 0
set tnoHSB.hud_x to HUDbars ; Same x pos as standard bars
set tnoHSB.hud_y to HUDbarsAbove ; Right above standard bars
; Size not given = HUDdefault = standard bar size
;set tnoHSB.hud_name to sv_Construct "Enc: " ; Static text. Remove this and the two next lines if you don't want the text
;set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color" ; Color matches bar color 
;set tnoHSB.hud_textDisplay to HUDtxtValueOfMax ; Display as value of max
SetStage tnoHSB 10
 
; Change those three global settings to match icons with text on the left side (for the bars below)
set tnoHSB.textPos_x to HUDtxtLeft 
set tnoHSB.textPos_y to HUDtxtCenter
set tnoHSB.textAdjust_y to 2
 
 
; ==== Display health of your summoned creature, as summon icon + health. Bar is invisible when no creature is currently summoned
; If using a mod that allows you multiple summons, you may want to copy the entire bar settings, but replace the "1" in "hud_summon 1" with "2", "3", etc.
 
set tnoHSB.hud_ref to sv_Construct "hud_summon 1" ; ref is current summon. Makes bar invisible if no current summon
set tnoHSB.hud_val to sv_Construct   "GetAV Health" ; Health of summon
set tnoHSB.hud_max to sv_Construct "GetBaseAV Health" ; Base health of summon
; Use pos (above previous bar)
set tnoHSB.hud_updateInterval to  0.6 ; Only update the bar every 0.6 secod
set tnoHSB.hud_type to  HUDbarRefIcon ; Display the correct icon for the summon
set tnoHSB.hud_textDisplay to HUDtxtValue ; Display health as plain number
; set tnoHSB.hud_name to sv_Construct "hud_ref: " ; Remove semicolon at start of line to display name of summon too
set tnoHSB.hud_x to 99 ; To the right
set tnoHSB.hud_y to HUDbarsLow ; Same y pos as fatigue bar
SetStage tnoHSB 10
 
 
; ==== Display disease status. Display name and icon of the last received disease, and number of diseases. Hidden if having no diseases
 
set tnoHSB.hud_ref to sv_Construct "GetDisease" ; ref is current disease
set tnoHSB.hud_val to sv_Construct   "GetDisease" ; val is number of diseases
set tnoHSB.hud_type to  HUDbarRefIcon ; Use the disease's icon
set tnoHSB.hud_name to sv_Construct "hud_ref: " ; Display name of ref (the current disease)
set tnoHSB.hud_textColor to sv_Construct "HUDcolorCyan" ; Text color is cyan 
set tnoHSB.hud_textDisplay to HUDtxtValue ; Display number of diseases
set tnoHSB.hud_updateInterval to  5 ; Only update the bar every fifth second since diseases don't change frequently
SetStage tnoHSB 10
 
 
 
; ==== An alternative customized enemy health bar
; It displays a bar similar to the vanilla, but also displays if the enemy health is buffed above its base.
; It changes color from green (above base), yellow (above 67%), orange (above 33%) to red (below 33%)
 
set tnoHSB.hud_color to sv_Construct "1+6*(tnoHSB.val<tnoHSB.tmp)+3*(tnoHSB.frac<0.67)-5*(tnoHSB.frac<0.33)" 
set tnoHSB.hud_ref to sv_Construct "hud_enemy" ; ref is last attacked enemy
set tnoHSB.hud_tmp to sv_Construct   "GetBaseAV Health" ; Base health of last attacked enemy
set tnoHSB.hud_val to sv_Construct   "GetAV Health" ; Health of last attacked enemy
set tnoHSB.hud_max to sv_Construct "tnoHSB.enemyMaxHealth" ; A special variable, max detected health of enemy
set tnoHSB.hud_custom to sv_Construct  "HealthArc\HA" 
set tnoHSB.hud_type to  41 
set tnoHSB.hud_custom_w to  128
set tnoHSB.hud_custom_h to  32
set tnoHSB.hud_size to 75 ; Size 75% of the native icon size
set tnoHSB.hud_x to 50 ; X pos 50 = centered
set tnoHSB.hud_y to 48 ; Y pos 48 = just above reticle
SetStage tnoHSB 10 
 
 
; === The health bar, displaying when you have a wounded actor in your crosshair, but not a current enemy 
set tnoHSB.hud_ref to sv_Construct "GetCrossHairRef" 
set tnoHSB.hud_visible to sv_Construct "(tnoHSB.frac < 1) && (tnoHSB.frac > 0) && (tnoHSB.enemyMaxHealth == 0)" ; Only display if the actor is alive and wounded and no current enemy
set tnoHSB.hud_color_max to HUDcolorGreen ; Color is green when health is full,
set tnoHSB.hud_color_min to HUDcolorYellow   ; ...and gradually changes towards yellow as health drops
set tnoHSB.hud_val to sv_Construct "GetAV Health" ; Health of crosshair ref
set tnoHSB.hud_max to sv_Construct "GetBaseAV Health" ; base health of crosshair ref
set tnoHSB.hud_custom to sv_Construct  "HealthArc\HA" 
set tnoHSB.hud_type to  41 
set tnoHSB.hud_custom_w to  128
set tnoHSB.hud_custom_h to  32
set tnoHSB.hud_size to 75 ; Size 75% of the native icon size
set tnoHSB.hud_y to HUDprevBar   ; X&Y pos same as enemy health bar
SetStage tnoHSB 10 
 
 
; ==== An alternative sneak icon for non-immersionists :)
; Transparency goes from transparent in low light to opaque in much light, and is yellow (7) when not detected and red (5) when detected
set tnoHSB.hud_visible to sv_Construct "Player.IsSneaking" ; Only visible when sneaking
set tnoHSB.hud_color to sv_Construct "7-2*tnoHSB.tmp" ; Yellow, but red if discovered
set tnoHSB.hud_val to sv_Construct "GetActorLightAmount"
set tnoHSB.hud_tmp to sv_Construct "(mqGetMenuGlobalFloatValue %qhudreticle_sneak\user8%q 1006) > 50" ; Value read from the "real" sneak icon
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_type to  1 ; Icon doesn't change
set tnoHSB.hud_custom to sv_Construct "Misc\sneak_eye"
set tnoHSB.hud_custom_w to  64 ; Icon base size
set tnoHSB.hud_custom_h to  50
set tnoHSB.hud_size to HUDmagicWidth ; Width equal to the spell icon
set tnoHSB.hud_alpha to HUDdefault ; Max alpha is same as your other bars
set tnoHSB.hud_alpha_min to 50 ; Min alpha is 50 of 255
set tnoHSB.hud_alpha_inv to 0 ; Lowest alpha when no light
set tnoHSB.hud_alpha_vis to 100 ; Reach max when in 100% light
set tnoHSB.hud_x to 50 ; X pos 50 = centered
set tnoHSB.hud_y to 50 ; Y pos 50 = centered
SetStage tnoHSB 10
 
 
; ==== 12hr clock, displayed as h.mm am/pm
set tnoHSB.hud_tmp to sv_Construct "Floor GameHour"  ; Temporary variable holding the number of whole hours since midnight
set tnoHSB.hud_val to sv_Construct "3*(GameHour - tnoHSB.tmp)/5 + tnoHSB.tmp - 12*(tnoHSB.tmp>=13) + 12*(tnoHSB.tmp<1)" ; essentially makes hud_val a 12 hr clock
set tnoHSB.hud_max to sv_Construct "24"
set tnoHSB.hud_name to sv_Construct " " ; No text before time
set tnoHSB.hud_name_2 to sv_Construct " #ampm[(tnoHSB.tmp>=12)*2:2]"      ; One space, + am if GameHour < 12, or pm if GameHour >= 12
set tnoHSB.hud_textColor to sv_Construct "3+4*(tnoHSB.tmp>=7 && tnoHSB.tmp<20)" ; Yellow (7) from 7am - 8pm, blue (3) otherwise 
set tnoHSB.hud_textDisplay to HUDtxtValue2 ; we want two decimal places
set tnoHSB.hud_type to   HUDtxtNoBar ; Hide bar, only display text
set tnoHSB.hud_textPos_x to HUDtxtCenter
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_y to 98
set tnoHSB.hud_x to 50
SetStage tnoHSB 10
 
 
; ==== BASIC PRIMARY NEEDS
 
; ==== Basic Primary Needs - Hunger
set tnoHSB.hud_val to sv_Construct   "BPN.HUDhunger"
set tnoHSB.hud_color to sv_Construct "HUDcolorRhubarb"
set tnoHSB.hud_max to sv_Construct "0"
set tnoHSB.hud_min to sv_Construct "100"
set tnoHSB.hud_x to                             99
set tnoHSB.hud_y to                             82
set tnoHSB.hud_size to 68
set tnoHSB.hud_name to sv_Construct "Hunger: "
set tnoHSB.hud_textDisplay to HUDtxtPercent
set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color"
set tnoHSB.hud_textPos_x to  HUDtxtLeft
set tnoHSB.hud_textPos_y to  HUDtxtCenter
set tnoHSB.hud_textSize to  12
set tnoHSB.hud_textShadowColor to sv_Construct  "HUDcolorBlack"
set tnoHSB.hud_textType to   HUDfontKingthings
setStage tnoHSB 10
 
; ==== Basic Primary Needs - Thirst
set tnoHSB.hud_val to sv_Construct "BPN.HUDthirst"
set tnoHSB.hud_color to sv_Construct "HUDcolorCyan"
set tnoHSB.hud_max to sv_Construct "0"
set tnoHSB.hud_min to sv_Construct "100"
set tnoHSB.hud_x to HUDdefault
set tnoHSB.hud_y to HUDprevBarBelow
set tnoHSB.hud_size to 68
set tnoHSB.hud_name to sv_Construct "Thirst: "
set tnoHSB.hud_textDisplay to HUDtxtPercent
set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color"
set tnoHSB.hud_textPos_x to HUDtxtLeft
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_textSize to 12
set tnoHSB.hud_textShadowColor to sv_Construct "HUDcolorBlack"
set tnoHSB.hud_textType to HUDfontKingthings
setStage tnoHSB 10
 
; ==== Basic Primary Needs - Sleep
set tnoHSB.hud_val to sv_Construct "BPN.HUDsleep"
set tnoHSB.hud_color to sv_Construct "HUDcolorLime"
set tnoHSB.hud_max to sv_Construct "0"
set tnoHSB.hud_min to sv_Construct "100"
set tnoHSB.hud_x to HUDdefault
set tnoHSB.hud_y to HUDprevBarBelow
set tnoHSB.hud_size to 68
set tnoHSB.hud_name to sv_Construct "Sleep: "
set tnoHSB.hud_textDisplay to HUDtxtPercent
set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color"
set tnoHSB.hud_textPos_x to HUDtxtLeft
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_textSize to 12
set tnoHSB.hud_textShadowColor to sv_Construct "HUDcolorBlack"
set tnoHSB.hud_textType to HUDfontKingthings
setStage tnoHSB 10
 
; ==== Basic Primary Needs - Caffeine
set tnoHSB.hud_val to sv_Construct "BPN.HUDcaffeine"
set tnoHSB.hud_color to sv_Construct "HUDcolorBrown"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
set tnoHSB.hud_x to HUDdefault
set tnoHSB.hud_y to HUDprevBarBelow
set tnoHSB.hud_size to 68
set tnoHSB.hud_name to sv_Construct "Caffeine: "
set tnoHSB.hud_textDisplay to HUDtxtPercent
set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color"
set tnoHSB.hud_textPos_x to HUDtxtLeft
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_textSize to 12
set tnoHSB.hud_textShadowColor to sv_Construct "HUDcolorBlack"
set tnoHSB.hud_textType to HUDfontKingthings
setStage tnoHSB 10
 
; ==== Basic Primary Needs - Alcohol
set tnoHSB.hud_val to sv_Construct "BPN.HUDalcohol"
set tnoHSB.hud_color to sv_Construct "HUDcolorYellow"
set tnoHSB.hud_max to sv_Construct "100"
set tnoHSB.hud_min to sv_Construct "0"
set tnoHSB.hud_x to HUDdefault
set tnoHSB.hud_y to HUDprevBarBelow
set tnoHSB.hud_size to 68
set tnoHSB.hud_name to sv_Construct "Alcohol: "
set tnoHSB.hud_textDisplay to HUDtxtPercent
set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color"
set tnoHSB.hud_textPos_x to HUDtxtLeft
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_textSize to 12
set tnoHSB.hud_textShadowColor to sv_Construct "HUDcolorBlack"
set tnoHSB.hud_textType to HUDfontKingthings
setStage tnoHSB 10
 
; ==== Basic Primary Needs - Mouse Over
set tnoHSB.hud_ref to sv_Construct "GetFormFromMod %qBasic Primary Needs.esp%q %q070B5A%q"
set tnoHSB.hud_name to sv_Construct "hud_ref"
set tnoHSB.hud_textDisplay to HUDtxtNoValue
set tnoHSB.hud_type to HUDtxtNoBar
set tnoHSB.hud_textPos_x to HUDtxtCenter
set tnoHSB.hud_textPos_y to HUDtxtCenter
set tnoHSB.hud_y to 85
set tnoHSB.hud_x to 50
set tnoHSB.hud_textType to HUDfontKingthings
set tnoHSB.hud_textSize to 16
set tnoHSB.hud_textShadowColor to sv_Construct "HUDcolorBlack"
SetStage tnoHSB 10

Link to comment
Share on other sites

The key is in the first BPN bar you specify the X and Y position and then all others are relative to that first bar. You'll need to experiment with X and Y values to get them to the left in a position that doesn't interfere with bars that are already to the left.

Link to comment
Share on other sites

Thanks a lot Striker!

 

I only took the parts i needed for Basic Primary Needs and they came on the right and it's way better than in the middle! i'm already very satisfied with this so i changed my mind about having them on the left :D

 

thank you again!

 

P,s: This post is Solved =)

Link to comment
Share on other sites

If you use HUD Status Bars Enhanced, you can make a separate INI file for Basic Primary Needs in the appropriate folder and add all bars to that one. Just a suggestion for any future needs for HUD bars. The HSBE documentation should have more info, but basically all it needs is a file named <plugin name>.esp.ini in the HSBE ini folder, and it loads it automatically.

 

I think I mentioned it in the BPN comments some time ago, and I hope Maskar will implement the use of HSBE in the next version, as it is a compatible and easy way (for both author and user) to achieve HUD elements. Forli has done wonders with enhancing the original HSB. :thumbsup:

 

Edit: Assuming you do/did not already use HSBE, that is.

Edited by Contrathetix
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...