diff --git a/db/seed/README.md b/db/seed/README.md new file mode 100644 index 0000000..2c3a798 --- /dev/null +++ b/db/seed/README.md @@ -0,0 +1,148 @@ +# Adding items to the database + +Anyone can add data to the database via a Pull Request on Github. Fork the repository, then create a new CSV file in the +`updates` folder with the date, type of item you're updating, and the next number in the sequence. The most important +part is the type of item, which should be plural for convention. This is what tells the service how to process your +data. + +``` +20240618-characters-001.csv +20241231-weapons-010.csv +20250115-summons-025.csv +``` + +It's recommended to use a CSV editor to edit this data, but something like Microsoft Excel or Numbers should work fine +too. + +## Required values + +You are required to set values for the following fields: +TBA + +## Arrays + +When adding the `character_id`, `nicknames_en`, or `nicknames_jp`, make sure to wrap your values in brackets ({}). If +there are multiple values, you can separate them with a comma (,) with no spaces on either side. + +``` +# character_id, Zeta and Vaseraga (Halloween): +{3024,3025} + +# nicknames_en, Threo +{sarasa,cake,thalatha} +``` + +## Value tables + +Values for properties like `element` are pre-defined, so you only need to input the corresponding digit. + +#### Rarity + +| Rarity | Value | +|--------|-------| +| SSR | 3 | +| SR | 2 | +| R | 1 | + +#### Element + +| Element | Value | +|---------|-------| +| Wind | 1 | +| Fire | 2 | +| Water | 3 | +| Earth | 4 | +| Dark | 5 | +| Light | 6 | + +#### Proficiency + +| Proficiency | Value | +|-------------|-------| +| Sabre | 1 | +| Dagger | 2 | +| Axe | 3 | +| Spear | 4 | +| Bow | 5 | +| Staff | 6 | +| Melee | 7 | +| Harp | 8 | +| Gun | 9 | +| Katana | 10 | + +#### Race + +| Race | Value | +|---------|-------| +| Unknown | 0 | +| Human | 1 | +| Erune | 2 | +| Draph | 3 | +| Harvin | 4 | +| Primal | 5 | + +#### Gender + +| Gender | Value | +|-------------|-------| +| Other | 0 | +| Male | 1 | +| Female | 2 | +| Male/Female | 3 | + +#### Weapon Series + +| Series Name | Value | +|-------------|-------| + +#### Summon Series + +| Series Name | Value | +|-------------|-------| + +### Wiki links + +You should try to provide identifiers for the 4 major wikis: gbf.wiki, gbf-wiki.com (JA), Kamigame (JA) and Gamewith ( +JA). Here's how: + +#### gbf.wiki + +This is simply the item's name, as it appears after `https://gbf.wiki/` in the URL. + +``` +https://gbf.wiki/Bahamut -> Bahamut +``` + +#### Gamewith + +This is a 5 to 6 digit string that appears at the end of the URL. + +``` +https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/article/show/21612 -> 21612 +``` + +#### Kamigame + +Use a [URL decoder](https://www.urldecoder.org/) to extract the Japanese characters from the URL after the final forward +slash (/) and before `.html`. + +``` +https://kamigame.jp/%E3%82%B0%E3%83%A9%E3%83%96%E3%83%AB/%E3%82%AD%E3%83%A3%E3%83%A9%E3%82%AF%E3%82%BF%E3%83%BC/SSR%E3%83%A4%E3%83%81%E3%83%9E.html +-(decoder)-> +https://kamigame.jp/グラブル/キャラクター/SSRヤチマ.html +-(value)-> +SSRヤチマ +``` + +#### gbf-wiki.com + +Use a [URL decoder](https://www.urldecoder.org/) to extract the Japanese characters from the URL after the question +mark. Replace the `+` with a space. + +``` +https://gbf-wiki.com/?%E3%83%A4%E3%83%81%E3%83%9E+(SSR)%E3%83%AA%E3%83%9F%E3%83%86%E3%83%83%E3%83%89%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3 +-(decoder)-> +https://gbf-wiki.com/?ヤチマ+(SSR)リミテッドバージョン +-(value)-> +ヤチマ (SSR)リミテッドバージョン +``` diff --git a/db/seed/updates/20250101-characters-000.csv.example b/db/seed/updates/20250101-characters-000.csv.example new file mode 100644 index 0000000..153b244 --- /dev/null +++ b/db/seed/updates/20250101-characters-000.csv.example @@ -0,0 +1,2 @@ +name_en,name_jp,granblue_id,rarity,element,proficiency1,proficiency2,gender,race1,race2,flb,min_hp,max_hp,max_hp_flb,min_atk,max_atk,max_atk_flb,base_da,base_ta,ougi_ratio,ougi_ratio_flb,special,ulb,max_hp_ulb,max_atk_ulb,character_id,wiki_en,release_date,flb_date,ulb_date,wiki_ja,gamewith,kamigame,nicknames_en,nicknames_jp +Gran,グラン,3040001000,3,1,1,2,1,1,0,true,1200,6800,8160,6400,8000,9600,6,3,4.5,5.0,false,false,0,0,{1},/wiki/Gran,2014-03-10,2016-04-01,,/wiki/グラン,/gran,/3040001000,{MC},"{主人公,グラン様}" diff --git a/db/seed/updates/20250101-summons-000.csv.example b/db/seed/updates/20250101-summons-000.csv.example new file mode 100644 index 0000000..bc594d8 --- /dev/null +++ b/db/seed/updates/20250101-summons-000.csv.example @@ -0,0 +1,2 @@ +name_en,name_jp,granblue_id,rarity,element,series,flb,ulb,max_level,min_hp,max_hp,max_hp_flb,max_hp_ulb,min_atk,max_atk,max_atk_flb,max_atk_ulb,subaura,limit,transcendence,max_atk_xlb,max_hp_xlb,summon_id,release_date,flb_date,ulb_date,wiki_en,wiki_ja,gamewith,kamigame,transcendence_date,nicknames_en,nicknames_jp +Bahamut,バハムート,2040003000,3,0,Divine Beasts,true,true,100,600,2400,2880,3360,1500,2000,2400,2800,true,true,true,3200,3840,1,2014-03-10,2016-04-01,2020-07-15,/wiki/Bahamut,/wiki/バハムート,/bahamut,/2040003000,2023-01-15,{Baha},"{バハ,黒龍}" diff --git a/db/seed/updates/20250101-weapons-000.csv.example b/db/seed/updates/20250101-weapons-000.csv.example new file mode 100644 index 0000000..6312256 --- /dev/null +++ b/db/seed/updates/20250101-weapons-000.csv.example @@ -0,0 +1,2 @@ +name_en,name_jp,granblue_id,rarity,element,proficiency,series,flb,ulb,max_level,max_skill_level,min_hp,max_hp,max_hp_flb,max_hp_ulb,min_atk,max_atk,max_atk_flb,max_atk_ulb,extra,ax_type,limit,ax,recruits_id,max_awakening_level,release_date,flb_date,ulb_date,wiki_en,wiki_ja,gamewith,kamigame,nicknames_en,nicknames_jp,transcendence,transcendence_date +Aschallon,アスカロン,1040014000,4,1,1,1,true,true,150,15,220,2200,2640,3080,2450,2940,3528,4116,false,1,true,true,,5,2014-03-10,2016-04-01,2020-07-15,/wiki/Aschallon,/wiki/アスカロン,/aschallon,/1040014000,{Asca},"{アスカ,アスカロン}",true,2023-01-15