• 0
Monsieur Panda

[Guide] Create your server & Client (2016/08)

Question

Hello,

For some reason, I decided to write my own guide for super newbie people. And when I say newbie, I say REAL newbie. I will not ask you to learn anything or saying rude things like "go google ffs".

I believe people that want to create their server are not necessary interested being a linux master or whatever. Never people are saying that before leaning guitar, people should learn how string and guitar are made.

Enough talk, lets start !

 

 

Prerequisites

  • Patience, meticulousness, cogitation
  • kRO full client: Mirror #1 (mediafire), Mirror #2 (Direct Link from my ftp)
  • kRO last actual compatible exe: Mirror #1 (mega.nz), Mirror #2 (Direct Link from my ftp)
  • Setup exe: Download (Page), Mirror #1 (Direct Link from my ftp)
  • N.E.M.O. Diff Patcher Download (git)
  • BGM parameter files. Download (Direct Link herc.ws), Mirror #1 (Direct Link from my ftp)
  • Translation Package. Download (git)
  • Putty: Download (Page)
  • If Putty does not work, use Kitty Download (Page)
  • 1~2 hours of your time

Things you should know:

  • You cannot see password in Putty / Kitty when you type it.
  • nano is a text editor. At the bottom of the screen you can see a menu. To use it, press CTRL + the option's letter
  • You cannot use numeric pad in nano
  • Being polite is always rewarding

 

I. Dedicated server

 

A. Get your server

  1. You can find very cheap solution at Kimsufi. Choose anything you want.
  2. I recommend you to choose Debian 8 (Jessie) for your OS. 
  3. In Kimsufi manager, you will find your server IP.
  4. You have your login (root) and password in an email after installing the OS

B. Configure your server

  1. Start Putty and enter server's IP address
  2. Connect with root then type the password you got by email. (You wont see " * " when you type)
  3. To change your password enter the following line
    • passwd
  4. Install required package by enter this (copy this and paste it with a right-click):
    • apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen
  5. The following is meant to make a web server. Even if you don't plan to make a website, I suggest you to take it, just because phpmyadmin is easy to use. While installing phpmyadmin, select apache2.
    • apt-get install apache2
    • apt-get install php5 php5-cli libapache2-mod-php5 php5-mysql
    • apt-get install phpmyadmin
    • ln -s /usr/share/phpmyadmin /var/www/html/
  6. ​Because hercules doesn't work if you use root login, we will create a new user.
    • useradd ragnarok
    • passwd ragnarok [choose_a_password]
  7. Connect to phpmyadmin and login with the information you chose at this address: http://your_server_ip/phpmyadmin
  8. Create a new database ragnarok and choose utf8_unicode_ci as collation
  9. Create another database and name it ragnarok_log with same collation
  10. Click on the tab Users (top of the page), Add User and fill the form.
    • Username: ragnarok,
    • password: [choose_a_assword],
    • Click on Check All in the privilege group. (or if you know what are you doing, select options you need)
  11. Now you can log out from your server in Putty
    • logout

C. Install Hercules

  1. Login again in Kitty with the new user ragnarok
  2. Download Hercules emulator
  3. We will need to reach the database installation folder:
    • cd Hercules/sql-files/
  4. We will now import tables in the database. You will have to write your mysql password each time (set in step B.4).
    • mysql -u ragnarok -p ragnarok < main.sql
    • mysql -u ragnarok -p ragnarok_log < logs.sql
    • mysql -u ragnarok -p ragnarok < item_db2.sql
    • mysql -u ragnarok -p ragnarok < mob_db2.sql
    • mysql -u ragnarok -p ragnarok < mob_skill_db2.sql
  5. if you want to make a PRE-RENEWAL server, enter also this
    • mysql -u ragnarok -p ragnarok < item_db.sql
    • mysql -u ragnarok -p ragnarok < mob_db.sql
    • mysql -u ragnarok -p ragnarok < mob_skill_db.sql
  6. If you want to make a RENEWAL server:
    • mysql -u ragnarok -p ragnarok < item_db_re.sql
    • mysql -u ragnarok -p ragnarok < mob_db_re.sql
    • mysql -u ragnarok -p ragnarok < mob_skill_db_re.sql

