Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

TeraLauncher 100.02: Advanced Game Launcher with Tauri.js

Newbie Spellweaver
Joined
May 9, 2014
Messages
56
Reaction score
31
Location
France
tera - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


Key Features:
  • Developed with Tauri.js for optimal performance and reduced memory footprint
  • Multilingual(EUR,FRA,RUS,GER) user interface with integrated translation system
  • Efficient and secure inter-process communication between launcher and game
  • Optimized memory management, ensuring non-interference with game performance
  • Advanced update system with access control (currently reserved for servers)
  • Modern design with responsive user interface and smooth animations(Bye bye bluehole launcher ^^)
  • Secure authentication and user privilege management
  • Intelligent game file verification with cache system for rapid updates
  • Game launch and monitoring with event handling (startup, crash, exit)

This one in zip file is only for Tera Starscape server.


To use the Launcher on Your Server or locally, you must download the source code​


//// SOURCE CODE IS HERE ////


⛑️ Read the following carefully pls 👇👇 ⛑️



Table of Contents

  • Prerequisites
  • Installation
  • Configuration
  • Usage
  • Development
  • Troubleshooting

Prerequisites


Before you begin, ensure you have the following installed:
  • (latest stable version)
  • (v14 or later)
  • A C++ compiler (e.g., with C++ workload on Windows, or GCC on Linux)

Installation


1. Install npm dependencies:
Code:
npm install

2. Install Rust dependencies:
Code:
cargo build

Configuration


1. Locate the config.json file in the teralib\src\config\config.json . It should contain the following variables:
Code:
{
    "LOGIN_ACTION_URL": "http://SERVERIP-URI/tera/LauncherLoginAction",
    "HASH_FILE_URL": "http://SERVERIP-URI/tera/launcher/hash-file.json",
    "FILE_SERVER_URL": "http://SERVERIP-URI/public",
    "SERVER_LIST_URL": "http://SERVERIP-URI/tera/ServerList.json?lang=en&sort=3"
  }


Fill in the values for each variable:

  • LOGIN_ACTION_URL: Set this to the URL for the launcher login action (e.g., )
    HASH_FILE_URL: Set this to the URL that provides the hash file for integrity checks that was generated with the launcher. (e.g., ). (You have to be an admin with Privilege set to 3 to be able to see the generation button in the launcher)
    FILE_SERVER_URL: Set this to the URL of your file server (e.g., for local development), you absolutely must create a “files” folder and put all your game client files to be updated there for it to work.
    SERVER_LIST_URL: Set this to the URL that provides the list of available servers. check the code below
Ensure these URLs are accessible and correctly configured for your TERA server setup.
Save the .env file after making your changes.
Note: The actual values for these URLs will depend on your specific TERA server configuration. Make sure to use the correct URLs provided by your server administrator.


SERVER LIST JSON :

JSON:
{

"servers": [

{

"id": 2800,

"name": "Servername",

"category": "<b><font color=\"#FFA500\">PvE</font></b>",

"title": "Servername",

"queue": "No",

"population": "<font color=\"#00ff00\">High</font>",

"address": "ServerIP",

"port": 7801,

"available": 1,

"unavailable_message": "Unable to access the server at this time",

"host": null

}

],

"sort_criterion": 2

}


Important Notes:
You can add as many servers as needed in the "servers" array.
Make sure to replace values like "ServerIP", "Servername", etc., with your own information.
The "sort_criterion" field determines the sorting order of servers. Adjust its value according to your needs.


Usage


To run the application:

1. In development mode:
Code:
npm run tauri dev

2. To build for production:
Code:
npm run tauri build

3. The built application will be in the `src-tauri/target/release` folder.


Features

  • Custom login system for TERA
  • File integrity checking
  • Server list retrieval
  • Multi-language support
  • Automatic game updates

Development

  • The frontend code is located in the src directory.
  • The Rust backend code is in the src-tauri directory.
  • The teralib directory contains Rust libraries specific to this project.

