Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Setting up T4c 1.72-1.73

Status
Not open for further replies.
Newbie Spellweaver
Joined
Nov 25, 2010
Messages
5
Reaction score
0
This is a quick tutorial on how to install the 1.72-1.73 T4C server, if you have the files that are (somewhat) available out there. I WILL NOT PROVIDE ANY FILES, DO NOT ASK.

I have used this process successfully on Windows 7 64-bit. I have written the tutorial afterwards, it MAY contain mistakes. Feel free to ask questions if something does not work. I'm sure the process is not the most efficient, I am not an expert. Specifically, my way to access and edit the database seems poor, I'd love to know a better way. Important thing though, is this works.


===INSTRUCTIONS===

These instructions are for installation on a 64-bit modern system. This was tested specifally on Windows 7 64-bit. Adjustments may be necessary on Windows 10.

You should have a bundle of files, which you should unzip into an accessible folder of your choice. I just called it "T4CStuff".

-Find the folder "T4CServer" that contains "T4C Server.exe". Place that folder directly in C:\ (you will need to edit a few lines if you don't). Rename the folder to exactly "T4CServer" (no space) if its not already.

-Find and run "MinimalSetup.reg". This is not 100% necessary, but it configures a bunch of settings for T4C Server.

-Open C:\T4CServer\T4CServerCP.exe.
-If you want to use the God of Nea client and have the files for it, you will need to change Server Version to 1730, otherwise its 1720 as default
-In the "Network" tab, set the IP as 127.0.0.1
-Leave port as 11677
-REMEMBER THE DATABASE TAB: This tab contains the login info to the 2 databases we will setup later.
-Explore the rest of the options, don't touch things you don't understand

NOTE ABOUT THE "START SERVICE": This opens up T4C Watch as a service. I think it prevents connection from the same PC, so leave it disabled.


Now, we're going to setup the DATABASE tab. For this, you will need to download & install a few things:

-MySQL Connector/ODBC 8.0 (x64 - 64-bit) (mysql-installer-community-8.0.12.0.msi)
-MySQL Connector/ODBC 3.51 (x84 - 32-bit) (mysql-connector-odbc-3.51.30-win32.msi)
-Maria DB 10.2 (x84 - 32-bit) (mariadb-10.2.12-win32.msi)

NOTE: The server seems to communicates exclusively in 32-bit and will fail in 64-bit. Maria DB is the MySQL replacement, which is just better for 32-bit support and for easily installing the databases using the provides .sql sources. Installing both ODBC connector in that order is necessary, the 1st one will communicate with the server, and the 64-bit version will let us connect with a 64-bit program.

To get ODBC 8.0, just download MySQL 8.0 and only install the ODBC option. Install this first, since it will be grayed out if you have installed the 32-bit version first.

Then install ODBC 3.51. Straightforward.

Now, install Maria DB 10.2. This should be rather straightforward. Select UTF8 as your characters. Whatever you setup as your root password, remember it for the next step.

Before continuing, somewhere in your files you should have some SQL structure files, "structure_data.sql" and "structure_user.sql". Find these files and put them directly in C:/. This is needed for the next operations.

Now, go in your Start menu -> Programs, find Maria DB and open MySQL Client (MariaDB 10.2). This is the command line.

It will ask you for the root password you installed Maria DB with, insert it.

Now we're in, we're going to setup both databases. Write ALL the following commands, one after the other.

CREATE DATABASE t4cserver;
CREATE DATABASE t4cuser;

CREATE USER 'customuser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL ON t4cserver.* TO 'customuser'@'localhost';
GRANT ALL ON t4cuser.* TO 'customuser'@'localhost';

USE t4cserver
SOURCE c:/structure_data.sql
USE t4cuser
SOURCE c:/structure_users.sql

QUIT

That should do it. NOTE: Replace "customuser" and "password" by what you desire. THESE ARE THE USER AND PASSWORD YOU HAVE TO SET IN THE DATABASE TAB OF YOUR SERVER, AND IN THE ODBC SETTINGS WE'RE GOING TO DO NEXT.

If you make any mistakes in the command lines, you can use the following commands to help you:

SHOW DATABASES; //This will show you what databases are setup currently.
DROP DATABASE nameofdatabase; //Use to delete a database if you fucked up somehow.

Once all of this is done, when the Maria DB/MySQL service is running, the 2 databases are open and ready to be used. What we need is to establish the mean to connect, which is ODBC.

You'll have to go in Control Panel, Administrative Tools, Data Sources (ODBC).

Before opening it, copy Data Sources (ODBC), so you have two. Rename one 64-bit and one 32-bit.

For the 32-bit one, right-click, properties, and change system32 to sysWOW64. This will now open ODBC with the 32-bit drivers. You will need to use the right shortcut to access the right ODBC drivers.


Now, open Data Sources (ODBC) - 32 bit.

Under "User DSN", click "Add". In the list, find "MySQL ODBC 3.51 Driver" (which we've installed). Click "Finish".
Modify the following:

Data Source Name: T4CServerData
TCP/IP Server: localhost
User: customuser (same as maria db setup)
Password: password (same as maria db setup)
Database: t4cserver (this is the name of the database we created under media db, it should also show up if you just open the list)

Click "Details >>", check "Enable automatic reconnect" and in Character Set, select "utf8".

Click "Test", it should say "Connection successful".


Now, we do this again, add another ODBC connection, slightly different.

Data Source Name: T4CServerUsers
TCP/IP Server: localhost
User: customuser
Password: password
Database: t4cuser

"Enable automatic reconnect" Character Set = "utf8", again.

Test it, it should work.

DO THIS NEXT STEP IF YOU WANT TO ACCESS YOUR DATABASE WITH A 64-BIT PROGRAM AS WE DO LATER IN THIS TUTORIAL

All this done, you can open "Data Sources (ODBC) - 64 bit" and do what we just did all we over again, with MySQL ODBC 8.0 Unicode Driver. Call them T4CServerData64 and T4CServerUsers64. This will NOT be used by the server.

Now is the perfect time to go back in the DATABASE TAB of your "T4CServerCP.exe" if you haven't already,

Server Database
Data Source Name: T4CServerData
Login: customuser (same as ODBC)
Password: password (same oas ODBC)

ODBC Authentification
Data Source Name: T4CServerUsers
Login: customuser (same as ODBC)
Password: password (same oas ODBC)

Table Name: accounts
Account Field: username
Password Field: password

Leave "where" blank.


ONE LAST STEP: You need to learn to access your database. I personally used LibreOffice, which is free. Download it. Then in Programs -> LibreOffice, open LibreOffice Base. Open an ODBC connection, write down the info, and connect to T4CServerUsers64 (yes, 64).

You should see "accounts". Open it. Set up an account for your server right there in the table. Something like "myuser", "mypassword", email@email.com, 2018-09-17 00:00, 2040-09-17 00:00 (who cares about the dates).

Save this. You've now created an account. Now, in T4CServerCP.exe, go to General Config and at Super User Account, put "myuser" (whatever you just setup). This will give you all the admin flags.


AND YOU'RE DONE. In theory. You may need to open ports in your router or firewall. Run the server using "Start.bat". You can check the logs -> Debug.log, if there are no ODBC error then the setup is successful, all you have left is to install a T4C client 1.72 and connect.

In the T4C client, just make sure to edit "iplist.txt" and write something like this:

MyCustomServer#127.0.0.1:11677

This will be good enough to test the connection with your same PC. Connect using the account we set up above with LibreOffice. Once you've all got this working, if you have your ports forwarded and all, you can change the IPs and the server IP to your public IP.
 
Initiate Mage
Joined
Nov 16, 2019
Messages
4
Reaction score
0
cant get the client to connect to the server, got the server running fine but when the client tries to connect it either fails or crashes to desktop

-----------------------------------------------------------------------------

make sure once you have followed this guide you forward you ports on router, ip address then active port 11677 udp tcp open, and check firewall

ps, when you use the t4cserverCP make sure you run as administrator otherwise it will not save the settings
 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top