D. Configure hercules

  1. It is required to set up a server login and password for char-server, map-server and the login database. It can be done by editing few files and the table login.
  2. Start by editing conf/inter-server.conf.
    • cd ../​​
    • nano conf/inter-server.conf
  3. Find the line sql.db_username and fill it with the user and password we created in step B.10. fill also the database name with ragnarok
  4. As the same time, you will need to edit conf/import/inter_conf.txt.
    • nano conf/import/inter_conf.txt
    • sql.db_username: ragnarok
      sql.db_password: your_sql_password
      sql.db_database: ragnarok
    • log_db_id: ragnarok
      log_db_pw: your_sql_password
      log_db_db: ragnarok_log
  5. now edit conf/import/char_conf.txt and fill it with this following text
    • nano conf/import/char_conf.txt
    • // Server Communication username and password.
      userid: [new user]
      passwd: [new password]
  6. Do the same to conf/import/map_conf.txt with the same userid and passwd.
    • nano conf/import/map_conf.txt
    • // Server Communication username and password.
      userid: [new user]
      passwd: [new password]
  7. You will need to update the login table from ragnarok database. Connect again to your phpmyadmin (I.B.7)
  8. Find the table login and edit the only row available.
    • userid must have the same value as [new user]
    • user_pass must have the same value as [new password]
  9. char-server.conf
    • nano conf/char-server.conf
    • server_name: [your_server_name]
    • wisp_server_name: Admin
  10. For some reason, you must reboot your server.
    • reboot
  11. Close the Terminal and connect again after a minute.
  12. Now you will need to work on your server ports
    • iptables -I INPUT 1 -p tcp --dport 6900 -j ACCEPT
    • iptables -I INPUT 1 -p tcp --dport 5121 -j ACCEPT
    • iptables -I INPUT 1 -p tcp --dport 6121 -j ACCEPT
    • iptables save
  13. We are done with the server for now. You can log out if you want. Lets prepare our client!
 
II. Create the Client
 
A. Organization
  1. Extract the full client in C:\ro_client\RO\ and launch update with rsu-kro-renewal-lite.exe or rsu-kro-rag-lite.exe if you set a pre-re server.
  2. Extract the Ragexe.exe in C:\ro_client\fresh\
  3. Extract data and System folders from the translation Package in C:\ro_client\fresh\
  4. Extract the opensetup.exe in C:\ro_client\fresh\
  5. Extract Mssfast.m3d and Mp3dec.asi from BGM.zip in C:\ro_client\fresh\
  6. Extract N.E.M.O. content in C:\ro_client\NEMO\
  7. Once Step 1 is DONE:
    • Copy All *.dll and *.INI files from C:\ro_client\RO\ to C:\ro_client\fresh\
    • Copy BGM and savedata folders from C:\ro_client\RO\ to C:\ro_client\fresh\
    • Copy rdata.grf and data.grf files from C:\ro_client\RO\ to C:\ro_client\fresh\

B. Configure the Client

  1. Launch N.E.M.O. and load 2015-05-13aRagexe.exe 
  2. Hit "Select Recommended"
  3. Confirm DATA.INI
  4. Rename iteminfo.lub to iteminfo_n.lub
  5. Now search "Read Data Folder First" and check it
  6. Hit "Apply Selected" and you will have a new 2015-05-13aRagexe_patched.exe file.
  7. You should "Save Profile" now, because you will probably want to edit again your client later :)

C. Add the translation

  1. Rename C:\ro_client\fresh\System\itemInfo.lub to iteminfo_n.lub
  2. You might need to rename C:\ro_client\fresh\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\ folder to 유저인터페이스 later, but for now, just skip this step (not sure if you encounter this problem).
  3. Open C:\ro_client\fresh\data\clientinfo.xml with a text editor (I recommend Notepad++)
  4. Update the address with your server IP
    • <address>[ip_address]</address>
  5. Done with the translation. Now we will say to the server, which client players are using.

 

III. Finish Server configuration

 

A. Compile the server

  1. Launch Putty again and login to your server. We will compile Hercules. It will take time so be patient.
    • cd ./Hercules
    • ​​./configure --enable-packetver=20150513
    • make clean
    • make sql
  2. once it is done, you can verify if the version has been properly set.
    • nano src/common/mmo.h
  3. Find following lines
    • #ifndef PACKETVER
              #define PACKETVER
  4. Change #define PACKETVER to #define PACKETVER 20150513 if not done yet.
  5. If you did change something in mmo.h, you need to recompile again. Process again the step III.A.1

B. Start the server

  1. To start the server, you simply need the following line (while being in Hercules folder)
    • ./athena-start start

 

 

IV. Player Side

 

A. Create a Game Master Account

  1. Go to your phpmyadmin (step I.B.7) and find again the login table.
  2. Hit the Insert tab
    • userid: [login_nickname]
    • user_pass: [login_pass]
    • group_id: 99
    • gender: M or F
  3. You have now your Game Master Account

