Jump to content


Photo

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

create server newbie client

  • Please log in to reply
36 replies to this topic

#1 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 06 August 2016 - 01:40 PM

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, 24 August 2016 - 08:18 AM.


#2 Eternity

Eternity

    Advanced Member

  • Members
  • PipPipPip
  • 93 posts

Posted 06 August 2016 - 03:00 PM

Nice guide, thank you :)



#3 Legend

Legend

    Advanced Member

  • Members
  • PipPipPip
  • 334 posts
  • LocationHeaven ♥
  • Emulator:Hercules
  • Github:Legend95

Posted 06 August 2016 - 04:57 PM

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~


You can use some of my *crappy* request scripts. It may somehow help you.

 

my ♥ belongs here


#4 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 06 August 2016 - 05:10 PM

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.



#5 Mysterious

Mysterious

    Advanced Member

  • Administrators
  • 3656 posts
  • LocationProntera ;3
  • Github:Mystery

Posted 06 August 2016 - 08:02 PM

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?


http://upaste.me a paste site with Athena syntax!
Now with the ability to test your athena pastes!


#6 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 07 August 2016 - 03:53 AM

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, 07 August 2016 - 03:54 AM.


#7 hemagx

hemagx

    Advanced Member

  • Former Core Developer
  • 230 posts
  • IRC Nickname:Ema
  • Emulator:Hercules
  • Github:hemagx

Posted 07 August 2016 - 04:10 AM

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


Spoiler

Spoiler

Spoiler

Spoiler

Spoiler

Spoiler

Spoiler

Spoiler

Spoiler

#8 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 07 August 2016 - 04:29 AM

@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, 07 August 2016 - 08:51 AM.


#9 LucasBrito

LucasBrito

    Member

  • Members
  • PipPip
  • 13 posts

Posted 11 August 2016 - 11:15 PM

Wonderful guide!

Congrulations.


Edited by LucasBrito, 12 August 2016 - 12:07 AM.


#10 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 19 August 2016 - 12:31 AM

Added custom item guide

Added iptables save


Edited by Monsieur Panda, 19 August 2016 - 12:34 AM.


#11 lionmark01

lionmark01

    Newbie

  • Members
  • Pip
  • 1 posts
  • Github:lionmark01

Posted 19 August 2016 - 07:47 PM

sorry I can fix it now

Edited by lionmark01, 19 August 2016 - 08:18 PM.


#12 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 20 August 2016 - 04:35 AM

sorry I can fix it now

 

You had a problem ? What was ?


Edited by Monsieur Panda, 20 August 2016 - 04:36 AM.


#13 Eternity

Eternity

    Advanced Member

  • Members
  • PipPipPip
  • 93 posts

Posted 20 August 2016 - 06:08 PM

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



#14 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 24 August 2016 - 02:43 PM

/!\ 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.



#15 True Zeal

True Zeal

    Advanced Member

  • Members
  • PipPipPip
  • 411 posts
  • LocationAlberta
  • Emulator:Hercules

Posted 24 August 2016 - 04:00 PM

amazing sir


I ask a lot of questions. Prepare to be frustrated.


#16 Eternity

Eternity

    Advanced Member

  • Members
  • PipPipPip
  • 93 posts

Posted 24 August 2016 - 11:40 PM

/!\ 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



#17 Monsieur Panda

Monsieur Panda

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts
  • LocationTokyo
  • Emulator:Hercules

Posted 25 August 2016 - 02:06 AM

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.



#18 mrlongshen

mrlongshen

    Noobies

  • Members
  • PipPipPip
  • 1127 posts
  • Locationlocalhost 127.0.0.1
  • Emulator:Hercules

Posted 25 August 2016 - 10:07 AM

Cool guide. I agree with you, there is just text and console line.  B)


Long live Hercules emulator


#19 Eternity

Eternity

    Advanced Member

  • Members
  • PipPipPip
  • 93 posts

Posted 16 September 2016 - 06:35 PM

Is Debian same with CentOS?



#20 rokimoki

rokimoki

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts
  • LocationCanary Islands
  • Emulator:Hercules
  • Github:rokimoki

Posted 20 September 2016 - 01:58 PM

Excelent work!

Is Debian same with CentOS?

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 397 user(s)