0 of 0

File information

Last updated

Original upload

Created by

tidusmd

Uploaded by

tidusMD

Virus scan

Safe to use

48 comments

  1. pablo5425
    pablo5425
    • member
    • 0 kudos
    did you think about linking it to another widget like health bar or the items in the bottom left corner?
    that would also keep it visible in FPS mode
    1. StygianEmperor
      StygianEmperor
      • premium
      • 8 kudos
      that would be helpful; i don't usually use third-person
    2. Guitarsolo
      Guitarsolo
      • member
      • 12 kudos
      is tied to the speedometer...so if someone makes a mod to display the speedometer in FPS, then this will shop up too
    3. pablo5425
      pablo5425
      • member
      • 0 kudos
      fps hide seems to be a special function that i was unable to find inside any inkwidget or inkhud file
      it might be part of the source code, or the assembly code inside the exe
  2. Denixerianer
    Denixerianer
    • premium
    • 1 kudos
    the version to display it at the top of the speedometer still shows at the bottom
  3. Valour549
    Valour549
    • premium
    • 86 kudos
    Default fonts are so goddamn tiny. But if increased they get cut off...

    Can you add some explanation what the four numbers mean? It's so much better to let players customize it due to different resolutions etc.
    VehicleInfo.ink_hp_title:SetMargin(0, 13, 0, 10)
    1. 213365
      213365
      • member
      • 4 kudos
      You can try installing RedHotTools and use ink inspector to see what different values does to the HUD element. Experiment and see what you come up with. !IMPORTANT! Remember what you changed and input the same values into the .lua. Then restart your game to see if your changes was applied correctly. Rinse and repeat till your happy with how your HUD looks.

      Took me a while to get mine just how I like it . . .
      Added a bit of code for changing the "letterCase" and tracking
      Swapped alignments to get proper element positioning
      Changes I made to the init.lua >
      Spoiler:  
      Show
      VehicleInfo.ink_horizontal_panel = inkHorizontalPanel.new()
      VehicleInfo.ink_horizontal_panel:SetName(CName.new("ap"))
      VehicleInfo.ink_horizontal_panel:SetAnchor(inkEAnchor.Centered)
      VehicleInfo.ink_horizontal_panel:SetFitToContent(false)
      if VehicleDurabilityDisplay.type == Type.Bottom then
        VehicleInfo.ink_horizontal_panel:SetMargin(0, 0, -15, -5)
      elseif VehicleDurabilityDisplay.type == Type.Top then
        VehicleInfo.ink_horizontal_panel:SetMargin(0, 0, -36, 85)
      end
      VehicleInfo.ink_horizontal_panel:Reparent(parent)

      VehicleInfo.ink_hp_title = inkText.new()
      VehicleInfo.ink_hp_title:SetName(CName.new("title"))
      VehicleInfo.ink_hp_title:SetText(GetLocalizedText("LocKey#91867"))
      VehicleInfo.ink_hp_title:SetFontFamily("base\\gameplay\\gui\\fonts\\raj\\raj.inkfontfamily")
      VehicleInfo.ink_hp_title:SetFontStyle("Medium")
      VehicleInfo.ink_hp_title:SetFontSize(25)
      VehicleInfo.ink_hp_title:SetTracking(5)
      VehicleInfo.ink_hp_title:SetLetterCase("UpperCase")
      VehicleInfo.ink_hp_title:SetOpacity(0.75)
      VehicleInfo.ink_hp_title:SetMargin(15, 10, 0, 0)
      VehicleInfo.ink_hp_title:SetFitToContent(true)
      VehicleInfo.ink_hp_title:SetJustificationType(textJustificationType.Left)
      VehicleInfo.ink_hp_title:SetHorizontalAlignment(textHorizontalAlignment.Left)
      VehicleInfo.ink_hp_title:SetVerticalAlignment(textVerticalAlignment.Center)
      VehicleInfo.ink_hp_title:SetStyle(ResRef.FromName("base\\gameplay\\gui\\common\\main_colors.inkstyle"))
      VehicleInfo.ink_hp_title:BindProperty("tintColor", "MainColors.MildRed")
      VehicleInfo.ink_hp_title:Reparent(VehicleInfo.ink_horizontal_panel)

      VehicleInfo.ink_hp_text = inkText.new()
      VehicleInfo.ink_hp_text:SetName(CName.new("text"))
      VehicleInfo.ink_hp_text:SetText("100")
      VehicleInfo.ink_hp_text:SetFontFamily("base\\gameplay\\gui\\fonts\\digital_readout\\digitalreadout.inkfontfamily")
      VehicleInfo.ink_hp_text:SetFontStyle("Regular")
      VehicleInfo.ink_hp_text:SetTracking(5)
      VehicleInfo.ink_hp_text:SetMargin(0, 13, 0, 0)
      VehicleInfo.ink_hp_text:SetFitToContent(true)
      VehicleInfo.ink_hp_text:SetJustificationType(textJustificationType.Right)
      VehicleInfo.ink_hp_text:SetHorizontalAlignment(textHorizontalAlignment.Right)
      VehicleInfo.ink_hp_text:SetVerticalAlignment(textVerticalAlignment.Center)
      VehicleInfo.ink_hp_text:SetStyle(ResRef.FromName("base\\gameplay\\gui\\common\\main_colors.inkstyle"))
      VehicleInfo.ink_hp_text:BindProperty("tintColor", "MainColors.Blue")
      if VehicleDurabilityDisplay.type == Type.Bottom then
        VehicleInfo.ink_hp_text:SetFontSize(50)
      elseif VehicleDurabilityDisplay.type == Type.Top then
        VehicleInfo.ink_hp_text:SetFontSize(25)
      end
      I use HUDitor to position the speedometer where I wanted it, HUD Painter to customize even more things!
      But to answer your question those four numbers are how the new HUD element is positioned referencing the anchor points and text alignments. You will see SetMargin() for all the added elements by the MOD ("ap", "title", "text").
    2. Valour549
      Valour549
      • premium
      • 86 kudos
      Are you able to be a little more specific with what each number means exactly? Because "referencing the anchor points and text alignments" still doesn't help unless I know where the anchor points or the alignments are. A roughly drawn picture in paint indicating the line that each value controls would be great.
    3. 213365
      213365
      • member
      • 4 kudos
      Okay Lets see If i can elaborate a little bit more about these numbers; I think I won't be able to really properly explain every aspect they can affect though.
      still doesn't help unless I know where the anchor points or the alignments are.
      That's why I've suggested using Ink Inspector to experiment with different values and options within the selected HUD element.
      Its easy to understand once you start making your own changes and see for yourself on what each value will affect, This is a safe way of testing your changes, edits made during a session wont be saved on next launch, that's why its Important to Input the changes your happy with into the .lua as you find your own desired positions and text settings. 
      I'll try and give an easy to understand breakdown:
      Spoiler:  
      Show
      1.) Anchor Points/Alignments are points or borders on the Hud element that determines how to position the text in simple referenced locations within the selected HUD widget bounding area (Centered, Centered.Right, Centered.Left, etc.).
      In Ink Inspector you can Visualize the bounding area by selecting the right HUD element you want to edit, it will be highlighted green up to its borders. Basically the affected HUD's area, are split into the respected anchor points.
      "Centered = will position element right onto the most central region of the affected area etc.

      2.) Alignments reference the anchor point set for a given element and aligns self depending on set option. A Left or Right alignment will reference the anchor point of the selected HUD and will position the element accordingly. Like if you notice your text way out to the side of the HUD widget then that might mean the anchor point of the main HUD widget might be a bit too close to a given border, changing it to somewhere closer to the center will bring the NEW element closer to your desired location.

      3.) Setting MARGINS > these are the values I like to call Fine Tuned. They do exactly that!
      Because the HUD widgets area is a dynamic space the positioning of anchor points and alignments will inevitably be "out of place" from what you expect with just setting anchor points and alignments.
      This is when the four values come into play. They will nudge the HUD element in pixels depending on your set values. You'll notice in my Code that I have negative values for the "ap" Ink element; that was required to get the positioning just right for my situation. If it wasn't a negative value The Meter will be offset to the left and a bit too close to the "MPH 000", so I used -values to nudge it to the right and down a few pixels. Use +/- values to fine tune your text location down to the pixel :)

      Don't forget to have Fun! with it . . . 
      Will love to see what you come up with, Take care Choom!
  4. TineGorm
    TineGorm
    • member
    • 0 kudos
    Hey,
    Works on update 2.21 (I installed it manually)

    Tho this font is so damn small XD
  5. kromancer
    kromancer
    • supporter
    • 1 kudos
    I find the durability counter working but sometimes, especially when reloading a save with a car already damaged, the counter goes back to 100 and not (let's say 54) where it was beforehand
  6. Xaliber13
    Xaliber13
    • premium
    • 98 kudos
    I'm still adjusting it, but so far this is what works best for me to make the text more apparent.

    Line 163-165:
        VehicleInfo.ink_hp_title:SetFontSize(36)
        VehicleInfo.ink_hp_title:SetOpacity(0.8)
        VehicleInfo.ink_hp_title:SetMargin(0, 13, 0, 10)

    Line 179:
        VehicleInfo.ink_hp_text:SetMargin(0, 13, 0, 10)
    Line 189 (or Line 187 if you use the Bottom version):
            VehicleInfo.ink_hp_text:SetFontSize(42)
    1. Valour549
      Valour549
      • premium
      • 86 kudos
      Have you figured out what those 4 numbers mean, my font won't fit lol
  7. talebabatto
    talebabatto
    • member
    • 0 kudos
    This is brilliant, could you add the gear the cars/bikes are using while driving near the speedometer?
  8. ElPasoNoTexas
    ElPasoNoTexas
    • supporter
    • 4 kudos
    Something I didn't know I needed! TY!!

    Is there a way to change the size? I'm using VCR font from Custom Fonts - https://www.nexusmods.com/cyberpunk2077/mods/2392?tab=posts

    NVM found it. Literally says SetFontSize lmaoo. Thanks!
    1. Gecko13Zucr
      Gecko13Zucr
      • member
      • 0 kudos
      I am having a similar problem, can you let me know where you found the SetFontSize option?
    2. Xaliber13
      Xaliber13
      • premium
      • 98 kudos
      Gecko, you need to open the files you've extracted, or if you installed with Vortex, right click and Open in File Manager. Find init.lua. 

      In line 163 there is this:
          VehicleInfo.ink_hp_title:SetFontSize(15)

      Change to your liking.
  9. SolarKing1034
    SolarKing1034
    • supporter
    • 0 kudos
    Does not currently work on update 2.2 if anyone asks
    Does work after updating all core mods
    1. kassinaillia
      kassinaillia
      • member
      • 0 kudos
      did you update all your other mods?
    2. RogerPizarro
      RogerPizarro
      • member
      • 0 kudos
      indeed, is not working.
    3. Hasimere
      Hasimere
      • member
      • 0 kudos
      Works fine for me.
  10. Zenivo
    Zenivo
    • member
    • 1 kudos
    Works for me on 2.2, all my core mods are updated.