B. Play

  1. Launch C:\ro_client\fresh\2015-05-13aRagexe_patched.exe
  2. Login with your newly created game master account
  3. Process thru in game.
  4. type @go 0
  5. Be happy.

 

V. Customize

 

A.  Back to the N.E.M.O.

  1. This Diff patcher is really cool, be aware of that. You can now edit again your client.
  2. repeat the step II.B.1
  3. Hit "Load Profile" and choose the previous file you created in step II.B.7
  4. Check the list and hit option you want.
  5. repeat step II.B.6 and 7

B. Options & Fix

  1. Remove the Pin Secure Code
    • Be sure to always be in Hercules folder ( cd ./Hercules)
    • ./athena-start stop
    • ​​nano conf/import/char_conf.txt
    • add this line: pincode_enabled: 0
    • process to step III.A.1
  2. To edit clientinfo.xml, I suggest you to check the wiki page
  3. if you can't see in game button
    • Rename C:\ro_client\fresh\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º to 유저인터페이스
    • Get Unbollox: Download (Download Page), Mirror #1 (Direct Link from my ftp)
    • In unbollox, select the texture folder and click on À¯ÀúÀÎÅÍÆäÀ̽º
  4. Changing starting point
    • nano conf/import/char_conf.txt
    • add start_point_re: prt_fild08,170,365
  5. Changing starting items
    • nano conf/import/char_conf.txt
    • ​add start_items: 2393,1,0,5055,1,0,569,20,1
  6. Changin starting Zeny
    • nano conf/import/char_conf.txt
    • add start_zeny: 5,000
  7. == More options to come, just reply to this topic if you can't find how to do what ==

C. Adding Custom Content

  1. NPC
    • ​Add your script in npc/custom/your_script_name.txt
    • Edit npc/script_custom.conf and add the following line:
      • npc: npc/custom/your_script_name.txt
  2. ITEM
    • Read the wiki about custom item (Link)
    • System/iteminfo_n.lub
      • [<item id>] = {
        unidentifiedDisplayName = "My custom Item", // Or "Accessory" or "Headgear" if it is an equipment
        unidentifiedResourceName = "my_custom_item",
        //This will set the sprite you will use (ex: my_custom_item.spr / actmy_custom_item.act)
        unidentifiedDescriptionName = 
        {
                    "Unknown Item, can be identified by using a ^6666CCMagnifier^000000."
                }, //Or basically juste { }, if it is not an equipment.
        identifiedDisplayName = "My custom Item",
        identifiedResourceName = "my_custom_item",
        identifiedDescriptionName = 
        {
                    "Bleh this item is a custom item.",
                    "Bleh this is a second line"
                },  // Description of your item.
        slotCount = 0,
        ClassNum = 0 // Read the wiki page for the list.
        },
    • Sprites.
      • Drop item sprite (also the same as click and drag) must be in:
        • data/sprite/¾ÆÀÌÅÛ/my_custom_item.spr / my_custom_item.act
      • Inventory texture (24x24 size 256 bit bmp) must be in:
        • data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/item/my_custom_item.bmp
      • Headgears: Copy the headgear in:
        • data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_my_custom_item.spr / ¿©_Helmet.act for Female
        • data\sprite\¾Ç¼¼»ç¸®\³²\³²_my_custom_item.spr / ³²_Helmet.act for Male
      • Collection picture (75x100 256 bit bmp) must be in:
        • data/sprite/¾ÆÀÌÅÛ/collection/my_custom_item.bmp
  3. MAP
    1. Cient side
      • Your map file name and ID cannot be longer than 13 caracters.
      • my_map.gat, my_map.gnd, my_map.rsw, my_map.extra must be in data/ folder (inside grf)
      • Additional textures (bmp) must be in data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/map/ 
      • BGM must be in BGM/ folder.
      • Add the bgm in data/mp3nametable.txt (ex: my_map.rsw#bgm\\44.mp3#)
      • Add following lines to data/resnametable.txt
        • my_map.gnd#my_map.gnd#
          my_map.gat#my_map.gat#
          my_map.rsw#my_map.rsw#
      • Add this line to data/mapnametable.txt
        • my_map.rsw#Title of my Map#
    2. Server Side
      • Add the following line to​​ db/map_index.txt
        • my_map
      • Add the following line to conf/maps.conf
        • map: my_map
    3. Cache
      • Create a map.grf and include a folder data/. Add inside your map files (gat, rsw, gnd, extra)
      • Create a folder grf/ in your server root (Hercules/) and upload map.grf inside grf/ folder.
      • Connect via ssh (putty) to your server and log in.
      • Stop your server 
        • ./athena-start stop
      • Edit conf/grf-files.txt
        • nano conf/grf-files.txt
      • Add the following line, save and close.
        • ​grf: grf/map.grf
      • Do the following command
        • ./mapcache
      • start your serveur
        • ./athena-start start
Edited by Monsieur Panda

Share this post


Link to post
Share on other sites

36 answers to this question

  • 0

This is the first "detailed" linux guide on setting up server side that I've ever seen in Herc  :lol: *or im just blind?*

Thumbs up! Keep it up~

Share this post


Link to post
Share on other sites
  • 0

yup That is why I wanted to make it ! because I use Linux as a hobbie, I'm not pro at all and I got a bit "lost" from the wiki. There is outdated information and missleading steps.

Share this post


Link to post
Share on other sites
  • 0

yup That is why I wanted to make it ! because I use Linux as a hobbie, I'm not pro at all and I got a bit "lost" from the wiki. There is outdated information and missleading steps.

 

Why didn't you edit the one on the wiki with this one?

Share this post


Link to post
Share on other sites
  • 0

 

yup That is why I wanted to make it ! because I use Linux as a hobbie, I'm not pro at all and I got a bit "lost" from the wiki. There is outdated information and missleading steps.

 

Why didn't you edit the one on the wiki with this one?

 

I am completly newbie, I thought it would be badly seen if someone like me edit the wiki. Beside of that, because I do not master herc, I think that I should just post what I know and understand in the forum. And later, after the approval of the community, I will be happy to edit the wiki ! :)

