Details of import/ dirs and examples

Signed-off-by: Akkarinage <akkarin@rathena.org>
This commit is contained in:
Akkarinage 2017-08-10 00:34:43 +01:00 committed by GitHub
parent ac1cf0499a
commit 8417d7616b
3 changed files with 224 additions and 22 deletions

118
conf/readme.md Normal file
View File

@ -0,0 +1,118 @@
# Import Directories
## What is the import directory for?
The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files.
By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena.
## How does this work?
Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding".
For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/conf/import/` directory correctly. (for `/db/import/` examples, see [/db/readme.md](/db/readme.md))
### Login Server
---
We want to use MD5 passwords and disable `_m/f` account creation methods.
#### /conf/import/login_conf.txt
new_account: no
use_MD5_passwords: yes
### Char Server
---
We want to change the server name to "Odin".
#### /conf/import/char_conf.txt
server_name: Odin
### Map Server
---
We want to hide all error messages and add a few custom maps.
#### /conf/import/map_conf.txt
//Makes server output more silent by omitting certain types of messages:
//16: Hide Error and SQL Error messages.
console_silent: 16
map: 1@toy
map: 1@valley
map: shops
### Inter Server
---
We want to use MySQL tables instead of .txt files.
#### /conf/import/inter_conf.txt
use_sql_db: yes
### Logging Settings
---
We want to log all items and all chat messages.
#### /conf/import/log_conf.txt
log_filter: 1
// Log CHAT (Global, Whisper, Party, Guild, Main chat, Clan) (Note 3)
// log_chat: 63 = logs everything
log_chat: 63
### Battle Configs
---
We want to change the way various mechanics work. For anything that would be configured in the `/conf/battle/` directory, it will go into `import/battle_conf.txt`. To help you find which configs came from where, it's generally a good idea to comment out the name of the file that specific collection of configs came from.
#### /conf/import/battle_conf.txt
// guild.conf
guild_exp_limit: 90
// items.conf
vending_over_max: no
vending_tax: 100
weapon_produce_rate: 200
potion_produce_rate: 200
produce_item_name_input: 0x03
// misc.conf
duel_time_interval: 2
at_mapflag: yes
at_monsterignore: yes
cashshop_show_points: yes
hide_fav_sell: yes
// Whether or not mail box status is displayed upon login.
// Default: 0
// 0 = No
// 1 = Yes
// 2 = Yes, when there are unread mails
mail_show_status: 2
// monster.conf
show_mob_info: 3
// party.conf
party_hp_mode: 1
display_party_name: yes
// pet.conf
pet_rename: yes
// player.conf
max_aspd: 196
max_third_aspd: 196
max_extended_aspd: 196
vip_disp_rate: no
// status.conf
debuff_on_logout: 3
We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system.

View File

@ -1,22 +0,0 @@
What is the import folder for?
-------------------------------------------------------------------------------
The folder provides a way for you to change your config settings without having
to update the files every time you update your server. You store your changes,
and the rest is updated with rAthena.
How does this work?
-------------------------------------------------------------------------------
Place only the settings you have changed in the import files.
For example, if you want to change a value in /battle/exp.conf:
// Rate at which exp. is given. (Note 2)
base_exp_rate: 700
You could instead copy the setting into /import/battle_conf.txt,
and you'll eliminate any problems updating in the future.
Neat, isn't it?
- Semi-guide by Ajarn / Euphy

106
db/readme.md Normal file
View File

@ -0,0 +1,106 @@
# Import Directories
## What is the import directory for?
The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files.
By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena.
## How does this work?
Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding".
For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/db/import/` directory correctly. (for `/conf/import/` examples, see [/conf/readme.md](/conf/readme.md))
### Achievements
---
We want to add our own custom achievement that can be given to a player via an NPC Script and another that we can give to our GMs.
#### /db/import/achievement_db.yml
Achievements:
- ID: 280000
Group: "AG_GOAL_ACHIEVE"
Name: "Emperio"
Reward:
TitleID: 1035
Score: 50
- ID: 280001
Group: "AG_GOAL_ACHIEVE"
Name: "Staff"
Reward:
TitleID: 1036
Score: 50
### Instances
---
We want to add our own customized Housing Instance.
#### /db/import/instance_db.txt
// ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,Map3,...,Map255
35,Home,3600,900,1@home,24,6,2@home,3@home
### Mob Alias
---
We want to give a custom mob a Novice player sprite.
#### /db/import/mob_avail.txt
// Structure of Database:
// MobID,SpriteID{,Equipment}
3850,0
### Custom Maps
---
We want to add our own custom maps. For this we need to add our map names to `import/map_index.txt` and then to the `import/map_cache.dat` file for the Map Server to load.
#### /db/import/map_index.txt
1@home 1250
2@home
3@home
ev_has
shops
prt_pvp
### Item Trade Restrictions
---
We want to ensure that specific items cannot be traded, sold, dropped, placed in storage, etc.
#### /db/import/item_trade.txt
// Legend for 'TradeMask' field (bitmask):
// 1 - item can't be dropped
// 2 - item can't be traded (nor vended)
// 4 - wedded partner can override restriction 2
// 8 - item can't be sold to npcs
// 16 - item can't be placed in the cart
// 32 - item can't be placed in the storage
// 64 - item can't be placed in the guild storage
// 128 - item can't be attached to mail
// 256 - item can't be auctioned
// Full outright value = 511
34000,511,100 // Old Green Box
34001,511,100 // House Keys
34002,511,100 // Reputation Journal
### Custom Quests
---
We want to add our own custom quests to the quest_db.
#### /db/import/quest_db.txt
// Quest ID,Time Limit,Target1,Val1,Target2,Val2,Target3,Val3,MobID1,NameID1,Rate1,MobID2,NameID2,Rate2,MobID3,NameID3,Rate3,Quest Title
89001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest"
89002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest"
We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system.