Jump to content

projectofall

Members
  • Content Count

    0
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    projectofall reacted to fourxhackd in Overview of Ragnarok Online Server Development   
    Reserving this post.
    Table of Contents
    Server side development Source code and what it means to compile Server configuration and customization NPC Scripting Source code editing Mid-level overview of Hercules
    The illustration below shows a more detailed view of the server (left) and the client (right). As you can see, it is OVERWHELMING, especially for a thirteen year old.
    So listen to me first when I say I want you to focus on the left side, which is the server side aspect of RO development.

     
    Server-side development
    On the left side, we will be focusing on the server-side development. We begin at the top most part of the server-side, which begins with the source code.
    What does "Source code" mean?
     
    The quote above and below is lifted from my own writings regarding Compiling and source code in the Hercules Wiki.
     
    Source Code and what it means to Compile
    Analogy (Language when traveling)
    You are a Filipino. You know the language Filipino as your main language. When you study in school and university, you learn the language English and Spanish. When you travel visit Korea, you learn a little Korean too. You are becoming more and more adaptable wherever you go. You can go to Europe, Spain, Korea, etc. 
    When you go to South Korea, you think of ordering food because you will eat. First, you think in Filipino "Gutom ako" which means "I am hungry" in English. So you get your Language Book for Koreans and say the korean counterpart which is 나 배고파 (na baegopa). By speaking Korean, you are understood by people in Korea.
     
    Parallelism in RO Development
    In RO Development, your source code is your main language. In your head, when you are thinking, that is the language that you hear when you think. In the example above, the source code is Filipino. I, fourxhackd, think in Filipino. When I have something I want to share in the forums of Hercules, I translate my understanding into the language necessary for you the readers, so that you will understand me.
     
    Changing from Filipino to English is called translation.
    Changing from source code to executable code is called compiling.
     
    Translation is necessary because not all people are Filipino, or English. Some are Korean, some are French, Chinese.
    Compilation is necessary because not all machines are Windows, or Unix. Some are OSX, Ubuntu, Fedora, etc.
     
    Because there are Language Books or Dictionaries for Filipino, we can perform translation from Filipino to another language (e.g. to English).
    Because there are Compilers for the C Programming Language, we can perform compiling from C Source Code to Runnable Executable Files (e.g. for Linux).
     
    Because we already know what ideas we have in our minds that we want to share, and because we have dictionaries, we are able to adapt and talk to people in different countries.
    Because Hercules shared with us the source code for RO server development, and because we have compilers, we are able to deploy RO server development code for any environment.
     
    Given the above analogy and explanation, I hope that you understand better what the words "source code" and "compile" mean, and why they are important. We will continue now with the assumption that you understand compiling source code, and that you will be able to follow different kinds of guides available throughout the forums/knowledge-base. Now that you understand it better, we can conclude this section by saying the following:
    Review the diagram at the top of this post again. Through compiling, we can produce produce the server executable programs (map, char, and login) from the source code.
     
    Extended Reading
    On Compiling and how to Compile, specifically in the context of Hercules - https://github.com/HerculesWS/Hercules/wiki/Compiling Wikipedia - Compiler https://en.wikipedia.org/wiki/Compiler Wikipedia - Source code https://en.wikipedia.org/wiki/Source_code  
     
    Server Configuration
    We will now continue to talk about configuring your server. This is the bottom part of the left side of the diagram.
    I will not go into too much detail on this, since configuration is pretty much straightforward and well documented.
    The only advice I have is to read the documentation already provided! Go to your hercules_server_folder/doc and read everything! Read all the comments that your wise masters have left behind for you.
    It is my opinion that configuring and customizing the server is the simplest part of RO development, for the simple reason that you need only change one value to another. Do not be afraid to test something out, and to bring it back if it doesn't work. It is okay to make mistakes.
    For example, in conf/map/battle/exp.conf:
    // Rate at which exp. is given. (Note 2) base_exp_rate: 100 // Rate at which job exp. is given. (Note 2) job_exp_rate: 100 If you are not sure what 100 means, then first read the documentation above.
    //========================================================================= // Battle (Experience) Configuration File //========================================================================= // Note 1: Value is a config switch (true/false) // Note 2: Value is in percents (100 means 100%) // Note 3: The max level of classes is stored in the exp table. // See files db/exp.txt and db/exp2.txt to change them. //========================================================================= Note 2 means that value is in percent, and that 100 means 100%. Now you understand!
    Now that you understand, try making it 200. See the difference. Then make it 10000. Test it out. Find out for yourself.
    It is important to think critically: "I wonder what will happen if I change this". Think. Test. Understand. That will build your confidence that you know what you are doing.
     
     
    NPC Scripting
    NPC Scripting is a type of server configuration, except that it focuses solely on NPC scripts. Just like my advice in general server configuration, read the documentation!
    Open hercules_server_folder/doc/script_commands.txt and read the whole document until it has been ingrained in you. 
    In school, you are forced to read text books to understand math, or science. However, we cannot apply it immediately in the world to understand the value of math and science.
    In RO development, you CAN read text books (like the script bible) to understand NPC scripting. Unlike math and science, your understanding of scripting can BRING TO LIFE new NPCs into the world. Celebrate this new found power of creation!
     
    Unfinished
    This guide is not yet finished. I'll be writing about it in more detail soon.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.