diff --git a/docs/setup/compiling-windows.md b/docs/setup/compiling-windows.md index 4074813..14f55e6 100644 --- a/docs/setup/compiling-windows.md +++ b/docs/setup/compiling-windows.md @@ -2,39 +2,69 @@ For compiling on Windows, Visual Studio is the preferred method, although using Cygwin is also possible. -=== Using Visual Studio === -[[Image:Compile_hercules.PNG|thumb|300px|MS Visual Studio 2012: Compile configuration (red) and solution (blue) with it's child projects.]] -Hercules ships with solution and project files for Visual Studio from 2012 onwards. -* Download the latest version of [https://www.visualstudio.com Visual Studio] (at the time of writing, MS Visual Studio 2015 Community Edition) and install it, if you do not have Visual Studio already installed. -* Open '''Hercules-14.sln''' in your Hercules folder if you use Visual Studio 2015, for Visual Studio 2013, you need to open '''Hercules-12.sln''', for Visual Studio 2012, you need to open '''Hercules-11.sln''' instead. -* Select the desired compile configuration (marked red). Use '''Release''' when you compile the server, where players will be playing on. '''Debug''' compiles the server without optimizations and with debugging information. -* Right-click the solution node (marked blue) and select '''Build solution'''. If you have compiled the server before, it is recommended to use '''Rebuild solution''', as it forces the compiling of all components, not just those, which seem to have changed since last compile. -* If the compilation was successful, the resulting executables are in the same folder as the solution named ''login-server.exe'', ''char-server.exe'', ''map-server.exe'' and ''mapcache.exe''. - -=== Using Cygwin === -[http://www.cygwin.com/ Cygwin] is a POSIX compatibility layer for Windows. As such it enables compiling the way it would be done on Linux. Compiling in Cygwin is '''not recommended''' due to lower performance and increased installation complexity. - -* Download [http://www.cygwin.com/setup.exe Cygwin] and install it, if not already done so. When installing, select following packages: -** from ''Devel'': ''cmake'', ''gcc'' and ''make'' -** from ''Lib'': ''libidn-devel'', ''libpcre-devel'', ''readline'', ''zlib-devel'' -* Running Cygwin Terminal will create folder '''home/user''' inside Cygwin installation folder, where ''user'' is the name currently logged on Windows user. -* SQL server needs to be installed in Cygwin so the compiler can access the SQL libraries. Download the .tar.gz archive from the [http://dev.mysql.com/downloads/mysql/?current_os=src MySQL website], such as '''mysql-5.5.20.tar.gz'''. -* Place the archive into '''/home/user''' and execute following inside Cygwin Terminal to unpack it: - cd ~ - tar xvzf mysql-5.5.20.tar.gz -* Navigate to directory with unpacked archive: - cd mysql-5.5.20 -* To avoid conficts, replace ''dtoa()'' with ''_dtoa()'' in ''strings/dtoa.c'' file: - sed -i 's/dtoa(/_dtoa(/g' ./strings/dtoa.c -* Build MySQL with following commands: - cmake . - make mysqlclient libmysql - make install -* After everything completes, Cygwin is ready for compiling Hercules. Navigate to the Hercules folder in Cygwin. Windows drives are accesible as /cygdrive/x where ''x'' is the letter assigned to the drive by Windows. -* Execute following commands inside Hercules folder to compile it: - ./configure --with-mysql=/usr/local/mysql/bin/mysql_config - make sql -* If the compilation was successful, the resulting executables are in the Hercules folder named ''login-server_sql.exe'', ''char-server_sql.exe'' and ''map-server_sql.exe''. -* Server executables can be run inside Cygwin Terminal or directly, but in this case you need to copy required libraries to Hercules folder: -** ''cygwin1.dll'', ''cygz.dll'', ''cyggcc_s-1.dll'', ''cygpcre-0.dll'' from /bin -** ''cygmysqlclient-18.dll'' from /usr/local/mysql/lib +### Using Visual Studio + + Hercules +ships with solution and project files for Visual Studio from 2012 onwards. + +- Download the latest version of [Visual Studio](https://www.visualstudio.com) (at the time of writing, MS Visual Studio + 2015 Community Edition) and install it, if you do not have Visual Studio already installed. +- Open **Hercules-14.sln** in your Hercules folder if you use Visual Studio 2015, for Visual Studio 2013, you need to + open **Hercules-12.sln**, for Visual Studio 2012, you need to open **Hercules-11.sln** instead. +- Select the desired compile configuration (marked red). Use **Release** when you + compile the server, where players will be playing on. **Debug** compiles the server without optimizations and with + debugging information. +- Right-click the solution node (marked blue) and select **Build solution**. If you + have compiled the server before, it is recommended to use **Rebuild solution**, as it forces the compiling of all + components, not just those, which seem to have changed since last compile. +- If the compilation was successful, the resulting executables are in the same folder as the solution named + *login-server.exe*, *char-server.exe*, *map-server.exe* and *mapcache.exe*. + +### Using Cygwin + +[Cygwin](http://www.cygwin.com/) is a POSIX compatibility layer for Windows. As such it enables compiling the way it +would be done on Linux. Compiling in Cygwin is **not recommended** due to lower performance and increased installation +complexity. + +- Download [Cygwin](http://www.cygwin.com/setup.exe) and install it, if not already done so. When installing, select + following packages: + - from *Devel*: *cmake*, *gcc* and *make* + - from *Lib*: *libidn-devel*, *libpcre-devel*, *readline*, *zlib-devel* +- Running Cygwin Terminal will create folder **`home/user`** inside Cygwin installation folder, where *user* is the name + currently logged on Windows user. +- SQL server needs to be installed in Cygwin so the compiler can access the SQL libraries. Download the .tar.gz archive + from the [MySQL website](http://dev.mysql.com/downloads/mysql/?current_os=src), such as **mysql-5.5.20.tar.gz**. +- Place the archive into **`/home/user`** and execute following inside Cygwin Terminal to unpack it: + +` cd ~` +` tar xvzf mysql-5.5.20.tar.gz` + +- Navigate to directory with unpacked archive: + +` cd mysql-5.5.20` + +- To avoid conficts, replace *dtoa()* with *\_dtoa()* in *strings/dtoa.c* file: + +` sed -i 's/dtoa(/_dtoa(/g' ./strings/dtoa.c` + +- Build MySQL with following commands: + +` cmake .` +` make mysqlclient libmysql` +` make install` + +- After everything completes, Cygwin is ready for compiling Hercules. Navigate to the Hercules folder in Cygwin. Windows + drives are accesible as `/cygdrive/x` where *x* is the letter assigned to the drive by Windows. +- Execute following commands inside Hercules folder to compile it: + +` ./configure --with-mysql=/usr/local/mysql/bin/mysql_config` +` make sql` + +- If the compilation was successful, the resulting executables are in the Hercules folder named *login-server_sql.exe*, + *char-server_sql.exe* and *map-server_sql.exe*. +- Server executables can be run inside Cygwin Terminal or directly, but in this case you need to copy required libraries + to Hercules folder: + - *cygwin1.dll*, *cygz.dll*, *cyggcc_s-1.dll*, *cygpcre-0.dll* from `/bin` + - *cygmysqlclient-18.dll* from `/usr/local/mysql/lib` diff --git a/docs/setup/configuration.md b/docs/setup/configuration.md index 861c6e7..e6b1811 100644 --- a/docs/setup/configuration.md +++ b/docs/setup/configuration.md @@ -1,394 +1,420 @@ -This article is aimed at configuration of Hercules for use. It is assumed that you have [[Installation|downloaded]] Hercules, have it [[Compiling|compiled]] -and [[Connecting|configured]] to connect. - -=Hercules File Structure= -When you open up your copy of Hercules for the first time, you may notice a lot of folders and files, we'll walk through briefly what each one is -for. - -{| class="wikitable" border="1" -|- -!Location -!Description -|- -|'''/3rdparty/'''||3rd party files, such as mysql.h -|- -|'''/conf/'''||Main configuration settings, such as connection settings, battle settings and [[mapflag|mapflags]]. -|- -|/conf/import/||[[Import folder]], mainly used to keep your configuration settings after an SVN update. -|- -|/conf/battle/||Where you will find settings to change the rates, drops, max stats and such for your server. -|- -|/conf/mapflags/||Folder with all the [[mapflag|mapflags]], such as noteleport, pvp and gvg. -|- -|'''/db/'''||Databases, such as the job_db, experience tables, item and mob flat-file databases. -|- -|'''/doc/'''||Various documented settings, mainly for database settings. -|- -|'''/npc/'''||Any NPC/spawn file you will find in the game is in here. -|- -|/npc/airports/||The airports and airship scripts are in here, and any NPC related to them. -|- -|/npc/battlegrounds||Battlegrounds scripts can be found in here. -|- -|/npc/cities/||Any non-quest, non-kafra [[NPC]] found in the towns are here. -|- -|/npc/custom/||Any NPC not officially supported by Hercules is located in here. Here is where you will find your healers, warpers and MVP arenas. -|- -|/npc/events/||Any official events, such as twin-towers or Christmas events on the official servers. -|- -|/npc/guides/||Any guides in the cities. -|- -|/npc/guild/||[[War of Emperium|WoE]] scripts and functions are in here. -|- -|/npc/guild2/||WoE:SE scripts and functions. -|- -|/npc/jobs/||Job changing scripts and quests, as well as functions. -|- -|/npc/kafras/||Kafra scripts and functions. -|- -|/npc/merchants/||Any official merchants in here. -|- -|/npc/mobs/||Spawn scripts for fields, dungeons as well as city cleaners in here. -|- -|/npc/other/||Scripts that don't really fit anywhere else, like the marriage script. -|- -|/npc/quests/||Official Quests, such as the Sign Quest or Thanatos Tower. -|- -|/npc/warps/||Warp portals, and scripts, that behave that way. -|- -|'''/sql-files/'''||If using SQL, this is where the pre-made database dumps are, that will populate your database with the correct tables and such. -|- -|'''/src/'''||All source files, the meat and potatoes of the emu. -|- -|/src/char/||Character server source files. -|- -|/src/common/||Common server settings. [[mmo.h]] is in here, the file that will modify most of the hard-coded server settings. -|- -|/src/login/||Login server source files. -|- -|/src/map/||Map server source files. -|- -|/src/plugins/||Plugins source files. -|- -|/src/tool/||[Tools](https://github.com/HerculesWS/Hercules/tree/stable/src/tool) source files, such as the mapcache builder. -|- -|'''/tools/'''||Contains tool scripts for various maintenance-related tasks. -|- -|'''/vcproj-9/'''||Project 9 Files,Files used if Using MS Visual Studio C++ 2008 -|- -|'''/vcproj-10/'''||Project 10 Files,Files used if using MS Visual Studio C++ 2010 -|- -|'''/vcproj-12/'''||Project 12 Files,Files used if using MS Visual Studio C++ 2012 -|} - -We're mainly focused on the '''/conf/''' folder in this article. - -=/conf/= -In the /conf/ folder, holds all of the configuration settings for a quick customization. Here are the locations for a frequent number of configuration changes. Remember that after changing any of these settings, it is always best to restart your servers for the changes to take effect. - -==Changing the base/job experience rates== -Open up /conf/battle/exp.conf. Look for: -
// 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
-
- -and change to whatever you want, in multiples of 100. A good rule of thumb is to get your number, say you want 10x rates. Input 10, then add 2 zero's (0) to it to make it 1000. - -==Changing multi level ups== -Open up /conf/battle/exp.conf. Search for: -
// Turn this on to allow a player to level up more than once from a kill. (Note 1)
-multi_level_up: no
-
-and change it to a 'yes'. - -==Changing the required DEX for insta-cast== -Open up /conf/battle/skill.conf. Search for: -
// At what dex does the cast time become zero (instacast)?
-castrate_dex_scale: 150
-
-And change to whatever you want it to be. - -==Changing the max stats== -Open up /conf/battle/player.conf. Search for: -
// Max limit of char stats. (agi, str, etc.)
-max_parameter: 99
-
-// Same as max_parameter, but for 3rd classes.
-max_third_parameter: 120
-
-// Same as max_parameter, but for baby classes.
-max_baby_parameter: 80
-
-// Same as max_parameter, but for baby 3rd's.
-max_baby_third_parameter: 108
-
-And change it to whatever you want it to be. - -==Setting the max levels== -Please see [[Edit_Max_Level|Edit Max Level]]. - -==Setting PK in your server== -Navigate to /conf/battle/misc.conf. Find: -
// PK Server Mode.  Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player.
-// When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items. 
-// There is a nopvp.txt for setting up maps not to have pk on in this mode.  Novices cannot be attacked and cannot attack.
-// Normal pvp counter and rank display are disabled as well.
-// Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a 
-//   manner penalty of 5 each time they kill another player (see manner_system 
-//   config to adjust how this will affect players)
-pk_mode: 0
-
Set this to a '1' for PK mode without karma/manner system, set to '2' to enable karma/manner system. - -You should also take a look at: -
// For PK Server Mode. Change this to define the minimum level players can start PK-ing
-pk_min_level: 55
-
And change that setting accordingly as well. - -==Monsters with HP/MaxHP/Level/percent HP displays== -To get your monsters to display either their level, HP/MAXHP or percent of HP remaining, open up /conf/battle/monster.conf. Look for: -
// Display some mob info next to their name? (add as needed)
-// (does not works on guardian or emperium)
-// 1: Display mob HP (Hp/MaxHp format)
-// 2: Display mob HP (Percent of full life format)
-// 4: Display mob's level
-show_mob_info: 0
-
You can change this setting to anything, either 1, 2, 3, 4, 5, 6 or 7, by adding what you want to display together. Please note that not all of the information, if multiple things are displayed, may fit. +This article is aimed at configuration of Hercules for use. It is assumed that you have +[downloaded](Installation "wikilink") Hercules, have it [compiled](Compiling "wikilink") and +[configured](Connecting "wikilink") to connect. + +# Hercules File Structure + +When you open up your copy of Hercules for the first time, you may notice a lot of folders and files, we'll walk through +briefly what each one is for. + +| Location | Description | +|--------------------|------------------------------------------------------------------------------------------------------------------------------------| +| **/3rdparty/** | 3rd party files, such as mysql.h | +| **/conf/** | Main configuration settings, such as connection settings, battle settings and [mapflags](mapflag "wikilink"). | +| /conf/import/ | [Import folder](Import_folder "wikilink"), mainly used to keep your configuration settings after an SVN update. | +| /conf/battle/ | Where you will find settings to change the rates, drops, max stats and such for your server. | +| /conf/mapflags/ | Folder with all the [mapflags](mapflag "wikilink"), such as noteleport, pvp and gvg. | +| **/db/** | Databases, such as the job_db, experience tables, item and mob flat-file databases. | +| **/doc/** | Various documented settings, mainly for database settings. | +| **/npc/** | Any NPC/spawn file you will find in the game is in here. | +| /npc/airports/ | The airports and airship scripts are in here, and any NPC related to them. | +| /npc/battlegrounds | Battlegrounds scripts can be found in here. | +| /npc/cities/ | Any non-quest, non-kafra [NPC](NPC "wikilink") found in the towns are here. | +| /npc/custom/ | Any NPC not officially supported by Hercules is located in here. Here is where you will find your healers, warpers and MVP arenas. | +| /npc/events/ | Any official events, such as twin-towers or Christmas events on the official servers. | +| /npc/guides/ | Any guides in the cities. | +| /npc/guild/ | [WoE](War_of_Emperium "wikilink") scripts and functions are in here. | +| /npc/guild2/ | WoE:SE scripts and functions. | +| /npc/jobs/ | Job changing scripts and quests, as well as functions. | +| /npc/kafras/ | Kafra scripts and functions. | +| /npc/merchants/ | Any official merchants in here. | +| /npc/mobs/ | Spawn scripts for fields, dungeons as well as city cleaners in here. | +| /npc/other/ | Scripts that don't really fit anywhere else, like the marriage script. | +| /npc/quests/ | Official Quests, such as the Sign Quest or Thanatos Tower. | +| /npc/warps/ | Warp portals, and scripts, that behave that way. | +| **/sql-files/** | If using SQL, this is where the pre-made database dumps are, that will populate your database with the correct tables and such. | +| **/src/** | All source files, the meat and potatoes of the emu. | +| /src/char/ | Character server source files. | +| /src/common/ | Common server settings. [mmo.h](mmo.h "wikilink") is in here, the file that will modify most of the hard-coded server settings. | +| /src/login/ | Login server source files. | +| /src/map/ | Map server source files. | +| /src/plugins/ | Plugins source files. | +| /src/tool/ | \[Tools\](https://github.com/HerculesWS/Hercules/tree/stable/src/tool) source files, such as the mapcache builder. | +| **/tools/** | Contains tool scripts for various maintenance-related tasks. | +| **/vcproj-9/** | Project 9 Files,Files used if Using MS Visual Studio C++ 2008 | +| **/vcproj-10/** | Project 10 Files,Files used if using MS Visual Studio C++ 2010 | +| **/vcproj-12/** | Project 12 Files,Files used if using MS Visual Studio C++ 2012 | + +We're mainly focused on the **/conf/** folder in this article. + +# /conf/ + +In the /conf/ folder, holds all of the configuration settings for a quick customization. Here are the locations for a +frequent number of configuration changes. Remember that after changing any of these settings, it is always best to +restart your servers for the changes to take effect. + +## Changing the base/job experience rates + +Open up /conf/battle/exp.conf. Look for: + + // 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 + + + +and change to whatever you want, in multiples of 100. A good rule of thumb is to get your number, say you want 10x +rates. Input 10, then add 2 zero's (0) to it to make it 1000. + +## Changing multi level ups + +Open up /conf/battle/exp.conf. Search for: + + // Turn this on to allow a player to level up more than once from a kill. (Note 1) + multi_level_up: no + + and change it to a 'yes'. + +## Changing the required DEX for insta-cast + +Open up /conf/battle/skill.conf. Search for: + + // At what dex does the cast time become zero (instacast)? + castrate_dex_scale: 150 + + And change to whatever you want it to be. + +## Changing the max stats + +Open up /conf/battle/player.conf. Search for: + + // Max limit of char stats. (agi, str, etc.) + max_parameter: 99 + + // Same as max_parameter, but for 3rd classes. + max_third_parameter: 120 + + // Same as max_parameter, but for baby classes. + max_baby_parameter: 80 + + // Same as max_parameter, but for baby 3rd's. + max_baby_third_parameter: 108 + + And change it to whatever you want it to be. + +## Setting the max levels + +Please see [Edit Max Level](Edit_Max_Level "wikilink"). + +## Setting PK in your server + +Navigate to /conf/battle/misc.conf. Find: + + // PK Server Mode. Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player. + // When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items. + // There is a nopvp.txt for setting up maps not to have pk on in this mode. Novices cannot be attacked and cannot attack. + // Normal pvp counter and rank display are disabled as well. + // Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a + // manner penalty of 5 each time they kill another player (see manner_system + // config to adjust how this will affect players) + pk_mode: 0 + + Set this to a '1' for PK mode without karma/manner system, set to '2' to enable karma/manner system. + +You should also take a look at: + + // For PK Server Mode. Change this to define the minimum level players can start PK-ing + pk_min_level: 55 + + And change that setting accordingly as well. + +## Monsters with HP/MaxHP/Level/percent HP displays + +To get your monsters to display either their level, HP/MAXHP or percent of HP remaining, open up +/conf/battle/monster.conf. Look for: + + // Display some mob info next to their name? (add as needed) + // (does not works on guardian or emperium) + // 1: Display mob HP (Hp/MaxHp format) + // 2: Display mob HP (Percent of full life format) + // 4: Display mob's level + show_mob_info: 0 + + You can change this setting to anything, either 1, 2, 3, 4, 5, 6 or 7, by adding what you want to display +together. Please note that not all of the information, if multiple things are displayed, may fit. For example, I want mob level and mob percent of HP showing, I would set this to 6. -==Setting Drop rates== +## Setting Drop rates + Open up /conf/battle/drops.conf and look for the following: - // The rate the common items are dropped (Items that are in the ETC tab, besides card) - item_rate_common: 100 - item_rate_common_boss: 100 - item_drop_common_min: 1 - item_drop_common_max: 10000 - - // The rate healing items are dropped (items that restore HP or SP) - item_rate_heal: 100 - item_rate_heal_boss: 100 - item_drop_heal_min: 1 - item_drop_heal_max: 10000 - - // The rate at which usable items (in the item tab) other then healing items are dropped. - item_rate_use: 100 - item_rate_use_boss: 100 - item_drop_use_min: 1 - item_drop_use_max: 10000 - - // The rate at which equipment is dropped. - item_rate_equip: 100 - item_rate_equip_boss: 100 - item_drop_equip_min: 1 - item_drop_equip_max: 10000 - - // The rate at which cards are dropped - item_rate_card: 100 - item_rate_card_boss: 100 - item_drop_card_min: 1 - item_drop_card_max: 10000 - - // The rate adjustment for the MVP items that the MVP gets directly in their inventory - item_rate_mvp: 100 - item_drop_mvp_min: 1 - item_drop_mvp_max: 10000 - - // The rate adjustment for card-granted item drops. - item_rate_adddrop: 100 - item_drop_add_min: 1 - item_drop_add_max: 10000 - - // Rate adjustment for Treasure Box drops (these override all other modifiers) - item_rate_treasure: 100 - item_drop_treasure_min: 1 - item_drop_treasure_max: 10000 - -All item_rate_* values can range from 0 to 1000000 (100 = 100%) and item_drop_* values can range from 1 to 10000 (100 = 1.00%). The meaning of the lines is explained using the common items block, but can be applied to other blocks as well (read the comments of each block, to see, what they refer to). Where there is no 'boss' line, it is simply not applicable to differentiate between normal and boss monsters. - - item_rate_common: 100 - -Specifies the rate adjustment for (common) items dropped by non-boss monsters. This means, if this is set to 100 (100%), all drop rates in the mob db are used, as is. If you set it to 600, drop rates will be 6 times high as in mob db. So 0.01% drop rate for cards would become 0.06%. - - item_rate_common_boss: 100 +`// The rate the common items are dropped (Items that are in the ETC tab, besides card)` +`item_rate_common: 100` +`item_rate_common_boss: 100` +`item_drop_common_min: 1` +`item_drop_common_max: 10000` + +`// The rate healing items are dropped (items that restore HP or SP)` +`item_rate_heal: 100` +`item_rate_heal_boss: 100` +`item_drop_heal_min: 1` +`item_drop_heal_max: 10000` + +`// The rate at which usable items (in the item tab) other then healing items are dropped.` +`item_rate_use: 100` +`item_rate_use_boss: 100` +`item_drop_use_min: 1` +`item_drop_use_max: 10000` + +`// The rate at which equipment is dropped.` +`item_rate_equip: 100` +`item_rate_equip_boss: 100` +`item_drop_equip_min: 1` +`item_drop_equip_max: 10000` + +`// The rate at which cards are dropped` +`item_rate_card: 100` +`item_rate_card_boss: 100` +`item_drop_card_min: 1` +`item_drop_card_max: 10000` + +`// The rate adjustment for the MVP items that the MVP gets directly in their inventory` +`item_rate_mvp: 100` +`item_drop_mvp_min: 1` +`item_drop_mvp_max: 10000` + +`// The rate adjustment for card-granted item drops.` +`item_rate_adddrop: 100` +`item_drop_add_min: 1` +`item_drop_add_max: 10000` + +`// Rate adjustment for Treasure Box drops (these override all other modifiers)` +`item_rate_treasure: 100` +`item_drop_treasure_min: 1` +`item_drop_treasure_max: 10000` + +All item_rate\_\* values can range from 0 to 1000000 (100 = 100%) and item_drop\_\* values can range from 1 to 10000 +(100 = 1.00%). The meaning of the lines is explained using the common items block, but can be applied to other blocks as +well (read the comments of each block, to see, what they refer to). Where there is no 'boss' line, it is simply not +applicable to differentiate between normal and boss monsters. + +`item_rate_common: 100` + +Specifies the rate adjustment for (common) items dropped by non-boss monsters. This means, if this is set to 100 (100%), +all drop rates in the mob db are used, as is. If you set it to 600, drop rates will be 6 times high as in mob db. So +0.01% drop rate for cards would become 0.06%. + +`item_rate_common_boss: 100` Specifies the rate adjustment for (common) items dropped by boss monsters. Works like item_rate_common. - item_drop_common_min: 1 +`item_drop_common_min: 1` -Specifies the minimum drop chance of (common) items. By default this is 1 (0.01%). All drop rates, which would render lower than this value, due to the effect of their respective item_rate_* settings, will be set to this value. Having this value set to 4 and rate to 100% would cause all cards and rare items, which are dropped at 0.01% being dropped at a chance of 0.04%. +Specifies the minimum drop chance of (common) items. By default this is 1 (0.01%). All drop rates, which would render +lower than this value, due to the effect of their respective item_rate\_\* settings, will be set to this value. Having +this value set to 4 and rate to 100% would cause all cards and rare items, which are dropped at 0.01% being dropped at a +chance of 0.04%. - item_drop_common_max: 10000 +`item_drop_common_max: 10000` -Specifies the maximum drop chance of (common) items. By default this is 10000 (100%). Any drop chance, which would be higher than this value, is set to this value. +Specifies the maximum drop chance of (common) items. By default this is 10000 (100%). Any drop chance, which would be +higher than this value, is set to this value. -==Setting a limit on the amount of castles a guild can own== -You can limit the amount of castles a guild can hold. Any guild that has the allotted number of castles will deal '0' damage to the emp they try to take after hitting the threshold. Open up /conf/battle/guild.conf. Find: -
// Maximum castles one guild can own (0 = unlimited)
-guild_max_castles: 0
-
-Set this to whatever you want the maximum to be. +## Setting a limit on the amount of castles a guild can own -==Setting what characters are allowed in a character name== -Typically, we don't want character names that contain ASCII weird characters or whatnot. Here is a great example that will limit the characters a name can use to what's on the standard American Keyboard. Open up /conf/char_athena.conf and look for: -
// Manage possible letters/symbol in the name of charater. Control character (0x00-0x1f) are never accepted. Possible values are:
-// NOTE: Applies to character, party and guild names.
-// 0: no restriction (default)
-// 1: only letters/symbols in 'char_name_letters' option.
-// 2: Letters/symbols in 'char_name_letters' option are forbidden. All others are possibles.
-char_name_option: 1
+You can limit the amount of castles a guild can hold. Any guild that has the allotted number of castles will deal '0'
+damage to the emp they try to take after hitting the threshold. Open up /conf/battle/guild.conf. Find: 
 
-// Set the letters/symbols that you want use with the 'char_name_option' option.
-// Note: Don't add spaces unless you mean to add 'space' to the list.
-char_name_letters: `1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?
-
-And set it to exactly what I have here. + // Maximum castles one guild can own (0 = unlimited) + guild_max_castles: 0 -== Changing "Welcome to Hercules SVN Version!" text == -The "Welcome to Hercules SVN! Enjoy! Please report any bugs you find." text can be changed or removed. Open up /npc/motd.txt and change as needed. Please keep note of the contents in the file: +
Set this to whatever you want the maximum to be. - // Internal default is limited to 128 lines. If you need more, you will need to modify the MOTD_LINE_SIZE definition in pc.c +## Setting what characters are allowed in a character name -To disable this message altogether simply delete the contents of the file, [b]but do not delete the entire file itself. Errors will arise in your map server![/b] +Typically, we don't want character names that contain ASCII weird characters or whatnot. Here is a great example that +will limit the characters a name can use to what's on the standard American Keyboard. Open up /conf/char_athena.conf and +look for: -== Grf-files.txt == -This is where you put the path to your Ragnarok Online directory. You only need to set ''grf'' and/or ''data_dir'', if you [[#Overriding map-cache|load maps from GRFs rather than from map-cache]]. + // Manage possible letters/symbol in the name of charater. Control character (0x00-0x1f) are never accepted. Possible values are: + // NOTE: Applies to character, party and guild names. + // 0: no restriction (default) + // 1: only letters/symbols in 'char_name_letters' option. + // 2: Letters/symbols in 'char_name_letters' option are forbidden. All others are possibles. + char_name_option: 1 + + // Set the letters/symbols that you want use with the 'char_name_option' option. + // Note: Don't add spaces unless you mean to add 'space' to the list. + char_name_letters: `1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>? + + And set it to exactly what I have here. + +## Changing "Welcome to Hercules SVN Version!" text + +The "Welcome to Hercules SVN! Enjoy! Please report any bugs you find." text can be changed or removed. Open up +/npc/motd.txt and change as needed. Please keep note of the contents in the file: + +`// Internal default is limited to 128 lines.  If you need more, you will need to modify the MOTD_LINE_SIZE definition in pc.c` + +To disable this message altogether simply delete the contents of the file, \[b\]but do not delete the entire file +itself. Errors will arise in your map server\![/b\] + +## Grf-files.txt + +This is where you put the path to your Ragnarok Online directory. You only need to set *grf* and/or *data_dir*, if you +[load maps from GRFs rather than from map-cache](#Overriding_map-cache "wikilink"). Example: - //----------------------------------------- - // GRF List - //----------------------------------------- - // grf: C:\path\to\RO\data.grf - // You may add more in this format - // grf: - grf: C:\Program Files\Gravity\RO\data.grf - grf: C:\Program Files\Gravity\RO\rdata.grf - grf: C:\Program Files\Gravity\RO\YourRO.grf - - //------ Others --------------------------- - - // Data Directory (without the actual data\ though) - // the below example would use C:\path\to\RO\data\ - //data_dir: C:\path\to\RO\ - data_dir: C:\Program Files\Gravity\RO\ + +`//-----------------------------------------` +`// GRF List` +`//-----------------------------------------` +`// grf: C:\path\to\RO\data.grf` +`// You may add more in this format` +`// grf: ` +`grf: C:\Program Files\Gravity\RO\data.grf` +`grf: C:\Program Files\Gravity\RO\rdata.grf` +`grf: C:\Program Files\Gravity\RO\YourRO.grf` + +`//------ Others ---------------------------` + +`// Data Directory (without the actual data\ though)` +`// the below example would use C:\path\to\RO\data\` +`//data_dir: C:\path\to\RO\` +`data_dir: C:\Program Files\Gravity\RO\` + If you have a custom GRF you add it here. For 64-bit Windows the path will be Program Files(x86). -== Changing what displays with the command @help == -Help.txt will change what displays for the @commands related to help (@h, @help), and help2.txt will change what displays for @h2 and @help2. The first text basically explains it all, 0 to display the help line and you can use other numbers for other GM levels. +## Changing what displays with the command @help + +Help.txt will change what displays for the @commands related to help (@h, @help), and help2.txt will change what +displays for @h2 and @help2. The first text basically explains it all, 0 to display the help line and you can use other +numbers for other GM levels. + +## Changing the max number of hairstyles and palettes -== Changing the max number of hairstyles and palettes == In client.conf, change the following numbers to the number of hairstyles/palettes you have: - // valid range of dye's and styles on the client - min_hair_style: 0 - max_hair_style: 25 - min_hair_color: 0 - max_hair_color: 8 - min_cloth_color: 0 - max_cloth_color: 4 -Don't go past the number of hairstyles/palettes you have though, or else you might get errors when using a hairstyle/palette NPC, but only if the NPC goes over the number of hairstyles/palettes you have. - -== Overriding map-cache == -If you do not want to update your map-cache each time your maps change or are added, you might want to read map data from GRFs. To do so, you need to edit map_athena.conf at: - // Read map data from GATs and RSWs in GRF files or a data directory - // as referenced by grf-files.txt rather than from the mapcache? - use_grf: no -Set this value to '''yes''', to enable GRFs as map data storage. You need to set-up [[#Grf-files.txt|grf-files.txt]] to point to the archives, which contain your maps. Note, that [[resnametable.txt]] (which allows setting up map aliases) is currently read from GRF archives only. - -= /conf/atcommand.conf and /conf/groups.conf = - -As of Hercules trunk r15572, the charcommands and atcommands are configured in the groups.conf. The server reads this file to decide who can use what command. normal players are id: 0, while the Administrators have the ultimate control at id:99. - -Removing a command from the group Id list will disable its use in game -the syntax is this: - -

-Unique group number. The only required field.
-
-
-Any string. If empty, defaults to "Group ". It is used in several @who 
-commands.
-
-
-Equivalent of GM level, which was used in revisions before r15572. You can 
-set it to any number, but usually it's between 0 (default) and 99. Members of 
-groups with lower level can not perform some actions/commands (like @kick) on 
-members of groups with higher level. It is what script command getgmlevel() 
-returns. Group level can also be used to override trade restrictions 
-(db/item_trade.txt).
-
-
-A group of settings
-	 : 
-or
-	 : [ ,  ]
-First boolean value is for atcommand, second one for charcommand. If set to 
-true, group can use command. If only atcommand value is provided, false is 
-assumed for charcommand. If a command name is not included, false is assumed for 
-both atcommand and charcommand.
-For a full list of available commands, see: doc/atcommands.txt.
-Command names must not be aliases.
-
-
-Boolean value. If true then all commands used by the group will be logged to 
-atcommandlog. If setting is omitted in a group definition, false is assumed.
-Requires 'log_commands' to be enabled in 'conf/log_athena.conf'.
-
-
-A group of settings
-	 : 
-If a permission is not included, false is assumed.
-For a full list of available permissions, see: doc/permissions.txt
-
-
-A list of group names that given group will inherit commands and permissions 
-from. Group names are case-sensitive.
-
-
- - -For example, say I want to allow my level 60 GM's to use @baselevel, but I want my level 80 GM's to use the #baselevel counterpart to increase another players' base level. + +`// valid range of dye's and styles on the client` +`min_hair_style: 0` +`max_hair_style: 25` +`min_hair_color: 0` +`max_hair_color: 8` +`min_cloth_color: 0 ` +`max_cloth_color: 4` + +Don't go past the number of hairstyles/palettes you have though, or else you might get errors when using a +hairstyle/palette NPC, but only if the NPC goes over the number of hairstyles/palettes you have. + +## Overriding map-cache + +If you do not want to update your map-cache each time your maps change or are added, you might want to read map data +from GRFs. To do so, you need to edit map_athena.conf at: + +`// Read map data from GATs and RSWs in GRF files or a data directory` +`// as referenced by grf-files.txt rather than from the mapcache?` +`use_grf: no` + +Set this value to **yes**, to enable GRFs as map data storage. You need to set-up +[grf-files.txt](#Grf-files.txt "wikilink") to point to the archives, which contain your maps. Note, that +[resnametable.txt](resnametable.txt "wikilink") (which allows setting up map aliases) is currently read from GRF +archives only. + +# /conf/atcommand.conf and /conf/groups.conf + +As of Hercules trunk r15572, the charcommands and atcommands are configured in the groups.conf. The server reads this +file to decide who can use what command. normal players are id: 0, while the Administrators have the ultimate control at +id:99. + +Removing a command from the group Id list will disable its use in game the syntax is this: + + + Unique group number. The only required field. + + + Any string. If empty, defaults to "Group ". It is used in several @who + commands. + + + Equivalent of GM level, which was used in revisions before r15572. You can + set it to any number, but usually it's between 0 (default) and 99. Members of + groups with lower level can not perform some actions/commands (like @kick) on + members of groups with higher level. It is what script command getgmlevel() + returns. Group level can also be used to override trade restrictions + (db/item_trade.txt). + + + A group of settings + : + or + : [ , ] + First boolean value is for atcommand, second one for charcommand. If set to + true, group can use command. If only atcommand value is provided, false is + assumed for charcommand. If a command name is not included, false is assumed for + both atcommand and charcommand. + For a full list of available commands, see: doc/atcommands.txt. + Command names must not be aliases. + + + Boolean value. If true then all commands used by the group will be logged to + atcommandlog. If setting is omitted in a group definition, false is assumed. + Requires 'log_commands' to be enabled in 'conf/log_athena.conf'. + + + A group of settings + : + If a permission is not included, false is assumed. + For a full list of available permissions, see: doc/permissions.txt + + + A list of group names that given group will inherit commands and permissions + from. Group names are case-sensitive. + +For example, say I want to allow my level 60 GM's to use @baselevel, but I want my level 80 GM's to use the \#baselevel +counterpart to increase another players' base level. The setting would be set as follows. -
-{
-   id: 60
-   name: "Event Manager"
-   inherit: ( "Support" )
-   level: 1
-   commands: {
-       baselevel: [true,false]
-   }
-   log_commands: true
-   permissions: {
-       can_trade: false
-       any_warp: true
-   }
-},
-
-{
-   id: 80
-   name: "Law Enforcement"
-   inherit: ( "Support" )
-   level: 2
-   commands: {
-       baselevel: [false,true]
-   }
-   log_commands: true
-   permissions: {
-       join_chat: true
-       kick_chat: true
-       hide_session: true
-       who_display_aid: true
-       hack_info: true
-       any_warp: true
-       view_hpmeter: true
-    }
-},
- -Notice that the first flag is for @, and the second is for #. - -'''NOTE: If a group ID inherits another group ID, and you add the same command under both groups, it will cause group.conf to act unpredictably. It has been noted that it may cause no groups, to have any atcommands. Including the admin group.''' + { + id: 60 + name: "Event Manager" + inherit: ( "Support" ) + level: 1 + commands: { + baselevel: [true,false] + } + log_commands: true + permissions: { + can_trade: false + any_warp: true + } + }, + + { + id: 80 + name: "Law Enforcement" + inherit: ( "Support" ) + level: 2 + commands: { + baselevel: [false,true] + } + log_commands: true + permissions: { + join_chat: true + kick_chat: true + hide_session: true + who_display_aid: true + hack_info: true + any_warp: true + view_hpmeter: true + } + }, + +Notice that the first flag is for @, and the second is for \#. + +**NOTE: If a group ID inherits another group ID, and you add the same command under both groups, it will cause +group.conf to act unpredictably. It has been noted that it may cause no groups, to have any atcommands. Including the +admin group.** diff --git a/docs/setup/configure.md b/docs/setup/configure.md index 44b8344..f0337c1 100644 --- a/docs/setup/configure.md +++ b/docs/setup/configure.md @@ -1,77 +1,98 @@ -Using '''configure''' script is a method to generate makefiles before compilation in Unix systems. - -When installing Hercules, configure script should be run after [[Git Clone]] and before compiling. - -== Basic usage == -
''Main article: [[Configure]].''
-To avoid errors in server-client communication, [[PACKETVER]] must be set to date the client you're going to use has been released at (in YYYYMMDD format), eg 20100730 for 2010-07-30aRagexeRE. Instead of editing [[mmo.h]] directly, PACKETVER can be set to desired date with configure switch --enable-packetver=YYYYMMDD. - -Run following command, replacing ''YYYYMMDD'' with your client release date, eg ''20100730''. - ./configure --enable-packetver=YYYYMMDD -Configure script will perform necessary tests and generate makefiles. -
-=== Sample output === -
checking whether make sets $(MAKE)... yes
-checking for gcc... gcc
-checking for C compiler default output file name... a.out
-checking whether the C compiler works... yes
-checking whether we are cross compiling... no
-checking for suffix of executables...
-checking for suffix of object files... o
-checking whether we are using the GNU C compiler... yes
-checking whether gcc accepts -g... yes
-checking for gcc option to accept ANSI C... none needed
-checking how to run the C preprocessor... gcc -E
-checking whether byte ordering is bigendian... no
-checking whether pointers can be stored in ints (old code)... yes
-checking whether gcc supports -Wno-unused-parameter... yes
-checking whether gcc supports -Wno-pointer-sign... yes
-checking whether gcc can actually use -Wno-pointer-sign... yes
-checking whether gcc supports -Wno-switch... yes
-checking whether gcc supports -fPIC... yes
-checking whether gcc needs -fPIC for shared objects... no
-checking whether gcc supports -fno-strict-aliasing... yes
-checking whether gcc is able to typecast to union... yes
-checking for setrlimit... yes
-checking for strnlen... yes
-checking for inflateEnd in -lz... yes
-checking zlib.h usability... yes
-checking zlib.h presence... yes
-checking for zlib.h... yes
-checking for library containing sqrt... -lm
-checking for library containing clock_gettime... -lrt
-checking whether CLOCK_MONOTONIC is supported and works... yes
-checking for mysql_config... /usr/bin/mysql_config
-checking for mysql_init in -lmysqlclient... yes
-checking mysql.h usability... yes
-checking mysql.h presence... yes
-checking for mysql.h... yes
-checking MySQL library (optional)... yes (5.0.51a)
-checking for pcre_study in -lpcre... yes
-checking PCRE library (optional)... yes
-checking host OS... Linux
-checking for MinGW... no
-configure: creating ./config.status
-config.status: creating Makefile
-config.status: creating src/common/Makefile
-config.status: creating 3rdparty/mt19937ar/Makefile
-config.status: creating src/char/Makefile
-config.status: creating src/login/Makefile
-config.status: creating src/char_sql/Makefile
-config.status: creating src/txt-converter/Makefile
-config.status: creating src/map/Makefile
-config.status: creating src/plugins/Makefile
-config.status: creating src/tool/Makefile
-=== Setting executable bit === -In order to run configure script it must be executable, ie have the ''execute'' permission set. When checking out a working copy from a git repository repository, executable bit should be set automatically. However, if it fails for some reason, running ./configure will bring the following message (or similar): - bash: ./configure: Permission denied +Using **configure** script is a method to generate makefiles before compilation in Unix systems. + +When installing Hercules, configure script should be run after [Git Clone](Git_Clone "wikilink") and before compiling. + +## Basic usage + + + +> *Main article: [Configure](Configure "wikilink").* + + To avoid errors in server-client communication, [`PACKETVER`](PACKETVER "wikilink") must be set to date +the client you're going to use has been released at (in YYYYMMDD format), eg `20100730` for 2010-07-30aRagexeRE. Instead +of editing [mmo.h](mmo.h "wikilink") directly, `PACKETVER` can be set to desired date with configure switch +`--enable-packetver=YYYYMMDD`. + +Run following command, replacing *YYYYMMDD* with your client release date, eg *20100730*. + +` ./configure --enable-packetver=YYYYMMDD` + +Configure script will perform necessary tests and generate makefiles. + +### Sample output + + checking whether make sets $(MAKE)... yes + checking for gcc... gcc + checking for C compiler default output file name... a.out + checking whether the C compiler works... yes + checking whether we are cross compiling... no + checking for suffix of executables... + checking for suffix of object files... o + checking whether we are using the GNU C compiler... yes + checking whether gcc accepts -g... yes + checking for gcc option to accept ANSI C... none needed + checking how to run the C preprocessor... gcc -E + checking whether byte ordering is bigendian... no + checking whether pointers can be stored in ints (old code)... yes + checking whether gcc supports -Wno-unused-parameter... yes + checking whether gcc supports -Wno-pointer-sign... yes + checking whether gcc can actually use -Wno-pointer-sign... yes + checking whether gcc supports -Wno-switch... yes + checking whether gcc supports -fPIC... yes + checking whether gcc needs -fPIC for shared objects... no + checking whether gcc supports -fno-strict-aliasing... yes + checking whether gcc is able to typecast to union... yes + checking for setrlimit... yes + checking for strnlen... yes + checking for inflateEnd in -lz... yes + checking zlib.h usability... yes + checking zlib.h presence... yes + checking for zlib.h... yes + checking for library containing sqrt... -lm + checking for library containing clock_gettime... -lrt + checking whether CLOCK_MONOTONIC is supported and works... yes + checking for mysql_config... /usr/bin/mysql_config + checking for mysql_init in -lmysqlclient... yes + checking mysql.h usability... yes + checking mysql.h presence... yes + checking for mysql.h... yes + checking MySQL library (optional)... yes (5.0.51a) + checking for pcre_study in -lpcre... yes + checking PCRE library (optional)... yes + checking host OS... Linux + checking for MinGW... no + configure: creating ./config.status + config.status: creating Makefile + config.status: creating src/common/Makefile + config.status: creating 3rdparty/mt19937ar/Makefile + config.status: creating src/char/Makefile + config.status: creating src/login/Makefile + config.status: creating src/char_sql/Makefile + config.status: creating src/txt-converter/Makefile + config.status: creating src/map/Makefile + config.status: creating src/plugins/Makefile + config.status: creating src/tool/Makefile + +### Setting executable bit + +In order to run configure script it must be executable, ie have the *execute* permission set. When checking out a +working copy from a git repository repository, executable bit should be set automatically. However, if it fails for some +reason, running `./configure` will bring the following message (or similar): + +` bash: ./configure: Permission denied` + To fix this, set executable permission with: - chmod +x ./configure -== Additional switches == +` chmod +x ./configure` + +## Additional switches + To display all available switches use: - ./configure --help -=== Debug mode === -It is possible to compile Hercules in debug mode with --enable-debug switch. -[[Category:Installation]] \ No newline at end of file +` ./configure --help` + +### Debug mode + +It is possible to compile Hercules in debug mode with `--enable-debug` switch. + +[Category:Installation](Category:Installation "wikilink") diff --git a/docs/setup/connecting.md b/docs/setup/connecting.md index 3703f36..007c7d4 100644 --- a/docs/setup/connecting.md +++ b/docs/setup/connecting.md @@ -1,174 +1,269 @@ -{{outdated}} +!!! warning + This page may contain outdated information, incompatible with the current version of Hercules and its coding standards. +This article covers taking the configuration steps to ensure a successful connection to your servers. You are required +to know the in and outs of your OS, as well as what a [LAN IP](wikipedia:Local_area_network "wikilink") and a [WAN +IP](wikipedia:Wide_area_network "wikilink") are. -This article covers taking the configuration steps to ensure a successful connection to your servers. You are required to know the in and outs of your OS, -as well as what a [[wikipedia:Local area network|LAN IP]] and a [[wikipedia:Wide area network|WAN IP]] are. +## Basics of the three servers -==Basics of the three servers== -===Login Server=== -The login server handles all login packets from the client. The client sees the login server first and connects to it first. The login server listens on the -port 6900 by default and usually reads data from the login table. The login server connects directly to the character server and passes it's information -to it once the client has successfully logged in. If your login server won't connect, your players cannot login in, but can play. +### Login Server -===Character Server=== -The character server handles all character selection and character loading for the map server. The character server receives commands to primarily display characters -once the client has logged in. The character server listens on the port 6121 by default. It also handles the loading and saving of most character data. -If the character server becomes disconnected, character data saving is not possible. +The login server handles all login packets from the client. The client sees the login server first and connects to it +first. The login server listens on the port 6900 by default and usually reads data from the login table. The login +server connects directly to the character server and passes it's information to it once the client has successfully +logged in. If your login server won't connect, your players cannot login in, but can play. -===Map Server=== -The map server handles all map functions, including, but not limited to, mob functions, map functions, NPC loading and unloading, as well as NPC processing. -the map server is your bread and butter and allows people to play on your server. It listens on the port 5121 by default. +### Character Server -If the character server becomes disconnected from your map server, it's likely the mapserver will disconnect everyone from it. This is not the case when the -MySQL server loses its connection to Hercules, as Hercules currently does not restore this connection. +The character server handles all character selection and character loading for the map server. The character server +receives commands to primarily display characters once the client has logged in. The character server listens on the +port 6121 by default. It also handles the loading and saving of most character data. If the character server becomes +disconnected, character data saving is not possible. -===Port Forwarding=== +### Map Server -If you intend to let your players play from an external internet connection, you ''must'' forward ports 6900, 6121, and 5121 respectively in your router's control panel. Simply forwarding port 6900 is not enough to allow clients to connect, and traffic will not be passed solely through your login server, even though they can communicate with one another internally on your localhost address. +The map server handles all map functions, including, but not limited to, mob functions, map functions, NPC loading and +unloading, as well as NPC processing. the map server is your bread and butter and allows people to play on your server. +It listens on the port 5121 by default. -==Configuring Hercules for use== -After you have finished [[compiling]] Hercules, you can set it up for use. There will be four files that we will concentrate on. Any settings we change in these files should '''always''' be moved to the relevant import folder files. If your compiler hasn't already made a copy of the [`conf/import-tmpl`](https://github.com/HerculesWS/Hercules/tree/stable/conf/import-tmpl) folder and named it /conf/import do that now. +If the character server becomes disconnected from your map server, it's likely the mapserver will disconnect everyone +from it. This is not the case when the MySQL server loses its connection to Hercules, as Hercules currently does not +restore this connection. -=====Using the /conf/import/ folder ([`conf/import-tmpl/`](https://github.com/HerculesWS/Hercules/tree/stable/conf/import-tmpl))===== -In this folder, you can 'import' your settings into each of the respected files. All you need is each parameter. When you do this, your settings will never be overwritten when you need -to update your GIT, as the import folder is built once. You can throw all of your settings in here and they will remain as they are, and will read AFTER the -main settings, which means these settings will take priority. +### Port Forwarding -===Step 1. Interserver Communication Passwords=== -First, you will need to set an intercommunication password and user. This is one of the most important steps to securing your server. +If you intend to let your players play from an external internet connection, you *must* forward ports 6900, 6121, and +5121 respectively in your router's control panel. Simply forwarding port 6900 is not enough to allow clients to connect, +and traffic will not be passed solely through your login server, even though they can communicate with one another +internally on your localhost address. -In order for the char-server to accept commands and packets from the login server, and for the map-server to accept commands and packets from the char-server they have to 'log-in' to each other, using the Server Communication passwords. -You MUST set these to something other than defaults, but you can set them to random characters, as long as they are the same in the three places they appear in, which are: [`conf/char-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf), [`conf/map-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf) and your login sql table. -They are defaulted to s1/p1, and '''MUST''' be changed. +## Configuring Hercules for use -Changes must be made to the import folder to ensure proper upgradability. A good habit to get into when working with GIT. -Simply copy and paste the lines you wish to alter from the .conf file to the relevant .txt file in the import folder. -Your /conf/import/char_conf.txt ''and'' /conf/import/map_conf.txt files should look as follows, with ''no'' changes made to [`conf/char-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf) or [`conf/map-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf):
-
// Server Communication username and password.
-userid: [new user]
-passwd: [new password]
+After you have finished [compiling](compiling "wikilink") Hercules, you can set it up for use. There will be four files +that we will concentrate on. Any settings we change in these files should **always** be moved to the relevant import +folder files. If your compiler hasn't already made a copy of the +\[\`conf/import-tmpl\`\](https://github.com/HerculesWS/Hercules/tree/stable/conf/import-tmpl) folder and named it +/conf/import do that now. -Your login table should match. Use this SQL query (or make the changes using your favourite SQL gui): -
use databasename_rag;
-UPDATE login
-set `userid` = "[new user]", `user_pass` = "[new password]" where `account_id` = 1;
+##### Using the /conf/import/ folder (\[\`conf/import-tmpl/\`\](https://github.com/HerculesWS/Hercules/tree/stable/conf/import-tmpl)) + +In this folder, you can 'import' your settings into each of the respected files. All you need is each parameter. When +you do this, your settings will never be overwritten when you need to update your GIT, as the import folder is built +once. You can throw all of your settings in here and they will remain as they are, and will read AFTER the main +settings, which means these settings will take priority. + +### Step 1. Interserver Communication Passwords + +First, you will need to set an intercommunication password and user. This is one of the most important steps to securing +your server. + +In order for the char-server to accept commands and packets from the login server, and for the map-server to accept +commands and packets from the char-server they have to 'log-in' to each other, using the Server Communication passwords. +You MUST set these to something other than defaults, but you can set them to random characters, as long as they are the +same in the three places they appear in, which are: +\[\`conf/char-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf), +\[\`conf/map-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf) and your login sql +table. They are defaulted to s1/p1, and **MUST** be changed. + +Changes must be made to the import folder to ensure proper upgradability. A good habit to get into when working with +GIT. Simply copy and paste the lines you wish to alter from the .conf file to the relevant .txt file in the import +folder. Your /conf/import/char_conf.txt *and* /conf/import/map_conf.txt files should look as follows, with *no* changes +made to \[\`conf/char-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf) or +\[\`conf/map-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf): + + + // Server Communication username and password. + userid: [new user] + passwd: [new password] + + + +Your login table should match. Use this SQL query (or make the changes using your favourite SQL gui): + + use databasename_rag; + UPDATE login + set `userid` = "[new user]", `user_pass` = "[new password]" where `account_id` = 1; + + After the user and password is set, you can move on down the page. -===Step 2. [`conf/login-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/login-server.conf)=== -Usually there is nothing to be done here in terms on connection. -You may want to edit your login_port to something other than default, but it must be an unused port by your OS. +### Step 2. \[\`conf/login-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/login-server.conf) + +Usually there is nothing to be done here in terms on connection. You may want to edit your login_port to something other +than default, but it must be an unused port by your OS. + +You can find this out by starting all the services that you need on the server and issuing the following commands to +your console: -You can find this out by starting all the services that you need on the server and issuing the following commands to your console: +**If using Windows:** +Goto Start, then click 'Run'. Type 'cmd' and press enter. Run the following command: -'''If using Windows:'''
-Goto Start, then click 'Run'. Type 'cmd' and press enter. Run the following command: -
netstat -a
-'''If using *nix:''' -
$ lsof -i
+ netstat -a -Once you have selected a port if you're going to change it, your /conf/import/login_conf.txt file should look as follows, with ''no'' changes made to [`conf/login-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/login-server.conf) (again just copy pasting the lines we want to change from one file to the other):
-
// Login Server Port
-login_port: [new port]
+
**If using \*nix:** -===Step 3. [`conf/char-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf)=== -This file sets parameters for the char-server to read. -When you open this up, there are a few things we need to do in here. + $ lsof -i + + + +Once you have selected a port if you're going to change it, your /conf/import/login_conf.txt file should look as +follows, with *no* changes made to +\[\`conf/login-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/login-server.conf) (again just +copy pasting the lines we want to change from one file to the other): + + + // Login Server Port + login_port: [new port] + + + +### Step 3. \[\`conf/char-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/char-server.conf) + +This file sets parameters for the char-server to read. When you open this up, there are a few things we need to do in +here. Firstly we should name our server: -When setting server_name, be sure to not use spaces as it says. -
// Server name, use alternative character such as ASCII 160 for spaces.
-// NOTE: Do not use spaces in the name, or guild emblems won't work client-side!
-server_name: [new server name]
+When setting server_name, be sure to not use spaces as it says. + + // Server name, use alternative character such as ASCII 160 for spaces. + // NOTE: Do not use spaces in the name, or guild emblems won't work client-side! + server_name: [new server name] + + + + + + // Wisp name for server: used to send wisp from server to players (between 4 to 23 characters) + wisp_server_name: [new server name] + + -
// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)
-wisp_server_name: [new server name]
+Usually, Hercules will auto-detect your external and internal IP if the IP fields are [commented +out](comments "wikilink"), but let's go ahead and remove the two slashes (//) from login_ip and char_ip. -Usually, Hercules will auto-detect your external and internal IP if the IP fields are [[comments|commented out]], but let's go ahead and remove the two slashes (//) from login_ip and char_ip. +The login_ip will point to the IP address where the login server will be running. Usually this is the localhost, or +127.0.0.1. If the login-server is to be located on the same network as the char-server (but on a different PC), use the +LAN IP of the login server's machine. If you are running a dedicated machine in a datacenter, or you know your IP is not +going to change, you can set this to your WAN IP. -The login_ip will point to the IP address where the login server will be running. Usually this is the localhost, or 127.0.0.1. -If the login-server is to be located on the same network as the char-server (but on a different PC), use the LAN IP of the login server's machine. -If you are running a dedicated machine in a datacenter, or you know your IP is not going to change, you can set this to your WAN IP. + -
// Login Server IP
-// The character server connects to the login server using this IP address.
-// NOTE: This is useful when you are running behind a firewall or are on
-// a machine with multiple interfaces.
-login_ip: [new ip here]
+ // Login Server IP + // The character server connects to the login server using this IP address. + // NOTE: This is useful when you are running behind a firewall or are on + // a machine with multiple interfaces. + login_ip: [new ip here] -The char_ip parameter will '''ALWAYS''' be your WAN IP, no exceptions. This is the IP that the char-server will accept connections with. +
-
// Character Server IP
-// The IP address which clients will use to connect.
-// Set this to what your server's public IP address is.
-char_ip: [your wan ip here]
+The char_ip parameter will **ALWAYS** be your WAN IP, no exceptions. This is the IP that the char-server will accept +connections with. -If you changed the login_port in login-server.conf, this setting here will need to match it. -
// Login Server Port
-login_port: [new port]
+ + + // Character Server IP + // The IP address which clients will use to connect. + // Set this to what your server's public IP address is. + char_ip: [your wan ip here] + + + +If you changed the login_port in login-server.conf, this setting here will need to match it. + + // Login Server Port + login_port: [new port] + + Make sure to make any changes in the import folder as always. -===Step 4. [`conf/map-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf)=== +### Step 4. \[\`conf/map-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/conf/map-server.conf) + This file sets parameters for the map-server to read. -The char_ip will point to the IP address where the login server will be running. Usually this is the localhost, or 127.0.0.1. -If the char-server is to be located on the same network as the map-server (but on a different PC), use the LAN IP of the char server's machine. -If you are running a dedicated machine in a datacenter, or you know your IP is not going to change, you can set this to your WAN IP. +The char_ip will point to the IP address where the login server will be running. Usually this is the localhost, or +127.0.0.1. If the char-server is to be located on the same network as the map-server (but on a different PC), use the +LAN IP of the char server's machine. If you are running a dedicated machine in a datacenter, or you know your IP is not +going to change, you can set this to your WAN IP. -
// Character Server IP
-// The map server connects to the character server using this IP address.
-// NOTE: This is useful when you are running behind a firewall or are on
-// a machine with multiple interfaces.
-char_ip: [new ip here]
+ -The map_ip parameter will '''ALWAYS''' be your WAN IP, no exceptions. This is the IP that the map-server will accept connections with. + // Character Server IP + // The map server connects to the character server using this IP address. + // NOTE: This is useful when you are running behind a firewall or are on + // a machine with multiple interfaces. + char_ip: [new ip here] -
// Map Server IP
-// The IP address which clients will use to connect.
-// Set this to what your server's public IP address is.
-map_ip: [your wan ip here]
+
+ +The map_ip parameter will **ALWAYS** be your WAN IP, no exceptions. This is the IP that the map-server will accept +connections with. + + + + // Map Server IP + // The IP address which clients will use to connect. + // Set this to what your server's public IP address is. + map_ip: [your wan ip here] + + Make sure to make any changes in the import folder as always. -===Step 5. [`conf/inter-server.conf`](https://github.com/HerculesWS/Hercules/blob/stable/connf/inter-server.conf)=== -About midway down this file, you will find your SQL settings. These will be set as accordingly. +### Step 5. \[\`conf/inter-server.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/connf/inter-server.conf) + +About midway down this file, you will find your SQL settings. These will be set as accordingly. -* The 'sql.db' settings control what the login-server reads for it's database settings. -* Hostname is the IP of the SQL server. -* Username is the username you use to login. For security, this should '''NEVER''' be root! -* Password is the password that the user will login with. -* The database is set to whatever the database name will be. Usually, this is just 'ragnarok'. +- The 'sql.db' settings control what the login-server reads for it's database settings. +- Hostname is the IP of the SQL server. +- Username is the username you use to login. For security, this should **NEVER** be root! +- Password is the password that the user will login with. +- The database is set to whatever the database name will be. Usually, this is just 'ragnarok'. If you make any changes in here, copy paste the lines you change into /conf/import/inter_conf.txt and modify them there. -==Starting Hercules== -When you're all done configuring Hercules, you can start it up. You can do this by simply running each of the three servers, or athena-start. +## Starting Hercules -==Client Side== -===Diff your client=== -See [[Hexing#Creating_custom_RagRE_client_using_a_DIFF_patcher|Hexing]]. +When you're all done configuring Hercules, you can start it up. You can do this by simply running each of the three +servers, or athena-start. -===Data Folder=== -#Download the most recent data folder [http://svn6.assembla.com/svn/ClientSide/ here]. -#Edit your [[Clientinfo|clientinfo.xml]] as needed. +## Client Side + +### Diff your client + +See [Hexing](Hexing#Creating_custom_RagRE_client_using_a_DIFF_patcher "wikilink"). + +### Data Folder + +1. Download the most recent data folder [here](http://svn6.assembla.com/svn/ClientSide/). +2. Edit your [clientinfo.xml](Clientinfo "wikilink") as needed. + +### Connect -===Connect=== Execute your exe. -==Trouble Shooting== -Its always best to post in the [https://herc.ws/board/forum/31-client-side-support/ client support] sub-forum for things that go wrong with the client, and [https://herc.ws/board/forum/14-general-server-support/ server support] sub-forum for things that go wrong with Hercules connecting or if errors pop up in your server log. +## Trouble Shooting + +Its always best to post in the [client support](https://herc.ws/board/forum/31-client-side-support/) sub-forum for +things that go wrong with the client, and [server support](https://herc.ws/board/forum/14-general-server-support/) +sub-forum for things that go wrong with Hercules connecting or if errors pop up in your server log. + +### CHARACTER_INFO size error!! + +To fix this, locate the src/common folder and open mmo.h in notepad. Find the following line: + + #ifndef PACKETVER + #define PACKETVER 20110609 -===CHARACTER_INFO size error!!=== -To fix this, locate the src/common folder and open mmo.h in notepad. Find the following line: -
#ifndef PACKETVER
-	#define PACKETVER 20110609
-
Edit this Part, put: -
#define PACKETVER YOURCLIENTDATE
+ + #define PACKETVER YOURCLIENTDATE So if my client was 2011-10-25aRagexeRE it would look like: -
#define PACKETVER 20111025
-[[Category:Configuration]] + #define PACKETVER 20111025 + +[Category:Configuration](Category:Configuration "wikilink") diff --git a/docs/setup/git-clone-unix.md b/docs/setup/git-clone-unix.md index ec2df5e..94a3401 100644 --- a/docs/setup/git-clone-unix.md +++ b/docs/setup/git-clone-unix.md @@ -1,3 +1,5 @@ Type the following to create a Hercules working copy in your home (~) directory - git clone https://github.com/HerculesWS/Hercules.git ~/Hercules -[[Category:Installation]] \ No newline at end of file + +`  git clone `[`https://github.com/HerculesWS/Hercules.git`](https://github.com/HerculesWS/Hercules.git)` ~/Hercules` + +[Category:Installation](Category:Installation "wikilink") diff --git a/docs/setup/git-clone.md b/docs/setup/git-clone.md index 18a96c7..dab4a87 100644 --- a/docs/setup/git-clone.md +++ b/docs/setup/git-clone.md @@ -1,12 +1,18 @@ -To download Hercules, you need to perform a '''clone''' from [[wikipedia:Git|Git]] (Git) repository. Checking out from a repository creates a working copy of it on your local machine. +To download Hercules, you need to perform a **clone** from [Git](wikipedia:Git "wikilink") (Git) repository. Checking +out from a repository creates a working copy of it on your local machine. A Git is required to perform a clone. Recommended applications are: -* [http://git-scm.com/ git] for Unix systems -* [http://code.google.com/p/msysgit/downloads/list?can=2 MSysGit] And [http://code.google.com/p/tortoisegit/wiki/Download?tm=2 TortoiseGit] for Windows systems (Both Required -== Unix == -
''For detailed instructions on how to install subversion, please refer to OS specific [[:Category:Installation Guides|installation guides]].''
-{{:Git Clone/Unix}} +- [git](http://git-scm.com/) for Unix systems +- [MSysGit](http://code.google.com/p/msysgit/downloads/list?can=2) And + [TortoiseGit](http://code.google.com/p/tortoisegit/wiki/Download?tm=2) for Windows systems (Both Required -== Windows == -Check [https://herc.ws/board/topic/152-obtaining-hercules/?p=845#entry845 Obtaining Hercules] for info on how to clone in windows \ No newline at end of file +## Unix + +> *For detailed instructions on how to install subversion, please refer to OS specific [installation +> guides](:Category:Installation_Guides "wikilink").* + +## Windows + +Check [Obtaining Hercules](https://herc.ws/board/topic/152-obtaining-hercules/?p=845#entry845) for info on how to clone +in windows diff --git a/docs/setup/import-folder.md b/docs/setup/import-folder.md index 4c895b7..5c25802 100644 --- a/docs/setup/import-folder.md +++ b/docs/setup/import-folder.md @@ -1,82 +1,107 @@ -{{outdated}} - -=Import folder Introduction= -The Import Folder is used to import virtually all of your configuration changes and settings into the core of the Hercules emulator without ever making changes to any .conf files after it is initially configured. This is very helpful when Creating a New Server Build, Compiling , or Updating to the Latest version this will allow retention of all the settings you previously configured without having to deal with possible overwrite conflicts from a git pull or change over to a New Server Build. - -=How it works= -So, It works as such; Once you have configured all of the files you wish to configure within the Conf directory of your server side you will take those same settings and copy them to the corresponding import directory files. For Example: Lets say you make the following changes to; - -'''conf/battle/client.conf''' ---> Make your desired changes, in this case we are changing hair and dye settings. - // Valid range of dyes and styles on the client. - min_hair_style: 0 - max_hair_style: 27 ----> Changing to 40 - min_hair_color: 0 - max_hair_color: 8 ----> Changing to 200 - min_cloth_color: 0 - max_cloth_color: 4 ----> Changing to 100 - -'''conf/battle/client.conf''' ---> We then simply copy only the changed setting lines into ---> conf/import/client_conf.txt - - max_hair_style: 40 - max_hair_color: 200 - max_cloth_color: 100 - -Since these three settings were the only ones we changed in this example these are the only configuration lines to copy from the .conf file into the corresponding import.txt file. This will now allow the server to directly import these changed settings. This can be done with any of the configuration files. The server reads .confs files within the conf directory first, however any settings configured within the /import/ folder will be read second, thus overwriting default settings. Please note over time settings have changed, so please compare Import.txt Files to any New Server Configuration Settings. - -=Commonly Imported Settings= - -The most common use of these files is for the following parameters:
-'''/conf/login_athena.conf''' -> /conf/import/login_conf.txt - login_port: 6900 - account.engine: auto - account.sql.db_hostname: 127.0.0.1 - account.sql.db_port: 3306 - account.sql.db_username: ragnarok - account.sql.db_password: ragnarok - account.sql.db_database: ragnarok - -'''/conf/char_athena.conf''' -> /conf/import/char_conf.txt - userid: s1 - passwd: p1 - server_name: Hercules - login_port: 6900 - char_ip: 127.0.0.1 - char_port: 6121 - start_point: new_1-1,53,111 - -'''/conf/map_athena.conf''' -> /conf/import/map_conf.txt - userid: s1 - passwd: p1 - char_ip: 127.0.0.1 - char_port: 6121 - map_ip: 127.0.0.1 - map_port: 5121 - -'''/conf/inter_athena.conf''' -> /conf/import/inter_conf.txt - sql.db_hostname: 127.0.0.1 - sql.db_port: 3306 - sql.db_username: ragnarok - sql.db_password: ragnarok - sql.db_database: ragnarok - char_server_ip: 127.0.0.1 - char_server_port: 3306 - char_server_id: ragnarok - char_server_pw: ragnarok - char_server_db: ragnarok - map_server_ip: 127.0.0.1 - map_server_port: 3306 - map_server_id: ragnarok - map_server_pw: ragnarok - map_server_db: ragnarok - log_db_ip: 127.0.0.1 - log_db_port: 3306 - log_db_id: ragnarok - log_db_pw: ragnarok - log_db_db: ragnarok - log_login_db: loginlog - use_sql_db: no - -=Conclusion= -The Import Folder is a powerful tool and is often overlooked by amateur developers, but it saves a lot of time and effort it is highly recommended to use. The import.txt files can be saved and used in any new build, just ensure you double check the pathways and corresponding configuration settings. The import folder is often incomplete or blank when downloading latest revisions, you will have to add the necessary files or overwrite the blank template files. - -[[Category:Configuration]] \ No newline at end of file +!!! warning + This page may contain outdated information, incompatible with the current version of Hercules and its coding standards. + + +# Import folder Introduction + +The Import Folder is used to import virtually all of your configuration changes and settings into the core of the +Hercules emulator without ever making changes to any .conf files after it is initially configured. This is very helpful +when Creating a New Server Build, Compiling , or Updating to the Latest version this will allow retention of all the +settings you previously configured without having to deal with possible overwrite conflicts from a git pull or change +over to a New Server Build. + +# How it works + +So, It works as such; Once you have configured all of the files you wish to configure within the Conf directory of your +server side you will take those same settings and copy them to the corresponding import directory files. For Example: +Lets say you make the following changes to; + +**conf/battle/client.conf** ---\> Make your desired changes, in this case we are changing hair and dye settings. + +`// Valid range of dyes and styles on the client.` +`min_hair_style: 0` +`max_hair_style: 27 ----> Changing to 40` +`min_hair_color: 0` +`max_hair_color: 8 ----> Changing to 200` +`min_cloth_color: 0 ` +`max_cloth_color: 4 ----> Changing to 100` + +**conf/battle/client.conf** ---\> We then simply copy only the changed setting lines into ---\> +conf/import/client_conf.txt + +`max_hair_style: 40` +`max_hair_color: 200` +`max_cloth_color: 100` + +Since these three settings were the only ones we changed in this example these are the only configuration lines to copy +from the .conf file into the corresponding import.txt file. This will now allow the server to directly import these +changed settings. This can be done with any of the configuration files. The server reads .confs files within the conf +directory first, however any settings configured within the /import/ folder will be read second, thus overwriting +default settings. Please note over time settings have changed, so please compare Import.txt Files to any New Server +Configuration Settings. + +# Commonly Imported Settings + +The most common use of these files is for the following parameters: +**/conf/login_athena.conf** -\> /conf/import/login_conf.txt + +`login_port: 6900` +`account.engine: auto` +`account.sql.db_hostname: 127.0.0.1` +`account.sql.db_port: 3306` +`account.sql.db_username: ragnarok` +`account.sql.db_password: ragnarok` +`account.sql.db_database: ragnarok` + +**/conf/char_athena.conf** -\> /conf/import/char_conf.txt + +`userid: s1` +`passwd: p1` +`server_name: Hercules` +`login_port: 6900` +`char_ip: 127.0.0.1` +`char_port: 6121` +`start_point: new_1-1,53,111` + +**/conf/map_athena.conf** -\> /conf/import/map_conf.txt + +`userid: s1` +`passwd: p1` +`char_ip: 127.0.0.1` +`char_port: 6121` +`map_ip: 127.0.0.1` +`map_port: 5121` + +**/conf/inter_athena.conf** -\> /conf/import/inter_conf.txt + +`sql.db_hostname: 127.0.0.1` +`sql.db_port: 3306` +`sql.db_username: ragnarok` +`sql.db_password: ragnarok` +`sql.db_database: ragnarok` +`char_server_ip: 127.0.0.1` +`char_server_port: 3306` +`char_server_id: ragnarok` +`char_server_pw: ragnarok` +`char_server_db: ragnarok` +`map_server_ip: 127.0.0.1` +`map_server_port: 3306` +`map_server_id: ragnarok` +`map_server_pw: ragnarok` +`map_server_db: ragnarok` +`log_db_ip: 127.0.0.1` +`log_db_port: 3306` +`log_db_id: ragnarok` +`log_db_pw: ragnarok` +`log_db_db: ragnarok` +`log_login_db: loginlog` +`use_sql_db: no` + +# Conclusion + +The Import Folder is a powerful tool and is often overlooked by amateur developers, but it saves a lot of time and +effort it is highly recommended to use. The import.txt files can be saved and used in any new build, just ensure you +double check the pathways and corresponding configuration settings. The import folder is often incomplete or blank when +downloading latest revisions, you will have to add the necessary files or overwrite the blank template files. + +[Category:Configuration](Category:Configuration "wikilink") diff --git a/docs/setup/index.md b/docs/setup/index.md index 9e4b245..0d41dbc 100644 --- a/docs/setup/index.md +++ b/docs/setup/index.md @@ -1,8 +1,9 @@ # Setup guides This category contains complete, detailed Hercules installation guides for various operating systems and software. -[[Category:Installation]] -Temporary: -For instructions on how to install on Linux, please refer to the following forum post by Ind, https://herc.ws/board/topic/105-regarding-github/ +Temporary: For instructions on how to install on Linux, please refer to the following forum post by Ind, + - Please note, if your Linux does not have "apt-get", you may need to use "yum install" instead. +`Please note, if your Linux does not have "apt-get", you may need to use "yum install" instead.` + +[Category:Installation](Category:Installation "wikilink") diff --git a/docs/setup/installation-centos.md b/docs/setup/installation-centos.md index ff79de9..a1f6cda 100644 --- a/docs/setup/installation-centos.md +++ b/docs/setup/installation-centos.md @@ -1,127 +1,196 @@ # Installation (CentOS) -This guide covers how to install [[Hercules]] on [[wikipedia:CentOS|CentOS]] and other [[wikipedia:List_of_Linux_distributions#RPM-based|versions of Linux]] that use [[wikipedia:Yellowdog_Updater,_Modified|yum]]. - -== Requirements == -* [[wikipedia:CentOS|CentOS]] or an [[wikipedia:List_of_Linux_distributions#RPM-based|RPM-based Linux]] that has the '''[[wikipedia:Yellowdog_Updater,_Modified|yum]]''' command -* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]] -* an Internet connection to download install packages - - -== Prerequisites == -All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]]. -=== Install Prerequisites === -# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window. -# Type the following command (this will install GCC, Make, MySQL, MySQL header files, MySQL Server, PCRE header files, Git, and Zlib header files) -#:
yum install gcc make mysql mysql-devel mysql-server pcre-devel git zlib-devel
-# (Optional) type the following command to install some additional packages: -#:
yum -y install dos2unix gdb nano screen unzip wget zip
- -=== Create a non-root Linux user === -By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. -# Type the following command to create a non-root Linux account: -#:
useradd --create-home --shell /bin/bash hercules1234
-#: --create-home = create the user's home directory -#: --shell = sets their login shell to [[wikipedia:Bash_(Unix_shell)|Bash]] -#: '''hercules1234''' = the login name of the new Linux account -#: ''1234'' = pick your own random numbers to make the username more unique -# Set a password for the new user (run this command and follow the prompts): -#:
passwd hercules1234
- -=== Configure MySQL === - -==== Set a root password ==== -The default MySQL Server install creates a MySQL user 'root'@'localhost' with NO password. It is recommended you create a password for the root user. -# Run this command and follow the prompts: -#: First Start MySQL: -#:
/etc/init.d/mysqld start 
-#: Then configure MySQL by: -#:
mysql_secure_installation
-# Login to your MySQL Server as root: -#: ''When prompted, enter your root MySQL password.'' -#:
mysql --user=root -p
-# Now your prompt should look like this (the MySQL command prompt): -#:
mysql> 
- -==== Create SQL database for Hercules ==== -# At the MySQL prompt, type this to [http://dev.mysql.com/doc/refman/5.5/en/create-database.html create a database] (replace hercules1234 with the Linux username you created earlier): -#:
mysql> CREATE DATABASE hercules1234_rag;
-# Create a separate database for logs: -#:
mysql> CREATE DATABASE hercules1234_log;
- -==== Setup a MySQL user for Hercules ==== -# At the MySQL prompt, type something like this to create a new MySQL user: -#:
mysql> CREATE USER 'hercules1234'@'localhost' IDENTIFIED BY 'secretpassword';
-#: hercules1234 = the name of the MySQL user (we named it the same as the Linux user to make it easier to identify) -#: localhost = the hostname or IP it will connect from -#: '''secretpassword''' = the password for this MySQL user -# [http://dev.mysql.com/doc/refman/5.5/en/grant.html Grant privileges] to the 'hercules' MySQL user: -#:
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON `hercules1234\_rag`.* TO 'hercules1234'@'localhost';
-#:
mysql> GRANT SELECT,INSERT ON `hercules1234\_log`.* TO 'hercules1234'@'localhost';
(note the [http://dev.mysql.com/doc/refman/5.5/en/string-literals.html#character-escape-sequences escaped underscore]) - -== Install [[Hercules]] == - -=== Login as your non-root Linux user === +This guide covers how to install [Hercules](Hercules "wikilink") on [CentOS](wikipedia:CentOS "wikilink") and other +[versions of Linux](wikipedia:List_of_Linux_distributions#RPM-based "wikilink") that use +[yum](wikipedia:Yellowdog_Updater,_Modified "wikilink"). + +## Requirements + +- [CentOS](wikipedia:CentOS "wikilink") or an [RPM-based + Linux](wikipedia:List_of_Linux_distributions#RPM-based "wikilink") that has the + **[yum](wikipedia:Yellowdog_Updater,_Modified "wikilink")** command +- root access or access to an account that has [sudo privileges](wikipedia:Sudo "wikilink") +- an Internet connection to download install packages + +## Prerequisites + +All of these commands will be typed at the [command-line interface](wikipedia:Command-line_interface "wikilink"). + +### Install Prerequisites + +1. Login to your server via [SSH](wikipedia:Secure_Shell "wikilink"), or if you are already logged into a + [GUI](wikipedia:Graphical_user_interface "wikilink") press Ctrl+Alt+T to open a terminal window. +2. Type the following command (this will install GCC, Make, MySQL, MySQL header files, MySQL Server, PCRE header files, + Git, and Zlib header files) + + yum install gcc make mysql mysql-devel mysql-server pcre-devel git zlib-devel +3. (Optional) type the following command to install some additional packages: + + yum -y install dos2unix gdb nano screen unzip wget zip + +### Create a non-root Linux user + +By the [principle of least privilege](wikipedia:Principle_of_least_privilege "wikilink"), it is recommended you do +**NOT** run Hercules as root. + +1. Type the following command to create a non-root Linux account: + + useradd --create-home --shell /bin/bash hercules1234 + + `--create-home` = create the user's home directory + + `--shell` = sets their login shell to [Bash](wikipedia:Bash_(Unix_shell) "wikilink") + + **`hercules1234`** = the login name of the new Linux account + + *`1234`* = pick your own random numbers to make the username more unique +2. Set a password for the new user (run this command and follow the prompts): + + passwd hercules1234 + +### Configure MySQL + +#### Set a root password + +The default MySQL Server install creates a MySQL user 'root'@'localhost' with NO password. It is recommended you create +a password for the root user. + +1. Run this command and follow the prompts: + + First Start MySQL: + + /etc/init.d/mysqld start + + Then configure MySQL by: + + mysql_secure_installation +2. Login to your MySQL Server as root: + + *When prompted, enter your root MySQL password.* + + mysql --user=root -p +3. Now your prompt should look like this (the MySQL command prompt): + + mysql> + +#### Create SQL database for Hercules + +1. At the MySQL prompt, type this to [create a database](http://dev.mysql.com/doc/refman/5.5/en/create-database.html) + (replace `hercules1234` with the Linux username you created earlier): + + mysql> CREATE DATABASE hercules1234_rag; +2. Create a separate database for logs: + + mysql> CREATE DATABASE hercules1234_log; + +#### Setup a MySQL user for Hercules + +1. At the MySQL prompt, type something like this to create a new MySQL user: + + mysql> CREATE USER 'hercules1234'@'localhost' IDENTIFIED BY 'secretpassword'; + + `hercules1234` = the name of the MySQL user (we named it the same as the Linux user to make it easier to identify) + + `localhost` = the hostname or IP it will connect from + + **`secretpassword`** = the password for this MySQL user +2. [Grant privileges](http://dev.mysql.com/doc/refman/5.5/en/grant.html) to the 'hercules' MySQL user: + + mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON `hercules1234\_rag`.* TO 'hercules1234'@'localhost'; + + mysql> GRANT SELECT,INSERT ON `hercules1234\_log`.* TO 'hercules1234'@'localhost'; + + (note the [escaped + underscore](http://dev.mysql.com/doc/refman/5.5/en/string-literals.html#character-escape-sequences)) + +## Install [Hercules](Hercules "wikilink") + +### Login as your non-root Linux user + The rest of the setup is done as hercules1234 (the Linux user you created in step 2.2) -# Logout from root SSH (or minimize the window). -# Login to your server via SSH as the hercules1234 Linux user. - -=== Git Clone === -{{:Git Clone/Unix}} - -=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables === -# Change directory to the '''sql-files''' folder. -#:
cd sql-files/
-# Execute these commands: -#: ''When prompted, enter your MySQL root password.'' -#:
mysql -u root -prootpassword hercuser_rodb < main.sql
-#:
mysql -u root -prootpassword hercuser_rodblog < logs.sql
-# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules) -#: (pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql
-#: (renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql
-#: (common to renewal and pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql
+ +1. Logout from root SSH (or minimize the window). +2. Login to your server via SSH as the hercules1234 Linux user. + +### Git Clone + +### [Import](http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html) MySQL Tables + +1. Change directory to the **sql-files** folder. + + cd sql-files/ +2. Execute these commands: + + *When prompted, enter your MySQL root password.* + + mysql -u root -prootpassword hercuser_rodb < main.sql + + mysql -u root -prootpassword hercuser_rodblog < logs.sql +3. If your Control Panel software or website requires it, you may also import the item, monster and monster skill + databases (not necessary for the correct operation of Hercules) + + (pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql + + (renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql + + (common to renewal and pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use: -#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog -#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data -#char-server: everything else + +1. login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog +2. map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data +3. char-server: everything else + Note that the sql_updates table is needed by all three servers. -=== [[:Category:Configuration|Configure Hercules]]=== +### [Configure Hercules](:Category:Configuration "wikilink") + +### Compile Source Code + +`cd Hercules` +`./configure` +`make sql` + +##### How to Recompile + +In the future (after you update or edit any file in /src) to recompile, add *make clean* before make sql: -=== Compile Source Code === - cd Hercules - ./configure - make sql +`cd Hercules` +`./configure` +**`make clean`** +`make sql` -===== How to Recompile ===== -In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: - cd Hercules - ./configure - '''make clean''' - make sql +## Start your Hercules Server -== Start your Hercules Server == - //change access mode of athena-start file so that you can execute it. - //Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors - chmod a+x athena-start +`//change access mode of athena-start file so that you can execute it.` +`//Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors ` +`chmod a+x athena-start` - //To Start - ./athena-start start - //To Stop - ./athena-start stop - //To Restart - ./athena-start restart +`//To Start` +`./athena-start start` +`//To Stop` +`./athena-start stop` +`//To Restart` +`./athena-start restart` -== See Also == +## See Also -[[Category:Installation Guides|CentOS]] +[CentOS](Category:Installation_Guides "wikilink") diff --git a/docs/setup/installation-debian.md b/docs/setup/installation-debian.md index 764d0fd..463fb7c 100644 --- a/docs/setup/installation-debian.md +++ b/docs/setup/installation-debian.md @@ -1,101 +1,143 @@ # Installation (Debian) -This guide covers how to install [[Hercules]] on [[wikipedia:Debian|Debian]] and other [[wikipedia:List_of_Linux_distributions#Debian-based|versions of Linux]] that use apt-get. - -== Requirements == -* [[wikipedia:Debian|Debian]] or an [[wikipedia:List_of_Linux_distributions##Debian-based]] that has the apt-get command -* root access or access to an account that has [[wikipedia:Sudo|sudo privileges]] -* an Internet connection to download install packages - - -== Prerequisites == -All of these commands will be typed at the [[wikipedia:Command-line_interface|command-line interface]]. -=== Install Prerequisites === -# Login to your server via [[wikipedia:Secure_Shell|SSH]], or if you are already logged into a [[wikipedia:Graphical_user_interface|GUI]] press Ctrl+Alt+T to open a terminal window. -apt-get update -apt-get upgrade -apt-get dist-update // To update to the latest version of Debian -# Type the following command (this will install GCC, Make, MySQL Server, MySQL header files, PCRE header files, git, and Zlib header files) -#:
apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen
- -=== Create a non-root Linux user === -By the [[wikipedia:Principle_of_least_privilege|principle of least privilege]], it is recommended you do '''NOT''' run Hercules as root. -# Type the following command to create a non-root Linux account: -#:
useradd hercuser
-# Be sure not to forget setting new password for new user -#:
passwd hercuser
- -== Install [[Hercules]] == - -=== Login as your non-root Linux user === +This guide covers how to install [Hercules](Hercules "wikilink") on [Debian](wikipedia:Debian "wikilink") and other +[versions of Linux](wikipedia:List_of_Linux_distributions#Debian-based "wikilink") that use apt-get. + +## Requirements + +- [Debian](wikipedia:Debian "wikilink") or an + [wikipedia:List_of_Linux_distributions##Debian-based](wikipedia:List_of_Linux_distributions##Debian-based "wikilink") + that has the apt-get command +- root access or access to an account that has [sudo privileges](wikipedia:Sudo "wikilink") +- an Internet connection to download install packages + +## Prerequisites + +All of these commands will be typed at the [command-line interface](wikipedia:Command-line_interface "wikilink"). + +### Install Prerequisites + +1. Login to your server via [SSH](wikipedia:Secure_Shell "wikilink"), or if you are already logged into a + [GUI](wikipedia:Graphical_user_interface "wikilink") press Ctrl+Alt+T to open a terminal window. + +apt-get update apt-get upgrade apt-get dist-update // To update to the latest version of Debian + +1. Type the following command (this will install GCC, Make, MySQL Server, MySQL header files, PCRE header files, git, + and Zlib header files) + + apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen + +### Create a non-root Linux user + +By the [principle of least privilege](wikipedia:Principle_of_least_privilege "wikilink"), it is recommended you do +**NOT** run Hercules as root. + +1. Type the following command to create a non-root Linux account: + + useradd hercuser +2. Be sure not to forget setting new password for new user + + passwd hercuser + +## Install [Hercules](Hercules "wikilink") + +### Login as your non-root Linux user + The rest of the setup is done as hercuser (the Linux user you created earlier) -# Logout from root SSH (or minimize the window). -# Login to your server via SSH as the hercuser Linux user. - -=== Git Clone === -
git clone https://github.com/HerculesWS/Hercules.git ~/Hercules
- -=== [http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html Import] MySQL Tables === -# Change directory to the '''sql-files''' folder. -#:
cd sql-files/
-# Execute these commands: -#: ''When prompted, enter your MySQL root password.'' -#:
mysql -u root -prootpassword hercuser_rodb < main.sql
-#:
mysql -u root -prootpassword hercuser_rodblog < logs.sql
-# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules) -#: (pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql
-#: (renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql
-#: (common to renewal and pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql
+ +1. Logout from root SSH (or minimize the window). +2. Login to your server via SSH as the hercuser Linux user. + +### Git Clone + + git clone https://github.com/HerculesWS/Hercules.git ~/Hercules + +### [Import](http://dev.mysql.com/doc/refman/5.5/en/batch-commands.html) MySQL Tables + +1. Change directory to the **sql-files** folder. + + cd sql-files/ +2. Execute these commands: + + *When prompted, enter your MySQL root password.* + + mysql -u root -prootpassword hercuser_rodb < main.sql + + mysql -u root -prootpassword hercuser_rodblog < logs.sql +3. If your Control Panel software or website requires it, you may also import the item, monster and monster skill + databases (not necessary for the correct operation of Hercules) + + (pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql + + (renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql + + (common to renewal and pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use: -#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog -#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data -#char-server: everything else + +1. login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog +2. map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data +3. char-server: everything else + Note that the sql_updates table is needed by all three servers. -=== [[:Category:Configuration|Configure Hercules]]=== +### [Configure Hercules](:Category:Configuration "wikilink") + +### Compile Source Code + +`cd Hercules` +`./configure` +`make sql` + +**Note:** If during the configure step you run into the "MySQL not found or incompatible" error, you may be able to fix +it by installing "libssl-dev" and/or "default-libmysqlclient-dev". + +- If you have added plugins for use with Hercules please use the below syntax instead of the above: -=== Compile Source Code === - cd Hercules - ./configure - make sql +`cd Hercules` +`./configure` +`make sql plugins` -'''Note:''' If during the configure step you run into the "MySQL not found or incompatible" error, you may be able to fix it by installing "libssl-dev" and/or "default-libmysqlclient-dev". +##### How to Recompile -*If you have added plugins for use with Hercules please use the below syntax instead of the above: - cd Hercules - ./configure - make sql plugins +In the future (after you update or edit any file in /src) to recompile, add *make clean* before make sql: +`cd Hercules` +`./configure` +**`make clean`** +`make sql plugins` -===== How to Recompile ===== -In the future (after you update or edit any file in /src) to recompile, add ''make clean'' before make sql: - cd Hercules - ./configure - '''make clean''' - make sql plugins +## Start your Hercules Server -== Start your Hercules Server == - //change access mode of athena-start file so that you can execute it. - //Use (dos2unix athena-start) if you are getting ^M errors ie. newline errors - chmod a+x athena-start +`//change access mode of athena-start file so that you can execute it.` +`//Use (dos2unix athena-start) if you are getting ^M errors ie. newline errors ` +`chmod a+x athena-start` - //To Start - ./athena-start start - //To Stop - ./athena-start stop - //To Restart - ./athena-start restart +`//To Start` +`./athena-start start` +`//To Stop` +`./athena-start stop` +`//To Restart` +`./athena-start restart` -== See Also == +## See Also -[[Category:Installation Guides|Debian Linux]] +[Debian Linux](Category:Installation_Guides "wikilink") diff --git a/docs/setup/installation-freebsd.md b/docs/setup/installation-freebsd.md index 023b159..e80a333 100644 --- a/docs/setup/installation-freebsd.md +++ b/docs/setup/installation-freebsd.md @@ -1,126 +1,153 @@ # Installation (FreeBSD) -This article is aimed at installing and getting [[Hercules]] to run successfully on a machine running [[wikipedia:FreeBSD|FreeBSD]] 9.1-RELEASE. It is assumed that FreeBSD was installed with the ports collection and enabled Linux Threading on install. This guide will NOT teach you how to network FreeBSD, install FreeBSD or configure any additional system settings (besides the ones needed to run Hercules and its dependencies). - -=Before we Start= -We will primarily working from the /home/user directory. Your primary user will need to be in the 'wheel' group and be able to su into root. Remember that I will include either $ or #, depending on who you should be. $ indicates you should be your primary user, and # indicates you should be root. - -=Required software= -We are going to use FreeBSD's ports collection to download, install and use most of these programs. It is assumed you already installed the ports collection, if you have not, I suggest you do that now. - -==Ports Collection== -The Ports Collection is a set of files used to compile and install applications on FreeBSD. While this is not a guide for FreeBSD, its recommended to obtain the same as given below: -
-# portsnap fetch
-Download a compressed snapshot of the Ports Collection into /var/db/portsnap.
-
-# portsnap extract
-When running Portsnap for the first time, extract the snapshot into /usr/ports
-
- - -==wget== -wget is a download manager available on FreeBSD and can be your bread and butter while working on FreeBSD. -
# whereis wget
-wget: /usr/ports/www/wget
-# cd /usr/ports/www/wget && make && make install
-# make clean
-# rehash
- -==gmake== -gmake, or GNUMake, is the GCC compiler used for FreeBSD. -
-# whereis gmake
-gmake: /usr/ports/devel/gmake
-# cd /usr/ports/devel/gmake && make && make install
-# make clean
-# rehash
-
- -==unrar== -unrar is a tool to unrar .rar's in BSD. -
-# whereis unrar
-unrar: /usr/ports/archivers/unrar
-$ cd /usr/ports/archivers/unrar
-$ make clean
-$ make install
-$ rehash
-
- -==GCC== -GCC is the GNU Compiler Collection and front ends for C, C++ and other languages. -This may not be available on the system but it can be obtained as below: -
# wget http://www.netgull.com/gnu/gcc/gcc-###.tar.gz (Where ## is the version number. visit the mirror to find out)
-# tar -xvf gcc-###.tar.gz
-# cd gcc*
-# make && make install
-# make clean
-# rehash
- -==gdb== -GDB is handy tool to have on a development machine, as it can take backtraces of crashes and help you find what went wrong. -It is probable that this is already available on your FreeBSD, but if it's not, here's how you can install it: -
# wget http://ftp.gnu.org/gnu/gdb/gdb-###.tar.gz (again, where ### is the version number, check out the mirror)
-# tar -xvf gdb-###.tar.gz
-# cd gdb*
-# make && make install
-# make clean 
-# rehash
- -==git== -[[Git]] is the versioning system used for Hercules and how we will get our copy of Hercules. -
# whereis git
-git: /usr/ports/devel/git
-# cd /usr/ports/devel/git && make && make install
-# make clean
-# rehash
-
- -Now, let's go ahead and download Hercules. We'll use git for this. - -
-$ su root
-# adduser //create a Hercules user
-# exit
-$ su hercules
-$ cd /home/hercules
-$ git clone https://github.com/HerculesWS/Hercules.git Hercules
-$
- -Now, we can populate the tables with the .sql files in Hercules. Navigate to your /sql-files/ folder in the Hercules files you just checked out. - -
-$ cd /home/hercules/trunk/sql-files
-$ mysql -uuser -ppassword myr-odb < main.sql
-$ mysql -uuser -ppassword myro-db < logs.sql
-
- -Now, you'll want to follow the steps in the [[:Category:Configuration]] and [[Connecting]] pages to get your Hercules configured. Once you've made all your source changes, you can compile Hercules. While you're in the root of your Hercules folder, issue the following commands to compile your server: - -
-$ ./configure
-$ gmake clean
-$ gmake sql
-$ rehash
-
- -'''Important Note:''' If you are using a 32 bit FreeBSD you have to use -
-chmod 777 configure
-$ ./configure --disable-64bit
-
+This article is aimed at installing and getting [Hercules](Hercules "wikilink") to run successfully on a machine running +[FreeBSD](wikipedia:FreeBSD "wikilink") 9.1-RELEASE. It is assumed that FreeBSD was installed with the ports collection +and enabled Linux Threading on install. This guide will NOT teach you how to network FreeBSD, install FreeBSD or +configure any additional system settings (besides the ones needed to run Hercules and its dependencies). + +# Before we Start + +We will primarily working from the /home/user directory. Your primary user will need to be in the 'wheel' group and be +able to su into root. Remember that I will include either \$ or \#, depending on who you should be. \$ indicates you +should be your primary user, and \# indicates you should be root. + +# Required software + +We are going to use FreeBSD's ports collection to download, install and use most of these programs. It is assumed you +already installed the ports collection, if you have not, I suggest you do that now. + +## Ports Collection + +The Ports Collection is a set of files used to compile and install applications on FreeBSD. While this is not a guide +for FreeBSD, its recommended to obtain the same as given below: + + # portsnap fetch + Download a compressed snapshot of the Ports Collection into /var/db/portsnap. + + # portsnap extract + When running Portsnap for the first time, extract the snapshot into /usr/ports + + + +## wget + +wget is a download manager available on FreeBSD and can be your bread and butter while working on FreeBSD. + + # whereis wget + wget: /usr/ports/www/wget + # cd /usr/ports/www/wget && make && make install + # make clean + # rehash + + + +## gmake + +gmake, or GNUMake, is the GCC compiler used for FreeBSD. + + # whereis gmake + gmake: /usr/ports/devel/gmake + # cd /usr/ports/devel/gmake && make && make install + # make clean + # rehash + + + +## unrar + +unrar is a tool to unrar .rar's in BSD. + + # whereis unrar + unrar: /usr/ports/archivers/unrar + $ cd /usr/ports/archivers/unrar + $ make clean + $ make install + $ rehash + + + +## GCC + +GCC is the GNU Compiler Collection and front ends for C, C++ and other languages. This may not be available on the +system but it can be obtained as below: + + # wget http://www.netgull.com/gnu/gcc/gcc-###.tar.gz (Where ## is the version number. visit the mirror to find out) + # tar -xvf gcc-###.tar.gz + # cd gcc* + # make && make install + # make clean + # rehash + + + +## gdb + +GDB is handy tool to have on a development machine, as it can take backtraces of crashes and help you find what went +wrong. It is probable that this is already available on your FreeBSD, but if it's not, here's how you can install it: + + + # wget http://ftp.gnu.org/gnu/gdb/gdb-###.tar.gz (again, where ### is the version number, check out the mirror) + # tar -xvf gdb-###.tar.gz + # cd gdb* + # make && make install + # make clean + # rehash + + + +## git + +[Git](Git "wikilink") is the versioning system used for Hercules and how we will get our copy of Hercules. + + # whereis git + git: /usr/ports/devel/git + # cd /usr/ports/devel/git && make && make install + # make clean + # rehash + + + +Now, let's go ahead and download Hercules. We'll use git for this. + + $ su root + # adduser //create a Hercules user + # exit + $ su hercules + $ cd /home/hercules + $ git clone https://github.com/HerculesWS/Hercules.git Hercules + $ + +Now, we can populate the tables with the .sql files in Hercules. Navigate to your /sql-files/ folder in the Hercules +files you just checked out. + + $ cd /home/hercules/trunk/sql-files + $ mysql -uuser -ppassword myr-odb < main.sql + $ mysql -uuser -ppassword myro-db < logs.sql + +Now, you'll want to follow the steps in the [:Category:Configuration](:Category:Configuration "wikilink") and +[Connecting](Connecting "wikilink") pages to get your Hercules configured. Once you've made all your source changes, you +can compile Hercules. While you're in the root of your Hercules folder, issue the following commands to compile your +server: + + $ ./configure + $ gmake clean + $ gmake sql + $ rehash + +**Important Note:** If you are using a 32 bit FreeBSD you have to use + + chmod 777 configure + $ ./configure --disable-64bit + instead -''NOTE:'' You should '''NEVER''' run Hercules as the root user!. Always setup a new user and this cannot be stressed enough on! -This will also prevent your from having difficulties with file permissions. +*NOTE:* You should **NEVER** run Hercules as the root user!. Always setup a new user and this cannot be stressed enough +on! This will also prevent your from having difficulties with file permissions. And to start your servers, you can simply use the following command: -
-$ ./athena-start  (start | stop | restart | status)
-
+ $ ./athena-start (start | stop | restart | status) And that's it! You now have Hercules running on your FreeBSD machine! -[[Category:Installation Guides]] +[Category:Installation Guides](Category:Installation_Guides "wikilink") diff --git a/docs/setup/installation.md b/docs/setup/installation.md index e755784..c05f665 100644 --- a/docs/setup/installation.md +++ b/docs/setup/installation.md @@ -1,52 +1,77 @@ -This article is aimed at downloading Hercules and any dependancies required to run it. In this article, you are expected to know basic file and program -management of the OS you are attempting to run Hercules on. (Or use Google to search for the answers) +This article is aimed at downloading Hercules and any dependancies required to run it. In this article, you are expected +to know basic file and program management of the OS you are attempting to run Hercules on. (Or use Google to search for +the answers) -==System Requirements== -{{EntirePage|System Requirements}} -Hercules runs on variety of 32-bit and 64-bit (limited) operating systems, including Windows, Linux and Unix. Hardware requirements are ones of typical server environment, whether virtual or dedicated. +## System Requirements + +Hercules runs on variety of 32-bit and 64-bit (limited) operating systems, including Windows, Linux and Unix. Hardware +requirements are ones of typical server environment, whether virtual or dedicated. + +## Program Requirements -==Program Requirements== To run Hercules, the following programs must be installed on the machine that will run Hercules: -===*nix based=== -For *nix, most of these programs will come as [[wikipedia:Software_package_%28installation%29|Packages]] with your OS, for example, -the FreeBSD Ports collection, or Debians apt-get or aptitude. Please see your OS's help/support pages to find out how to utilize package installations. As a general rule, the following packages will be required to compile Hercules:
-[http://www.gnu.org/software/wget/ wget], [http://subversion.tigris.org/ subversion], [http://gcc.gnu.org/ GCC], [http://www.gnu.org/software/make/ make] (if running *BSD, gmake is needed instead of make.) -====libmysqlclient15-dev==== -libmysqlclient15-dev is the library for MySQL and is '''required''' to compile an SQL version of Hercules. This will most likely need to be installed via packages. - -===Windows based=== -Depending on how you want to compile, one of two methods can be used. We '''highly recommend''' the use of [http://www.microsoft.com/Express/vc/ Visual C++]. -[http://www.cygwin.com/ Cygwin] can also be used. If cygwin is used, you have some configuration to do, please see below:
-
Expand the development or devel branch in Cygwin and make sure GCC and Make are checked. These are the only 2 things you need, -the others are up to you whether you want to download them or not. The downloading and installation of packages may take some time -depending on your packages, their size, your network speed, and the remote server's network speed. -This shouldn't take too long if it's just GCC and Make.
-You will also need [http://subversion.tigris.org/ subversion] - -==Installing software== -===Linux OS's=== -A simple make and make install is all that is needed for most of the packages. You can find [[:Category:Installation|instructions]] and readmes in each of the downloads for your distro telling you how to install and compile each package. Once subversion is installed, you can download Hercules's latest source via [[GIT]].
-
-$ git clone git://github.com/HerculesWS/Hercules.git hercules 
-for trunk - -===Windows OS's=== -{{outdated|type=section}} -When using SVN in Windows, all your commands are in a right click menu integrated into the Windows Shell.
-[[Image:svnwindows.jpg]]
-Simply create a new folder, right click on it and select 'SVN Checkout...' and a dialog box will appear.
-[[Image:checkout.jpg]]
-Enter your URL (in the example above, simply add /trunk after the URL to checkout Trunk, or /branches/stable for stable) and TSVN will download -a fresh copy of Hercule's SVN to that folder. - -==Compiling== -Please see [[Compiling]] for more detailed instructions. - -For your OS, you will need to compile binaries if you had downloaded Hercules via the SVN. you can then move on to [[:Category:Configuration]] and then running Hercules. - -==See Also== -* [[:Category:Installation|Installation per OS]] -* [[GIT]] -* [[Installing_SQL|Installing SQL for Hercules use]] - -[[Category:Basics]] \ No newline at end of file + +### \*nix based + +For \*nix, most of these programs will come as [Packages](wikipedia:Software_package_%28installation%29 "wikilink") with +your OS, for example, the FreeBSD Ports collection, or Debians apt-get or aptitude. Please see your OS's help/support +pages to find out how to utilize package installations. As a general rule, the following packages will be required to +compile Hercules: +[wget](http://www.gnu.org/software/wget/), [subversion](http://subversion.tigris.org/), [GCC](http://gcc.gnu.org/), +[make](http://www.gnu.org/software/make/) (if running \*BSD, gmake is needed instead of make.) + +#### libmysqlclient15-dev + +libmysqlclient15-dev is the library for MySQL and is **required** to compile an SQL version of Hercules. This will most +likely need to be installed via packages. + +### Windows based + +Depending on how you want to compile, one of two methods can be used. We **highly recommend** the use of [Visual +C++](http://www.microsoft.com/Express/vc/). [Cygwin](http://www.cygwin.com/) can also be used. If cygwin is used, you +have some configuration to do, please see below: + +> Expand the development or devel branch in Cygwin and make sure GCC and Make are checked. These are the only 2 things +> you need, the others are up to you whether you want to download them or not. The downloading and installation of +> packages may take some time depending on your packages, their size, your network speed, and the remote server's +> network speed. This shouldn't take too long if it's just GCC and Make. + +You will also need [subversion](http://subversion.tigris.org/) + +## Installing software + +### Linux OS's + +A simple make and make install is all that is needed for most of the packages. You can find +[instructions](:Category:Installation "wikilink") and readmes in each of the downloads for your distro telling you how +to install and compile each package. Once subversion is installed, you can download Hercules's latest source via +[GIT](GIT "wikilink"). + + + $ git clone git://github.com/HerculesWS/Hercules.git hercules + + for trunk + +### Windows OS's + +When using SVN in Windows, all your commands are in a right click menu integrated into the Windows Shell. +![](svnwindows.jpg "svnwindows.jpg") +Simply create a new folder, right click on it and select 'SVN Checkout...' and a dialog box will appear. +![](checkout.jpg "checkout.jpg") +Enter your URL (in the example above, simply add /trunk after the URL to checkout Trunk, or /branches/stable for stable) +and TSVN will download a fresh copy of Hercule's SVN to that folder. + +## Compiling + +Please see [Compiling](Compiling "wikilink") for more detailed instructions. + +For your OS, you will need to compile binaries if you had downloaded Hercules via the SVN. you can then move on to +[:Category:Configuration](:Category:Configuration "wikilink") and then running Hercules. + +## See Also + +- [Installation per OS](:Category:Installation "wikilink") +- [GIT](GIT "wikilink") +- [Installing SQL for Hercules use](Installing_SQL "wikilink") + +[Category:Basics](Category:Basics "wikilink") diff --git a/docs/setup/installing-sql.md b/docs/setup/installing-sql.md index e9e2291..f9cd93a 100644 --- a/docs/setup/installing-sql.md +++ b/docs/setup/installing-sql.md @@ -1,171 +1,323 @@ -= Introduction = -This article will guide you through the installation and configuration stages of MySQL for your particular Operating System. What is a MySQL database? [[wikipedia:MySQL|MySQL]] is a multi-user access database that stores a number of different kinds of information in scaleable tables. In layman's terms, it puts a bunch of stuff in charts for your server to read. Hercules no longer supports text based save files (for Accounts, Characters, etc.) and requires a MySQL database to create these save files. - -== Windows == -This guide will instruct you on installing MySQL on Windows Vista/7, although it should work relatively the same with Windows XP. This guide also assumes you have already [[Installation_on_Windows|installed your Hercules server]].
-
-'''Uninstallation Note'''
-Before continuing, it is important to note that if you make an error and decide to start again by uninstalling the MySQL database and software, that you make sure you do a ''thorough'' uninstallation, and then reboot Windows before trying again. A couple tips to make sure your uninstallation is thorough: -* Uninstall Workbench first -* Remove the MySQL database folders in your user folder. This is generally in: - C:\Users\\AppData\Roaming\MySQL -:Just delete the whole folder. -* Run Administrative Tools -> Services and look to make sure nothing MySQL related is running or set to run (because it shouldn't exist anymore) -* Go to the location on your hard drive you installed MySQL5 and Workbench and ensure everything is deleted. -* Make sure you reboot. -* There is a Oracle made guide [http://dev.mysql.com/doc/refman/5.1/en/windows-installer-uninstalling.html here], but it isn't necessarily thorough. -* If you still have hanging and crashing during the configuration wizard, you may have to create your root account manually. Do an internet search for this, as it varies by system. And continue afterwards at the "MySQL Workbench" section. - -=== Download === -To install MySQL Server you will first need to download the package corresponding to your version of Windows. [http://dev.mysql.com/downloads/mysql/ MySQL Community Server] is available for free and is exactly what is needed. Version 5.5 currently works well with Hercules and is recommended. '''ENSURE''' that you download the appropriate bit version (32 or 64) for your system, if you do not, you will receive errors during the execution wizard. This software installs the server on your computer that stores the data files and tables. Although alone, without prior knowledge of MySQL it is very difficult to operate and configure your servers data. That is why you will need MySQL Workbench.
-
-[http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench] is a tool for viewing your MySQL database in a GUI environment. As said, it is not required but very beneficial; in addition, it is required by this guide. To be able to install and run MySQL Workbench 5.2 your System also needs to have the libraries listed below installed. The listed items are provided as links to the corresponding download pages where you can fetch the necessary files. - -[http://www.microsoft.com/download/en/details.aspx?id=17113 Microsoft .NET Framework 4 Client Profile]
-[http://www.microsoft.com/download/en/details.aspx?id=5555 Microsoft Visual C++ 2010 Redistributable Package (x86)] - -=== Configure Hercules Files === -Before you begin with your MySQL installation, you need to setup your server conf files to be ready for the database you are about to install. I choose to do this in advance, because it allows you to have the usernames and passwords ready for use so you don't have to go back and set them, and you can just run your server afterwards with everything all ready. -* Open "inter-server.conf", and change sql.db_password, char_server_pw, map_server_pw and log_db_pw to a password of your choice. For this guide we will use the password "Fish". Passwords are case sensitive. This is not a strong password, and you should use a better one, this is just an example. Also change log_db_db to "log". All other fields should be let alone, the default username and port functions fine. ([http://imageshack.us/a/img546/9444/interathena.jpg Image]) -* Open "map-server.conf" and "char-server.conf" and locate the server communication passwords: - userid: s1 - passwd: p1 +# Installing SQL + +# Introduction + +This article will guide you through the installation and configuration stages of MySQL for your particular Operating +System. What is a MySQL database? [MySQL](wikipedia:MySQL "wikilink") is a multi-user access database that stores a +number of different kinds of information in scaleable tables. In layman's terms, it puts a bunch of stuff in charts for +your server to read. Hercules no longer supports text based save files (for Accounts, Characters, etc.) and requires a +MySQL database to create these save files. + +## Windows + +This guide will instruct you on installing MySQL on Windows Vista/7, although it should work relatively the same with +Windows XP. This guide also assumes you have already [installed your Hercules +server](Installation_on_Windows "wikilink"). + +**Uninstallation Note** +Before continuing, it is important to note that if you make an error and decide to start again by uninstalling the MySQL +database and software, that you make sure you do a *thorough* uninstallation, and then reboot Windows before trying +again. A couple tips to make sure your uninstallation is thorough: + +- Uninstall Workbench first +- Remove the MySQL database folders in your user folder. This is generally in: + +`C:\Users\``\AppData\Roaming\MySQL ` + + +Just delete the whole folder. + +- Run Administrative Tools -\> Services and look to make sure nothing MySQL related is running or set to run (because it + shouldn't exist anymore) +- Go to the location on your hard drive you installed MySQL5 and Workbench and ensure everything is deleted. +- Make sure you reboot. +- There is a Oracle made guide [here](http://dev.mysql.com/doc/refman/5.1/en/windows-installer-uninstalling.html), but + it isn't necessarily thorough. +- If you still have hanging and crashing during the configuration wizard, you may have to create your root account + manually. Do an internet search for this, as it varies by system. And continue afterwards at the "MySQL Workbench" + section. + +### Download + +To install MySQL Server you will first need to download the package corresponding to your version of Windows. [MySQL +Community Server](http://dev.mysql.com/downloads/mysql/) is available for free and is exactly what is needed. Version +5.5 currently works well with Hercules and is recommended. **ENSURE** that you download the appropriate bit version (32 +or 64) for your system, if you do not, you will receive errors during the execution wizard. This software installs the +server on your computer that stores the data files and tables. Although alone, without prior knowledge of MySQL it is +very difficult to operate and configure your servers data. That is why you will need MySQL Workbench. + +[MySQL Workbench](http://dev.mysql.com/downloads/workbench/5.2.html) is a tool for viewing your MySQL database in a GUI +environment. As said, it is not required but very beneficial; in addition, it is required by this guide. To be able to +install and run MySQL Workbench 5.2 your System also needs to have the libraries listed below installed. The listed +items are provided as links to the corresponding download pages where you can fetch the necessary files. + +[Microsoft .NET Framework 4 Client Profile](http://www.microsoft.com/download/en/details.aspx?id=17113) +[Microsoft Visual C++ 2010 Redistributable Package (x86)](http://www.microsoft.com/download/en/details.aspx?id=5555) + +### Configure Hercules Files + +Before you begin with your MySQL installation, you need to setup your server conf files to be ready for the database you +are about to install. I choose to do this in advance, because it allows you to have the usernames and passwords ready +for use so you don't have to go back and set them, and you can just run your server afterwards with everything all +ready. + +- Open "inter-server.conf", and change sql.db_password, char_server_pw, map_server_pw and log_db_pw to a password of + your choice. For this guide we will use the password "Fish". Passwords are case sensitive. This is not a strong + password, and you should use a better one, this is just an example. Also change log_db_db to "log". All other fields + should be let alone, the default username and port functions fine. + ([Image](http://imageshack.us/a/img546/9444/interathena.jpg)) +- Open "map-server.conf" and "char-server.conf" and locate the server communication passwords: + +`userid: s1` +`passwd: p1` + Change these to whatever you want, but something secure. For this guide we will use "FishUser" and "FishPassword" - userid: FishUser - passwd: FishPassword -
+ +`userid: FishUser` +`passwd: FishPassword` + + Make sure these are the same in both map-server and char-server otherwise you will have errors. -* There are additional SQL configuration features in "login-server.conf" that you should take a look at now, to enable for use (such as IPban features). -* Write all these passwords down or keep the files open for reference and continue to your MySQL installation! - -=== Install MySQL === -First, you will need to install the MySQL server where all the data will be stored. After downloading the [http://dev.mysql.com/downloads/mysql/ MySQL Community Server], run the installer and use the following steps (''for this installation version 5.5.28 was used''). -# Click next and accept the license agreement. -# Click "Typical" for Setup Type; then click "Install" (you may have to allow UAC control from windows). -# Click "Next" when the MySQL Enterprise tool pops up, this is a simple advertisement. -# After installation is finished the completion screen with a "Finish" button will show, make sure you have "Launch the MySQL Instance Configuration Wizard" '''CHECKED'''! The configuration wizard will allow you to setup the server to accept the kind of data you want and by setting it up now you will most likely never have to configure it again. -# Click "Next" at the first screen, and then click "[http://imageshack.us/a/img90/1771/standardconfig.jpg Standard Configuration]" and hit "Next". -# Check both "Install As Windows Service" and "Include Bin Directory in Windows PATH" for the Service Name, name it "''MySQL5''" and ensure "Launch the MySQL Server Automatically is '''CHECKED'''. ([http://imageshack.us/a/img685/3323/serverinstance.jpg Image]) -# On the next screen, you will need to select the root password. This password is very important as you will '''never be able to retrieve it''' so make sure you write it down somewhere safe. The "root" access to your MySQL database can pretty much do anything to your data, so make sure you keep this information safe. If you want to enable root access from a remote machine, check the included box. You probably won't need to enable that unless you know what you're doing. Keep the password you selected available for now. -# On the next screen just click "Execute" to run the configuration unless you want to go back and change something. -# Once it is finished, hit "Finish" to close the wizard. It will report if there are any errors (there shouldn't be). - -=== MySQL Workbench === -Next it is time to install the MySQL Workbench application. This application will allow you to edit your database and prepare it for Hercules, as well as perform maintenance in the future. -# Run the MySQL Workbench installer and click "Next" on the first screen. -# Choose your installation directory. The default directory should be fine. Click "Next" to proceed. -# Select "Complete" and click "Next", and then install, granting permissions when prompted. -# Once the wizard is completed, hit "Finish" and the default Workbench screen will come up. -# This is called the Home Screen and should look like [http://imageshack.us/a/img571/3885/workbenchhome.jpg this]. -# You need to create a new server instance to host your files for Hercules to access. Select "New Server Instance" under the "Server Administration" section. -# A window will pop up, select "localhost" and click "Next". This installs the instance on the localhost, which is your computer. -# On the next screen, leave everything the default. Where it says "Username" leave that at root, so you have root access. Under that, click "[http://imageshack.us/a/img845/4056/storeinvault.jpg Store in Vault]" and enter the root password from earlier (it's alright to copy/paste the password if you put it in a text file). -# After it has successfully tested the database connection, click "Next" -# On the next screen, leave the configuration settings defaulted. It should point to the existing service (MySQL5 from earlier) and the default path is fine. ([http://imageshack.us/a/img600/1089/defaultwindowsconfig.jpg Image]) -# On the next screen hit "Next" and then "Continue" on the popup. Leave the Server Instance with the default name of - mysqld@localhost + +- There are additional SQL configuration features in "login-server.conf" that you should take a look at now, to enable + for use (such as IPban features). +- Write all these passwords down or keep the files open for reference and continue to your MySQL installation! + +### Install MySQL + +First, you will need to install the MySQL server where all the data will be stored. After downloading the [MySQL +Community Server](http://dev.mysql.com/downloads/mysql/), run the installer and use the following steps (*for this +installation version 5.5.28 was used*). + +1. Click next and accept the license agreement. +2. Click "Typical" for Setup Type; then click "Install" (you may have to allow UAC control from windows). +3. Click "Next" when the MySQL Enterprise tool pops up, this is a simple advertisement. +4. After installation is finished the completion screen with a "Finish" button will show, make sure you have "Launch + the MySQL Instance Configuration Wizard" **CHECKED**! The configuration wizard will allow you to setup the server to + accept the kind of data you want and by setting it up now you will most likely never have to configure it again. +5. Click "Next" at the first screen, and then click "[Standard + Configuration](http://imageshack.us/a/img90/1771/standardconfig.jpg)" and hit "Next". +6. Check both "Install As Windows Service" and "Include Bin Directory in Windows PATH" for the Service Name, name it + "*MySQL5*" and ensure "Launch the MySQL Server Automatically is **CHECKED**. + ([Image](http://imageshack.us/a/img685/3323/serverinstance.jpg)) +7. On the next screen, you will need to select the root password. This password is very important as you will **never + be able to retrieve it** so make sure you write it down somewhere safe. The "root" access to your MySQL database can + pretty much do anything to your data, so make sure you keep this information safe. If you want to enable root access + from a remote machine, check the included box. You probably won't need to enable that unless you know what you're + doing. Keep the password you selected available for now. +8. On the next screen just click "Execute" to run the configuration unless you want to go back and change something. +9. Once it is finished, hit "Finish" to close the wizard. It will report if there are any errors (there shouldn't be). + +### MySQL Workbench + +Next it is time to install the MySQL Workbench application. This application will allow you to edit your database and +prepare it for Hercules, as well as perform maintenance in the future. + +1. Run the MySQL Workbench installer and click "Next" on the first screen. +2. Choose your installation directory. The default directory should be fine. Click "Next" to proceed. +3. Select "Complete" and click "Next", and then install, granting permissions when prompted. +4. Once the wizard is completed, hit "Finish" and the default Workbench screen will come up. +5. This is called the Home Screen and should look like [this](http://imageshack.us/a/img571/3885/workbenchhome.jpg). +6. You need to create a new server instance to host your files for Hercules to access. Select "New Server Instance" + under the "Server Administration" section. +7. A window will pop up, select "localhost" and click "Next". This installs the instance on the localhost, which is + your computer. +8. On the next screen, leave everything the default. Where it says "Username" leave that at root, so you have root + access. Under that, click "[Store in Vault](http://imageshack.us/a/img845/4056/storeinvault.jpg)" and enter the root + password from earlier (it's alright to copy/paste the password if you put it in a text file). +9. After it has successfully tested the database connection, click "Next" +10. On the next screen, leave the configuration settings defaulted. It should point to the existing service (MySQL5 from + earlier) and the default path is fine. ([Image](http://imageshack.us/a/img600/1089/defaultwindowsconfig.jpg)) +11. On the next screen hit "Next" and then "Continue" on the popup. Leave the Server Instance with the default name of + +`mysqld@localhost` + You are now ready to install your Hercules databases. -=== Database Installation === -It is now time to install the pre-installed database files that will allow your Hercules server to connect to your MySQL database and properly store data, such as characters, items, and guilds. Open up MySQL Workbench to the home screen. -# Double click "localhost" on the left under the "SQL Development" section. ([http://imageshack.us/a/img337/8550/localhostdoubleclick.jpg Image]) -# On the next screen (after a small loading bubble pops up), you will have access to the specific tables that were mentioned earlier. You will enter this screen in the future when you want to edit accounts and other things directly (not common). -# We need to install a new "Schema", this is like a folder where all the database tables are stored. [http://imageshack.us/a/img194/2897/newschema.jpg Click the yellow cylinder looking thing in the upper left to create a new Schema]. Name it "ragnarok" - '''NOTE!''' Lower case is important here, make sure it is exactly "ragnarok". The server collation should be "Server Default". -# Click "Apply" to create the Schema. A window will pop up with the actual commands that are going to take place; click "Apply" again to finalize your order. -# Now right click 'ragnarok' under "Object Browser" and click "Set as default schema", a line will appear through it telling the browser that any commands you make now will be ordered to that Schema. -# Next, [http://imageshack.us/a/img571/205/opensqlscript.png click the button directly to the left of the one you just did], it says "SQL" with a tiny folder. Navigate to your Hercules/sql-files/ folder, and open the sql script file "main.sql". -# You'll see a bunch of code appear, these are commands that will tell the browser to create plain databases for your Hercules server. Click the yellow lightning bolt in the upper left hand corner to execute it and allow it to finish (ensure you click the first lightning bolt, the one without a cursor symbol or a magnifying glass over it). -# After it finishes, a bunch of executed commands will appear on the bottom of the screen. You can now expand the ragnarok schema to see a bunch of tables. ([http://imageshack.us/a/img72/1450/ragnaroktables.jpg Image]) -# Now, do the same thing for a schema called "log", but open and execute logs.sql instead of main.sql. Ensure the tables are there as well. -# Close the existing query tabs by hitting the "X" in the upper right of the tab. With the ragnarok tables still open, scroll down to the "login" table and '''RIGHT click''' it, then select "Edit Table Data". -# Here you'll see existing account information that players can log in with to make characters. If you remember, the first account is the server communication account and it has the default password that you were asked to reset earlier. For our example we chose "FishUser" and "FishPassword". Enter these in the "username" and "password" field. And then create your first GM account by clicking where the word "null" is on the row with a ' * ' and enter "2000000" for the "account_id" field, with a username and password that you like. For this guide we chose a username of "HercGM" and a password of "12345" and a sex of "M". To enable full administrator GM, just set the "group_id" to "99". Zero out everything else. [http://imageshack.us/a/img411/5976/logintables.jpg When you are finished it should look like THIS]. -# Hit the "Apply" button in the corner and then again when the code prompt appears. This should modify your tables. After it is done, you may close the SQL Editor by clicking the "X" on the tab at upper left corner. Hitting the "X" in the upper right closes the whole workbench. If you accidentally close it, just open it again. -# On the Workbench Home Screen, click "Manage Security" under Server Administration. Select "mysqld@localhost" and then click "OK". -# The next screen is the security window. You want to add an account that your server can use to access the databases that is NOT the root account, for enhanced security. Click "Add Account" in the lower left of the default screen. -# The login name needs to be "ragnarok", and the password we selected earlier for this guide is "Fish". The system will tell you how strong your password is... Fish is a very weak password. Leave the connectivity limit box defaulted and then hit "Apply" in the lower right. ([http://imageshack.us/a/img59/2025/newsecurityaccount.jpg Image]) -# You'll see the account show up in the left above root. Select it and then click the "Administrative Roles" tab. -# Ensure that the "MonitorAdmin", "DBManager", "DBDesigner" and "BackupAdmin" are checked. Some of these will select themselves based on what you click. Then click "Apply". As a note, this step isn't entirely necessary but provides increased security. The simpler step is to just give the user all privileges by clicking the "DBA" option at the top. ([http://imageshack.us/a/img266/5876/useradministrativeroles.png Image]) -# Click the "Schema Privileges" tab. -# In this tab, click "ragnarok" and then click the only available button, which is "Add Entry...". -# Leave "Any Host" selected and change Schema to "Selected Schemas". Then select the "ragnarok" schema and hit OK. -# At the bottom, hit "Select 'ALL'" to enable all database privileges for this Schema. This allows your ''ragnarok'' user to have access to all the tables in the schema of the same name. In other words, it allows your server to read/write the tables in the database you made. Make sure you click "Save Changes". -# Do the same for the "log" schema you made. When you are [http://imageshack.us/a/img89/1509/userschemaprivileges.jpg done it should look like this]. -
-'''Congratulations!''' You have successful installed the MySQL database and are ready to run your server! See below for further adjustments. - -==== Additional Configurations ==== -===== Enabling Logging ===== +### Database Installation + +It is now time to install the pre-installed database files that will allow your Hercules server to connect to your MySQL +database and properly store data, such as characters, items, and guilds. Open up MySQL Workbench to the home screen. + +1. Double click "localhost" on the left under the "SQL Development" section. + ([Image](http://imageshack.us/a/img337/8550/localhostdoubleclick.jpg)) +2. On the next screen (after a small loading bubble pops up), you will have access to the specific tables that were + mentioned earlier. You will enter this screen in the future when you want to edit accounts and other things directly + (not common). +3. We need to install a new "Schema", this is like a folder where all the database tables are stored. [Click the yellow + cylinder looking thing in the upper left to create a new Schema](http://imageshack.us/a/img194/2897/newschema.jpg). + Name it "ragnarok" - **NOTE!** Lower case is important here, make sure it is exactly "ragnarok". The server + collation should be "Server Default". +4. Click "Apply" to create the Schema. A window will pop up with the actual commands that are going to take place; + click "Apply" again to finalize your order. +5. Now right click 'ragnarok' under "Object Browser" and click "Set as default schema", a line will appear through it + telling the browser that any commands you make now will be ordered to that Schema. +6. Next, [click the button directly to the left of the one you just + did](http://imageshack.us/a/img571/205/opensqlscript.png), it says "SQL" with a tiny folder. Navigate to your + Hercules/sql-files/ folder, and open the sql script file "main.sql". +7. You'll see a bunch of code appear, these are commands that will tell the browser to create plain databases for your + Hercules server. Click the yellow lightning bolt in the upper left hand corner to execute it and allow it to finish + (ensure you click the first lightning bolt, the one without a cursor symbol or a magnifying glass over it). +8. After it finishes, a bunch of executed commands will appear on the bottom of the screen. You can now expand the + ragnarok schema to see a bunch of tables. ([Image](http://imageshack.us/a/img72/1450/ragnaroktables.jpg)) +9. Now, do the same thing for a schema called "log", but open and execute logs.sql instead of main.sql. Ensure the + tables are there as well. +10. Close the existing query tabs by hitting the "X" in the upper right of the tab. With the ragnarok tables still open, + scroll down to the "login" table and **RIGHT click** it, then select "Edit Table Data". +11. Here you'll see existing account information that players can log in with to make characters. If you remember, the + first account is the server communication account and it has the default password that you were asked to reset + earlier. For our example we chose "FishUser" and "FishPassword". Enter these in the "username" and "password" field. + And then create your first GM account by clicking where the word "null" is on the row with a ' \* ' and enter + "2000000" for the "account_id" field, with a username and password that you like. For this guide we chose a username + of "HercGM" and a password of "12345" and a sex of "M". To enable full administrator GM, just set the "group_id" to + "99". Zero out everything else. [When you are finished it should look like + THIS](http://imageshack.us/a/img411/5976/logintables.jpg). +12. Hit the "Apply" button in the corner and then again when the code prompt appears. This should modify your tables. + After it is done, you may close the SQL Editor by clicking the "X" on the tab at upper left corner. Hitting the "X" + in the upper right closes the whole workbench. If you accidentally close it, just open it again. +13. On the Workbench Home Screen, click "Manage Security" under Server Administration. Select "mysqld@localhost" and + then click "OK". +14. The next screen is the security window. You want to add an account that your server can use to access the databases + that is NOT the root account, for enhanced security. Click "Add Account" in the lower left of the default screen. +15. The login name needs to be "ragnarok", and the password we selected earlier for this guide is "Fish". The system + will tell you how strong your password is... Fish is a very weak password. Leave the connectivity limit box + defaulted and then hit "Apply" in the lower right. + ([Image](http://imageshack.us/a/img59/2025/newsecurityaccount.jpg)) +16. You'll see the account show up in the left above root. Select it and then click the "Administrative Roles" tab. +17. Ensure that the "MonitorAdmin", "DBManager", "DBDesigner" and "BackupAdmin" are checked. Some of these will select + themselves based on what you click. Then click "Apply". As a note, this step isn't entirely necessary but provides + increased security. The simpler step is to just give the user all privileges by clicking the "DBA" option at the + top. ([Image](http://imageshack.us/a/img266/5876/useradministrativeroles.png)) +18. Click the "Schema Privileges" tab. +19. In this tab, click "ragnarok" and then click the only available button, which is "Add Entry...". +20. Leave "Any Host" selected and change Schema to "Selected Schemas". Then select the "ragnarok" schema and hit OK. +21. At the bottom, hit "Select 'ALL'" to enable all database privileges for this Schema. This allows your *ragnarok* + user to have access to all the tables in the schema of the same name. In other words, it allows your server to + read/write the tables in the database you made. Make sure you click "Save Changes". +22. Do the same for the "log" schema you made. When you are [done it should look like + this](http://imageshack.us/a/img89/1509/userschemaprivileges.jpg). + + +**Congratulations!** You have successful installed the MySQL database and are ready to run your server! See below for +further adjustments. + +#### Additional Configurations + +##### Enabling Logging + Simply open logs.conf in your conf folder, and look for: - // Use MySQL Logs? (SQL Version Only) - sql_logs: 0 -Change 0 to 1. You can also go through and change logging options. Your logs will be stored within your log schema. To view IPs in loginlog, you must click it, then right click it and choose alter table, then click on the columns tab. For the PK row, check all of the boxes, then apply it. Now you can double click on the loginlog and view the IPs, though after you are done alter the table again and uncheck all the boxes, this helps insure security. This should only be done for IP bans. -===== Increasing Security ===== -'''Use MD5 to encrypt your password'''
-** '''WARNING:''' This will turn your passwords gibberish, just numbers and letters, making them unreadable so be sure to note down your password, either in a text file on your C drive, or on a piece of paper. In MySQL Workbench, click edit, then preferences, then click the SQL Queries tab. Uncheck "(Safe Updates) Forbid UPDATE and DELETE statements without a WHERE clause...", then click OK. Make ragnarok your default schema, by right clicking its name and clicking "Set as Default Schema", now click File, then Open SQL script, and open convert_passwords.sql. Then click the execute icon. +`// Use MySQL Logs? (SQL Version Only)` +`sql_logs: 0` + +Change 0 to 1. You can also go through and change logging options. Your logs will be stored within your log schema. To +view IPs in loginlog, you must click it, then right click it and choose alter table, then click on the columns tab. For +the PK row, check all of the boxes, then apply it. Now you can double click on the loginlog and view the IPs, though +after you are done alter the table again and uncheck all the boxes, this helps insure security. This should only be done +for IP bans. + +##### Increasing Security + +**Use MD5 to encrypt your password** +\*\* **WARNING:** This will turn your passwords gibberish, just numbers and letters, making them unreadable so be sure +to note down your password, either in a text file on your C drive, or on a piece of paper. In MySQL Workbench, click +edit, then preferences, then click the SQL Queries tab. Uncheck "(Safe Updates) Forbid UPDATE and DELETE statements +without a WHERE clause...", then click OK. Make ragnarok your default schema, by right clicking its name and clicking +"Set as Default Schema", now click File, then Open SQL script, and open convert_passwords.sql. Then click the execute +icon. + +## Linux -== Linux == To Install the Mysql Server there is really only a few things that you have to do. -=== Installing MySQL === +### Installing MySQL + From your terminal, type - sudo yum install mysql-server* -- OR - - sudo apt-get install mysql-server -After your Operating System downloaded and installed MySQL, you will see your terminal window changed and you will be prompted to provide the root password for the MySQL server +`sudo yum install mysql-server*` + +\- OR - + +`sudo apt-get install mysql-server` + +After your Operating System downloaded and installed MySQL, you will see your terminal window changed and you will be +prompted to provide the root password for the MySQL server + +### Setting up your own user -=== Setting up your own user === Once the server has been installed you will need to call the server from terminal with this command. - mysql -u root + +`mysql -u root` + or - mysql -u root -p + +`mysql -u root -p` + then, type in your password. -You are now logged into the MySQL server as root. The best way to use your own SQL server is to have a username of your own control with your own password. The next command will create your own user. The IDENTIFIED BY clause defines the password. - CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok'; - GRANT ALL PRIVILEGES ON 'ragnarok'.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok'; - flush privileges; - -If that doesn't work it my be due to a version syntax error, try the following. - -
-  CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';
-  GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';
-
- -=== Installing the Tables === - -
-  cd /path/to/Hercules/
-
- -Note: Afterwards issue this command lines, please have your password prepared since every after command lines issued you will be prompted for it. - -# Change directory to the '''sql-files''' folder. -#:
cd sql-files/
-# Execute these commands: -#: ''When prompted, enter your MySQL root password.'' -#:
mysql -u root -prootpassword hercuser_rodb < main.sql
-#:
mysql -u root -prootpassword hercuser_rodblog < logs.sql
-# If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules) -#: (pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql
-#: (renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql
-#: (common to renewal and pre-renewal) -#:
mysql -u root -prootpassword hercuser_rodb < item_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_db2.sql
-#:
mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql
+You are now logged into the MySQL server as root. The best way to use your own SQL server is to have a username of your +own control with your own password. The next command will create your own user. The `IDENTIFIED BY` clause defines the +password. + +`CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';` +`GRANT ALL PRIVILEGES ON 'ragnarok'.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';` +`flush privileges;` + +If that doesn't work it my be due to a version syntax error, try the following. + + CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok'; + GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok'; + +### Installing the Tables + + cd /path/to/Hercules/ + +Note: Afterwards issue this command lines, please have your password prepared since every after command lines issued you +will be prompted for it. + +1. Change directory to the **sql-files** folder. + + cd sql-files/ +2. Execute these commands: + + *When prompted, enter your MySQL root password.* + + mysql -u root -prootpassword hercuser_rodb < main.sql + + mysql -u root -prootpassword hercuser_rodblog < logs.sql +3. If your Control Panel software or website requires it, you may also import the item, monster and monster skill + databases (not necessary for the correct operation of Hercules) + + (pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql + + (renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql + + (common to renewal and pre-renewal) + + mysql -u root -prootpassword hercuser_rodb < item_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_db2.sql + + mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use: -#login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog -#map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data -#char-server: everything else + +1. login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog +2. map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data +3. char-server: everything else + Note that the sql_updates table is needed by all three servers. -[[Category:Installation]] \ No newline at end of file +[Category:Installation](Category:Installation "wikilink") diff --git a/docs/setup/mmo-h.md b/docs/setup/mmo-h.md index 80ee186..0357ffb 100644 --- a/docs/setup/mmo-h.md +++ b/docs/setup/mmo-h.md @@ -1,37 +1,56 @@ # `mmo.h` -[[Category:Incomplete]] +!!! warning + This page may contain outdated information, incompatible with the current version of Hercules and its coding standards. -[`src/common/mmo.h`](https://github.com/HerculesWS/Hercules/blob/stable/src/common/mmo.h) This source file holds global declarations and hard-coded settings, that are used by the login, char and map server. If you modify anything, you have to recompile all three servers, otherwise you may run into errors. +\[\`src/common/mmo.h\`\](https://github.com/HerculesWS/Hercules/blob/stable/src/common/mmo.h) This source file holds +global declarations and hard-coded settings, that are used by the login, char and map server. If you modify anything, +you have to recompile all three servers, otherwise you may run into errors. -=== PACKETVER === -Specifies the packet version to use for server-client communication. It must be set to date, your client has been released at, e. g. 20090922 for 2009-09-22aRagexeRE. Note: If you have a client, that is newer, than the latest packet version in the comment, some things might not work properly, if the client packets have changed since then. +### PACKETVER + +Specifies the packet version to use for server-client communication. It must be set to date, your client has been +released at, e. g. 20090922 for 2009-09-22aRagexeRE. Note: If you have a client, that is newer, than the latest packet +version in the comment, some things might not work properly, if the client packets have changed since then. + +### ENABLE_SC_SAVING -=== ENABLE_SC_SAVING === If you disable this define, all status changes get discarded upon logout. -=== HOTKEY_SAVING === -When enabled, the server stores client hotkeys. While older clients save them locally in the registry, newer clients require this define to be enabled. +### HOTKEY_SAVING + +When enabled, the server stores client hotkeys. While older clients save them locally in the registry, newer clients +require this define to be enabled. + +### MAX_MAP_PER_SERVER -=== MAX_MAP_PER_SERVER === Sets how many maps a single map server may manage. This also includes instanced maps. -=== MAX_INVENTORY === -Sets maximum amount of item slots in the character item inventory. If you set this above 127, some scripts, that enumerate characters' inventory will break. +### MAX_INVENTORY + +Sets maximum amount of item slots in the character item inventory. If you set this above 127, some scripts, that +enumerate characters' inventory will break. + +### MAX_CHARS + +Max number of characters per account. Note, that changing this setting alone is not enough if the client is not hexed to +support more characters as well. + +### GLOBAL_REG_NUM + +Max number of permanent [char variables](Variables#Player_Variables "wikilink"). + +### ACCOUNT_REG_NUM + +Max number of permanent [account variables](Variables#Account_Variables "wikilink"). -=== MAX_CHARS === -Max number of characters per account. Note, that changing this setting alone is not enough if the client is not hexed to support more characters as well. +### ACCOUNT_REG_NUM2 -=== GLOBAL_REG_NUM === -Max number of permanent [[Variables#Player_Variables|char variables]]. +Max number of permanent [global account variables](Variables#Global_Account_Variables "wikilink"). -=== ACCOUNT_REG_NUM === -Max number of permanent [[Variables#Account_Variables|account variables]]. +### MAX_QUEST_DB -=== ACCOUNT_REG_NUM2 === -Max number of permanent [[Variables#Global_Account_Variables|global account variables]]. +Maximum number of Quest database to be loaded. File is located in db/questdb.txt note: if you have too many quests, your +map server will show errors that there's too many quest db. remember to recompile your server if you do! -=== MAX_QUEST_DB === -Maximum number of Quest database to be loaded. File is located in db/questdb.txt -note: if you have too many quests, your map server will show errors that there's too many quest db. remember to recompile your server if you do! -[[Category:Configuration]] +[Category:Incomplete](Category:Incomplete "wikilink") [Category:Configuration](Category:Configuration "wikilink") diff --git a/docs/setup/network-conf.md b/docs/setup/network-conf.md index 9b8b13d..62a3192 100644 --- a/docs/setup/network-conf.md +++ b/docs/setup/network-conf.md @@ -2,17 +2,21 @@ Network.conf consists of three main sections: -==lan_subnets== +## lan_subnets + This section is where you put the subnets your server is on internally behind your router or other networking equipment. -It is unclear if you should place your WAN IP in here somewhere in order to allow external connections or not. The old subnet system did require this, though it seems like it might not be required here. +It is unclear if you should place your WAN IP in here somewhere in order to allow external connections or not. The old +subnet system did require this, though it seems like it might not be required here. -==allowed== -This is a list of IPs your char-server and map-server are allowed to connect from. Default is 0.0.0.0:0.0.0.0 (any IP and any subnet), though it is recommended to change this to the specific IPs they will be connecting from. It is unclear if this needs to be your WAN or LAN address though. +## allowed -==trusted== -Same as "allowed", except the IPs on this list are exempt from being banned for failed passwords and such. +This is a list of IPs your char-server and map-server are allowed to connect from. Default is 0.0.0.0:0.0.0.0 (any IP +and any subnet), though it is recommended to change this to the specific IPs they will be connecting from. It is unclear +if this needs to be your WAN or LAN address though. +## trusted +Same as "allowed", except the IPs on this list are exempt from being banned for failed passwords and such. This configuration file is in dire need of better documentation. diff --git a/docs/setup/obtaining-hercules.md b/docs/setup/obtaining-hercules.md index b4b4675..9d23cca 100644 --- a/docs/setup/obtaining-hercules.md +++ b/docs/setup/obtaining-hercules.md @@ -1,63 +1,75 @@ -Hercules is available through GitHub, a web-based hosting service for software development projects that use the GIT revision control system. +Hercules is available through GitHub, a web-based hosting service for software development projects that use the GIT +revision control system. -=Obtaining Hercules on Windows= +# Obtaining Hercules on Windows + +### Downloads -===Downloads=== In order to get GIT on Windows properly, you need to download two things: MSysGit and TortoiseGIT. - [http://code.google.com/p/msysgit/downloads/list?can=2 Download and Install MSysGit] - [http://code.google.com/p/tortoisegit/wiki/Download?tm=2 Download the latest TortoiseGit] +` `[`Download and Install MSysGit`](http://code.google.com/p/msysgit/downloads/list?can=2) +` `[`Download the latest TortoiseGit`](http://code.google.com/p/tortoisegit/wiki/Download?tm=2) -===Installation=== -Alright, first go through MSysGit installer and just set it up (its used as a base for TortoiseGit). then once you install MSysGit, launch the installer you just downloaded for TortoiseGit, you'll be prompted by a window similar to the following +### Installation -[[File:tgit-1.jpeg|framed|center]] -[[File:tgit-2.jpeg|framed|center|The next window is "Choose SSH Client", select "TortoisePLink", hit Next.]] -[[File:tgit-3.jpeg|framed|center|The next window is "Custom Setup", do not change anything unless you know what you're doing, hit Next.]] -[[File:tgit-4.jpeg|framed|center|We're done with the installation, that was easy, wasn't it?]] +Alright, first go through MSysGit installer and just set it up (its used as a base for TortoiseGit). then once you +install MSysGit, launch the installer you just downloaded for TortoiseGit, you'll be prompted by a window similar to the +following +[framed\|center](File:tgit-1.jpeg "wikilink") [framed\|center\|The next window is "Choose SSH Client", select +"TortoisePLink", hit Next.](File:tgit-2.jpeg "wikilink") [framed\|center\|The next window is "Custom Setup", do not +change anything unless you know what you're doing, hit Next.](File:tgit-3.jpeg "wikilink") [framed\|center\|We're done +with the installation, that was easy, wasn't it?](File:tgit-4.jpeg "wikilink") +### Obtaining Hercules -===Obtaining Hercules=== Go to the folder where you want Hercules to be placed, right click and select "Git Clone..." -[[File:tgit-5.jpeg|framed|center]] -in the URL field, type the following: - https://github.com/HerculesWS/Hercules.git -ensure the 'Directory' field is as desired, and hit 'OK' -[[File:tgit-6.jpeg|framed|center]] -[[File:tgit-7.jpeg|framed|center|Now Hercules is being downloaded]] -Just wait for it to complete the download of your working copy and you'll be good to go. +[framed\|center](File:tgit-5.jpeg "wikilink") in the URL field, type the following: + +` `[`https://github.com/HerculesWS/Hercules.git`](https://github.com/HerculesWS/Hercules.git) + +ensure the 'Directory' field is as desired, and hit 'OK' [framed\|center](File:tgit-6.jpeg "wikilink") +[framed\|center\|Now Hercules is being downloaded](File:tgit-7.jpeg "wikilink") Just wait for it to complete the +download of your working copy and you'll be good to go. + +### Updating Hercules + +Right-Click the folder where you downloaded your working copy and within the TortoiseGit menu, select "Pull..." as shown +below [framed\|center](File:tgit-8.jpeg "wikilink") On the following window just hit 'OK', and your working copy will +update. ![\|center\|framed](tgit-9.jpeg "|center|framed") + +# Obtaining Hercules on Linux +### CentOS -===Updating Hercules=== -Right-Click the folder where you downloaded your working copy and within the TortoiseGit menu, select "Pull..." as shown below -[[File:tgit-8.jpeg|framed|center]] -On the following window just hit 'OK', and your working copy will update. -[[File:tgit-9.jpeg||center|framed]] +- Step 1: +` rpm -Uvhhttp://repo.webtatic.com/yum/centos/5/latest.rpm` +- Step 2: -=Obtaining Hercules on Linux= -===CentOS=== -* Step 1: - rpm -Uvhhttp://repo.webtatic.com/yum/centos/5/latest.rpm -* Step 2: - yum install --enablerepo=webtatic git-all -* Step 3: - yum install --enablerepo=webtatic --disableexcludes=main git-all +` yum install --enablerepo=webtatic git-all` +- Step 3: -===Debian/Others=== -* Step 1: - apt-get install git +` yum install --enablerepo=webtatic --disableexcludes=main git-all` +### Debian/Others + +- Step 1: + +` apt-get install git` + +### Obtaining a Working Copy -===Obtaining a Working Copy=== Type the following to create a Hercules working copy in your home (~) directory: - git clone https://github.com/HerculesWS/Hercules.git ~/Hercules +` git clone `[`https://github.com/HerculesWS/Hercules.git`](https://github.com/HerculesWS/Hercules.git)` ~/Hercules` + +### Updating a Working Copy -===Updating a Working Copy=== Type the following when inside your working copy: - git pull -[[Category:Installation]] \ No newline at end of file + +` git pull` + +[Category:Installation](Category:Installation "wikilink") diff --git a/docs/setup/src-config.md b/docs/setup/src-config.md index e7f9733..72a8941 100644 --- a/docs/setup/src-config.md +++ b/docs/setup/src-config.md @@ -1,103 +1,165 @@ -This page provides information on the '''/src/config/''' folder and its settings. The '''/src/config/''' folder contains special server settings that allow you to further customize your server, the most popular of them being '''RENEWAL''', a switch to enable or disable Ragnarok Renewal mechanics +This page provides information on the **/src/config/** folder and its settings. The **/src/config/** folder contains +special server settings that allow you to further customize your server, the most popular of them being **RENEWAL**, a +switch to enable or disable Ragnarok Renewal mechanics +### /src/config/const.h + +------------------------------------------------------------------------------------------------------------------------ -=== /src/config/const.h === ----- This file does not posses any settings, it is used to store constants used by other settings. -=== /src/config/core.h === ----- -The core configuration file (which is inherited by map.h) that inherits all other configuration files, at this point in time this file does not possess any settings +### /src/config/core.h + +------------------------------------------------------------------------------------------------------------------------ + +The core configuration file (which is inherited by map.h) that inherits all other configuration files, at this point in +time this file does not possess any settings + +### /src/config/renewal.h + +------------------------------------------------------------------------------------------------------------------------ -=== /src/config/renewal.h === ----- This configuration files provides Ragnarok Renewal settings for you to further customize your server -==== RENEWAL ==== -:This setting affects the following mechanics -:* Renewal MATK -:* Renewal MDEF -:* Renewal DEF -:* Renewal Status Points -:* Renewal Heal Formula -:* Renewal ASPD Shield Penalty -:* Renewal Stat Bonuses (str,agi,vit,flee,hit,etc) -:* Renewal Files -:** ''item_db_re.txt'', ''statpoint_renewal.txt'', ''job_db_re.txt'', [[DB_Folder_Inheritance|and others]] are only loaded in this mode. [[DB_Folder_Inheritance|Check the DB Inheritance page for all]] -:'''How to Disable''' -:* Commenting it's #define RENEWAL line out makes it disable (add '''//''' before #define) - -==== RENEWAL_DROP ==== -:This setting enables or disables Ragnarok Renewal drop rate modifier, which is based on the level difference between a character and the monster it killed -:The modifier depends on the following table -:{|border="1" style="text-align:center;" -|- -| '''Difference in Base Level''' || '''Drop Rate''' -|- -| 30 levels above monster or more || 50% -|- -| + 15 ~ 29 || 60% -|- -| + 10 ~ 14 || 75% -|- -| + 6 ~ 9 || 90% -|- -| + 1 ~ 5 || 100% -|- -| Equal || 100% -|- -| - 1 ~ 10 || 100% -|- -| - 11 ~ 13 || 75% -|- -| 15 levels below monster or more || 50% -|} -:'''For Example''', if you are level 50, and you kill a monster level 10, which normally drops a item at 50%, for you it'd drop at 25% (because you're 30 levels or higher than it) -:'''How to Disable''' -:* Commenting it's #define RENEWAL_DROP line out makes it disable (add '''//''' before #define) - -==== RENEWAL_EXP ==== -:This setting enables or disables Ragnarok Renewal exp rate modifier, which is based on the level difference between a character and the monster it killed -:'''How to Disable''' -:* Commenting it's #define RENEWAL_DROP line out makes it disable (add '''//''' before #define) - -==== RENEWAL_CAST ==== -:This setting enables or disables '''Renewal Casting''' and in it, cast time is decreased by DEX*2+INT, 20% of the cast time is not reduced by stats, for example, on a skill whose cast time is 10s, only 8s may be reduced. other 2s are part of a "fixed cast time" that is only reduced by special items and skills (such as Arch Bishop's Sacrament skill). '''When disabled''' it uses the old cast time method, influenced by dex, items and skills
-:'''How to Disable''' -:* Commenting it's #define RENEWAL_CAST line out makes it disable (add '''//''' before #define) -==== RENEWAL_CAST_VMIN ==== -:* '''Note''': This setting only matters if '''RENEWAL_CAST''' is enabled -:This setting allows you to specify how many points a user is required to have to reach instant cast -:* '''VALUE''': The formula is (casterDex x 2) + (casterInt), '''default value''' is '''530''' -==== RENEWAL_EDP ==== -:This setting enables or disables Ragnarok Renewal mechanics for '''Enchant Deadly Poison''' skill,
-:the changes compared to old mechanics are: -:* EDP doesn't increases final damage by 400%, instead it increases your weapon atk and your stat atk -:* EDP doesn't affect '''Grimtooth''' skill -:'''How to Disable''' -:* Commenting it's #define RENEWAL_EDP line out makes it disable (add '''//''' before #define) - -=== /src/config/secure.h === ----- + +#### RENEWAL + + +This setting affects the following mechanics + +- Renewal MATK +- Renewal MDEF +- Renewal DEF +- Renewal Status Points +- Renewal Heal Formula +- Renewal ASPD Shield Penalty +- Renewal Stat Bonuses (str,agi,vit,flee,hit,etc) +- Renewal Files + - *item_db_re.txt*, *statpoint_renewal.txt*, *job_db_re.txt*, [and others](DB_Folder_Inheritance "wikilink") are only + loaded in this mode. [Check the DB Inheritance page for all](DB_Folder_Inheritance "wikilink") + +**How to Disable** + +- Commenting it's \#define RENEWAL line out makes it disable (add **//** before \#define) + +#### RENEWAL_DROP + + +This setting enables or disables Ragnarok Renewal drop rate modifier, which is based on the level difference between a +character and the monster it killed + +The modifier depends on the following table + +{\|border="1" style="text-align:center;" + +\|- \| **Difference in Base Level** \|\| **Drop Rate** \|- \| 30 levels above monster or more \|\| +50% \|- \| + 15 ~ 29 \|\| 60% \|- \| + 10 ~ 14 \|\| +75% \|- \| + 6 ~ 9 \|\| 90% \|- \| + 1 ~ 5 \|\| 100% \|- \| Equal \|\| +100% \|- \| - 1 ~ 10 \|\| 100% \|- \| - 11 ~ 13 \|\| 75% \|- \| 15 levels below monster or more +\|\| 50% \|} + + +**For Example**, if you are level 50, and you kill a monster level 10, which normally drops a item at 50%, for you it'd +drop at 25% (because you're 30 levels or higher than it) + +**How to Disable** + +- Commenting it's \#define RENEWAL_DROP line out makes it disable (add **//** before \#define) + +#### RENEWAL_EXP + + +This setting enables or disables Ragnarok Renewal exp rate modifier, which is based on the level difference between a +character and the monster it killed + +**How to Disable** + +- Commenting it's \#define RENEWAL_DROP line out makes it disable (add **//** before \#define) + +#### RENEWAL_CAST + + +This setting enables or disables **Renewal Casting** and in it, cast time is decreased by DEX\*2+INT, 20% of the cast +time is not reduced by stats, for example, on a skill whose cast time is 10s, only 8s may be reduced. other 2s are part +of a "fixed cast time" that is only reduced by special items and skills (such as Arch Bishop's Sacrament skill). **When +disabled** it uses the old cast time method, influenced by dex, items and skills + +**How to Disable** + +- Commenting it's \#define RENEWAL_CAST line out makes it disable (add **//** before \#define) + +#### RENEWAL_CAST_VMIN + +:\* **Note**: This setting only matters if **RENEWAL_CAST** is enabled + + +This setting allows you to specify how many points a user is required to have to reach instant cast + +- **VALUE**: The formula is (casterDex x 2) + (casterInt), **default value** is **530** + +#### RENEWAL_EDP + + +This setting enables or disables Ragnarok Renewal mechanics for **Enchant Deadly Poison** skill, + +the changes compared to old mechanics are: + +- EDP doesn't increases final damage by 400%, instead it increases your weapon atk and your stat atk +- EDP doesn't affect **Grimtooth** skill + +**How to Disable** + +- Commenting it's \#define RENEWAL_EDP line out makes it disable (add **//** before \#define) + +### /src/config/secure.h + +------------------------------------------------------------------------------------------------------------------------ + This configuration files provides additional security features to your server -==== SECURE_NPCTIMEOUT ==== -:When enabled all npcs dialog will 'timeout' if user is on idle for longer than the amount of seconds allowed, on 'timeout' the npc dialog window changes it's next/menu to a 'close' button -:* '''VALUE''' is the amount of '''seconds''' you want the server to wait prior to timeout an idle NPC dialog -==== SECURE_NPCTIMEOUT_INTERVAL ==== -:* '''Note''': This setting only matters if '''SECURE_NPCTIMEOUT''' is enabled -:This setting is the amount of '''seconds''' you want the server to wait prior to checking if an NPC dialog is idle - -=== /src/config/classes/general.h === + +#### SECURE_NPCTIMEOUT + + +When enabled all npcs dialog will 'timeout' if user is on idle for longer than the amount of seconds allowed, on +'timeout' the npc dialog window changes it's next/menu to a 'close' button + +- **VALUE** is the amount of **seconds** you want the server to wait prior to timeout an idle NPC dialog + +#### SECURE_NPCTIMEOUT_INTERVAL + +:\* **Note**: This setting only matters if **SECURE_NPCTIMEOUT** is enabled + + +This setting is the amount of **seconds** you want the server to wait prior to checking if an NPC dialog is idle + +### /src/config/classes/general.h + This configuration files provides settings for you to further customize your server skills -==== RR_MAGIC_REFLECTION ==== -:* '''Note''': This setting exists because server owners were exposed to the unofficial magical reflection for several years, and expecting many to not want to change this setting was made. -:When enabled the official magical reflection is used, official magical reflection damage is calculated against ''the caster'', while the unofficial magical reflection calculates the reflected damage against ''the target''.
-:'''How to Disable''' -:* Commenting it's #define MAGIC_REFLECTION_TYPE line out makes it disable (add '''//''' before #define) - -=== /src/config/classes/swordsman.h === ----- + +#### RR_MAGIC_REFLECTION + +:\* **Note**: This setting exists because server owners were exposed to the unofficial magical reflection for several +years, and expecting many to not want to change this setting was made. + + +When enabled the official magical reflection is used, official magical reflection damage is calculated against *the +caster*, while the unofficial magical reflection calculates the reflected damage against *the target*. + +**How to Disable** + +- Commenting it's \#define MAGIC_REFLECTION_TYPE line out makes it disable (add **//** before \#define) + +### /src/config/classes/swordsman.h + +------------------------------------------------------------------------------------------------------------------------ + This configuration files provides settings for you to further customize your server's swordsman skills -==== MAX_RUNE ==== -:This setting allows you to specify how many rune knight's runes of the same type an character is able to hold in his inventory
-:'''Default''' value for this setting is 20 -[[Category:Source Snippets]] \ No newline at end of file + +#### MAX_RUNE + + +This setting allows you to specify how many rune knight's runes of the same type an character is able to hold in his +inventory + +**Default** value for this setting is 20 + +[Category:Source Snippets](Category:Source_Snippets "wikilink")