Jump to content

A list of the scaleform functions by context.


Recommended Posts

I was wondering if anyone had a list of the functions that are exposed to the scaleform/flash side of the game. Through alot of google-foo (and some looking in ghidra) I so far found that the system seems to work via functions/properties of the object ("BGSCodeObj" also seems to exist as "_arg_1") which is exposed to the class "BGSExternalInterface". It also seems that the functions which are exposed depends on possibly the path of the swf.

 

What I am essentially looking for is something along the lines of this:

  • Interface/games/*
    executeCommand
  • Looksmenu
  • Pipboy
  • Inventory
    sortItems

 

 

Link to comment
Share on other sites

It depends on what menu is active.

For holotapes (TerminalHolotapeMenu):

 

notifyScripts = function Function() {}
executeCommand = function Function() {}
getHighscore = function Function() {}
setHighscore = function Function() {}
setSaveData = function Function() {}
getSaveData = function Function() {}
getTextReplaceID = function Function() {}
getTextReplaceValue = function Function() {}
registerSound = function Function() {}
playRegisteredSound = function Function() {}
pauseRegisteredSound = function Function() {}
stopRegisteredSound = function Function() {}
playSound = function Function() {}
playLeftAnim = function Function() {} (this plays the "switch left" finger animation on the Pip-Boy)
playRightAnim = function Function() {} (this plays the "switch right" finger animation on the Pip-Boy)
playActionAnim = function Function() {} (this plays the "select" finger animation on the Pip-Boy)
closeHolotape = function Function() {}

 

List courtesy of reg2k

 

Scrivener07 documented some more menus here: https://www.creationkit.com/fallout4/index.php?title=Menus

Link to comment
Share on other sites

Thanks, I was also able to find this https://github.com/reg2k/fo4-vertibird-jump/blob/master/src/VertibirdJump.cpp and ive been trying to well use it as a conceptual framework to look at the disassembled code. I know its probably not whats directly used but i like to believe if they did something that made sense that would be it. (eg check string of path agenst a list).

Link to comment
Share on other sites

If possible. The site doesnt work well for many people.

The problem lies with registration. It looks like the portion of the domain that handles the email confirmation is broken, thus nobody can confirm their email addresses and this is required to make edits.

 

 

Creation Kit could not send your confirmation mail. Please check your email address for invalid characters.

Mailer returned: authentication failure [sMTP: Invalid response code received from server (code: 535, response: Authentication Credentials Invalid)]

 

It shows that even for addresses that are correct.

Edited by AnishaDawn
Link to comment
Share on other sites

To figure out whats exposed to AS3, I had to write some AS3 functions to trace out object data.

It looks something like this

 

Below are some utility functions for dumping information to log files. You can pluck out Debug.as & Utility.as and place them into your own project. Those two files shouldnt have any dependencies besides each other.

 

https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L17-L31

System.Diagnostics.Utility.TraceObject(BGSCodeObj);

https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L73-L76

System.Diagnostics.Utility.TraceDisplayList(stage);

When you run TraceDisplayList make sure the swf is fully loaded by only calling it during the ADDED_TO_STAGE event or later. The class constructor will be too early.

 

The last part of this trick is getting the code into the menu you want to dump info for. I made a standalone swf that can be injected into the display list of any target menu like HUDMenu or PipBoyMenu for example. I did the injection via Papyrus using the xSE UI.Load function. I would listen for the target menu to open via OnMenuOpenClose event and then run UI.Load. In some cases I had to use an OnKeyDown event instead of OnMenuOpenClose because some menus are tricky to catch opening in papyrus.

 

Well once my custom swf was UI.Load'ed into the target display list I would run the utility functions to dump info into the f4se.log

Link to comment
Share on other sites

To figure out whats exposed to AS3, I had to write some AS3 functions to trace out object data.

It looks something like this

 

Below are some utility functions for dumping information to log files. You can pluck out Debug.as & Utility.as and place them into your own project. Those two files shouldnt have any dependencies besides each other.

 

https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L17-L31

System.Diagnostics.Utility.TraceObject(BGSCodeObj);

https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L73-L76

System.Diagnostics.Utility.TraceDisplayList(stage);

When you run TraceDisplayList make sure the swf is fully loaded by only calling it during the ADDED_TO_STAGE event or later. The class constructor will be too early.

 

The last part of this trick is getting the code into the menu you want to dump info for. I made a standalone swf that can be injected into the display list of any target menu like HUDMenu or PipBoyMenu for example. I did the injection via Papyrus using the xSE UI.Load function. I would listen for the target menu to open via OnMenuOpenClose event and then run UI.Load. In some cases I had to use an OnKeyDown event instead of OnMenuOpenClose because some menus are tricky to catch opening in papyrus.

 

Well once my custom swf was UI.Load'ed into the target display list I would run the utility functions to dump info into the f4se.log

I am surprised you can trace the object I thought attempting to trace it would either be an empty output or CTD.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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