jfmherokiller Posted March 13, 2021 Share Posted March 13, 2021 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/*executeCommandLooksmenuPipboyInventorysortItems Link to comment Share on other sites More sharing options...
niston Posted March 14, 2021 Share Posted March 14, 2021 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 More sharing options...
jfmherokiller Posted March 14, 2021 Author Share Posted March 14, 2021 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 More sharing options...
jfmherokiller Posted March 20, 2021 Author Share Posted March 20, 2021 I will also say the reason I wanted the list was so i could see what functions are available for the console because I wanted to possibly make a version of this mod for fallout 4 https://www.nexusmods.com/newvegas/mods/70801 so far im only focusing on console history. Link to comment Share on other sites More sharing options...
scrivener07 Posted March 21, 2021 Share Posted March 21, 2021 It takes a lot of man power to get stuff like this documented and verified. If you can pin down the function parameters for these then it would be a good community service to note them on the pages. https://www.creationkit.com/fallout4/index.php?title=Console If possible. The site doesnt work well for many people. Link to comment Share on other sites More sharing options...
AnishaDawn Posted March 28, 2021 Share Posted March 28, 2021 (edited) 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 March 28, 2021 by AnishaDawn Link to comment Share on other sites More sharing options...
scrivener07 Posted March 29, 2021 Share Posted March 29, 2021 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 More sharing options...
jfmherokiller Posted April 1, 2021 Author Share Posted April 1, 2021 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.logI 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 More sharing options...
Recommended Posts