summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-20 22:10:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-20 22:10:03 +0300
commit5e9e635515a556bea43dc858e0d7774160b7528a (patch)
tree862a0afa26e539f50028f90392f3ae1c20e3afe8
parent9f86b6cbe21f8ca3a1d06b1353f071cf5b23d08b (diff)
downloaddocs-5e9e635515a556bea43dc858e0d7774160b7528a.tar.gz
docs-5e9e635515a556bea43dc858e0d7774160b7528a.tar.bz2
docs-5e9e635515a556bea43dc858e0d7774160b7528a.tar.xz
docs-5e9e635515a556bea43dc858e0d7774160b7528a.zip
Update docs from Hercules.
-rw-r--r--server/conf/global_configuration.txt69
-rw-r--r--server/gm/atcommands.txt14
-rw-r--r--server/items/permissions.txt2
-rw-r--r--server/other/map_cache.txt9
-rw-r--r--server/other/md5_hashcheck.txt24
-rw-r--r--server/scripts/constants.md36
-rw-r--r--server/scripts/script_commands.txt88
7 files changed, 155 insertions, 87 deletions
diff --git a/server/conf/global_configuration.txt b/server/conf/global_configuration.txt
new file mode 100644
index 0000000..a000a45
--- /dev/null
+++ b/server/conf/global_configuration.txt
@@ -0,0 +1,69 @@
+//===== Hercules Documentation ===============================
+//= Global configuration reference
+//===== By: ==================================================
+//= Panikon (Hercules Dev. Team)
+//===== Current Version: =====================================
+//= 20140616
+//===== Description: =========================================
+//= Global configurations found in conf/global/
+//============================================================
+
+- What are global configurations?
+
+Global configurations are configurations that can be shared between servers,
+but can also be set independently in each server.
+
+- How do they work?
+
+They work by using an include system that is available with libconfig:
+
+ "A configuration file may "include" the contents of another file using an
+ include directive. This directive has the effect of inlining the contents of
+ the named file at the point of inclusion.
+
+ An include directive must appear on its own line in the input. It has the
+ form:
+
+ @include "filename"
+
+ Any backslashes or double quotes in the filename must be escaped as '\\' and
+ '\"', respectively."
+ From libconfig's documentation
+
+So each file that is included is actually inside each one of the main
+configuration files and thus a change in the first will be a change in the
+latter.
+Note: the @include directive is read by the server executable, so any path
+should be from were it is and NOT from where the main configuration file is!
+
+- How do I stop using global configurations?
+
+To stop using global configurations is very simple, all you have to do is copy
+the contents that are inside the global configuration file and put them
+_exactly_ where the include directive were in the main configuration file.
+
+E.g.
+ Find in any file:
+ @include "conf/global/sql_connection.conf"
+ Replace it with:
+ sql_connection: {
+ // [INTER] You can specify the codepage to use in your mySQL tables here.
+ // (Note that this feature requires MySQL 4.1+)
+ //default_codepage: ""
+
+ // [LOGIN] Is `userid` in account_db case sensitive?
+ //case_sensitive: false
+
+ // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1
+ // Under windows, you want to use 127.0.0.1. If you see a message like
+ // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
+ // and you have localhost, switch it to 127.0.0.1
+ db_hostname: "127.0.0.1"
+ db_port: 3306
+ db_username: "ragnarok"
+ db_password: "ragnarok"
+ db_database: "ragnarok"
+ //codepage:""
+ }
+ If the main configuration file belongs to the map server, for instance, you
+ don't need to include default_codepage and case_sensitive.
diff --git a/server/gm/atcommands.txt b/server/gm/atcommands.txt
index e8a5b0e..fdafb6c 100644
--- a/server/gm/atcommands.txt
+++ b/server/gm/atcommands.txt
@@ -79,8 +79,8 @@ Toggles the display of experience gain messages.
@showzeny
Toggles the display of Zeny gain messages.
-Configuration for zeny being dropped by mobs is in '/conf/battle/monster.conf':
-zeny_from_mobs: yes
+Configuration for zeny being dropped by mobs is in 'conf/map/battle/monster.conf':
+zeny_from_mobs: true
---------------------------------------
@@ -905,7 +905,7 @@ Changes Kafra Points by the specified amount.
@dye <default: 0-4>
Changes appearance based on the given parameters.
-The min/max values are set in '/conf/battle/client.conf'.
+The min/max values are set in 'conf/map/battle/client.conf'.
---------------------------------------
@@ -945,7 +945,7 @@ Additionally, @sizeall will change the size of all online players.
@leave
Duel-organizing commands.
-Some options can be found in '/conf/battle/misc.conf'.
+Some options can be found in 'conf/map/battle/misc.conf'.
---------------------------------------
@@ -1188,7 +1188,7 @@ Changes a battle_config flag without rebooting the server.
@adjgroup <group ID>
Changes the group of a character (lasts until relog).
-The groups are specified in '/conf/groups.conf'.
+The groups are specified in 'conf/groups.conf'.
---------------------------------------
@@ -1273,7 +1273,7 @@ Warps all online characters of a party to your location.
Allows you to spy on any party's Party Chat.
At least one member of that party must be online.
-NOTE: map server needs to be configured to enable spying to use this command (enable_spy: yes)
+NOTE: map server needs to be configured to enable spying to use this command (enable_spy: true)
---------------------------------------
@@ -1336,7 +1336,7 @@ Warps all online characters of a guild to your location.
Allows you to spy on any guild's Guild Chat.
At least one member of that guild must be online.
-NOTE: map server needs to be configured to enable spying to use this command (enable_spy: yes)
+NOTE: map server needs to be configured to enable spying to use this command (enable_spy: true)
---------------------------------------
diff --git a/server/items/permissions.txt b/server/items/permissions.txt
index a656f8b..bc84f86 100644
--- a/server/items/permissions.txt
+++ b/server/items/permissions.txt
@@ -5,7 +5,7 @@
//===== Current Version: =====================================
//= 20131031
//===== Description: =========================================
-//= Player group permissions, configured in /conf/groups.conf.
+//= Player group permissions, configured in conf/groups.conf.
//============================================================
can_trade : Ability to trade or otherwise distribute items (drop, storage, vending etc...).
diff --git a/server/other/map_cache.txt b/server/other/map_cache.txt
index 19ab92a..80a8366 100644
--- a/server/other/map_cache.txt
+++ b/server/other/map_cache.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= DracoRPG
//===== Current Version: =====================================
-//= 20070724
+//= 20160820
//===== Description: =========================================
//= A complete manual for Hercules' map cache generator as
//= well as a reference on the map cache format used.
@@ -32,11 +32,8 @@ having slightly different maps. When building your cache, you should ensure you'
The list of GRFs and/or data directory must follow the format and indication of the default file: as many "grf:" entries as
you wish and optionally only one "data_dir:" entry with trailing backslash included. // comments are supported as usual.
-In fact, any file with one map name per line can be used as a map list, that's why the map index list is used as a default:
-we are sure it contains every map supported by the server. Anything after the map name is ignored, // comments are supported
-and if the first word on the line is "map:" then the second word is used as the map name instead: that allows using
-/conf/maps.conf as your map list, which is handy if you want to generate a minimal map cache for each of your multiple
-map-servers.
+A custom map list can be used, in order to generate a map cache file with different (or less) maps than the current Hercules
+configuration. For details on the map list format, see conf/map/maps.conf.
The map cache file path can point to an already existing file, as the builder adds a map only if it's not already cached.
This way, you can add custom maps to the base map cache without even needing kRO Sakray maps. If you wish to rebuild the
entire map cache, though, you can either provide a path to a non-existing file, or force the rebuild mode.
diff --git a/server/other/md5_hashcheck.txt b/server/other/md5_hashcheck.txt
index d9064b1..0153938 100644
--- a/server/other/md5_hashcheck.txt
+++ b/server/other/md5_hashcheck.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20140208
+//= 20160210
//===== Description: =========================================
//= This file outlines the login server's MD5 hash check.
//============================================================
@@ -20,27 +20,9 @@ Please refer to your client diff tool manual for the appropriate patch
tools or diffs it may have similar names.)
The serverside settings for the hash check are located in
-conf/login.conf:
+conf/login/login.conf::login_configuration.permission.hash
-// Client MD5 hash check
-// If turned on, the login server will check if the client's hash matches
-// the value below, and will not connect tampered clients.
-// Note: see doc/md5_hashcheck.txt for more details.
-client_hash_check: off
-
-// Client MD5 hashes
-// The client with the specified hash can be used to log in by players with
-// a group_id equal to or greater than the given value.
-// If you specify 'disabled' as hash, players with a group_id greater than or
-// equal to the given value will be able to log in regardless of hash (and even
-// if their client does not send a hash at all.)
-// Format: group_id, hash
-// Note: see doc/md5_hashcheck.txt for more details.
-client_hash: 0, 113e195e6c051bb1cfb12a644bb084c5
-client_hash: 10, cb1ea78023d337c38e8ba5124e2338ae
-client_hash: 99, disabled
-
-To enable MD5 hash checks, set 'client_hash_check' to 'on' and add one
+To enable MD5 hash checks, set 'client_hash_check' to 'true' and add one
'client_hash' entry for each client you want to use.
The group_id can be any of the groups in conf/groups.conf, and it is
useful in case if you want to allow GMs to use a different client
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index 65e2650..09f0f9f 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -3621,6 +3621,7 @@
- `C_PURPLE`: 8388736
- `C_RED`: 16711680
- `C_SILVER`: 12632256
+- `C_SPRINGGREEN`: 65433
- `C_TEAL`: 32896
- `C_WHITE`: 16777215
- `C_YELLOW`: 16776960
@@ -4841,7 +4842,7 @@
- `GN_CRAZYWEED_ATK`: 2484
- `GN_DEMONIC_FIRE`: 2485
- `GN_FIRE_EXPANSION`: 2486
-- `GN_FIRE_EXPANSION_SMOKE_POWDE`: 2487
+- `GN_FIRE_EXPANSION_SMOKE_POWDER`: 2487
- `GN_FIRE_EXPANSION_TEAR_GAS`: 2488
- `GN_FIRE_EXPANSION_ACID`: 2489
- `GN_HELLS_PLANT`: 2490
@@ -6253,6 +6254,20 @@
- `MG_F_UNDEAD_KNIGHT`: 2474
- `MG_CORRUPTION_ROOT`: 2475
- `MG_AMDARAIS`: 2476
+- `NG_WANDER_MAN`: 2477
+- `NG_RIDEWORD`: 2478
+- `NG_MIMIC`: 2479
+- `NG_EVIL_DRUID`: 2480
+- `NG_WRAITH_DEAD`: 2481
+- `G_MG_KHALITZBURG`: 2482
+- `NG_BAPHOMET`: 2483
+- `G_NG_BAPHOMET_`: 2484
+- `NG_CHIMERA`: 2485
+- `IRENE_ELDER`: 2542
+- `PAYONSOLDIER`: 2543
+- `PAYONSOLDIER2`: 2544
+- `GUARDDOG`: 2545
+- `GUARDDOG2`: 2546
- `GEFFEN_MAGE_1`: 2549
- `GEFFEN_MAGE_2`: 2550
- `GEFFEN_MAGE_3_1`: 2551
@@ -6582,6 +6597,13 @@
- `C1_AGAV`: 2911
- `C2_ACIDUS_`: 2912
- `C3_ACIDUS_`: 2913
+- `BIG_BEN`: 2916
+- `BIG_BELL`: 2917
+- `TIME_KEEPER`: 2918
+- `NEO_PUNK`: 2919
+- `ARC_ELDER`: 2920
+- `OWL_VISCOUNT`: 2921
+- `OWL_MARQUEES`: 2923
- `T_ELDER_WILOW`: 2924
- `T_WILOW`: 2925
- `T_HARPY`: 2926
@@ -6595,6 +6617,7 @@
- `T_ARCHANGELING`: 2934
- `T_EVIL_CLOUD_HERMIT`: 2935
- `E_GHOSTRING`: 2936
+- `TIMEHOLDER`: 3074
- `ORGANIC_JAKK`: 3202
- `INORGANIC_JAKK`: 3203
- `DARK_SOUL`: 3381
@@ -8606,6 +8629,7 @@
- `TE_Ring_of_Protection`: 2944
- `TE_Ring_Of_Rage`: 2945
- `TE_Ring_Of_Defiance`: 2946
+- `Silversmith_Bracelet`: 2949
- `Rune_Ring`: 2950
- `Kvasir_Ring_Blue`: 2951
- `Kvasir_Ring_Red`: 2952
@@ -11077,6 +11101,10 @@
- `P_Cart_C`: 6606
- `Temporal_Crystal`: 6607
- `Coagulated_Spell`: 6608
+- `Glast_Decayed_Nail`: 6609
+- `Glast_Horrendous_Mouth`: 6610
+- `Gold_Coin_Basket`: 6612
+- `Colorful_Brooch`: 6613
- `Siege_Guild_Coin`: 6615
- `Lmtd_Manny_Card`: 6616
- `Lmtd_Sid_Card`: 6617
@@ -11100,6 +11128,7 @@
- `XMAS_Cookie`: 6681
- `Bag_Of_Selling_Goods`: 6682
- `Lovely_Stick`: 6712
+- `Contaminated_Magic`: 6755
- `Organic_Pumpkin`: 6804
- `Inorganic_Pumpkin`: 6805
- `Solo_Troops_Badge`: 6821
@@ -13302,6 +13331,7 @@
- `Metal_Dagger`: 13079
- `Octo_kitchen_Knife`: 13081
- `TE_Woe_Knife`: 13083
+- `Goldsmithing_Dagger`: 13086
- `RWC_Memory_Knife`: 13092
- `Thanatos_Dagger`: 13093
- `Evil_Slayer_Stabber_Dagger`: 13094
@@ -13506,6 +13536,7 @@
- `P_Saber3`: 13434
- `Magical_Blade`: 13438
- `TE_Woe_Sword`: 13439
+- `Ceremonial_Sword`: 13440
- `Old_Parasol`: 13442
- `Pala`: 13444
- `Crimson_Saber`: 13454
@@ -14542,6 +14573,7 @@
- `TE_Woe_Coat`: 15062
- `TE_Woe_Chain_Mail`: 15063
- `TE_Woe_Mage_Coat`: 15064
+- `Engraved_Armor`: 15066
- `Rune_Suit`: 15067
- `Adv_Angel's_Protection`: 15068
- `Anti-Magic_Suit`: 15073
@@ -16604,3 +16636,5 @@
- `EXP2`: 29027
> End of list
+
+<!--GENERATED FILE DO NOT EDIT-->
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index f0758de..e1f6891 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -73,25 +73,30 @@ Wherever you refer to a map, use 'mapname' instead of 'mapname.gat'.
Script loading structure
------------------------
-Scripts are loaded by the map server as referenced in the
-'conf/map-server.conf' configuration file, but in the default
-configuration, it doesn't load any script files itself. Instead, it loads
-the file 'npc/scripts_main.conf' which itself contains references to other
-files. The actual scripts are loaded from txt files, which are linked up
-like this:
+Scripts are loaded by the map server as referenced in the
+'npc/(pre-)re/scripts_main.conf' configuration file.
-npc: <path to a filename>
+The file contains a list of scripts to be loaded (or other configuration files
+to be parsed, through the @include directive), in the following format:
-Any line like this, invoked, ultimately, by 'map-server.conf' will load up
-the script contained in this file, which will make the script available.
-No file will get loaded twice, to prevent possible errors.
+npc_global_list: (
+ "npc/path/to/the/script/to/load.txt",
+ "npc/other/file.txt",
+@include "npc/other_configuration_file.conf"
+)
-Another configuration file option of relevance is:
+Any script will only get loaded once even if specified twice, to prevent
+possible errors.
-delnpc: <path to a filename>
+It's possible to specify scripts to exclude from loading, by inserting them
+(using the same syntax) in the list available in npc/scripts_removed.conf:
-This will unload a specified script filename from memory, which, while
-seemingly useless, may sometimes be required.
+npc_removed_list: (
+ "npc/path/to/the/file/to/skip.txt",
+)
+
+Script file format
+------------------
Whenever '//' is encountered in a line upon reading, everything beyond
this on that line is considered to be a comment and is ignored. This works
@@ -161,7 +166,7 @@ monster database (which contains an uppercase name used to summon the
monster with a GM command).
Amount is the amount of monsters that will be spawned when this command is
-executed, it is affected by spawn rates in 'battle.conf'.
+executed, it is affected by spawn rates in 'conf/map/battle.conf'.
Delay1 and delay2 control monster respawn delays - the first one is the
fixed base respawn time, and the second is random variance on top of the
@@ -1635,7 +1640,7 @@ receive free Zeny as a result.
The command has two optional arguments and a return value.
The default value of 'min' and 'max' can be set with 'input_min_value' and
-'input_max_value' in script.conf.
+'input_max_value' in conf/map/script.conf.
For numeric inputs the value is capped to the range [min,max]. Returns 1
if the value was higher than 'max', -1 if lower than 'min' and 0 otherwise.
For string inputs it returns 1 if the string was longer than 'max', -1 is
@@ -3044,25 +3049,6 @@ the function is called. This function is intended for use in item scripts.
---------------------------------------
-*getnameditem(<item id>,"<name to inscribe>");
-*getnameditem("<item name>","<name to inscribe>");
-
-This function is equivalent to using 'getitem', however, it will not just
-give the character an item object, but will also inscribe it with a
-specified character's name. You may not inscribe items with arbitrary
-strings, only with names of characters that actually exist. While this
-isn't said anywhere specifically, apparently, named items may not have
-cards in them, slots or no - these data slots are taken by the character
-ID who's name is inscribed. Only one remains free and it's not quite clear
-if a card may be there.
-
-This function will return 1 if an item was successfully created and 0 if
-it wasn't for whatever reason. Like 'getitem', this function will also
-accept an 'english name' from the item database as an item name and will
-return 0 if no such item exists.
-
----------------------------------------
-
*getitemslots(<item ID>)
This function will look up the item with the specified ID number in the
@@ -3792,13 +3778,13 @@ Example 2:
*basicskillcheck()
-This function will return the state of the configuration option
-'basic_skill_check' in 'battle.conf'. Returns 1 if the option is enabled
-and 0 if it isn't. If the 'basic_skill_check' option is enabled, which it
-is by default, characters must have a certain number of basic skill levels
-to sit, request a trade, use emotions, etc. Making your script behave
-differently depending on whether the characters must actually have the
-skill to do all these things might in some cases be required.
+This function will return the state of the configuration option
+'basic_skill_check' in 'conf/map/battle.conf'. Returns 1 if the option is
+enabled and 0 if it isn't. If the 'basic_skill_check' option is enabled, which
+it is by default, characters must have a certain number of basic skill levels
+to sit, request a trade, use emotions, etc. Making your script behave
+differently depending on whether the characters must actually have the skill to
+do all these things might in some cases be required.
---------------------------------------
@@ -5083,9 +5069,9 @@ disable changing equips while running that script in particular. Note that
if a different script also calls disable_items, it will override the last
call (so you may want to call this command at the start of your script
without assuming the effect is still in effect).
-If 'item_enabled_npc' option is set to Yes in 'items.conf' all NPC are
-allowing changing of equipment by default except for those have been set
-with 'disable_items'.
+If 'item_enabled_npc' option is set to true in 'conf/map/battle/items.conf' all
+NPC are allowing changing of equipment by default except for those have been
+set with 'disable_items'.
---------------------------------------
@@ -5512,8 +5498,8 @@ Used in reset NPC's (duh!).
This command takes off all the skill points on the invoking character, so
they only have Basic Skill blanked out (lvl 0) left, and returns the
points for them to spend again. Nothing else will change but the skills.
-Quest skills will also reset if 'quest_skill_reset' option is set to Yes
-in 'battle.conf'. If the 'quest_skill_learn' option is set in there, the
+Quest skills will also reset if 'quest_skill_reset' option is set to true in
+'conf/map/battle.conf'. If the 'quest_skill_learn' option is set in there, the
points in the quest skills will also count towards the total.
Used in reset NPC's (duh!).
@@ -6988,8 +6974,8 @@ mapflag's state.
*getbattleflag("<battle flag>")
Sets or gets the value of the given battle flag.
-Battle flags are the flags found in the battle/*.conf files and is also
-used in Lupus' variable rates script.
+Battle flags are the flags found in the conf/map/battle/*.conf files and is
+also used in Lupus' variable rates script.
Examples:
@@ -7206,7 +7192,7 @@ window). It will not be displayed anywhere else.
*logmes "<message>";
This command will write the message given to the map server NPC log file,
-as specified in 'conf/logs.conf'. If SQL logging is enabled, the message
+as specified in 'conf/map/logs.conf'. If SQL logging is enabled, the message
will go to the 'npclog' table.
If logs are not enabled for NPCs, nothing will happen.
@@ -8309,7 +8295,7 @@ rate if the pet intimacy is at the maximum possible.
The behavior modified with the above mentioned commands will only be
exhibited if the pet is loyal and appropriate configuration options are
-set in 'battle.conf'.
+set in 'conf/map/battle.conf'.
Pet scripts in the database normally run whenever a pet of that type
hatches from the egg. Other commands usable in item scripts (see 'bonus')