The teralib folder contains:

A custom Rust library for TERA-specific functionality in the launcher. It typically includes:
  • Rust source code for TERA-specific features
  • Modules for game management
  • Functions for server interaction
  • Game-related data structures

Important: The teralib folder contains critical components for the proper functioning of the launcher and the game. Do not modify its contents unless you are an experienced developer with in-depth knowledge of the system. Incorrect modifications can lead to launcher malfunctions or game compatibility issues.

To add new features:
1. Modify the appropriate files in the frontend or backend.
2. Use Tauri’s API for frontend-backend communication.
3. Update the `config.json` file if new variables are needed.


Good to Know


This section provides insights into some key features of the launcher:

1. Hash File Generation System
When you click the “Generate Hash File” button:
  • The launcher scans all game files in the specified directory
  • It calculates a unique hash (e.g., SHA-256) for each file
  • These hashes are stored in a file, typically named “hash-file.json”
  • This file is used to verify game file integrity and identify which files need updating

2. Update System
The update process works as follows:
  • The launcher compares local file hashes with those from the server
  • Only files with different hashes are downloaded, saving bandwidth
  • A caching system is used to optimize the update process:
  • Information about processed files (hashes, timestamps) is stored locally
  • This cache helps avoid unnecessary checks and downloads for unchanged files
  • The cache is typically stored in a file named “file_cache.json”
3. Login System
  • The launcher uses a custom login system specific to your TERA server
  • Login credentials are securely transmitted to the server specified in the config.json file
  • Upon successful login, the launcher receives authentication information needed to start the game

4. Server List
  • The launcher fetches the list of available game servers from a URL specified in the config.json file
  • This allows for dynamic server lists that can be updated without modifying the launcher itself

Understanding these systems can help you better utilize the launcher and troubleshoot any issues that may arise. Remember, the internal workings of these systems (especially in the `teralib` folder) should not be modified unless you have expert knowledge of the launcher’s architecture.


Troubleshooting
  • If you encounter issues with Rust dependencies, try running `cargo clean` followed by `cargo build`.
  • For Node.js related issues, delete the `node_modules` folder and run `npm install` again.
  • Ensure your firewall isn’t blocking the application’s network access.
  • Check the application logs for detailed error messages.
  • Verify that all URLs in the `config.json` file are correct and accessible.
I create a base, now it's up to you my friends to customize it as you wish, but here you have everything you need to create a custom launcher for your own server.
 

Attachments

Last edited:
Any update on the release?
Sorry for the wait guys, I've been away on IRL business. Now I'm back to organizing the code, I'm trying to get this done quickly. On the other hand, I guarantee it won't be super super clean, but it'll be functional, so if you have any improvements to make, feel free ^^.

The first post has been modified, enjoy!


Oh, I forgot, thanks to you P5yl0, it's mainly thanks to you that I've been able to make progress on this project.
 
Last edited:
How would this work with HSDN api for tera 100? I am not sure what to place for the login action url. There is no launcherloginaction file
 
Last edited:
So I put the launcher.js in place thst it can be accessed from internet?


I have the .env set with links to the launcher.js file hash-file.json and serverlist.json but i can not login it also does not say the server is up. What did I miss?

I'd just like to ask you a few questions. Have you ever successfully launched a tera server with TERA API nodejs? Have you ever managed to configure the basic launcher provided? Do you know what an API is? Because I've explained almost everything above. and hsdn has also detailed everything here tera-api-nodejs , my launcher just needs the . and for it to work you need to understand what an api is and how it works.

 

I'd just like to ask you a few questions. Have you ever successfully launched a tera server with TERA API nodejs? Have you ever managed to configure the basic launcher provided? Do you know what an API is? Because I've explained almost everything above. and hsdn has also detailed everything here tera-api-nodejs , my launcher just needs the . and for it to work you need to understand what an api is and how it works.

