Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

registrator2000

Uploaded by

registrator2000

Virus scan

Some manually verified files

HUDFramework API Suggestions (18 comments)

  1. registrator2000
    registrator2000
    • premium
    • 2,302 kudos
    Locked
    Sticky
    This thread is for suggestions for improvements and new additions to the HUDFramework API.
  2. kitsunemm
    kitsunemm
    • member
    • 0 kudos
    hi when i use your mod it change the item the i find in the commonwealth it tell me the type next to it

    like scrap,ammo,weapon,money. i hope if you will add the ability to cancel it since at least for it really annoy me so i would love to just read the original name

    maybe put a logo next to it

    i would love it if you change at least this
    and thx for the great mod
  3. omegaaf
    omegaaf
    • member
    • 0 kudos
    I would really appreciate a mod, one as prominent and well done as yours to include improved 21:9 ultrawide support. I know it may be a lot to ask of you, but it would truly set your extravagant mod apart
  4. kinggath
    kinggath
    • premium
    • 4,106 kudos
    I would love to see an easy means to break free of the user's hud colors, especially conditionally. For example: when a bar or number gets below a certain threshold - switch to a red color.
    1. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      It would require some minor restructuring to have individual widgets be able to control this option independently, but it is possible. I'll look into this in a future update.
  5. Neanka
    Neanka
    • premium
    • 606 kudos
    did u think about showing wisgets in vats menu? and also make native variables for showing mode (in normal game mode, in PA, in vats menu, in scope menu etc. )
    1. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      HUDFramework will have F4SE integration in the near future - it will use native calls for messaging if F4SE is present and fallback to non-F4SE routines if not.

      For hooking into VATSMenu and other menus, this is possible today with F4SE but I'm not certain if it should be in HUDFramework's scope to do so! (See Vertibird Jump F4SE plugin source for an example on hooking VertibirdMenu and adding a new native function to BGSCodeObj.)
    2. scrivener07
      scrivener07
      • premium
      • 342 kudos
      If you have source available for vertibird Jump then I could not find it. Was it hosted somewhere other than the nexus?
    3. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      It was outdated as I had updated the mod for the latest game version (v1.9.4). It should be up now.
  6. scrivener07
    scrivener07
    • premium
    • 342 kudos
    I may have figured out the problem I had with `HUD.SendMessageString` that I mentioned earlier on the discord server. The documents state this about widget IDs and sending messages.

    RegisterWidget::asSWF
    "The path to your widget's SWF file. The root directory is Data\Interface. This is the widget identifier. Use this value in future LoadWidget and SendMessage calls."

    The `SendMessage` function works with the same WidgetID used for `RegisterWidget`. For some reason the `SendMessageString` function must omit the file extension from the WidgetID. Below is similar to what Ive used for the WidgetID of `SendMessageString`.

    HUD.RegisterWidget(self, "MyWidget.swf", 10, 70)
    HUD.SendMessage("MyWidget.swf", UpdateNumber, 99)
    HUD.SendMessageString("MyWidget", "UpdateString", "Hello World")

    I may be misunderstanding something or its just an inconsistency in the framework. Much appreciated if you could shed some light on this.

    opps wrong thread
    1. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      You haven't misunderstood - this is an oversight on my part. Apologies! I hope you did not experience too much frustration.

      I have now fixed this inconsistency in 1.0d.

      If you would like some context: In the beginning, widgets were to 'subscribe' to and register their own widget IDs at runtime by calling hud.subscribe("<WidgetName that the widget wanted to register>"). However, I eventually decided against this because two widgets could register for the same name and then encounter issues, so I used the widget path as a unique identifier for each widget and auto-registered that name with HUDFramework. This registration was for the 'friendly-name' of the widget (without the extension) instead of with the extension and this was left over for SendMessageString.
    2. scrivener07
      scrivener07
      • premium
      • 342 kudos
      Even with send string not working there were no frustrations. With only about 30 minutes of work I got a widget in game on my first try. Since you graciously provided the source for us I was able to dig right in and see how `SendMessageString` was used.

      Very impressive work you have done here.
  7. Gopher
    Gopher
    • premium
    • 8,156 kudos
    I was wondering if we can get something similar to the eval function that actually returns a value? Basically I wan't to be able to find the x y coords of different elements on the HUD the same way we can do if we add our own custom widgets.
    1. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      Unfortunately this would be a PC-only feature via the script extender. Vanilla FO4 only allows for Papyrus -> AS3 and not the other way round. Could you elaborate on your use-case? Perhaps there could be other methods to achieve what you want to do.

      For instance, you can evaluate a script that moves a UI element relative to its current position with the += operator. You can also have if and else conditional statements to make sure elements don't get moved off-screen, for example.
    2. Gopher
      Gopher
      • premium
      • 8,156 kudos
      Well basically I want to find the position of elements so I can move them, but return them to the original location at a later time. How I do it at the moment is to just remember how far I moved something, then move it back. But of course that is vulnerable to mistakes and glitches. If I could 'inject a variable' and set it to the position, then I could use that. But my guess is I really need to make an invisible widget that records data and takes control.
    3. registrator2000
      registrator2000
      • premium
      • 2,302 kudos
      I've added in v1.0d a "data" object that will be available to the eval VM environment to store session-persistent data, which has the same lifetime as a HUD widget. (One session corresponds to each load of the HUDMenu. The HUD is not reloaded when moving between zones, but loading a game will cause a reload.)

      Usage is as follows:
      hud.Eval("data.myWidgetData = 5;")

      later...

      hud.Eval("myWidget.x = data.myWidgetData")

      For more complex AS3 manipulation, I agree that it will be useful and likely easier to create a widget, sending widget commands to make these changes natively in Scaleform rather than rely on just the Eval function.
    4. Gopher
      Gopher
      • premium
      • 8,156 kudos
      Thanks, will check it out immediately
    5. Gopher
      Gopher
      • premium
      • 8,156 kudos
      OK, works perfectly, thanks