Popular Post Aleos Posted October 22, 2020 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13 Popular Post Share Posted October 22, 2020 ItemDB -> YAML! As of Git Hash: 04cfe17, rAthena's item database has been converted to YAML! What this means: The item database being in YAML format means that the database is now much more human-readable. This allows for quick review, modification, and addition of items without having to memorize the CSV format or use any third party tools. The parser now also has much better error handling when reading items into memory so tracking down those pesky typos is a thing of the past! The update combines item_avail, item_buyingstore, item_delay, item_flag, item_nouse, item_stack, and item_trade databases into the item_db so there is much less searching around multiple databases when doing anything with items! As items are no longer defined in a single row, this means the flat file has grown in size. To ease the on load text editors for people's computers who may not have the horsepower we split the items as they are in game via Consumables, Equipment, and Etc. The Job restriction for items has been cleaned up so that custom masks don't have to be made and removes a horrible restriction for those adding custom classes to their servers. Now it's as easy as defining the EAJ_* constant... and that's it! The item combo system has had a massive cleanup in the background. We no longer do sketchy memory management and manipulation with a move to use standard libraries provided by C++11! As with any YAML conversion we have provided an option in the CSV2YAML tool built right into rAthena! Just build the CSV2YAML tool within Visual Studio or via Make and run the executable. The tool will provide you with general steps and convert your custom items right on over to the YAML format. No muss, no fuss! Something that was brought up in the Pull Request was the support for SQL. Many people were against the move to YAML because the support for SQL was compromised. Well, we are happy to say that SQL is still supported and isn't going anywhere! We've developed a new tool, YAML2SQL, which can convert the YAML item database into SQL format. This allows servers who utilize SQL to continue with this method. We've also gone a step further and provided a SQL View which will create a new compatibility table without breaking support for your Control Panel/databases. The SQL View is optional though once the Control Panel/database is setup to utilize the new table. The new and fuller item data in this table also provides much more detail to the item database than ever before! You can read more details in our README! What this means to developers: Pull Requests can be reviewed much quicker and much more simpler. Identifying the actual change to the item and easily verifying said change without having to count commas! Additional features being added to the item database no longer requires the development of a side database. A vast majority of the item data is now part of the item_db structure and can continue to grow in this format! Redefined Import System: Now that the item_db is in YAML format, the adjustment of items is much simpler. If a change is being made to an item only the parts that are being changed have to be defined in the import. Below are some examples: Adjusting Red_Potion weight to 10 and increasing the heal rate in the script. - Id: 501 Weight: 100 Script: | itemheal rand(100,120),0; Remove the Thief classes from being able to equip the Cap. - Id: 2226 Jobs: Assassin: false Rogue: false Thief: false Add a stack limit of 10 to Meat for inventory only. - Id: 517 Stack: Amount: 10 Inventory: true Check out the item_db documentation for further details! Thanks to @Lemongrass, @Capuche, and @Cydh for their help! 6 12 2 2 Quote Link to comment Share on other sites More sharing options...
Start_ Posted October 22, 2020 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 931 Reputation: 173 Joined: 04/05/13 Last Seen: 4 hours ago Share Posted October 22, 2020 Very nice! Thank you rAthena! 1 Quote Link to comment Share on other sites More sharing options...
Poring King Posted October 22, 2020 Group: Members Topic Count: 62 Topics Per Day: 0.02 Content Count: 1013 Reputation: 190 Joined: 11/27/14 Last Seen: Thursday at 01:51 AM Share Posted October 22, 2020 (edited) Thankyou for your effort ^_^ more power !! rAthena Dev team . Well because of this i suddenly click the donate button ^_^ Edited October 22, 2020 by Poring King 1 Quote Link to comment Share on other sites More sharing options...
rayhanalka Posted October 22, 2020 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 19 Reputation: 3 Joined: 12/30/15 Last Seen: June 6 Share Posted October 22, 2020 whoaa thank you. that's a great step and also big changes... i hope we got monster db txt to yaml soon and so on monster skills db to yaml, there are a lot of things that need to be taken care of. good job devs, like your work tho.. 1 Quote Link to comment Share on other sites More sharing options...
Kakaroto Posted October 22, 2020 Group: Members Topic Count: 99 Topics Per Day: 0.02 Content Count: 632 Reputation: 95 Joined: 05/11/12 Last Seen: 47 minutes ago Share Posted October 22, 2020 Congratulations to all rAthena devs, nice work guys! 1 Quote Link to comment Share on other sites More sharing options...
Lemongrass Posted October 22, 2020 Group: Developer Topic Count: 28 Topics Per Day: 0.01 Content Count: 547 Reputation: 270 Joined: 11/08/11 Last Seen: June 10 Share Posted October 22, 2020 Good job - now let us continue with the next one! 1 Quote Link to comment Share on other sites More sharing options...
mazvi Posted October 25, 2020 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 78 Reputation: 7 Joined: 11/26/12 Last Seen: December 28, 2023 Share Posted October 25, 2020 (edited) Nice update.. Edited October 25, 2020 by mazvi Not relevant Quote Link to comment Share on other sites More sharing options...
cpawjou Posted November 4, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 01/31/13 Last Seen: October 30 Share Posted November 4, 2020 After changing to yml, how do I batch translate the names of Name:, the name is refer to idnum2itemdisplaynametable.txt Quote Link to comment Share on other sites More sharing options...
Onairda Posted November 7, 2020 Group: Members Topic Count: 71 Topics Per Day: 0.02 Content Count: 168 Reputation: 8 Joined: 12/30/16 Last Seen: Tuesday at 12:18 PM Share Posted November 7, 2020 On 10/22/2020 at 12:42 PM, Poring King said: Thankyou for your effort ^_^ more power !! rAthena Dev team . Well because of this i suddenly click the donate button ^_^ On 10/22/2020 at 11:53 PM, Lemongrass said: Good job - now let us continue with the next one! On 10/22/2020 at 11:15 AM, Start_ said: Very nice! Thank you rAthena! Hello Everyone, Good day! Apologies for notifying you I just got back from making RO again and I just downloaded a fresh rathena SVN but I can't find the Item_db.txt in db/pre-re . Do you have any idea where can I find the item_db ? or any instruction how can I edit the effects of the items. Thank you! Quote Link to comment Share on other sites More sharing options...
Poring King Posted November 7, 2020 Group: Members Topic Count: 62 Topics Per Day: 0.02 Content Count: 1013 Reputation: 190 Joined: 11/27/14 Last Seen: Thursday at 01:51 AM Share Posted November 7, 2020 @G-RO as you can see its now item_db.yml not item_db.txt anymore Quote Link to comment Share on other sites More sharing options...
Onairda Posted November 7, 2020 Group: Members Topic Count: 71 Topics Per Day: 0.02 Content Count: 168 Reputation: 8 Joined: 12/30/16 Last Seen: Tuesday at 12:18 PM Share Posted November 7, 2020 Just now, Poring King said: @G-RO as you can see its now item_db.yml not item_db.txt anymore Hello Porimg. Appreciate your response, Can you please guide me where can Edit the item_db.yml I tried to open the item_db.yaml in db/pre-re but inside was only the below. How can I see the itemID and effects? # This file is a part of rAthena. # Copyright(C) 2019 rAthena Development Team # https://rathena.org - https://github.com/rathena # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ########################################################################### # Item Database ########################################################################### # # Item Settings # ########################################################################### # - Id Item ID. # AegisName Server name to reference the item in scripts and lookups, should use no spaces. # Name Name in English for displaying as output. # Type Item type. (Default: Etc) # SubType Weapon or Ammo type. (Default: 0) # Buy Buying price. When not specified, becomes double the sell price. (Default: 0) # Sell Selling price. When not specified, becomes half the buy price. (Default: 0) # Weight Item weight. Each 10 is 1 weight. (Default: 0) # Attack Weapon's attack. (Default: 0) # MagicAttack Weapon's magic attack. (Default: 0) # Defense Armor's defense. (Default: 0) # Range Weapon's attack range. (Default: 0) # Slots Available slots in item. (Default: 0) # Jobs Jobs that can equip the item. (Map default is 'All: true') # Classes Upper class types that can equip the item. (Map default is 'All: true') # Gender Gender that can equip the item. (Default: Both) # Locations Equipment's placement. (Default: None) # WeaponLevel Weapon level. (Default: 0) # EquipLevelMin Minimum required level to equip. (Default: 0) # EquipLevelMax Maximum level that can equip. (Default: 0) # Refineable If the item can be refined. (Default: false) # View View sprite of an item. (Default: 0) # AliasName Another item's AegisName that will be sent to the client instead of this item's AegisName. (Default: null) # Flags: Item flags. (Default: null) # BuyingStore If the item is available for Buyingstores. (Default: false) # DeadBranch If the item is a Dead Branch. (Default: false) # Container If the item is part of a container. (Default: false) # UniqueId If the item is a unique stack. (Default: false) # BindOnEquip If the item is bound to the character upon equipping. (Default: false) # DropAnnounce If the item has a special announcement to self on drop. (Default: false) # NoConsume If the item is consumed on use. (Default: false) # DropEffect If the item has a special effect when on the ground. (Default: None) # Delay: Item use delay. (Default: null) # Duration Duration of delay in seconds. # Status Status Change used to track delay. (Default: None) # Stack: Item stack amount. (Default: null) # Amount Maximum amount that can be stacked. # Inventory If the stack is applied to player's inventory. (Default: true) # Cart If the stack is applied to the player's cart. (Default: false) # Storage If the stack is applied to the player's storage. (Default: false) # GuildStorage If the stack is applied to the player's guild storage. (Default: false) # NoUse: Conditions when the item is unusable. (Default: null) # Override Group level to override these conditions. # Sitting If the item can not be used while sitting. (Default: false) # Trade: Trade restrictions. (Default: null) # Override Group level to override these conditions. # NoDrop If the item can not be dropped. (Default: false) # NoTrade If the item can not be traded. (Default: false) # TradePartner If the item can not be traded to the player's partner. (Default: false) # NoSell If the item can not be sold. (Default: false) # NoCart If the item can not be put in a cart. (Default: false) # NoStorage If the item can not be put in a storage. (Default: false) # NoGuildStorage If the item can not be put in a guild storage. (Default: false) # NoMail If the item can not be put in a mail. (Default: false) # NoAuction If the item can not be put in an auction. (Default: false) # Script Script to execute when the item is used/equipped. (Default: null) # EquipScript Script to execute when the item is equipped. (Default: null) # UnEquipScript Script to execute when the item is unequipped or when a rental item expires. (Default: null) ########################################################################### Header: Type: ITEM_DB Version: 1 Footer: Imports: - Path: db/pre-re/item_db_usable.yml - Path: db/pre-re/item_db_equip.yml - Path: db/pre-re/item_db_etc.yml Thank you so much! Quote Link to comment Share on other sites More sharing options...
Poring King Posted November 7, 2020 Group: Members Topic Count: 62 Topics Per Day: 0.02 Content Count: 1013 Reputation: 190 Joined: 11/27/14 Last Seen: Thursday at 01:51 AM Share Posted November 7, 2020 @G-RO I think this is not the right section to ask for this but to answer your question check the item_db.yml footer it says very clear Footer: Imports: - Path: db/pre-re/item_db_usable.yml - Path: db/pre-re/item_db_equip.yml - Path: db/pre-re/item_db_etc.yml Quote Link to comment Share on other sites More sharing options...
iwillnot Posted November 21, 2020 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 51 Reputation: 23 Joined: 04/28/12 Last Seen: April 22, 2022 Share Posted November 21, 2020 This is really amazing work. Great job guys! Quote Link to comment Share on other sites More sharing options...
Radian Posted November 25, 2020 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24 Share Posted November 25, 2020 Great work Dev Team! Quote Link to comment Share on other sites More sharing options...
hikashin-rae Posted December 1, 2020 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 208 Reputation: 23 Joined: 01/14/13 Last Seen: Thursday at 01:12 AM Share Posted December 1, 2020 This is good update nice keep our updates coming, Thank you as always. Quote Link to comment Share on other sites More sharing options...
boypol Posted December 5, 2020 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 12/01/20 Last Seen: May 11, 2021 Share Posted December 5, 2020 Hi can anyone teach me how to convert itemdb old format to new yaml format? Thanks Quote Link to comment Share on other sites More sharing options...
dantoki Posted December 9, 2020 Group: Members Topic Count: 67 Topics Per Day: 0.02 Content Count: 229 Reputation: 32 Joined: 10/21/12 Last Seen: Friday at 04:42 PM Share Posted December 9, 2020 About this update, did we have any converter for the older ones? I mean about the custom items that added on import/item_db.txt is there any converter to make it yaml as well? Anyways, Thanks for this update . More Power rAthena Quote Link to comment Share on other sites More sharing options...
Capuche Posted December 9, 2020 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 615 Joined: 07/05/12 Last Seen: October 1 Share Posted December 9, 2020 ^ The tool to convert txt to yml (csv2yaml) can convert your import/item_db.txt as well. Compile the tool, run it ! 1 1 Quote Link to comment Share on other sites More sharing options...
dantoki Posted December 14, 2020 Group: Members Topic Count: 67 Topics Per Day: 0.02 Content Count: 229 Reputation: 32 Joined: 10/21/12 Last Seen: Friday at 04:42 PM Share Posted December 14, 2020 ^ Cool! thank youuuu ~ Quote Link to comment Share on other sites More sharing options...
jayvz17 Posted December 16, 2020 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 35 Reputation: 1 Joined: 04/08/14 Last Seen: July 8 Share Posted December 16, 2020 (edited) I read this in github. Actually I did not understand why they removed the SQL. Can anyone explain it to me? Also, mySQL queyring is easy to me. Or there is other system (just like workbench) to sort/filter the YAML? UPDATED: SORRY I did not read the whole message. Author said "SQL was compromised. Well, we are happy to say that SQL is still supported" But still I wonder which system do I need to use to filter the data in yml. Thanks. Edited December 16, 2020 by jayvz17 Quote Link to comment Share on other sites More sharing options...
Cydh Posted December 23, 2020 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 746 Joined: 06/16/12 Last Seen: June 10 Share Posted December 23, 2020 I'm 2 months late here, just to say "welcome to YAML, item_db!" Quote Link to comment Share on other sites More sharing options...
Profile Posted December 23, 2020 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 77 Reputation: 1 Joined: 04/15/17 Last Seen: January 4, 2021 Share Posted December 23, 2020 (edited) Please move if this is not the correct place to ask this. When trying to convert a .txt file, I'm getting these errors: This is the file: This is what the new .yml becomes: It is saying it has an Unknown weapon type, but the number it is refering to is the "View" number that's used on /accessoryid.lub. Am I missing something here? Just switched from old rAthena to latest. Thanks. Edited December 24, 2020 by Profile Quote Link to comment Share on other sites More sharing options...
Capuche Posted December 24, 2020 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 615 Joined: 07/05/12 Last Seen: October 1 Share Posted December 24, 2020 Your old file have mistakes, your items should be type armor instead of weapon (4 instead of 5), or if they are supposed to be weapon type, the 'viewid' of the weapon must be defined source side. Quote Link to comment Share on other sites More sharing options...
Adimgar Posted January 22, 2021 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 01/17/13 Last Seen: October 5, 2022 Share Posted January 22, 2021 (edited) Great work!! Being an Old School SQL old man, i'm still getting used to it, but i do like it so far. Will this migration extend to mob_db too?, because now we have beautifull item_db.yml files and the old mob_db.txt (csv) files. It'll be great to do so for consistency and custimization (ie custom drops easyness), with a separated mob_db.yml, mob_db_mvp.yml and mob_db_champion.yml would be fantastic imo. Asking for a little help, i've loaded compatibility views in sql, but control panel still cannot read tiem_db (missing columns), what is the right support forum to ask for help on this? Congratulations and keep up with the excelent work!. Edited January 22, 2021 by Adimgar Quote Link to comment Share on other sites More sharing options...
Ninjininja Posted January 25, 2021 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 01/17/21 Last Seen: February 10, 2021 Share Posted January 25, 2021 (edited) On 1/22/2021 at 3:41 PM, Adimgar said: Asking for a little help, i've loaded compatibility views in sql, but control panel still cannot read tiem_db (missing columns), what is the right support forum to ask for help on this? Yea... I'm getting that same problem too. NOT A COMPUTER PERSON, just a noob trying to figure it out as well, so take this with a grain of salt: From what I can gather from Google and piece together from the rAthena documents, I think what those compatibility files did was take the item databases and create a "virtual" database that rearranges the tables in the order FluxCP wants them to be in (under Views). However, maybe a file in FluxCP itself needs to be changed? Seems that by default the program looks at (in my case) item_db_re and item_db2_re. However it now needs to look at (in my case) item_db_re_compat and item_db2_re_compat. So I've been spending extra free time the last few days looking in the various php files and seeing if anything like that is in there. Again: I'm doing a blind leading the blind thing here... so I'm probably completely wrong. But I figure trying is better than doing nothing, and maybe I'll stumble on the answer... or fall off the cliff. LoL Edited January 25, 2021 by Ninjininja Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.