[Guide] So you want a L2J Server
Posted: Sun Nov 23, 2014 12:24 am
This basic guide is meant for testing, and NOT for a Live server.
Briefing
Every L2J server you have played on has 2 main things.
L2J_SERVER files and L2J_DATAPACK files.
L2J_SERVER would be the mechanical part of your server. This part loads the datapack and allows connections.
L2J_DATAPACK would be the content part of your server. This part defines all aspects of the emulation.
A good analogy,
L2J_DATAPACK are the books in a library.
L2J_SERVER is the librarian who handles the books.
Software list
1.-Java
2.-Eclipse
3.-Xampp
NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.
4.-Heidi SQL
If you want any other client like Navicat, you can do so.
Repository Files
The Repository system allows easy simultaneous modification of the files from the developers.
More information about git
The current repository location is in: https://github.com/L2J
The Git system has something called "Branches". And the purpose is to separate different code versions.
Just to name a few there are C4, Gracia, Freya, Hi5 branches.
If you want to set up a Freya server, then you would have to get the Freya branch.
In this example i will be using the Hi5 Stable branch.
So you want a L2J Server?
-> Start Eclipse
-> Select a Workspace, it can be anywhere.
-> Go to Window
-> Show View
-> Project Explorer
Cloning Datapack
-> Copy this : https://github.com/L2J/L2J_DataPack.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select the Branch you want
-> Finish
Cloning Serverpack
- >Copy this : https://github.com/L2J/L2J_Server.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select Desired Branch
-> Finish
Compiling Datapack
-> Inside Project Explorer
-> Expand L2J_Datapack
-> Right-Click Build.xml
-> Run As
-> Ant Build
Compiling Serverpack
-> Inside Project Explorer
-> Expand L2J_Server
-> Right-Click Build.xml
-> Run As
-> Ant Build
Setting Up Files
-> Navigate to your L2J_DATAPACK file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into a new folder you can call it how you want.
-> Navigate to your L2J_SERVER file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into the folder you created. It will ask to overwrite. This is normal, press yes.
Installing Database
-> Run Xampp Control Panel
-> Press Start in MySQL
-> Run HeidiSQL
-> Log into your local Mysql Server
-> Create Databases: l2jls , l2jgs and l2jcs (use utf8-general_ci encoding)
-> Browse to yourserverfolder/tools
-> Run Dbinst_cs.jar (Community Server)
-> Fill in with your Mysql information.
-> Select Full Install
-> Repeat the process for Dbinst_ls.jar (Login Server) and Dbinst_gs.jar (Game Server), thanks to Unafraid
NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.
Optional: If you have set a root password for your MySql server then follow these steps:
-> Open yourserverfolder\login\L2J_Configurator.jar
-> Under LoginServer tab find "Password"
-> Type your MySql root password
-> Save and Close
-> Open yourserverfolder\game\L2J_Configurator.jar
-> Under Server tab find "Password"
-> Type your MySql root password
-> Save and Close
Starting the Server
-> Run yourserverfolder\game\StartGameServer ------------------ A Command Prompt Window will open, let it load
-> Run yourserverfolder\login\StartLoginServer ------------------ A Command Prompt Window will open, let it load
Logging in
Now that we have got our server up and running, its time to test it.
To play in the server, from the same pc, you need to edit your hosts file.
Located inside C:\Windows\System32\drivers\etc
Copy the file in your desktop, edit it with notepad adding these lines:
[pastebin]2pL4AN8K[/pastebin]
Save the file, copy from desktop and paste inside the C:\Windows\System32\drivers\etc directory.
I suggest you do it this way because sometimes windows will not allow you to edit and save the files when they are inside the operating system directory. E.g windows/system32/xxxx
Once you have saved the file. Start your Lineage 2 Client and test. (Accounts are auto create by default)
Do not edit the Lineage 2 Client because it is illegal
I hope you enjoyed the guide, if you are a seasoned L2J Developer and found any error or have a suggestion, submit a comment.
Happy testing!
UPDATE 29/12/14 ----> Changed DatabaseInstaller.bat/sh method to Dbinst_(ls,gs,cs) method.
Briefing
Every L2J server you have played on has 2 main things.
L2J_SERVER files and L2J_DATAPACK files.
L2J_SERVER would be the mechanical part of your server. This part loads the datapack and allows connections.
L2J_DATAPACK would be the content part of your server. This part defines all aspects of the emulation.
A good analogy,
L2J_DATAPACK are the books in a library.
L2J_SERVER is the librarian who handles the books.
Software list
1.-Java
2.-Eclipse
3.-Xampp
NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.
4.-Heidi SQL
If you want any other client like Navicat, you can do so.
Repository Files
The Repository system allows easy simultaneous modification of the files from the developers.
More information about git
The current repository location is in: https://github.com/L2J
The Git system has something called "Branches". And the purpose is to separate different code versions.
Just to name a few there are C4, Gracia, Freya, Hi5 branches.
If you want to set up a Freya server, then you would have to get the Freya branch.
In this example i will be using the Hi5 Stable branch.
So you want a L2J Server?
-> Start Eclipse
-> Select a Workspace, it can be anywhere.
-> Go to Window
-> Show View
-> Project Explorer
Cloning Datapack
-> Copy this : https://github.com/L2J/L2J_DataPack.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select the Branch you want
-> Finish
Cloning Serverpack
- >Copy this : https://github.com/L2J/L2J_Server.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select Desired Branch
-> Finish
Compiling Datapack
-> Inside Project Explorer
-> Expand L2J_Datapack
-> Right-Click Build.xml
-> Run As
-> Ant Build
Compiling Serverpack
-> Inside Project Explorer
-> Expand L2J_Server
-> Right-Click Build.xml
-> Run As
-> Ant Build
Setting Up Files
-> Navigate to your L2J_DATAPACK file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into a new folder you can call it how you want.
-> Navigate to your L2J_SERVER file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into the folder you created. It will ask to overwrite. This is normal, press yes.
Installing Database
-> Run Xampp Control Panel
-> Press Start in MySQL
-> Run HeidiSQL
-> Log into your local Mysql Server
-> Create Databases: l2jls , l2jgs and l2jcs (use utf8-general_ci encoding)
-> Browse to yourserverfolder/tools
-> Run Dbinst_cs.jar (Community Server)
-> Fill in with your Mysql information.
-> Select Full Install
-> Repeat the process for Dbinst_ls.jar (Login Server) and Dbinst_gs.jar (Game Server), thanks to Unafraid
NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.
Optional: If you have set a root password for your MySql server then follow these steps:
-> Open yourserverfolder\login\L2J_Configurator.jar
-> Under LoginServer tab find "Password"
-> Type your MySql root password
-> Save and Close
-> Open yourserverfolder\game\L2J_Configurator.jar
-> Under Server tab find "Password"
-> Type your MySql root password
-> Save and Close
Starting the Server
-> Run yourserverfolder\game\StartGameServer ------------------ A Command Prompt Window will open, let it load
-> Run yourserverfolder\login\StartLoginServer ------------------ A Command Prompt Window will open, let it load
Logging in
Now that we have got our server up and running, its time to test it.
To play in the server, from the same pc, you need to edit your hosts file.
Located inside C:\Windows\System32\drivers\etc
Copy the file in your desktop, edit it with notepad adding these lines:
[pastebin]2pL4AN8K[/pastebin]
Save the file, copy from desktop and paste inside the C:\Windows\System32\drivers\etc directory.
I suggest you do it this way because sometimes windows will not allow you to edit and save the files when they are inside the operating system directory. E.g windows/system32/xxxx
Once you have saved the file. Start your Lineage 2 Client and test. (Accounts are auto create by default)
Do not edit the Lineage 2 Client because it is illegal
I hope you enjoyed the guide, if you are a seasoned L2J Developer and found any error or have a suggestion, submit a comment.
Happy testing!
UPDATE 29/12/14 ----> Changed DatabaseInstaller.bat/sh method to Dbinst_(ls,gs,cs) method.