Jump to content

Need some UI.Get help


RedxYeti

Recommended Posts

ive always had this issue for fallout 4 and skyrim. to me theres no clear way to get the correct string for the path to a var.

 


Event OnQuestInit()
	RegisterForMenuOpenCloseEvent("ExamineMenu")
EndEvent

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
	If asMenuName == "ExamineMenu" && abOpening == true
		Debug.MessageBox(UI.Get("ExamineMenu", "root1.Menu_mc._singleItemInspectMode"))
	Endif
EndEvent


im trying to get this var in the examine menu but have no clue what the second string is for get. this just returns none.

thanks in advance.

Link to comment
Share on other sites

Yes, getting the var path that can be sometimes... tricky, and time consuming.

As for "_singleItemInspectMode", that's a private var in ExamineMenu.swf which can't be accessed by Get (or Set either). You'd need to edit this variable in action script: replace "private" with "public".

Personally, the best "universal" approach to find variable paths I have found so far is:

   - editing the AS3 script of the menu's .swf file in Adobe Animate or JPEXS:

        - add trace() function calls like trace(this.parent.name) to get the "path to the variable" you're looking for (put the trace() functions in ExamineMenu.as for example then call it from Papyrus with UI.Invoke()),

        - then use the game's GFx logging (which can be enabled with and accessed through F4SE, see F4SE >> src >> f4se_whatsnew.txt >> bEnableGFXLog) to see the path in the F4SE log (..\Documents\My Games\Fallout4\F4SE\f4se.log).

Now, I can't find my Invoke() callable GetAS3VarPath function anywhere... but you'll need to write something like this.

If you have Starfield, I've made plenty of UI mods that use the native equivalent of Get (BGS uses Scaleform and ExternalInterface for AS3 - C++ communication; I named the function GetAS3Variable), I can send a few working examples like:

GETAS3VARIABLE "WorkshopMenu root1.Menu_mc.BuildItemCard_mc.NameSection_mc.Name_mc.Text_tf.text"		; name of the item to be placed in Workshop Build Mode

 

Edited by LarannKiar
Link to comment
Share on other sites

thanks for the reply, im a little more confused now but thats not your fault haha

while i try to set this up could you help me with the syntax with the pipboy menu functions https://falloutck.uesp.net/wiki/PipboyMenu

say something simple like Caps()

what i tried

Debug.MessageBox(Ui.Get("PipboyMenu", "root1.Menu_mc.DataObj:Pipboy_DataObj.Caps()"))

just returns none

Link to comment
Share on other sites

18 hours ago, RedxYeti said:

thanks for the reply, im a little more confused now but thats not your fault haha

while i try to set this up could you help me with the syntax with the pipboy menu functions https://falloutck.uesp.net/wiki/PipboyMenu

say something simple like Caps()

what i tried

Debug.MessageBox(Ui.Get("PipboyMenu", "root1.Menu_mc.DataObj:Pipboy_DataObj.Caps()"))

just returns none

I'm not sure if you can access DataObj without naming it. UI functions can navigate through names and this object is created in PipBoyMenu()  --->  this.DataObj = new Pipboy_DataObj();

But I don't see if it receives a name, in which case it'd keep its default generated instance name a like "instance46" or something. (Would change every time the object is created and destructed).

By the way, this would return "Data_tf":

Debug.MessageBox(UI.Get("PipboyMenu", "root1.Menu_mc.Header_mc.PageHeader_mc.DATA_tf.name"))

See the menu hierarchy in JPEXS >> Sprites and the action scripts.

( For Caps, you can use Papyrus: Game.GetPlayer().GetItemCount(Game.GetCaps()) ).

Edited by LarannKiar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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