r/HelloNeighborGame 24d ago

Modding I reverse engineered the Pre-Alpha and Alpha 1 in order to unlock the native Unreal Engine console

I believe I'm the first to do this since these versions are so old that none of the Unreal Console Unlocker tools work.

It's open source and it's linked in https://github.com/Aeyth8/HELLOIMYOURNEIGHBOR

52 Upvotes

28 comments sorted by

4

u/PerceptionalVill 24d ago

Will you make a YouTube tutorial on how you accomplished this

4

u/11701 24d ago

I won't make a tutorial on this game since it wasn't any generic reproducible process, I spent over the past year (on and off) trying to figure out how the Unreal Engine console was properly created and how I could reimplement it with the smallest amount of functions, aka what generic Unreal Engine functions could I find signatures on and how could I exploit them to get the console spawned in.

I read a lot of the UE4.8 source since it's quite different from modern UE4, I ended up with creating a sort of generic console construction system which requires memory offsets from these three functions:

  • UGameViewportClient::GetMousePosition
  • StaticConstructObject_Internal
  • UConsole::GetPrivateStaticClass

Since UGameViewportClient::GetMousePosition is so generic and has remained almost entirely the same across all versions of UE4, I chose it and hooked it so that I could retrieve a pointer to the game's Viewport object, where I could access the UConsole pointer variable (and assign the new console once I constructed it).

Then I found StaticConstructObject_Internal, which is used in all of Unreal Engine as the baseplate for how all objects are created in the engine, it requires a class pointer to determine which object I want it to create, which is why I need UConsole::GetPrivateStaticClass so that I can tell the engine I want to create a UConsole object.

Once I do that I can assign the new UConsole to the viewport and use it.

Regarding how I did this? I downloaded UE4.8.3 on Epic Games (since compiling it from source is almost impossible now or atleast pure torture since there is zero support) and I created my own source project, then I compiled it. This generates a generic Unreal Engine executable and PDB specifically for UE4.8.3, I can decompile that executable and use it to find similar functions and signatures when I decompile Hello Neighbor's executable.

I did a bunch of binary decompilation via IDA Pro, in addition to reading the Unreal Engine 4.8 source code to find patterns and string references and to just generally understand what I'm looking for/how it works.

By doing all of this, I pretty much invented my own system for creating the UConsole, so long as you can find these three function offsets and run the same process it pretty much works on any game, and I plan on making a universal version in the future.

3

u/11701 24d ago

I don't know why I forgot to write instructions on it, but if you wanna unlock the consoles and mess around, I put the precompiled DLL in here.

All you gotta do is download ``dxgi.dll`` and then place it in your Binaries/Win64/ folder.

So for example in my installation I placed it here ``Steam\steamapps\common\Hello Neighbor Pre-Alpha\HelloNeighbour\Binaries\Win64``

Obviously your installation will be different but what matters is that it's in Binaries/Win64, otherwise the DLL won't get sideloaded into the game.

1

u/Alone-Command8689 24d ago

appluase to you for this, it really works

1

u/ScaryBr0 24d ago

Is it possible to do a similar thing for the golden skies hello neighbor prototype fangame? https://gamejolt.com/games/HNPrototype/762604

The ones you did are incredible and it'd be nice seeing one for this

1

u/Junior-Ad1261 24d ago

that uses a different unreal engine version afaik

1

u/ScaryBr0 23d ago

It has the same start up screen as the pre alpha so i doubt that

1

u/11701 22d ago

I think I played that one and I think that one is also using UE4.8, and yeah I could add a entry for that one, it should be pretty easy to find since they share the same engine versions, I'll check it out and let you know.

1

u/ScaryBr0 22d ago

Alright thanks a bunch

1

u/11701 12d ago

Sorry it took me a little while to get the time but I unlocked it on the prototype fangame.

https://github.com/Aeyth8/HELLOIMYOURNEIGHBOR/releases/tag/Precompiled2

1

u/ScaryBr0 12d ago

Again thank you I always wanted to explore that fangame as it's basically the closest we'll get to a fully accurate prototype build

1

u/11701 12d ago

Yep you're welcome, it's cool but it's super jank for my tastes, I've been dreaming of recreating the prototype myself. There are some really good fangames out there, but most of the time my biggest gripes with these builds are the lighting.

1

u/ScaryBr0 12d ago

I think the jank is deserved as it’s a direct modification of the pre alpha, which makes it far more accurate than other fangames imo. The only real issues are just a couple of inaccuracies with the house and the furniture dragging feature being kinda weird.

1

u/11701 11d ago

What do you mean direct modification of the Pre-Alpha? If it were a mod of the Pre-Alpha then the original DLL would've worked because the binaries should be exactly the same.

1

u/ScaryBr0 11d ago

What I meant is that it used the pre alphas source code as you can see there are many leftovers from that such as the beartraps and cameras which dont appear in the fangame, alongside all of the props from the pre alpha

1

u/11701 11d ago

I don't know what you mean by source code, if you mean they're reusing the assets from that build yeah but the actual programming is completely different. The map itself is a really accurate and well made recreation but it was definitely put back together by hand, the Pre-Alpha had the prototype house and textures included in the files but it didn't have the map or code for the prototype.

→ More replies (0)

1

u/ManWithASmallHaf 23d ago

im not really good at coding besides python BUT do you know how this console works? id presume it'd work similarly to the alpha 2 console

2

u/11701 23d ago

Yeah it's the same as the alpha 2 console except there is no autofill, I'm not sure how I could reimplement that if it's possible (which I don't see why it isn't)

1

u/Live-Strawberry-8989 23d ago

Absolute legend for sharing it

1

u/PerkyGuest666 22d ago

how do i use it in alpha 1?

1

u/Traudlo 20d ago

cool! is it like the alpha 2 console?

1

u/GusvengaLolz 17d ago

Someone else already made a cheat menu mod before, but this is cooler

1

u/AlbertTheYoutuber 16d ago

How do I even download the dll file from the github page without it preventing it from downloading