Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Companion HUD Stats


InsanitySorrow
 Share

Recommended Posts

Companion HUD Stats

After I decided to try my hand at using pluggy to make some form of HUD component, I decided to go with plain text since it would be simpler than using Bars, plus I'm a bit tired of bars :laugh:. This is the result :D

Notes:

Quest Script

Requires OBSE v18+

Pluggy v 125+

Script:

;===========================
;Name: HUD - Stats
;Version: 1.0
;Author: InsanitySorrow
;===========================

;===========================
;Scriptname
;===========================

Scriptname aaISHUDStatsScript

;===========================
;Variables
;===========================

Short Initialize

Float fQuestDelayTime

Float PosX
Float PosY
Float Pos2X
Float Pos2Y
Float Pos3X
Float Pos3Y
Float Pos4X
Float Pos4Y
Float Pos5X
Float Pos5Y
Float Pos6X
Float Pos6Y
Float Pos7X
Float Pos7Y
Float Pos8X
Float Pos8Y

Long Health
Long Fatigue
Long Level
Long Magicka
Long HudHealth
Long HudFatigue
Long HudMagicka
Long HudLevel
Long HudH
Long HudF
Long HudM
Long HudL

Long TempHealth
Long TempFatigue
Long TempMagicka
Long TempLevel

Long CritterHealth
Long CritterFatigue
Long CritterMagicka
Long CritterLevel

Long font_style
Long font_height
Long font_width
Long font_weight
Long font_italic
Long font_r
Long font_g
Long font_b

Ref Critter

;===========================
;Script
;===========================
Begin GameMode
If (GetGameLoaded)
DelAllHudTs
let Initialize := 0
If (Initialize == 0)
let fQuestDelayTime := 0.001

let PosX := 20
let PosY := 300

let Pos2X := 20
let Pos2Y := 320

let Pos3X := 20
let Pos3Y := 290

let Pos4X := 70
let Pos4Y := 300

let Pos5X := 70
let Pos5Y := 320

let Pos6X := 70
let Pos6Y := 290

let Pos7X := 20
let Pos7Y := 310

let Pos8X := 70
let Pos8Y := 310

let Critter := SimpliciaTheSlowRef

Set Health to CreateString -1 "%e"
Set Fatigue to CreateString -1 "%e"
Set Level to CreateString -1 "%e"
Set Magicka to CreateString -1 "%e"

Set CritterHealth to CreateString -1 "%e"
Set CritterFatigue to CreateString -1 "%e"
Set CritterLevel to CreateString -1 "%e"
Set CritterMagicka to CreateString -1 "%e"

Set font_style to CreateString -1 "Arial" 0 1
Set font_height to 14
Set font_width to 0
Set font_weight to 0
Set font_italic to 0
Set font_r to 200
Set font_g to 200
Set font_b to 200

Set HudHealth to NewHudT PosX PosY
SetHudT HudHealth Health font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudFatigue to NewHudT Pos2X Pos2Y
SetHudT HudFatigue Fatigue font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudLevel to NewHudT Pos3X Pos3Y
SetHudT HudLevel Level font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudH to NewHudT Pos4X Pos4Y
SetHudT HudH CritterHealth font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudF to NewHudT Pos5X Pos5Y
SetHudT HudF CritterFatigue font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudL to NewHudT Pos6X Pos6Y
SetHudT HudL CritterLevel font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudMagicka to NewHudT Pos7X Pos7Y
SetHudT HudMagicka Magicka font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

Set HudM to NewHudT Pos8X Pos8Y
SetHudT HudM CritterFatigue font_style 1 font_height font_width font_weight font_italic font_r font_g font_b 1

let Initialize := 1
Endif
Endif

Set TempHealth to Critter.GetAv Health
Set TempMagicka to Critter.GetAv Magicka
Set TempFatigue to Critter.GetAv Fatigue
Set TempLevel to Critter.GetLevel

IntToString CritterHealth TempHealth 0
IntToString CritterMagicka TempMagicka 0
IntToString CritterFatigue TempFatigue 0
IntToString CritterLevel TempLevel 0

SetString Health "Health: "
SetString Fatigue "Fatigue: "
SetString Magicka "Magicka: "
SetString Level "Level: "

HudT_Text hudHealth Health 0
HudT_Text hudFatigue Fatigue 0
HudT_Text hudMagicka Magicka 0
HudT_Text hudLevel Level 0

HudT_Text hudH CritterHealth 0
HudT_Text hudM CritterMagicka 0
HudT_Text hudF CritterFatigue 0
HudT_Text hudL CritterLevel 0
End[/code]

[color=#FFA500][b]Changes:[/b][/color]

Now there are a couple of changes you can make to the script from font changes to position changes. But first you'll want to change this line:

[b]let Critter := SimpliciaTheSlowRef[/b]

Just change where it says [b]SimpliciaTheSlowRef[/b] to change the reference the script will cover.

Aside from that you can change the Font style, colour ect by adjusting these lines:

[b]

Set font_style to CreateString -1 "Arial" 0 1

Set font_height to 14

Set font_width to 0

Set font_weight to 0

Set font_italic to 0

Set font_r to 200

Set font_g to 200

Set font_b to 200[/b]

The 3 RGB values change the font colour, to change the font edit where it says [b]Arial[/b] with your chosen font. Another change can be made and that's the position of the HUD stats by editing the X and Y Position values :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...