uriadin Posted February 12, 2023 Share Posted February 12, 2023 I have been working on a portion of an overall mod and this specific portion converts the game from using a Caps Currency based economy to one that heavily relies on a more realistic trade/bartering system. To accomplish this I needed to edit the SWF files, and was specifically working on the Bartermenu one (originally was editing vanilla to see what actionscript entailed and realized it was pretty simple and moved to FallUI because I wanted to incorporate that in to the overhaul). However, I was hitting quite the snag when it came to editing certain Actionscript files and unintended consequences would arise that required reverting to a version in which I DID NOT TOUCH specific AS files at all within JPEXS (they have been hit or miss). After days of attempting to find a solution I attempted to re-write the specific AS file in Adobe CC, save the script, then re-import the "replacement" in to JPEXS and it seems that it is functioning correctly. But... I am curious if this is a method that others that have touched the AS in the files have found pretty sound, if others have similar issues, or if I am barking up the wrong tree still and this was a fluke success that will possibly bite me in the rear further down the line as I make more changes, and if there is another more reliable method that anyone knows of. I understand that JPEXS compiler is "experimental" and it leaves me hesitant to claim reliability, and the programming aspect of this isn't my biggest concern but the application order and reliability are what make me nervous that I am going to end up failing. Any advice, comments, etc. would be greatly appreciated from anyone with more experience editing the SWF files. Thanks in advance. Link to comment Share on other sites More sharing options...
LarannKiar Posted February 12, 2023 Share Posted February 12, 2023 (edited) You shouldn't use JPEXS for editing ActionScripts. Adobe Flash and Animate CC are much more suitable for this (I use Animate CC). Here are the decompiled interface files for Fallout 4 by Scrivener07. Just open BarterMenu.fla (Macromedia flash project file) to start editing. Publish it as .swf with Animate CC (and don't import the scripts to JPEXS). By the way, which ActionScript are you trying to edit? Edited February 12, 2023 by LarannKiar Link to comment Share on other sites More sharing options...
uriadin Posted February 12, 2023 Author Share Posted February 12, 2023 Thank you so much for the decompiled interface files link.I was working on the main Bartermenu script, doing some changes that better represent a value "balance" view instead of the caps transfer view and adding short replies/opinions instead of the player and container caps numbers and icons.What would happen, no matter what I changed in that specific file, is that the quantity slider would fail to kick in, even if it was just a simple alpha change and even if I undid all changes, the compiled file would be faulty. I will say that I have made further changes by my above method of writing the code in CC, saving the script, then importing an overwrite in JPEXS and it has continued to compile perfectly without the issues, but the safer bet does seem to be for me to learn Animate CC and do it that way because trust in the compiler is still shot. Really appreciate your comment and I will grab those decompiled scripts and begin the process of doing it that way. Also, just to beat a dead horse, I really appreciate it. Finding info on this anywhere is like pulling teeth outside of one post online somewhere for a different game that mentioned doing it all in P-code which would leave me with a nervous breakdown and possibly Amish, so Thank you! Link to comment Share on other sites More sharing options...
RaidersClamoring Posted February 13, 2023 Share Posted February 13, 2023 "...was editing vanilla to see what actionscript entailed and realized it was pretty simple..."Lol, you clearly have some kind of gift then because every time I get into that mess I end up with light nerve damage. Good on ya.I never rewrote any of the SWFs but I do have somewhat of a decent orientation around the scaleform infrastructure at this point. I usually go the Papyrus route of UI.Get(), UI.Set() and UI.Invoke(). If you think you can get away with using this instead it might be a way forward (if you are simply hiding a text field for instance) . You would then rely on OnMenuOpen and such events.Do note that while Scaleform uses actionscript, it's an Autodesk Scaleform version of actionscript that has a few limitations as well as some unique extensions. Here's the one piece of documentation that exists out there. Specifically link two will be of interest.https://help.autodesk.com/view/SCLFRM/ENU/https://help.autodesk.com/view/SCLFRM/ENU/?guid=__scaleform_help_flash_support_html Link to comment Share on other sites More sharing options...
uriadin Posted February 14, 2023 Author Share Posted February 14, 2023 "I usually go the Papyrus route of UI.Get(), UI.Set() and UI.Invoke(). If you think you can get away with using this instead it might be a way forward (if you are simply hiding a text field for instance) . You would then rely on OnMenuOpen and such events."I have looked very slightly in to that and believe it might be useful for certain elements at some point as well, thanks for the advice. I wanted to update after finally getting the files linked above and digging through them, these are a perfect starting point to do what I need without worrying about compiling issues. So very glad I was linked to those, hopefully all goes well from here forward. Thanks to you guys for the help. Link to comment Share on other sites More sharing options...
Recommended Posts