ScriptName kuerteeCHUDCQuestScriptfloat fQuestDelayTimestring_var HUDSurfacePathstring_var label1string_var container1string_var bar1string_var quest1string_var variableName1string_var evaluateString1string_var maxValue1short showValueInLabel1short showCode1float scale1float x1float y1float xContainer1float yContainer1float xBar1float yBar1long pLabel1long pContainer1FilePathlong pBar1FilePathlong hud1long hud1Stringlong hud1Containerlong hud1Barstring_var label2string_var container2string_var bar2string_var quest2string_var variableName2string_var evaluateString2string_var maxValue2short showValueInLabel2short showCode2float scale2float x2float y2float xContainer2float yContainer2float xBar2float yBar2long pLabel2long pContainer2FilePathlong pBar2FilePathlong hud2long hud2Stringlong hud2Containerlong hud2Barstring_var label3string_var container3string_var bar3string_var quest3string_var variableName3string_var evaluateString3string_var maxValue3short showValueInLabel3short showCode3float scale3float x3float y3float xContainer3float yContainer3float xBar3float yBar3long pLabel3long pContainer3FilePathlong pBar3FilePathlong hud3long hud3Stringlong hud3Containerlong hud3Barstring_var label4string_var container4string_var bar4string_var quest4string_var variableName4string_var evaluateString4string_var maxValue4short showValueInLabel4short showCode4float scale4float x4float y4float xContainer4float yContainer4float xBar4float yBar4long pLabel4long pContainer4FilePathlong pBar4FilePathlong hud4long hud4Stringlong hud4Containerlong hud4Barstring_var label5string_var container5string_var bar5string_var quest5string_var variableName5string_var evaluateString5string_var maxValue5short showValueInLabel5short showCode5float scale5float x5float y5float xContainer5float yContainer5float xBar5float yBar5long pLabel5long pContainer5FilePathlong pBar5FilePathlong hud5long hud5Stringlong hud5Containerlong hud5Barstring_var label6string_var container6string_var bar6string_var quest6string_var variableName6string_var evaluateString6string_var maxValue6short showValueInLabel6short showCode6float scale6float x6float y6float xContainer6float yContainer6float xBar6float yBar6long pLabel6long pContainer6FilePathlong pBar6FilePathlong hud6long hud6Stringlong hud6Containerlong hud6Barstring_var label7string_var container7string_var bar7string_var quest7string_var variableName7string_var evaluateString7string_var maxValue7short showValueInLabel7short showCode7float scale7float x7float y7float xContainer7float yContainer7float xBar7float yBar7long pLabel7long pContainer7FilePathlong pBar7FilePathlong hud7long hud7Stringlong hud7Containerlong hud7Barstring_var hudFontlong pHUDFontshort fontHeightshort fontWidthshort fontWeightshort hudTItalicshort hudTRshort hudTGshort hudTBshort hudTFormatfloat valuefloat value2short roundValuestring_var stringValuestring_var stringValue2float percentageValuestring_var scriptLinelong pStringValuelong pStringValue2int functionMode;0 = reset;1 = create;2 = updateref obseToPluggyRefstring_var dummyStringshort removeWhenZero1short removeWhenFull1short removeWhenZero2short removeWhenFull2short removeWhenZero3short removeWhenFull3short removeWhenZero4short removeWhenFull4short removeWhenZero5short removeWhenFull5short removeWhenZero6short removeWhenFull6short removeWhenZero7short removeWhenFull7short opacity1short opacity2short opacity3short opacity4short opacity5short opacity6short opacity7short debugbegin GameMode set fQuestDelayTime to 2 if IsPlayerMovingIntoNewSpace Return endif if GetGameLoaded set functionMode to 0 set obseToPluggyRef to kuerteeCHUDCMiscItem endif if functionMode == 0 set functionMode to 1 DelAllHudTs DelAllHudSs set hud1 to 0 set hud1Container to 0 set hud1Bar to 0 set hud2 to 0 set hud2Container to 0 set hud2Bar to 0 set hud3 to 0 set hud3Container to 0 set hud3Bar to 0 set label1 to sv_Destruct set container1 to sv_Destruct set bar1 to sv_Destruct set quest1 to sv_Destruct set variableName1 to sv_Destruct set evaluateString1 to sv_Destruct set maxValue1 to sv_Destruct set label2 to sv_Destruct set container2 to sv_Destruct set bar2 to sv_Destruct set quest2 to sv_Destruct set variableName2 to sv_Destruct set evaluateString2 to sv_Destruct set maxValue2 to sv_Destruct set label3 to sv_Destruct set container3 to sv_Destruct set bar3 to sv_Destruct set quest3 to sv_Destruct set variableName3 to sv_Destruct set evaluateString3 to sv_Destruct set maxValue3 to sv_Destruct set hud4 to 0 set hud4Container to 0 set hud4Bar to 0 set hud5 to 0 set hud5Container to 0 set hud5Bar to 0 set hud6 to 0 set hud6Container to 0 set hud6Bar to 0 set hud7 to 0 set hud7Container to 0 set hud7Bar to 0 set label4 to sv_Destruct set container4 to sv_Destruct set bar4 to sv_Destruct set quest4 to sv_Destruct set variableName4 to sv_Destruct set evaluateString4 to sv_Destruct set maxValue4 to sv_Destruct set label5 to sv_Destruct set container5 to sv_Destruct set bar5 to sv_Destruct set quest5 to sv_Destruct set variableName5 to sv_Destruct set evaluateString5 to sv_Destruct set maxValue5 to sv_Destruct set label6 to sv_Destruct set container6 to sv_Destruct set bar6 to sv_Destruct set quest6 to sv_Destruct set variableName6 to sv_Destruct set evaluateString6 to sv_Destruct set maxValue6 to sv_Destruct set label7 to sv_Destruct set container7 to sv_Destruct set bar7 to sv_Destruct set quest7 to sv_Destruct set variableName7 to sv_Destruct set evaluateString7 to sv_Destruct set maxValue7 to sv_Destruct set hudFont to sv_Destruct set stringValue to sv_Destruct set stringValue2 to sv_Destruct set scriptLine to sv_Destruct set dummyString to sv_Destruct elseif functionMode == 1 set functionMode to 2 ;initialise================================================== if pStringValue =http://forums.bethsoft.com/index.php?/topic/1130416-review-this-script-pretty-please/= 0 set pStringValue to CreateString -1" " 0 1 endif if pStringValue2 == 0 set pStringValue2 to CreateString -1 " " 0 1 endif if pHUDFont == 0 set pHUDFont to CreateString -1 " " 0 1 endif StringLen pStringValue 0 StringLen pStringValue2 0 StringLen pHUDFont 0 if pLabel1 == 0 set pLabel1 to CreateString -1 " " 0 1 endif if pContainer1FilePath == 0 set pContainer1FilePath to CreateString -1 " " 0 1 endif if pBar1FilePath == 0 set pBar1FilePath to CreateString -1 " " 0 1 endif if pLabel2 == 0 set pLabel2 to CreateString -1 " " 0 1 endif if pContainer2FilePath == 0 set pContainer2FilePath to CreateString -1 " " 0 1 endif if pBar2FilePath == 0 set pBar2FilePath to CreateString -1 " " 0 1 endif if pLabel3 == 0 set pLabel3 to CreateString -1 " " 0 1 endif if pContainer3FilePath == 0 set pContainer3FilePath to CreateString -1 " " 0 1 endif if pBar3FilePath == 0 set pBar3FilePath to CreateString -1 " " 0 1 endif if pLabel4 == 0 set pLabel4 to CreateString -1 " " 0 1 endif if pContainer4FilePath == 0 set pContainer4FilePath to CreateString -1 " " 0 1 endif if pBar4FilePath == 0 set pBar4FilePath to CreateString -1 " " 0 1 endif if pLabel5 == 0 set pLabel5 to CreateString -1 " " 0 1 endif if pContainer5FilePath == 0 set pContainer5FilePath to CreateString -1 " " 0 1 endif if pBar5FilePath == 0 set pBar5FilePath to CreateString -1 " " 0 1 endif if pLabel6 == 0 set pLabel6 to CreateString -1 " " 0 1 endif if pContainer6FilePath == 0 set pContainer6FilePath to CreateString -1 " " 0 1 endif if pBar6FilePath == 0 set pBar6FilePath to CreateString -1 " " 0 1 endif if pLabel7 == 0 set pLabel7 to CreateString -1 " " 0 1 endif if pContainer7FilePath == 0 set pContainer7FilePath to CreateString -1 " " 0 1 endif if pBar7FilePath == 0 set pBar7FilePath to CreateString -1 " " 0 1 endif StringLen pLabel1 0 StringLen pContainer1FilePath 0 StringLen pBar1FilePath 0 StringLen pLabel2 0 StringLen pContainer2FilePath 0 StringLen pBar2FilePath 0 StringLen pLabel3 0 StringLen pContainer3FilePath 0 StringLen pBar3FilePath 0 StringLen pLabel4 0 StringLen pContainer4FilePath 0 StringLen pBar4FilePath 0 StringLen pLabel5 0 StringLen pContainer5FilePath 0 StringLen pBar5FilePath 0 StringLen pLabel6 0 StringLen pContainer6FilePath 0 StringLen pBar6FilePath 0 StringLen pLabel7 0 StringLen pContainer7FilePath 0 StringLen pBar7FilePath 0 set fontHeight to 14 set fontWidth to 0 set fontWeight to 0 set hudTItalic to 0 set hudTR to 255 set hudTG to 255 set hudTB to 255 set hudTFormat to 1 set showValueInLabel1 to 0 set showCode1 to 1 set removeWhenZero1 to 0 set removeWhenFull1 to 0 set scale1 to 0.44 set x1 to 15 set y1 to 600 set xContainer1 to 15 set yContainer1 to 615 set xBar1 to xContainer1 + 13 * scale1 set yBar1 to yContainer1 + 1 * scale1 set xBar1 to Ceil xBar1 set yBar1 to Ceil yBar1 set showValueInLabel2 to 0 set showCode2 to 1 set removeWhenZero2 to 0 set removeWhenFull2 to 0 set scale2 to 0.44 set x2 to 15 set y2 to 630 set xContainer2 to 15 set yContainer2 to 645 set xBar2 to xContainer2 + 13 * scale2 set yBar2 to yContainer2 + 1 * scale2 set xBar2 to Ceil xBar2 set yBar2 to Ceil yBar2 set showValueInLabel3 to 0 set showCode3 to 1 set removeWhenZero3 to 0 set removeWhenFull3 to 0 set scale3 to 0.44 set x3 to 15 set y3 to 660 set xContainer3 to 15 set yContainer3 to 675 set xBar3 to xContainer3 + 13 * scale3 set yBar3 to yContainer3 + 1 * scale3 set xBar3 to Ceil xBar3 set yBar3 to Ceil yBar3 set showValueInLabel4 to 0 set showCode4 to 1 set removeWhenZero4 to 0 set removeWhenFull4 to 0 set scale4 to 0.44 set x4 to 15 set y4 to 690 set xContainer4 to 15 set yContainer4 to 705 set xBar4 to xContainer4 + 13 * scale4 set yBar4 to yContainer4 + 1 * scale4 set xBar4 to Ceil xBar4 set yBar4 to Ceil yBar4 set showValueInLabel5 to 0 set showCode5 to 1 set removeWhenZero5 to 0 set removeWhenFull5 to 0 set scale5 to 0.44 set x5 to 15 set y5 to 720 set xContainer5 to 15 set yContainer5 to 735 set xBar5 to xContainer5 + 13 * scale5 set yBar5 to yContainer5 + 1 * scale5 set xBar5 to Ceil xBar5 set yBar5 to Ceil yBar5 set showValueInLabel6 to 0 set showCode6 to 1 set removeWhenZero6 to 0 set removeWhenFull6 to 0 set scale6 to 0.44 set x6 to 15 set y6 to 750 set xContainer6 to 15 set yContainer6 to 765 set xBar6 to xContainer6 + 13 * scale6 set yBar6 to yContainer6 + 1 * scale6 set xBar6 to Ceil xBar6 set yBar6 to Ceil yBar6 set showValueInLabel7 to 0 set showCode7 to 1 set removeWhenZero7 to 0 set removeWhenFull7 to 0 set scale7 to 0.44 set x7 to 15 set y7 to 780 set xContainer7 to 15 set yContainer7 to 795 set xBar7 to xContainer7 + 13 * scale7 set yBar7 to yContainer7 + 1 * scale7 set xBar7 to Ceil xBar7 set yBar7 to Ceil yBar7 set dummyString to sv_Construct "%e" RunBatchScript "Data\ini\kuerteeCustomisableHUDComponents.ini" if hudFont == 0 set hudFont to sv_Construct "DarN Kingthings Petrock 14" endif if stringValue =http://forums.bethsoft.com/index.php?/topic/1130416-review-this-script-pretty-please/= 0 set stringValue to sv_Construct"Textures\kuerteeCustomisableHUDComponents\" endif if container1 == 0 set container1 to sv_Construct "%zbar_container.png" stringValue endif if bar1 == 0 set bar1 to sv_Construct "%zbar_orange.jpg" stringValue endif if container2 == 0 set container2 to sv_Construct "%zbar_container.png" stringValue endif if bar2 == 0 set bar2 to sv_Construct "%zbar_purple.jpg" stringValue endif if container3 == 0 set container3 to sv_Construct "%zbar_container.png" stringValue endif if bar3 == 0 set bar3 to sv_Construct "%zbar_yellow.jpg" stringValue endif if container4 == 0 set container4 to sv_Construct "%zbar_container.png" stringValue endif if bar4 == 0 set bar4 to sv_Construct "%zbar_orange.jpg" stringValue endif if container5 == 0 set container5 to sv_Construct "%zbar_container.png" stringValue endif if bar5 == 0 set bar5 to sv_Construct "%zbar_purple.jpg" stringValue endif if container6 == 0 set container6 to sv_Construct "%zbar_container.png" stringValue endif if bar6 == 0 set bar6 to sv_Construct "%zbar_yellow.jpg" stringValue endif if container7 == 0 set container7 to sv_Construct "%zbar_container.png" stringValue endif if bar7 == 0 set bar7 to sv_Construct "%zbar_orange.jpg" stringValue endif if stringValue =http://forums.bethsoft.com/index.php?/topic/1130416-review-this-script-pretty-please/= 0 set stringValue to sv_Construct"%e" endif if stringValue2 == 0 set stringValue2 to sv_Construct "%e" endif if scriptLine == 0 set scriptLine to sv_Construct "%e" endif SetNameEX "%z" label1 obseToPluggyRef StringGetName obseToPluggyRef pLabel1 SetNameEx "%z" container1 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer1FilePath pStringValue pStringValue2 SetNameEx "%z" bar1 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar1FilePath pStringValue pStringValue2 SetNameEX "%z" label2 obseToPluggyRef StringGetName obseToPluggyRef pLabel2 SetNameEx "%z" container2 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer2FilePath pStringValue pStringValue2 SetNameEx "%z" bar2 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar2FilePath pStringValue pStringValue2 SetNameEX "%z" label3 obseToPluggyRef StringGetName obseToPluggyRef pLabel3 SetNameEx "%z" container3 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer3FilePath pStringValue pStringValue2 SetNameEx "%z" bar3 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar3FilePath pStringValue pStringValue2 SetNameEX "%z" label4 obseToPluggyRef StringGetName obseToPluggyRef pLabel4 SetNameEx "%z" container4 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer4FilePath pStringValue pStringValue2 SetNameEx "%z" bar4 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar4FilePath pStringValue pStringValue2 SetNameEX "%z" label5 obseToPluggyRef StringGetName obseToPluggyRef pLabel5 SetNameEx "%z" container5 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer5FilePath pStringValue pStringValue2 SetNameEx "%z" bar5 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar5FilePath pStringValue pStringValue2 SetNameEX "%z" label6 obseToPluggyRef StringGetName obseToPluggyRef pLabel6 SetNameEx "%z" container6 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer6FilePath pStringValue pStringValue2 SetNameEx "%z" bar6 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar6FilePath pStringValue pStringValue2 SetNameEX "%z" label7 obseToPluggyRef StringGetName obseToPluggyRef pLabel7 SetNameEx "%z" container7 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pContainer7FilePath pStringValue pStringValue2 SetNameEx "%z" bar7 obseToPluggyRef StringGetName obseToPluggyRef pStringValue2 StringCat pBar7FilePath pStringValue pStringValue2 SetNameEX "%z" pHUDFont obseToPluggyRef StringGetName obseToPluggyRef pHUDFont ;hud1 initialise================================================== if (evaluateString1 != 0 || quest1 != 0 || variableName1 != 0) if hud1 == 0 set hud1 to NewHudT x1 y1 HudTProtect hud1 0 endif if hud1String == 0 set hud1String to CreateString -1 0 0 1 endif SetHudT hud1 hud1String pHUDFont showCode1 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer1FilePath if hud1Container == 0 set hud1Container to NewHudS pContainer1FilePath 1 showCode1 xContainer1 yContainer1 HudSProtect hud1Container 0 HudS_SclX hud1Container scale1 HudS_SclY hud1Container scale1 endif endif if StringLen pBar1FilePath if hud1Bar == 0 set hud1Bar to NewHudS pBar1FilePath 1 showCode1 xBar1 yBar1 HudSProtect hud1Bar 0 HudS_SclX hud1Bar scale1 HudS_SclY hud1Bar scale1 endif endif endif ;hud2 initialise================================================== if (evaluateString2 != 0 || quest2 != 0 || variableName2 != 0) if hud2 == 0 set hud2 to NewHudT x2 y2 HudTProtect hud2 0 endif if hud2String == 0 set hud2String to CreateString -1 0 0 1 endif SetHudT hud2 hud2String pHUDFont showCode2 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer2FilePath if hud2Container == 0 set hud2Container to NewHudS pContainer2FilePath 1 showCode2 xContainer2 yContainer2 HudSProtect hud2Container 0 HudS_SclX hud2Container scale2 HudS_SclY hud2Container scale2 endif endif if StringLen pBar2FilePath if hud2bar == 0 set hud2Bar to NewHudS pBar2FilePath 1 showCode2 xBar2 yBar2 HudSProtect hud2Bar 0 HudS_SclX hud2Bar scale2 HudS_SclY hud2Bar scale2 endif endif endif ;hud3 initialise================================================== if (evaluateString3 != 0 || quest3 != 0 || variableName3 != 0) if hud3 == 0 set hud3 to NewHudT x3 y3 HudTProtect hud3 0 endif if hud3String == 0 set hud3String to CreateString -1 0 0 1 endif SetHudT hud3 hud3String pHUDFont showCode3 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer3FilePath if hud3Container == 0 set hud3Container to NewHudS pContainer3FilePath 1 showCode3 xContainer3 yContainer3 HudSProtect hud3Container 0 HudS_SclX hud3Container scale3 HudS_SclY hud3Container scale3 endif endif if StringLen pBar3FilePath if hud3Bar == 0 set hud3Bar to NewHudS pBar3FilePath 1 showCode3 xBar3 yBar3 HudSProtect hud3Bar 0 HudS_SclX hud3Bar scale3 HudS_SclY hud3Bar scale3 endif endif endif ;hud4 initialise================================================== if (evaluateString4 != 0 || quest4 != 0 || variableName4 != 0) if hud4 == 0 set hud4 to NewHudT x4 y4 HudTProtect hud4 0 endif if hud4String == 0 set hud4String to CreateString -1 0 0 1 endif SetHudT hud4 hud4String pHUDFont showCode4 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer4FilePath if hud4Container == 0 set hud4Container to NewHudS pContainer4FilePath 1 showCode4 xContainer4 yContainer4 HudSProtect hud4Container 0 HudS_SclX hud4Container scale4 HudS_SclY hud4Container scale4 endif endif if StringLen pBar4FilePath if hud4Bar == 0 set hud4Bar to NewHudS pBar4FilePath 1 showCode4 xBar4 yBar4 HudSProtect hud4Bar 0 HudS_SclX hud4Bar scale4 HudS_SclY hud4Bar scale4 endif endif endif ;hud5 initialise================================================== if (evaluateString5 != 0 || quest5 != 0 || variableName5 != 0) if hud5 == 0 set hud5 to NewHudT x5 y5 HudTProtect hud5 0 endif if hud5String == 0 set hud5String to CreateString -1 0 0 1 endif SetHudT hud5 hud5String pHUDFont showCode5 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer5FilePath if hud5Container == 0 set hud5Container to NewHudS pContainer5FilePath 1 showCode5 xContainer5 yContainer5 HudSProtect hud5Container 0 HudS_SclX hud5Container scale5 HudS_SclY hud5Container scale5 endif endif if StringLen pBar5FilePath if hud5Bar == 0 set hud5Bar to NewHudS pBar5FilePath 1 showCode5 xBar5 yBar5 HudSProtect hud5Bar 0 HudS_SclX hud5Bar scale5 HudS_SclY hud5Bar scale5 endif endif endif ;hud6 initialise================================================== if (evaluateString6 != 0 || quest6 != 0 || variableName6 != 0) if hud6 == 0 set hud6 to NewHudT x6 y6 HudTProtect hud6 0 endif if hud6String == 0 set hud6String to CreateString -1 0 0 1 endif SetHudT hud6 hud6String pHUDFont showCode6 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer6FilePath if hud6Container == 0 set hud6Container to NewHudS pContainer6FilePath 1 showCode6 xContainer6 yContainer6 HudSProtect hud6Container 0 HudS_SclX hud6Container scale6 HudS_SclY hud6Container scale6 endif endif if StringLen pBar6FilePath if hud6Bar == 0 set hud6Bar to NewHudS pBar6FilePath 1 showCode6 xBar6 yBar6 HudSProtect hud6Bar 0 HudS_SclX hud6Bar scale6 HudS_SclY hud6Bar scale6 endif endif endif ;hud7 initialise================================================== if (evaluateString7 != 0 || quest7 != 0 || variableName7 != 0) if hud7 == 0 set hud7 to NewHudT x7 y7 HudTProtect hud7 0 endif if hud7String == 0 set hud7String to CreateString -1 0 0 1 endif SetHudT hud7 hud7String pHUDFont showCode7 fontHeight fontWidth fontWeight hudTItalic hudTR hudTG hudTB hudTFormat if StringLen pContainer7FilePath if hud7Container == 0 set hud7Container to NewHudS pContainer7FilePath 1 showCode7 xContainer7 yContainer7 HudSProtect hud7Container 0 HudS_SclX hud7Container scale7 HudS_SclY hud7Container scale7 endif endif if StringLen pBar7FilePath if hud7Bar == 0 set hud7Bar to NewHudS pBar7FilePath 1 showCode7 xBar7 yBar7 HudSProtect hud7Bar 0 HudS_SclX hud7Bar scale7 HudS_SclY hud7Bar scale7 endif endif endif endif if functionMode == 2 ;hud1 update================================================== if hud1Bar if sv_length evaluateString1 sv_Set "set kCHUDC.value to %z" evaluateString1 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest1 variableName1 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue1 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel1 SetString hud1String " " StringLen hud1String 0 if showValueInLabel1 set roundValue to value IntToString pStringValue roundValue StringCat hud1String pLabel1 pStringValue SetString pStringValue " of " StringCat hud1String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud1String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud1String pLabel1 pStringValue endif HudT_Text hud1 hud1String endif HudS_Tex hud1Bar pBar1FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale1 if debug PrintToConsole "kCHUD: HUD 1 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud1Bar percentageValue if (value < 1 && removeWhenZero1) || (value > value2 - 1 && removeWhenFull1) HudT_Opac hud1 0 HudS_Opac hud1Bar 0 HudS_Opac hud1Container 0 else HudT_Opac hud1 opacity1 HudS_Opac hud1Bar opacity1 HudS_Opac hud1Container opacity1 endif ;force opacity else HudT_Opac hud1 0 HudS_Opac hud1Bar 0 HudS_Opac hud1Container 0 endif endif ;hud2 update================================================== if hud2Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString2 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest2 variableName2 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue2 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel2 SetString hud2String " " StringLen hud2String 0 if showValueInLabel2 set roundValue to value IntToString pStringValue roundValue StringCat hud2String pLabel2 pStringValue SetString pStringValue " of " StringCat hud2String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud2String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud2String pLabel2 pStringValue endif HudT_Text hud2 hud2String endif HudS_Tex hud2Bar pBar2FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale2 if debug PrintToConsole "kCHUD: HUD 2 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud2Bar percentageValue if (value < 1 && removeWhenZero2) || (value > value2 - 1 && removeWhenFull2) HudT_Opac hud2 0 HudS_Opac hud2Bar 0 HudS_Opac hud2Container 0 else HudT_Opac hud2 opacity2 HudS_Opac hud2Bar opacity2 HudS_Opac hud2Container opacity2 endif ;force opacity else HudT_Opac hud2 0 HudS_Opac hud2Bar 0 HudS_Opac hud2Container 0 endif endif ;hud3 update================================================== if hud3Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString3 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest3 variableName3 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue3 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel3 SetString hud3String " " StringLen hud3String 0 if showValueInLabel3 set roundValue to value IntToString pStringValue roundValue StringCat hud3String pLabel3 pStringValue SetString pStringValue " of " StringCat hud3String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud3String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud3String pLabel3 pStringValue endif HudT_Text hud3 hud3String endif HudS_Tex hud3Bar pBar3FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale3 if debug PrintToConsole "kCHUD: HUD 3 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud3Bar percentageValue if (value < 1 && removeWhenZero3) || (value > value2 - 1 && removeWhenFull3) HudT_Opac hud3 0 HudS_Opac hud3Bar 0 HudS_Opac hud3Container 0 else HudT_Opac hud3 opacity3 HudS_Opac hud3Bar opacity3 HudS_Opac hud3Container opacity3 endif ;force opacity else HudT_Opac hud3 0 HudS_Opac hud3Bar 0 HudS_Opac hud3Container 0 endif endif ;hud4 update================================================== if hud4Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString4 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest4 variableName4 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue4 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel4 SetString hud4String " " StringLen hud4String 0 if showValueInLabel4 set roundValue to value IntToString pStringValue roundValue StringCat hud4String pLabel4 pStringValue SetString pStringValue " of " StringCat hud4String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud4String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud4String pLabel4 pStringValue endif HudT_Text hud4 hud4String endif HudS_Tex hud4Bar pBar4FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale4 if debug PrintToConsole "kCHUD: HUD 4 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud4Bar percentageValue if (value < 1 && removeWhenZero4) || (value > value2 - 1 && removeWhenFull4) HudT_Opac hud4 0 HudS_Opac hud4Bar 0 HudS_Opac hud4Container 0 else HudT_Opac hud4 opacity4 HudS_Opac hud4Bar opacity4 HudS_Opac hud4Container opacity4 endif ;force opacity else HudT_Opac hud4 0 HudS_Opac hud4Bar 0 HudS_Opac hud4Container 0 endif endif ;hud5 update================================================== if hud5Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString5 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest5 variableName5 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue5 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel5 SetString hud5String " " StringLen hud5String 0 if showValueInLabel5 set roundValue to value IntToString pStringValue roundValue StringCat hud5String pLabel5 pStringValue SetString pStringValue " of " StringCat hud5String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud5String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud5String pLabel5 pStringValue endif HudT_Text hud5 hud5String endif HudS_Tex hud5Bar pBar5FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale5 if debug PrintToConsole "kCHUD: HUD 5 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud5Bar percentageValue if (value < 1 && removeWhenZero5) || (value > value2 - 1 && removeWhenFull5) HudT_Opac hud5 0 HudS_Opac hud5Bar 0 HudS_Opac hud5Container 0 else HudT_Opac hud5 opacity5 HudS_Opac hud5Bar opacity5 HudS_Opac hud5Container opacity5 endif ;force opacity else HudT_Opac hud5 0 HudS_Opac hud5Bar 0 HudS_Opac hud5Container 0 endif endif ;hud6 update================================================== if hud6Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString6 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest6 variableName6 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue6 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel6 SetString hud6String " " StringLen hud6String 0 if showValueInLabel6 set roundValue to value IntToString pStringValue roundValue StringCat hud6String pLabel6 pStringValue SetString pStringValue " of " StringCat hud6String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud6String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud6String pLabel6 pStringValue endif HudT_Text hud6 hud6String endif HudS_Tex hud6Bar pBar6FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale6 if debug PrintToConsole "kCHUD: HUD 6 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud6Bar percentageValue if (value < 1 && removeWhenZero6) || (value > value2 - 1 && removeWhenFull6) HudT_Opac hud6 0 HudS_Opac hud6Bar 0 HudS_Opac hud6Container 0 else HudT_Opac hud6 opacity6 HudS_Opac hud6Bar opacity6 HudS_Opac hud6Container opacity6 endif ;force opacity else HudT_Opac hud6 0 HudS_Opac hud6Bar 0 HudS_Opac hud6Container 0 endif endif ;hud7 update================================================== if hud7Bar if sv_length evaluateString2 sv_Set "set kCHUDC.value to %z" evaluateString7 scriptLine else sv_Set "set kCHUDC.value to %z.%z" quest6 variableName7 scriptLine endif RunScriptLine "%z" scriptLine sv_Set "set kCHUDC.value2 to %z" maxValue7 stringValue2 RunScriptLine "%z" stringValue2 if value || value2 if pLabel7 SetString hud7String " " StringLen hud7String 0 if showValueInLabel7 set roundValue to value IntToString pStringValue roundValue StringCat hud7String pLabel7 pStringValue SetString pStringValue " of " StringCat hud7String pStringValue set roundValue to value2 IntToString pStringValue roundValue StringCat hud7String pStringValue else SetString pStringValue " " StringLen pStringValue 0 StringCat hud7String pLabel7 pStringValue endif HudT_Text hud7 hud7String endif HudS_Tex hud7Bar pBar7FilePath 1 set percentageValue to value / value2 if percentageValue < 0 set percentageValue to 0 elseif percentageValue > 1 set percentageValue to 1 endif set percentageValue to percentageValue * scale7 if debug PrintToConsole "kCHUD: HUD 7 value %0.2f value2 %0.2f percentage %0.2f" value value2 percentageValue endif HudS_SclX hud7Bar percentageValue if (value < 1 && removeWhenZero7) || (value > value2 - 1 && removeWhenFull7) HudT_Opac hud7 0 HudS_Opac hud7Bar 0 HudS_Opac hud7Container 0 else HudT_Opac hud7 opacity7 HudS_Opac hud7Bar opacity7 HudS_Opac hud7Container opacity7 endif ;force opacity else HudT_Opac hud7 0 HudS_Opac hud7Bar 0 HudS_Opac hud7Container 0 endif endif endifend
And here's what I have for bar 6 in my ini:
;==================================================;HUD 6;==================================================set kCHUDC.label6 to sv_Construct "Encumbrance:"set kCHUDC.container6 to sv_Construct "%zcontainer.png" kCHUDC.stringValueset kCHUDC.bar6 to sv_Construct "%zpurple.jpg" kCHUDC.stringValueset kCHUDC.evaluateString6 to sv_Construct "Player.GetActorValue Encumbrance"set kCHUDC.maxValue6 to sv_Construct "Player.GetBaseActorValue Encumbrance"set kCHUDC.showValueInLabel6 to 1set kCHUDC.showCode6 to 1set kCHUDC.removeWhenZero6 to 0set kCHUDC.removeWhenFull6 to 0set kCHUDC.scale6 to 0.44set kCHUDC.x6 to 15set kCHUDC.y6 to 720set kCHUDC.xContainer6 to 15set kCHUDC.yContainer6 to kCHUDC.y6 + 15set kCHUDC.xBar6 to kCHUDC.xContainer6 + 13 * kCHUDC.scale6set kCHUDC.yBar6 to kCHUDC.yContainer6 + 1 * kCHUDC.scale6set kCHUDC.xBar6 to Ceil kCHUDC.xBar6set kCHUDC.yBar6 to Ceil kCHUDC.yBar6set kCHUDC.opacity6 to 100
Let's see if some smart people can spot why bar 6 always shows 365 as the max value, instead of the value it is supposed to show according to the ini.