Edited by Monsieur Panda

Share this post


Link to post
Share on other sites
  • 0

I would suggest to make MariaDB as the database softwear here instead of regular mysql, it proved to have greater performance.

Share this post


Link to post
Share on other sites
  • 0

@hemagx I read something like this yes. Because I never used MariaDB, for now I will continue on my way but I will let a notice about it. Thank you for your feedback !

 

EDIT: Big update. Please let me know if you see mistakes or missing information ! Thank you !  :wub:

Edited by Monsieur Panda

Share this post


Link to post
Share on other sites
  • 0

sorry I can fix it now

 

You had a problem ? What was ?

Edited by Monsieur Panda

Share this post


Link to post
Share on other sites
  • 0

/!\ IMPORTANT /!\

 

STEP I.D.1 to I.D.9 IS OUTDATED SINCE 2016-08-20 !

 

But don't worry, I'll update as soon as I can.

Share this post


Link to post
Share on other sites
  • 0

/!\ IMPORTANT /!\

 

STEP I.D.1 to I.D.9 IS OUTDATED SINCE 2016-08-20 !

 

But don't worry, I'll update as soon as I can.

 

Love, your guide very well detailed! i appreciate all your effort and time for this guide, still waiting for those images :D

Share this post


Link to post
Share on other sites
  • 0

I Would love, to have a screen shot every guide you made to help people easily :D

great job!

 

To be honest, there is nothing much to show. This is just text and console line. There is no "interface" or something  :unsure: 

Screenshot would just show command line I already wrote.

Share this post


Link to post
Share on other sites
  • 0

Excelent work!

Is Debian same with CentOS?

Nope, use yum install [packets] instead of apt-get install [packets]

Share this post


Link to post
Share on other sites
  • 0

Great guide!

 

But do you think that new-to-linux-world should be installing insecure server like this?
Meaning, anyone who needs this guide is probably unaware of security things. I know that it's not really part of the guide, but it really should be mentioned for the sake of all the new servers who are insecure :S
At least give a link to things to do first for a brand new Debian server before starting to follow the guide.
Anyway, great guide! :)

Share this post


Link to post
Share on other sites
  • 0

Imo, people who doesn't know basic, or at least, cannot even do basic search, should not open a server. But right, next guide will have a section "to go further" explaining security and other :)

Share this post


Link to post
Share on other sites
  • 0

Imo, people who doesn't know basic, or at least, cannot even do basic search, should not open a server. But right, next guide will have a section "to go further" explaining security and other :)

I could not agree more. But your guide makes it possible to host server without almost any knowledge at all. At that point, "should" and "should not" -things don't really matter.

 

If you need help with next guide, i'm up. I was actually thinking to make a Debian guide myself, with exception of using two servers, one for emulator and one for web-server. But i never seem to have time to do it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now