Connectivity Guide: Difference between revisions
m (Default charBlockSize is 106 (not 108)) |
mNo edit summary |
||
Line 20: | Line 20: | ||
::'''<span style="color:red">Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. Also, download at your risk, we will not be resposabilized if your computer crashes.</span>''' | ::'''<span style="color:red">Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. Also, download at your risk, we will not be resposabilized if your computer crashes.</span>''' | ||
::'''''Note | ::'''''Note:''''' You will need some programs to extract it, the common ones are [http://www.rarlab.com/ WinRAR] and [http://www.7-zip.org/ 7zip]. | ||
:'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open WPE. | :'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open WPE. | ||
:'''3.''' At WPE's | :'''3.''' At WPE's window, click on '''''Target Programs''''' button. | ||
::[[File:Targetyc.png]] | ::[[File:Targetyc.png]] | ||
Revision as of 19:06, 20 March 2010
OpenKore comes with a large list of server information. But some servers are not in the list, and sometimes the server information changes (for instance, when a server changes IP address or upgrades the server software). This guide teaches you several ways to figure out the (new) server information. Read this guide completely and carefully! If you encounter problems, finish reading this guide first before asking questions on the forum or IRC!
But before you do that, read the list of unsupported servers. Your server may not be supported at all - in that case reading this guide would be a waste of time.
OpenKore needs the following information about the Ragnarok Online server before it can login:
- The server name.
- The server's address (IP address or host name) and port number.
- The server's master version number.
- The server's server version number. (not the same as the master version number)
- The server's character encoding.
- The server's type version.
Getting Server Information
There are two ways for getting them, which is using WPE or Wireshark. WPE is the easiest one, because most ragnarok players are familiarized with it already or at least know what it does and how it works. But some servers block it's use, so you better use Wireshark.
WPE (Winsock Packet Editor)
- 1. Download and extract it. Download it here.
- Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. Also, download at your risk, we will not be resposabilized if your computer crashes.
- 2. Open your ragnarok but don't login yet! Leave it on the login screen and open WPE.
- A window will open, search for your server's executable and double-click it.
- Note. Some servers "hide" their executables by renaming it (like from xxxRO.exe to binadds.dll), so don't worry if your executable isn't a .exe one.
- 4. In the WPE's window, click on Play button.
- 5. Maximize your Ragnarok's window and login. You don't need to login to the map-server, just the login-server is enough.
- Note. Valid login information are not needed.
- 6. Back to WPE's window, click on Stop button
- A window will open with some packets. Here we can find the server's version and master_version, IP and port.
- The packets will be different on each server, but most of the time it will start with 64 00.
- These are the packets that contains the version and master_version. Write them down because they are going to be used later.
- Legend:
- Version.
- IP
- Port
- Master version
- 7. Now, the version and master version need to be converted, because they are a hexadecimal number (base-16) and Kore expects a decimal number (base-10). Use this calculator. With the numbers converted, you can now make openkore use it. See Passing server information to OpenKore.
Wireshark
- 1. Download and install Wireshark. (Download link here).
- 2. Open your ragnarok but don't login yet! Leave it on the login screen and open Wireshark.
- 4. In the "Interface" dropdown box, select an interface which you want to capture on. If you're unsure which interface to use, select the one whose IP address is equal to your ip address or is not unknown. Alternatively you can try all of them and use the one that records the packets. Set the others settings like the images bellow:
- 5. After configuring the options, click on Start button and go back to your ragnarok and login. Loginning to the map-server is not needed, the login-server is enough.
- Note. Valid information are not needed.
- 6. After loginning, go back to Wireshark and press the Stop button.
- 7. In the Wireshark main window you can see the TCP segments that were captured. Fill in the packet filter, but what to fill in depends on the username you used to login.
- Enter this in the "Filter" text box:
eth contains "xxxxxx" or eth contains xxxxxx
- Replace xxxxxx with your username that you used to login and press enter. In my example, my username was Mushroom.
- 8. You will now have only one entry, click on it and you will have some information about it. This is where you are going to get the server's IP and port.
- Write down your ip and port because you are going to need them later.
- 9. On the entry again, right-click on it and go to Follow TCP Stream.
- 10. A new window will open, in the bottom left, select Hex Dump.
- 11. Now we got the login packets. Take a look at it and write down the packets that contains the version and master version numbers. They are marked on the image bellow.
- 12. With the informations above, you have to convert them, because they're a hexadecimal number (base-16) and Kore expects a decimal number (base-10). You can use this calculator. With the numbers converted, you can now make openkore use it. See the section bellow for how to use it.
Passing server information to OpenKore
OpenKore reads server information from a file named servers.txt. The file is on tables folder.
If your server is not listed in the file, then add a new entry. If your server is already listed, then modify the existing entry. Here is the format:
[Server's Name] -> Your server's name. Must be between '[' and ']' ip x.x.x.x -> Your server's IP. port xxxx -> Your server's port number. master_version xx -> Your server's master_version. The one that you converted from hex to decimal. version xx -> The server's version. The one that you converted from hex to decimal. serverType xxx -> Your serverType. For privates default one is 8_4. Officials one have their own. charBlockSize xx -> Set this if you are getting wrong char name and job name. Default is 106. serverEncoding xxxx -> Character encoding. More information read bellow. private 1 -> Only set this if the bot connects to the wrong map server IP. Used by private servers. recvpackets xxxxxx.txt -> Your recvpackets' name file. It this option is not set, it will use the default one (recvpackets.txt). More informations read bellow.
And here is an example:
[MushroomRO] ip 127.0.0.1 port 6900 master_version 16 version 20 serverType 8_4 charBlockSize 108 serverEncoding Western recvpackets mush-recvpackets.txt
After having modified servers.txt, restart OpenKore.
Character encoding
The character encoding cannot be automatically detected, but here's a list of possible character encodings that you can use:
Encoding | Language used |
---|---|
Western | English, or a language which uses a Roman-based alphabet. For example, German, French, Portuguese, etc., but also Indonesian. |
Simplified Chinese | Simplified Chinese. |
Traditional Chinese | Traditional Chinese. |
Korean | Korean |
Russian | Russian, or a Cyrillic-based language. |
Japanese | Japanese |
Thai | Thai |
Packet Length Extractor
Packet Length Extractor is a program which retreives the packet lengths from the RO client and stores them in recvpackets.txt. If you're having server problems, such as:
- Packet Tokenizer: Unknown switch: xxxx
- Getting disconnected after a few seconds
- NPCs, players and monsters are not recognized by Kore
Then generating a new recvpackets.txt might solve the problem. It's advisable to always extract the recvpackets for any server that you will play. The file must be on tables folder.
Note. You may have problems extracting the recvpackets if your server's client has some kind of protection.
About Recvpackets
The network data that the server sends to Kore, is a byte stream. Kore must be able to recognize messages inside that byte stream to be able to do something with it. But the size of the messages can vary from to server to server. Recvpackets.txt contains information about the size of each message, so Kore can correctly split the byte stream into messages.
Download
There are two programs you can use to extract the recvpackets:
- JCV's RO Tools
- OpenKore Packet Length Extractor
It's better to use JCV's RO Tools as it is more up to date and have some fixes for newer clients. Also it's much easier to maintain, but it has undesirable and outdated options in addition to the packet extractor.