Jump to content

Adding Holotape Games


The Madness

Recommended Posts

I've been working on trying to build some new holotape games, and was curious if anyone else has been poking at this problem. I'm able to add new holotape games by creating a .swf in Flash and exporting it to Fallout 4\Data\Programs with the name of an existing holotape game (I've been replacing Red Menace), but there are some limitations that I'm running into. The biggest one is that I can't figure out how to add any persistent data to my game.

 

By looking at the decompiled Red Menace tape, I can see that there is a way of firing an external call that saves the high score in that game:

BGSExternalInterface.call(BGSCodeObj,"setHighscore",GameConfig.GAME_HIGH_SCORE_KEY,GamePersistantData.highScore);

I think my problem is I have no idea how to use that BSGCodeObj; as far as I can tell it's always either null, or a new Object, and nothing seems to get set on it. It seems like there's some dependency injection or something that's adding a bunch of functions and setting values on it, 'cause I don't see it getting built anywhere in the decompiled code.

 

Has anyone else experimented with this who might have some idea how I can add persistent data to my game?

 

Here's a .gif I made the other day while goofing around with this.

 

http://i.imgur.com/6SVcPhf.gif

 

Anyway, more info about this process if anyone's curious:

I followed the instructions for this DOOM for the pip boy mod, but replaced RedMenace with my own swf. All I had to do was build at the same resolution as the other holotape games (826x700) and it seems to Just Work. I've been building in Flash Pro CC; I had hoped I would be able to make stuff with Haxe/Monodevelop, but everything I build in Monodevelop makes Fallout 4 crash instantly. The in-game pip-boy takes keyboard input the same way as any Flash game, but there's no mouse cursor. To see the Red Menace code, I used the Bethesda Archive Extractor to pull the swf out of 'Fallout 4 - Interfaces.ba2' then decompiled it with JPEXS.

Link to comment
Share on other sites

Hey The Madness,

 

Found any solution to this yet? I've also been researching how to save data inside a SWF. Kudos on finding that BGSExternalInterface call! I'll have to mess around with that. I am also pretty positive the BGSCodeObj is injected by the native code; so that might be a blocker right there.

 

Other avenues I've tried that have either crashed the game, killed the execution of further ActionScript, or just simply didn't work:

SharedObject.getLocal

FileStream

Clipboard.generalClipboard.setData

URLRequest (to a localhost server, results in a cross-domain security block)

 

None of those work. SharedObject.getLocal and Clipboard should work in Scaleform, but I guess Bethesda disabled them.

 

 

I'm asking the F4SE devs if its got anything that'll help.

They got back to me, and unfortunately Bethesda moved some stuff around that made it significantly difficult to work through getting Scaleform working. So that most likely won't be a thing until G.E.C.K. is released.

Edited by SombreErmine
Link to comment
Share on other sites

  • 3 months later...

Sorry for the thread necromancy mods, but I figured the info I have to share is relevant. :smile:

With that out of the way, the BGSCodeObj seems to be created in Fallout4.exe (found by looking at the hex in HxD). And looking further into that, all the commands are contained within the EXE file it seems like. I was personally poking around in the TerminalMenu.swf, trying to see if there was an easy way to get text input to work. Alas, it seems like not (well, without adding it in myself, of course).

 

Though I am definitely out of my depth when it comes to ActionScript, it seems like I could add an event listener for the keyboard and get text input that way. I might just avoid this particular rabbit hole, though. :P

Edited by Reneer
Link to comment
Share on other sites

  • 2 years later...

Hi, sorry for the necromancy.

 

I was investigating how to add more options to items within the pipboy inventory menu, and it ultimately ended up at a BGSExternalInterface.call method. I believe the BGSobject is the bridge between flash objects in the .swf and in game objects in the engine. So if you wanted to execute a papyrus script on an in game object through a pipboy menu button press, it would go through that path. Other than that im lost and hoping someone else will have some insight on how exactly to set that up. Any clarification would be greatly appreaciated.

Link to comment
Share on other sites

  • 3 years later...

I will not apologize for "necro-ing" an old post, I think it is a great thing to continue an old post rather than trying to find a new post!

 

Does anyone have any more information on this?

 

Or even download links for new holotape games?

Edited by Yeazzal
Link to comment
Share on other sites

  • Recently Browsing   0 members

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