Yes I have a server I have made custom edits in a tera server I have never tried doing anything like this before and am trying to understand how to do it which is why I'm asking. If you don't want to give support just say you don't want to give support.
 
Last edited:
Please note that at the moment TERA API officially does not support output of server list in JSON format.

But test support via update is available here.
 
Last edited:
Yes I have a server I have made custom edits in a tera server I have never tried doing anything like this before and am trying to understand how to do it which is why I'm asking. If you don't want to give support just say you don't want to give support.
thank you for answering my question, now I can answer yours. First of all, the .env asks for this information:

  1. LOGIN_ACTION_URL: (e.g., ), this is the one from tera-api-nodejs, so it will always be http://your_webserver/tera/LauncherLoginAction
  2. HASH_FILE_URL: (e.g., ). You'll need to generate this from the launcher and place it on your web server.
  3. FILE_SERVER_URL: (e.g., ), url of your local server, where the client files will be located, I just forgot to mention one thing, you'll need to have a folder called “files”, which is where you'll put all your update files.
  4. SERVER_LIST_URL: the url of the serverlist, the serverlist.json must be created manually if you don't know how to use the API to manage it dynamically.
If you want everything to go smoothly, then I advise you to take the time to understand hsdn 's tera-api nodejs, especially what's in launcher.js, so this:

JavaScript:
function apiRequest(action, params) {
    var response = null;

    $.ajax({
        url: “/tera/” + action + “?ts=” + Date.now(),
        method: params ? “post” : “get”,
        data: params,
        async: false,
        success: function(data) {
            response = data;
        }
    });

    return response;
}

So to answer your question, the .env doesn't ask for launcher.js at all, just what I quoted above
 
thank you for answering my question, now I can answer yours. First of all, the .env asks for this information:

  1. LOGIN_ACTION_URL: (e.g., ), this is the one from tera-api-nodejs, so it will always be http://your_webserver/tera/LauncherLoginAction
  2. HASH_FILE_URL: (e.g., ). You'll need to generate this from the launcher and place it on your web server.
  3. FILE_SERVER_URL: (e.g., ), url of your local server, where the client files will be located, I just forgot to mention one thing, you'll need to have a folder called “files”, which is where you'll put all your update files.
  4. SERVER_LIST_URL: the url of the serverlist, the serverlist.json must be created manually if you don't know how to use the API to manage it dynamically.
If you want everything to go smoothly, then I advise you to take the time to understand hsdn 's tera-api nodejs, especially what's in launcher.js, so this:

