Terraria Launcher

Neonalig

Terrarian
This is a simple launcher to allow the user to either launch Modded Terraria or Vanilla Terraria on startup.
Setup is really simple and the files are given in two formats, Batch and Executable.

Batch
Included are three files: a batch file, a readme file, and a text file for fancy box-drawing characters `;)
║═╔╗╠╣╚╝
@Echo off
for /f %%i in ('type "box.txt"') do set "box=%%i"
mode 22,9
color 02
set "vanilla=TerrariaGame.exe"
set "modded=tModLoader.exe"

:menu
cls
echo %box:~2,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~3,1%
echo %box:~0,1% Terraria Launcher %box:~0,1%
echo %box:~0,1% %box:~0,1%
echo %box:~4,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~5,1%
echo %box:~0,1% (V)anilla %box:~0,1%
echo %box:~4,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~5,1%
echo %box:~0,1% (M)odded %box:~0,1%
echo %box:~6,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~1,1%%box:~7,1%
set /p "INPUT=>> "

echo.%INPUT%|findstr /C:"V" >nul 2>&1 && goto launchVanilla
echo.%INPUT%|findstr /C:"v" >nul 2>&1 && goto launchVanilla
echo.%INPUT%|findstr /C:"M" >nul 2>&1 && goto launchModded
echo.%INPUT%|findstr /C:"m" >nul 2>&1 && goto launchModded
goto menu

:launchVanilla
%vanilla%
exit

:launchModded
%modded%
exit
Step 1) Open the "TerrariaLauncher.bat" file and edit the following lines:
Replace: set "vanilla=TerrariaGame.exe"
With: set "vanilla=[TERRARIA EXECUTABLE NAME HERE]"
Replace: set "modded=tModLoader.exe"
With: set "modded=[MOD LOADER EXECUTABLE NAME HERE]"
(just without the [ ] )

Step 2) Navigate to your terraria installation folder (Generally C:\Program Files\Steam\steamapps\common\Terraria\)
Step 3) Paste (/ Extract) the "TerrariaLauncher.bat" and "box.txt" file to the installation folder

Now when you launch the Batch file, it will let you chose to launch Vanilla or Modded Terraria

!!WARNING!! When Terraria inevitably gets updated, the "Terraria.exe" file will be replaced. Just repeat Steps 1-4 again ;)

Executable
Included is a single executable file (a compiled batch script with embedded box-drawing characters `:D), and a readme file
Step 1) Navigate to your terraria installation folder (Generally C:\Program Files\Steam\steamapps\common\Terraria\)
Step 2) Rename your default terraria executable to "TerrariaGame.exe"
Step 3) Rename your ModLoader executable to "tModLoader.exe"
Step 4) Paste the Executable in this archive to the terraria installation folder
Now when you launch Terraria through steam, it will run the launcher first.
!!WARNING!! When Terraria inevitably gets updated, the "Terraria.exe" file will be replaced. Just repeat Steps 1-4 again ;)


Installation is relatively simple, and the steps are included in a readme file, translated into out in "Simplified" English (for the non-initiated xD)
(Downloads are attached to the thread)
 

Attachments

  • TerrariaLauncherBatch.zip
    1.2 KB · Views: 1,780
  • TerrariaLauncherExecutable.zip
    110.2 KB · Views: 2,445
This is a VERY good(and fancy) script, but i wanna note an alternative that is a bit simpler and doesn't require replacing Terraria.exe(I only tested this on the Steam Version):

1) Go to your Terraria installation folder and create a new folder where you will put tModLoader.(You can rename the tModLoader Terraria.exe to tModLoader.exe or anythin that you want)
2) After that you open Steam and click "Add Game" on the bottom left and select "Add a Non-Steam Game".
3) In the selection box press "Browse" and navigate to your tModLoader installation and select your tModLoader executable
4) Click "Add Selected Programs" and you're done

Now you have a shortcut to tmodloader in steam.
 
This is a VERY good(and fancy) script, but i wanna note an alternative that is a bit simpler and doesn't require replacing Terraria.exe(I only tested this on the Steam Version):

1) Go to your Terraria installation folder and create a new folder where you will put tModLoader.(You can rename the tModLoader Terraria.exe to tModLoader.exe or anythin that you want)
2) After that you open Steam and click "Add Game" on the bottom left and select "Add a Non-Steam Game".
3) In the selection box press "Browse" and navigate to your tModLoader installation and select your tModLoader executable
4) Click "Add Selected Programs" and you're done

Now you have a shortcut to tmodloader in steam.
Good alternative surprised I didn't think of that XD, however, the other reason I made this is because it doesn't have to be used exclusively for Terraria. It can be used for any two executables (with only two lines needing to be replaced), and any engine - So you don't have to be using exclusively steam. Thanks for the comment though `;)

(P.S. You have the right to say: "first" `:p)
 
Good alternative surprised I didn't think of that XD, however, the other reason I made this is because it doesn't have to be used exclusively for Terraria. It can be used for any two executables (with only two lines needing to be replaced), and any engine - So you don't have to be using exclusively steam. Thanks for the comment though `;)

(P.S. You have the right to say: "first" `:p)

Yes i did that too at first and i had a verxy simmilar script, but it was always a hassle when Terraria was updated
 
Back
Top Bottom