How do i open the console in a shipped game ?

This is very important for my game.

I assume you bind a key in the project settings?

Thanks, i will give it a try.

I have this in my Input.ini and it still won’t work.

[/Script/Engine.InputSettings]
ConsoleKeys=Tilde

And a version i’ve compiled as development build has about the same input file and it works over there.

The console is intended as a development tool and is compiled out in shipping builds as it provides access to a wide array of destructive and undesired commands that you would not want your players to use.

1 Like

So the best option is to create your own console? That makes sense since most in game consoles don’t have access to engine level stuff . Just game related commands.

all consoles have engine level stuff, point of console is debugging. Thing is if console is available to players its usually secured from cheating

When you work on a big online game and someone let a debug build containing console commands get to the hands of players… Ah the horror
cough Tera cough

KK Thanks for the info, In my case i’v just used a umg menu to send the commands to the console, this is just an early release, so i guess i will make a menu for later releases to prevent access to the console.

I was wondering, if shipping package is only 32bit, doesn’t it prevent the game from using more then 4gb of ram?..

Hey Sunbeam,

The link you posted doesn’t seem to work. Could you post the link again and explain how to enable the console again. I’m looking into enabling it on unreal engine 4.

Do you think it’s possible?

Hello!
Here is the permalink to that post: Batman: Arkham City – Enable Console & RCheatManager commands | DEViATTED - PC Game Trainers, Cheats and Mods

The problems are:

  • he was talking about modifying already-built EXEs using Cheat Engine
  • he was talking about UE3, not UE4 (although UE3 and UE4 have the same structure)

I was looking on how to restore the console. Created a function called InitializeConsole in my GameInstance class:

void MyPewPewShooterGameInstance::InitializeConsole()
{
    UWorld* World = ();
    if (!ensure(World != nullptr)) return;
    auto* Viewport = World->GetGameViewport();
    if (!ensure(Viewport != nullptr)) return;

    if (!Viewport->ViewportConsole)
    {
        Viewport->ViewportConsole = static_cast<UConsole*>(UGameplayStatics::SpawnObject(UConsole::StaticClass(), ()->GetGameViewport()));
    }
}

When you call it, you have to make sure that the Viewport already exist on the game world i.e. it won’t work if you call it from inside of the constructor of the game instance because at that point in time viewport is still null in the world.

For now I just call it from BeginPlay of my game mode, which is sufficient enough for now. Dunno what would be the proper place to call it, since everything can change technically: game mode, level, player controller, etc. And I need to make sure that I call by the time ViewPort exists.

1 Like

Wow… forgot I even replied in this topic :slight_smile: Got back here from this post: Enable console in shipping build - #14 by amadeokusch.

Anywayz, in almost all of the UE3 games I found, the Console is there, but “disabled” in the most rudimentary way (by some bool or function that returns true/false). In UE4, Shipping builds are frameworked to exclude the console via #ifdefs, as well as some of the cheats (fly, walk, ghost). I’ve managed to build the Engine in the past (4.21) by removing all of these constrictions and getting a clean 4.21 Shipping with almost everything a Development build has.

But to respond: you have to build the Engine like mentioned above, then identify where the Console and CheatManager are instantiated and “reconstruct” them in your own code. I use ASM ripping from my Shipping with all features on and porting said code to any game, regardless of UE4 version (sure, there are some differences between 4.21, 4.25 and 4.27).

My tables usually contain reconstructed code that’s hooked in place of the nullstubbed cheat commands :slight_smile:

BR,
Sun

1 Like

Hi SB,

Thanks for your previous efforts around console command use in UE3 shipped games. However, looking through your articles/PDFs I cannot see any instruction of how to actually re-enable the console (unless I’ve missed it). Could you please direct me to, or explain how you switched the booleans in such cases? For reference, I’m trying to achieve this in Mirror’s Edge