Enable Fake Console on Retail BF1

Started by Dark_Phantom, August 05, 2022, 04:04:24 PM

Previous topic - Next topic
August 05, 2022, 04:04:24 PM Last Edit: February 13, 2024, 04:28:41 PM by Dark_Phantom
What, you thought BF1 was dead? Not yet!

This tutorial will be a quick "How-To" on how to patch the fake console in YOUR game.  Few downloads (except for a hex editor and the mod tools), nothing too complicated.  I've posted other tutorials like this but I hope this one will be more practical.

Things you need:
1.) The SWBF1 Common/Shell Builders that I made in the downloads section
2.) The 1.2 patch of the game (Steam version will not work for this)
3.) A hex editor, such as XVI32 or Hexinator or PSPad or 010 Editor... there's 500 good options for this.
4.) Willingness to read directions

Step 1.)
This is probably the hardest step.  You're going to need the common/shell builders I made here: http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=1552
Navigate to Common\Scripts\ifs_pausemenu.lua.  This file can be opened in something like Notepad or any text editor.
Search for "this.buttons.console.hidden" (without quotes)
Put two dashes in front of that line like this:
--this.buttons.console.hidden = gDemoBuild or gFinalBuildSave file, and navigate back to the main folder of the builder. 
Run MungeCommon.bat.  When it is finished, you're going to take the common.lvl which was created in _LVL_PC\Common\ENG\Common.lvl and replace the one in your games folder with it. (Something like C:\Lucasarts\Star Wars Battlefront\Gamedata\_LVL_PC\COMMON\ENG\common.lvl)

Step 2.)
Open up your hex editor and use it to open Battlefront.exe.  Once again, this part will only work on the 1.2 SWBFspy patch. Use your hex editors "Go To" function and enter 0x24a3c (or just 24a3c, if it allows).  This should navigate you to a few bytes like this:
0f 84 b9
Change it to
0f 85 b9

Technical reason: This allows a bypass of the console write instruction anytime it is accessed.  Essentially I changed a "jump if equal" to "jump if not equal" once I found a good place to put my change in as seamless as possible.

Step 3.)
Run your game and enter into any match.  You should be able to run the commands "invincible" and "unlimitedammo" without a crash.  In my experience, in case you were trying to be an expert hacker, this stuff generally does not work online, and can cause your game to desync and/or crash.

OK, so there's some stuff that's in SPTest that's not in the base game or doesn't work right.  Some stuff does not exist at all in the executable. A command like RenderCollision will not work because at compile time the game has already stripped out the debug renderers.  The command will do nothing.  This was wrong, I forgot at the time that "RenderCollision" only applies in freecam.  It actually does work.

One more cool thing, if you want to prove you're a top of the line hacker.  At 0x29fe9Ch exists a string "debugmenu" that the console menu uses to append to the commands.  Sounds boring right?  Change it to "ai" padded with 0's where the original text was.  When you enter the Fake Console now, the AI commands will populate.  The best ones are camup and camdown, which finally make my dream a reality of a real, accessible spectator mode in BF1.  Most of the others do not work because they require the debug actions or a console input to actually set up correctly.

Good luck and see you on the front!
The BOBclan:  A Rich History

Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.