Jump to content

Epic Games Modding - A Techical Solution


Nakaka

Recommended Posts

 

It worked the first time like a charm, now everytime I boot it gets stuck in offline mode.

Server issues I think. People on battlefront reddit are reporting issues like that( and so am I).

 

Try going to collections then click on connect in top left corner.

 

 

Also, I modified a solution for myself which does some checks and error checking to make the game launches quicker if you have origin and epicgames launched. If you are not logged in, your game will fail to launch and you will see that in output.

 

If anyone wants it, here it's.

Paste this into notepad, save as STAR WARS BATTLEFRONT II.cmd (make sure you select ALL FILES in save as type when you are saving!).

@ECHO OFF

echo You must be signed into Origin and EpicGamesStore for this to work.
echo(

FOR /F "usebackq tokens=3*" %%A IN (`reg query "HKLM\SOFTWARE\EA Games\STAR WARS Battlefront II" /v "Install Dir"`) DO (
    set installdir=%%B
    )
FOR /F "tokens=2* skip=2" %%A IN ('reg query "HKLM\SOFTWARE\WOW6432Node\Electronic Arts\EA Core" /v "EADM6InstallDir"') DO (
    set origindir=%%B
	)
FOR /F "tokens=2* skip=2" %%A IN ('reg query "HKLM\SOFTWARE\WOW6432Node\EpicGames\Unreal Engine" /v "INSTALLDIR"') DO (
	set egsdir=%%B
	)

SETLOCAL enabledelayedexpansion
qprocess | find /i "origin.exe" >nul || (echo( & echo Starting Origin client ... & start "" "%origindir%\Origin.exe")
qprocess | find /i "epicgames" >nul || (echo( & echo Starting EpicGamesLauncher ... & start "" "%egsdir%\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe")
qprocess | find /i "starwarsbat">nul
if not errorlevel 1 ( 
echo( & echo Game is already running. & goto eof
) else if errorlevel 1 ( 
echo( & echo Launching Star Wars Battlefront 2 ... & "%origindir%\EALink.exe" "link2ea://launchgame/MtMassive?AUTH_PASSWORD=0&AUTH_TYPE=exchangecode&epicusername=&epicuserid=&epiclocale=en&theme=sws&platform=epic&Hotfix=go& -datapath %%22%installdir%\ModData%%22" & goto check_launch)

:check_launch
timeout 10 /nobreak >nul
qprocess | find /i "starwarsbat">nul
if errorlevel 1 ( 
echo( & echo Game can't launch. You are probably not logged in to your accounts on Origin and EpicGames. & echo( & echo You need to launch Origin and EpicGamesLauncher manually, login in and make sure your & echo( & echo credentials are saved, so you can login automatically when you launch your clients. Then you & echo( & echo will be able to launch the game successfully.
) else if not errorlevel 1 (
echo( & echo Game launched. Your game should appear soon.
)
goto eof

:eof
echo(
pause

 

So I tried the code and it says:

 

Game can't launch. You are probably not logged in to your accounts on Origin and EpicGames.
You need to launch Origin and EpicGamesLauncher manually, login in and make sure your
credentials are saved, so you can login automatically when you launch your clients. Then you
will be able to launch the game successfully.
-----------------------------------------------------------
What do I need to do? I did launch Origin and Epic manually and it doesn't work. Do I need to change something in the code?
Link to comment
Share on other sites

  • Replies 113
  • Created
  • Last Reply

Top Posters In This Topic

It was working yesterday with two mods but now everytime I open the game, only one mod works. I repeated evry thing multiple times but it still doesnt work. I also unapplied the mod but it was still ingame. can someone help?

Link to comment
Share on other sites

I had my hand at this yesterday and found a solution. This solution assumes you already have Frosty Mod Manager, and have attempted to launch the game with your imported mods. (this creates a necessary "ModData" folder)

 

Backstory

Recently EA decided to update Origin to require the use of EpicGamesLauncher.exe to launch Battlefront II.

Earlier versions of Origin doesn't need EpicGamesLauncher at all. Although nothing's technically preventing you from using the earlier Origin, you cannot play Battlefront II with friends. With the new version of Origin, Origin launches EALink.exe, which talks to EpicGamesLauncher.exe, and will not carry over the "-datapath" required to load mods.

 

Solution Part 1 (Optional? See *Note)

  1. Open CMD.exe (from start menu) and go fullscreen so you can see it better
  2. Paste (without quotes): "WMIC path win32_process get Caption,Commandline"
  3. Launch Battlefront II from Epic
  4. Press enter inside CMD.exe
  5. Look for EALink.exe in the list. If you see it, you have all the information you need. Copy the whole line to Word/Notepad for reference. You can copy text from CMD.exe by selecting the text, then right-clicking it.

If you don't see EALink.exe in the list, it isn't running, so you pressed enter too late/early.

 

Solution Part 2

  1. Open notepad.exe (from start menu) and paste this line of text to it (INCLUDING quotes):

    "[PATH_TO_ORIGIN]\EALink.exe" "link2ea://launchgame/MtMassive?AUTH_PASSWORD=[AUTHPASS]&AUTH_TYPE=exchangecode&epicusername=[EPICUSERNAME]&epicuserid=[EPICUSERID]&epiclocale=en&theme=sws&platform=epic&Hotfix=go& -datapath %22[DATAPATH]%22"

  2. Replace [AUTHPASS], [EPICUSERNAME], and [EPICUSERID] with the information you gathered from CMD.exe earlier.
  3. Replace [DATAPATH] with something like: C:\Games\Origin\STAR WARS Battlefront II\ModData
  4. Replace [PATH_TO_ORIGIN] with something like: C:\Program Files (x86)\Origin
  5. Open another CMD.exe (from start menu)
  6. Paste the notepad's text into CMD.exe (right-click -> paste)
  7. Press enter to launch the game.

*Note: It might be that [EPICUSERNAME] and [EPICUSERID] can be blank, and [AUTHPASS], though necessary, can be 0... epic.

 

 

Solution #1

Running this script accomplishes the same thing as Solution #2.

You must bypass any anti-virus prompts.

If you downloaded with Firefox, you must un-hide Windows file extensions, then rename the extension to ".cmd" instead of ".cmd.html"

 

Solution #2

  1. Open Epic & Origin
  2. Open notepad (from start menu) and paste in this line of text (INCLUDING quotes):

    "C:\Program Files (x86)\Origin\EALink.exe" "link2ea://launchgame/MtMassive?AUTH_PASSWORD=0&AUTH_TYPE=exchangecode&epicusername=&epicuserid=&epiclocale=en&theme=sws&platform=epic&Hotfix=go& -datapath %%22DATAPATH%%22"
  3. Replace DATAPATH with something like C:\Program Files (x86)\Origin Games\STAR WARS Battlefront II\ModData
  4. Save the file (to your desktop) as Battlefront.cmd
  5. Double-click Battlefront.cmd to launch the game.

  • If Origin pops up but the game doesn't open, your DATAPATH is probably wrong.
    • There is no backslash at the end.
    • The "%%22" is necessary.
  • If the game still doesn't launch, or you get a error, you have a bad mod. Uncheck all mods and try again.
  • Whenever you uncheck mods within Frosty, you MUST press "►Launch" to apply the changes.

Thanks to Bread for helping me test.

 

 

9 march 2021 still working. thanks man you're genius

Link to comment
Share on other sites

It does only work for one mod. When I launched the game, a text file was created with this error:

 

[0307/155342:WARNING:resource_bundle_qt.cpp(114)] locale_file_path.empty() for locale

 

 

I think I found a solution but its not so pretty:

-enter games files delete ModData folder

-add or delete the mod you want in frosty

-start the game from frosty

-close the game

-Reopen the game from Battlefront.cmd

 

this worked for me

Link to comment
Share on other sites

 

 

It worked the first time like a charm, now everytime I boot it gets stuck in offline mode.

Server issues I think. People on battlefront reddit are reporting issues like that( and so am I).

 

Try going to collections then click on connect in top left corner.

 

 

Also, I modified a solution for myself which does some checks and error checking to make the game launches quicker if you have origin and epicgames launched. If you are not logged in, your game will fail to launch and you will see that in output.

 

If anyone wants it, here it's.

Paste this into notepad, save as STAR WARS BATTLEFRONT II.cmd (make sure you select ALL FILES in save as type when you are saving!).

@ECHO OFF

echo You must be signed into Origin and EpicGamesStore for this to work.
echo(

FOR /F "usebackq tokens=3*" %%A IN (`reg query "HKLM\SOFTWARE\EA Games\STAR WARS Battlefront II" /v "Install Dir"`) DO (
    set installdir=%%B
    )
FOR /F "tokens=2* skip=2" %%A IN ('reg query "HKLM\SOFTWARE\WOW6432Node\Electronic Arts\EA Core" /v "EADM6InstallDir"') DO (
    set origindir=%%B
	)
FOR /F "tokens=2* skip=2" %%A IN ('reg query "HKLM\SOFTWARE\WOW6432Node\EpicGames\Unreal Engine" /v "INSTALLDIR"') DO (
	set egsdir=%%B
	)

SETLOCAL enabledelayedexpansion
qprocess | find /i "origin.exe" >nul || (echo( & echo Starting Origin client ... & start "" "%origindir%\Origin.exe")
qprocess | find /i "epicgames" >nul || (echo( & echo Starting EpicGamesLauncher ... & start "" "%egsdir%\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe")
qprocess | find /i "starwarsbat">nul
if not errorlevel 1 ( 
echo( & echo Game is already running. & goto eof
) else if errorlevel 1 ( 
echo( & echo Launching Star Wars Battlefront 2 ... & "%origindir%\EALink.exe" "link2ea://launchgame/MtMassive?AUTH_PASSWORD=0&AUTH_TYPE=exchangecode&epicusername=&epicuserid=&epiclocale=en&theme=sws&platform=epic&Hotfix=go& -datapath %%22%installdir%\ModData%%22" & goto check_launch)

:check_launch
timeout 10 /nobreak >nul
qprocess | find /i "starwarsbat">nul
if errorlevel 1 ( 
echo( & echo Game can't launch. You are probably not logged in to your accounts on Origin and EpicGames. & echo( & echo You need to launch Origin and EpicGamesLauncher manually, login in and make sure your & echo( & echo credentials are saved, so you can login automatically when you launch your clients. Then you & echo( & echo will be able to launch the game successfully.
) else if not errorlevel 1 (
echo( & echo Game launched. Your game should appear soon.
)
goto eof

:eof
echo(
pause

 

So I tried the code and it says:

 

Game can't launch. You are probably not logged in to your accounts on Origin and EpicGames.
You need to launch Origin and EpicGamesLauncher manually, login in and make sure your
credentials are saved, so you can login automatically when you launch your clients. Then you
will be able to launch the game successfully.
-----------------------------------------------------------
What do I need to do? I did launch Origin and Epic manually and it doesn't work. Do I need to change something in the code?

 

 

 

 

 

 

 

Hey, sorry it took me so long!

 

What Windows version do you have? It works without issues for me on Windows 10 Pro.

 

Have you tried closing EpicGames and Origin then running the script again? Does it work that way?

 

When you open EpicGames or Origin, are you logging in automatically or do you have to input credentials everytime?

 

Please run command line and type "qprocess" without quotation marks. Do you get any output from that command or does it say that command does not exist?

Edited by Compactpl
Link to comment
Share on other sites

  • 2 weeks later...

This solution was working for me, then stopped. I tried to install an older version of Origin, which didn't work, then reinstalled up to date origin to go through my mods one by one with the script and see if any of them were messing with it. Now I get an error in the .cmd saying "the system cannot find the path specified". Origin should be installed in the exact same place it was previously, so I don't understand why it can't find it. Any suggestions?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...