JavaScript:
function apiRequest(action, params) {
    var response = null;

    $.ajax({
        url: “/tera/” + action + “?ts=” + Date.now(),
        method: params ? “post” : “get”,
        data: params,
        async: false,
        success: function(data)
[/QUOTE]
Thank you for this. When i press generate hash it just says generating hash and never finishes
 
Last edited:
Update for TERA API to support this Launcher

Added a support for this launcher to the TERA API, allowing you to automatically generate a server list (serverlist.json).

Available here: (v2)

To install, unzip the contents of the archive into your tera-api directory, replacing the existing files.
Make a backup of your src directory before installation!

The update adds a new endpoint, which will be available at the link:
Code:
http://IP:PORT/tera/ServerList.json?lang=en&sort=3
It must be specified for SERVER_LIST_URL in .env file in the tera-rust-launcher/teralaunch/.

Note: At the moment I am sharing this update for testing, so it is not yet included in the main TERA API repository.
 
Last edited:
I have tested and I am not getting a server list in the launcher
the serverlist is requested at server selection, if your json serverlist isn't good you won't be able to get to character selection. So it's not the launcher that asks for the serverlist, but rather the game server. The launcher just acts as a relay between the game client and the game server. Unless I'm mistaken, you could correct me, but that's what I understand. ^^
 
I have tested and I am not getting a server list in the launcher

The server list only shows at server selection (In-Game), just like TheNak said.

In the debug version of the launcher, you can see which info is retrieved from the account itself.

I made a little batch script to automatize the build process of the launcher

Nothing complicated, no error handling but in my tests it works.

First of all, Install NodeJS and Rust then create a file something.cmd and put the following content in it.

Code:
@echo off
git clone https://github.com/TheNak976/tera-rust-launcher
cd tera-rust-launcher/teralaunch && npm install && cd ..
cd teralib && cargo build && cd ..\teralaunch && notepad .env
echo Press enter to continue...
pause >nul
npm run tauri build && start "" "src-tauri\target\release"
echo done.
pause

Your .env file should be something like this,

Code:
LOGIN_ACTION_URL=http://SERVERIP-URI/tera/LauncherLoginAction
HASH_FILE_URL=http://SERVERIP-URI/tera/launcher/hash-file.json
FILE_SERVER_URL=http://SERVERIP-URI/public/files/
SERVER_LIST_URL=http://SERVERIP-URI/tera/ServerList.json?lang=en&sort=3

Copy teralauncher.exe and put it to the root folder of your TERA Client and that's all.

But i have a couple of things that isn't working properly (maybe i did something wrong)

In the first launch i got the following errors,

When i try to log in, that error message appear,

1725047392211 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


Seconds later it log in successfully but then here's where comes the second error,

1725048458186 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


I found that the second error is because the file config.ini is not present in the same folder as the launcher (Wonder if it have to be generated automatically by the launcher or copy it from the repo). But I just copy the same config.ini file from \tera-rust-launcher\teralaunch\config.ini and the error disappears, then in the launcher settings i set the correct path of the game client.

But here's my headache, i really really don't know why the authentication only works using the launcher from /release folder and not in the client folder, ... it's the same launcher

> When i execute the launcher directly from \teralaunch\src-tauri\target\release and try to log in, its works.
> But if i copy the same launcher to the client root and execute it and try to log in it doesn't work, always prompt the same error as the first picture

Any tips? TheNak

Thanks in advance
 
Last edited:
The server list only shows at server selection (In-Game), just like TheNak said.

In the debug version of the launcher, you can see which info is retrieved from the account itself.

I made a little batch script to automatize the build process of the launcher

Nothing complicated, no error handling but in my tests it works.

First of all, Install NodeJS and Rust then create a file something.cmd and put the following content in it.

Code:
@echo off
git clone https://github.com/TheNak976/tera-rust-launcher
cd tera-rust-launcher/teralaunch && npm install && cd ..
cd teralib && cargo build && cd ..\teralaunch && notepad .env
echo Press enter to continue...
pause >nul
npm run tauri build && start "" "src-tauri\target\release"
echo done.
pause

Your .env file should be something like this,

Code:
LOGIN_ACTION_URL=http://SERVERIP-URI/tera/LauncherLoginAction
HASH_FILE_URL=http://SERVERIP-URI/tera/launcher/hash-file.json
FILE_SERVER_URL=http://SERVERIP-URI/public/files/
SERVER_LIST_URL=http://SERVERIP-URI/tera/ServerList.json?lang=en&sort=3

Copy teralauncher.exe and put it to the root folder of your TERA Client and that's all.

But i have a couple of things that isn't working properly (maybe i did something wrong)

In the first launch i got the following errors,

When i try to log in, that error message appear,

View attachment 266107

Seconds later it log in successfully but then here's where comes the second error,

View attachment 266110

I found that the second error is because the file config.ini is not present in the same folder as the launcher (Wonder if it have to be generated automatically by the launcher or copy it from the repo). But I just copy the same config.ini file from \tera-rust-launcher\teralaunch\config.ini and the error disappears, then in the launcher settings i set the correct path of the game client.

But here's my headache, i really really don't know why the authentication only works using the launcher from /release folder and not in the client folder, ... it's the same launcher

> When i execute the launcher directly from \teralaunch\src-tauri\target\release and try to log in, its works.
> But if i copy the same launcher to the client root and execute it and try to log in it doesn't work, always prompt the same error as the first picture

Any tips? TheNak

Thanks in advance
Thx my friend, i will fix it ^^

The server list only shows at server selection (In-Game), just like TheNak said.

In the debug version of the launcher, you can see which info is retrieved from the account itself.

I made a little batch script to automatize the build process of the launcher

Nothing complicated, no error handling but in my tests it works.

First of all, Install NodeJS and Rust then create a file something.cmd and put the following content in it.

Code:
@echo off
git clone https://github.com/TheNak976/tera-rust-launcher
cd tera-rust-launcher/teralaunch && npm install && cd ..
cd teralib && cargo build && cd ..\teralaunch && notepad .env
echo Press enter to continue...
pause >nul
npm run tauri build && start "" "src-tauri\target\release"
echo done.
pause

Your .env file should be something like this,

Code:
LOGIN_ACTION_URL=http://SERVERIP-URI/tera/LauncherLoginAction
HASH_FILE_URL=http://SERVERIP-URI/tera/launcher/hash-file.json
FILE_SERVER_URL=http://SERVERIP-URI/public/files/
SERVER_LIST_URL=http://SERVERIP-URI/tera/ServerList.json?lang=en&sort=3

Copy teralauncher.exe and put it to the root folder of your TERA Client and that's all.

But i have a couple of things that isn't working properly (maybe i did something wrong)

In the first launch i got the following errors,

When i try to log in, that error message appear,

View attachment 266107

Seconds later it log in successfully but then here's where comes the second error,

View attachment 266110

I found that the second error is because the file config.ini is not present in the same folder as the launcher (Wonder if it have to be generated automatically by the launcher or copy it from the repo). But I just copy the same config.ini file from \tera-rust-launcher\teralaunch\config.ini and the error disappears, then in the launcher settings i set the correct path of the game client.

But here's my headache, i really really don't know why the authentication only works using the launcher from /release folder and not in the client folder, ... it's the same launcher

> When i execute the launcher directly from \teralaunch\src-tauri\target\release and try to log in, its works.
> But if i copy the same launcher to the client root and execute it and try to log in it doesn't work, always prompt the same error as the first picture

Any tips? TheNak

Thanks in advance
It's fixed for the login error, I renamed config.ini to tera_config.ini, so for the moment this config file should be in the same place as the launcher. So now the zip launcher attached to the first post is only for terastarscape. To customize your own locally or for your server, you'll need to download the sources and compile your own according to your server. First post updated
 
Last edited:
Thx my friend, i will fix it ^^


It's fixed for the login error, I renamed config.ini to tera_config.ini, so for the moment this config file should be in the same place as the launcher. So now the zip launcher attached to the first post is only for terastarscape. To customize your own locally or for your server, you'll need to download the sources and compile your own according to your server. First post updated

Thank you, this update resolves all my previously reported issues.

Now i can log in into the launcher and launch the game normally.

But now i have a new issue,

I don't get any server listed at the server lobby,

1725129374510 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums



Using the HT launcher, i got the server list normally (proof that the api is working)

1725129238665 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


I'm getting correctly the server list with the json format

"SERVER_LIST_URL": " "

1725129428304 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


1725129179853 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums


1725130851415 - TeraLauncher 100.02: Advanced Game Launcher with Tauri.js - RaGEZONE Forums
 
Thank you, this update resolves all my previously reported issues.

Now i can log in into the launcher and launch the game normally.

But now i have a new issue,

I don't get any server listed at the server lobby,

View attachment 266188


Using the HT launcher, i got the server list normally (proof that the api is working)

View attachment 266187

I'm getting correctly the server list with the json format

"SERVER_LIST_URL": " "

View attachment 266189

View attachment 266186

View attachment 266190
So your problem is fixed? The serverlist must absolutely be in json format ^^. and what's HT Launcher?
 
Back