Skip to content

Commit

Permalink
added translations and images for all artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
theBowja committed Mar 20, 2021
1 parent af9ac7c commit fd2777e
Show file tree
Hide file tree
Showing 448 changed files with 16,492 additions and 990 deletions.
4 changes: 2 additions & 2 deletions examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let header = `# Examples\n\nFirst start off with:\n${codeStart()}const ${libname
let folders = [
{
function: 'characters',
params: ['amber, { resultlanguage: \'JP\' }', 'carmen', 'december', 'pyro', 'geo dmg', 'liyue', 'sword', 'ballad']
params: ['jean','amber, { resultlanguage: \'JP\' }', 'carmen', 'december', 'pyro', 'geo dmg', 'liyue', 'sword', 'ballad']
},
{
function: 'talents',
Expand All @@ -38,7 +38,7 @@ let folders = [
},
{
function: 'artifacts',
params: ['flame'],
params: ['flame', '5', 'noblesse/[\'2pc\']'],
},
{
function: 'recipes',
Expand Down
116 changes: 88 additions & 28 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,45 @@ const genshindb = require('genshin-db');

## genshindb.characters(query[, opts])]

<details>
<summary>genshindb.characters('<b>jean'</b>)</summary>

```js
{
name: 'Jean',
title: 'Dandelion Knight',
description: "The righteous and rigorous Dandelion Knight, and Acting Grand Master of Mondstadt's Knights of Favonius.",
rarity: '5',
element: 'Anemo',
weapontype: 'Sword',
substat: 'Healing Bonus',
gender: 'Female',
body: 'LADY',
association: 'MONDSTADT',
region: 'Mondstadt',
affiliation: 'Knights of Favonius',
birthdaymmdd: '3/14',
birthday: 'March 14',
constellation: 'Leo Minor',
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/8/89/Character_Jean_Thumb.png',
card: 'https://static.wikia.nocookie.net/gensin-impact/images/0/0e/Character_Jean_Card.jpg',
portrait: 'https://static.wikia.nocookie.net/gensin-impact/images/0/02/Character_Jean_Portrait.png',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/character_icon/UI_AvatarIcon_Qin.png',
sideicon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/character_side_icon/UI_AvatarIcon_Side_Qin.png'
},
cv: {
english: 'Stephanie Southerland',
chinese: '林簌',
japanese: '斎藤千和',
korean: '안영미'
},
talentmaterialtype: 'Resistance',
url: 'https://genshin-impact.fandom.com/wiki/Jean'
}
```

</details>
<details>
<summary>genshindb.characters('<b>amber', { resultlanguage: 'JP' }</b>)</summary>

Expand Down Expand Up @@ -440,52 +479,73 @@ const genshindb = require('genshin-db');
```js
{
name: 'Crimson Witch of Flames',
minrarity: '4',
maxrarity: '5',
rarity: [ '4', '5' ],
'2pc': 'Pyro DMG Bonus +15%',
'4pc': 'Increases Overloaded and Burning DMG by 40%. Increases Vaporize and Melt DMG by 15%. Using Elemental Skill increases the 2-Piece Set Bonus by 50% of its starting value for 10s. Max 3 stacks.',
flower: {
name: "Witch's Flower of Blaze",
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/0/0f/Item_Witch%27s_Flower_of_Blaze.png'
},
description: 'A flower touched by the witch who once dreamt of burning away all the demons in the world. The anonymous flames affectionately caress the hands of those who touch it.'
relictype: 'Flower of Life',
description: 'A flower touched by the witch who once dreamt of burning away all the demons in the world. The anonymous flames affectionately caress the hands of those who touch it.',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15006_4.png'
},
plume: {
name: "Witch's Ever-Burning Plume",
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/b/b3/Item_Witch%27s_Ever-Burning_Plume.png'
},
description: 'A bird feather touched by the witch who once dreamt of burning away all the demons in the world. Its eternal flame burns hot.'
relictype: 'Plume of Death',
description: 'A bird feather touched by the witch who once dreamt of burning away all the demons in the world. Its eternal flame burns hot.',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15006_2.png'
},
sands: {
name: "Witch's End Time",
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/1/14/Item_Witch%27s_End_Time.png'
},
description: 'A timepiece worn by the witch who dreamt of burning away all the demons in the world. The years the witch dedicated to the flames flow within.'
relictype: 'Sands of Eon',
description: 'A timepiece worn by the witch who dreamt of burning away all the demons in the world. The years the witch dedicated to the flames flow within.',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15006_5.png'
},
goblet: {
name: "Witch's Heart Flames",
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/b/ba/Item_Witch%27s_Heart_Flames.png'
},
description: 'A flame-spitting urn left behind by the Crimson Witch of Flames, who once dreamt of burning away all the demons in the world. The fire in the urn burns eternally, as did its former master.'
relictype: 'Goblet of Eonothem',
description: 'A flame-spitting urn left behind by the Crimson Witch of Flames, who once dreamt of burning away all the demons in the world. The fire in the urn burns eternally, as did its former master.',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15006_1.png'
},
circlet: {
name: "Witch's Scorching Hat",
images: {
image: 'https://static.wikia.nocookie.net/gensin-impact/images/e/ea/Item_Witch%27s_Scorching_Hat.png'
},
description: 'A hat once worn by the witch who dreamt of burning away all the demons in the world. The large brim blocked her sight.'
},
'2pc': 'Pyro DMG Bonus +15%',
'4pc': 'Increases Overloaded and Burning DMG by 40%. Increases Vaporize and Melt DMG by 15%. Using an Elemental Skill increases 2-Piece Set effects by 50% for 10s. Max 3 stacks.',
drop: {
'4': [ 'Hidden Palace of Zhou Formula' ],
'5': [ 'Hidden Palace of Zhou Formula' ]
relictype: 'Circlet of Logos',
description: 'A hat once worn by the witch who dreamt of burning away all of the demons in the world. The large brim blocked her sight.',
icon: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15006_3.png'
}
}
```

</details>
<details>
<summary>genshindb.artifacts('<b>5'</b>)</summary>

```js
[
'Archaic Petra',
'Blizzard Strayer',
'Bloodstained Chivalry',
'Crimson Witch of Flames',
"Gladiator's Finale",
'Heart of Depth',
'Lavawalker',
'Maiden Beloved',
'Noblesse Oblige',
'Retracing Bolide',
'Thundering Fury',
'Thundersoother',
'Viridescent Venerer',
"Wanderer's Troupe"
]
```

</details>
<details>
<summary>genshindb.artifacts('<b>noblesse'</b>)<b>['2pc']</b></summary>

```js
'Elemental Burst DMG +20%'
```

</details>

## genshindb.recipes(query[, opts])]
Expand Down
25 changes: 23 additions & 2 deletions import.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,29 @@ function collateWeapon(existing, inputdata) {
existing.url = inputdata.url || '';
}

function collateArtifact(existing, newdata) {
clearObject(existing);
existing.name = newdata.name;
if(newdata.aliases) existing.aliases = newdata.aliases;
existing.rarity = newdata.rarity;
if(newdata['1pc']) existing['1pc'] = newdata['1pc'];
if(newdata['2pc']) existing['2pc'] = newdata['2pc'];
if(newdata['4pc']) existing['4pc'] = newdata['4pc'];
const types = ['flower', 'plume', 'sands', 'goblet', 'circlet'];
types.forEach(type => {
if(newdata[type] === undefined) return;
existing[type] = {};
existing[type].name = newdata[type].name;
existing[type].relictype = newdata[type].relictype;
existing[type].description = newdata[type].description;
existing[type].icon = newdata[type].icon;
})
}

function importData(folder, collateFunc, dontwrite) {
language.languageCodes.forEach(langC => {
if(dontwrite && langC !== 'EN') return;
// if(langC !== 'EN') return;
let newaggregateddata = require(`./import/${langC}/${folder}.json`);
for(const [filename, newdata] of Object.entries(newaggregateddata)) {
let basepath = `${language.languageMap[langC]}/${folder}`
Expand All @@ -176,7 +196,7 @@ function importData(folder, collateFunc, dontwrite) {
collateFunc(existing, newdata, language.languageMap[langC]);
//if(langC === 'CHT') console.log(existing);

if(dontwrite) continue;
if(dontwrite) { console.log(existing); continue; }
fs.mkdirSync(`./src/data/${basepath}`, { recursive: true });
fs.writeFileSync(`./src/data/${basepath}/${filename}.json`, JSON.stringify(existing, null, '\t'));
}
Expand All @@ -186,4 +206,5 @@ function importData(folder, collateFunc, dontwrite) {
// importData('characters', collateCharacter);
// importData('constellations', collateConstellation);
// importData('talents', collateTalent);
importData('weapons', collateWeapon)
// importData('weapons', collateWeapon)
importData('artifacts', collateArtifact);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genshin-db",
"version": "2.2.0",
"version": "2.3.0",
"description": "Genshin Impact v1.4 JSON database. Search and get results in all in-game languages! Sources from the fandom wiki and GenshinData repo.",
"main": "./src/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Flexibly search and get the information of characters, talents, constellations, weapons, weapon material, talent material, artifacts, food recipes.

All in-game languages are supported for query and result. (translations available only for characters, talents, constellations, weapons currently).
All in-game languages are supported for query and result. (translations available only for characters, talents, constellations, weapons, artifacts currently).

Start with:

Expand Down
40 changes: 40 additions & 0 deletions src/data/ChineseSimplified/artifacts/adventurer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "冒险家",
"rarity": [
"1",
"2",
"3"
],
"2pc": "生命值上限提高1000点。",
"4pc": "开启各类宝箱后的5秒内,持续恢复30%生命值。",
"flower": {
"name": "冒险家之花",
"relictype": "生之花",
"description": "从深邃的古都寻得的绝境求生的小花,被当做骄傲的勋章佩在胸前。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10010_4.png"
},
"plume": {
"name": "冒险家尾羽",
"relictype": "死之羽",
"description": "异国的奇妙鸟类的羽毛,在这片大陆上非常罕见。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10010_2.png"
},
"sands": {
"name": "冒险家怀表",
"relictype": "时之沙",
"description": "常在不见天日的巨渊还是失落的古都流连的冒险家,会经常忘记时间。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10010_5.png"
},
"goblet": {
"name": "冒险家金杯",
"relictype": "空之杯",
"description": "冒险家某次出征的战利品,虽然有缺口,仍然是值得骄傲的猎获。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10010_1.png"
},
"circlet": {
"name": "冒险家头带",
"relictype": "理之冠",
"description": "束在额前的饰带,吸满了汗液、覆盖着尘土。但脏污难以遮掩冒险家的骄傲。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10010_3.png"
}
}
39 changes: 39 additions & 0 deletions src/data/ChineseSimplified/artifacts/archaicpetra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "悠古的磐岩",
"rarity": [
"4",
"5"
],
"2pc": "获得15%岩元素伤害加成。",
"4pc": "获得结晶反应形成的晶片时,队伍中所有角色获得35%对应元素伤害加成,持续10秒。同时只能通过该效果获得一种元素伤害加成。",
"flower": {
"name": "磐陀裂生之花",
"relictype": "生之花",
"description": "盛开于磐陀巨岩的金石之花。花瓣随风轻摇,似有生机。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15014_4.png"
},
"plume": {
"name": "嵯峨群峰之翼",
"relictype": "死之羽",
"description": "来自矶岩巨鸢的刚羽,玄石的羽尖有时会凝结有清冷的露珠。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15014_2.png"
},
"sands": {
"name": "星罗圭璧之晷",
"relictype": "时之沙",
"description": "以整块圭璧雕琢而成的日晷,纹路层叠星罗,沉默地记录着失去的时间。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15014_5.png"
},
"goblet": {
"name": "巉岩琢塑之樽",
"relictype": "空之杯",
"description": "华丽而不失庄重的酒樽,千年前曾满盛玉露。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15014_1.png"
},
"circlet": {
"name": "不动玄石之相",
"relictype": "理之冠",
"description": "玄岩精雕而成的庄严面具,空洞的双眼永远冰冷地凝视着前方。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15014_3.png"
}
}
39 changes: 39 additions & 0 deletions src/data/ChineseSimplified/artifacts/berserker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "战狂",
"rarity": [
"3",
"4"
],
"2pc": "暴击率提高12%。",
"4pc": "生命值低于70%时,暴击率额外提升24%。",
"flower": {
"name": "战狂的蔷薇",
"relictype": "生之花",
"description": "被染红的精致花朵,与狂战士的气质微妙地相符。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10005_4.png"
},
"plume": {
"name": "战狂的翎羽",
"relictype": "死之羽",
"description": "原本传说中报丧之鸟的黯蓝尾羽,一部分被染成了红色。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10005_2.png"
},
"sands": {
"name": "战狂的时计",
"relictype": "时之沙",
"description": "永远无情流动着的器物。提醒着狂战士自己在战场上的时限,和在人世间的时限。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10005_5.png"
},
"goblet": {
"name": "战狂的骨杯",
"relictype": "空之杯",
"description": "用不知名的巨大兽类的骨头制成的杯。是某次厮杀后得到的猎获。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10005_1.png"
},
"circlet": {
"name": "战狂的鬼面",
"relictype": "理之冠",
"description": "在不顾生死的厮杀中一半破碎的骇人铁面具。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_10005_3.png"
}
}
39 changes: 39 additions & 0 deletions src/data/ChineseSimplified/artifacts/blizzardstrayer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "冰风迷途的勇士",
"rarity": [
"4",
"5"
],
"2pc": "获得15%冰元素伤害加成。",
"4pc": "攻击处于冰元素影响下的敌人时,暴击率提高20%;若敌人处于冻结状态下,则暴击率额外提高20%。",
"flower": {
"name": "历经风雪的思念",
"relictype": "生之花",
"description": "早已绝迹的冰川之花,霜结着点点冰露。孤高的勇士也曾为这朵鲜花折腰。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_14001_4.png"
},
"plume": {
"name": "摧冰而行的执望",
"relictype": "死之羽",
"description": "散布寒冬的鸟羽,仿佛能感受到猛禽在雪原与冰峰之上呼号翱翔的振翅之风。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_14001_2.png"
},
"sands": {
"name": "冰雪故园的终期",
"relictype": "时之沙",
"description": "等待勇士归来的故国人民所用的时计。其中流淌的并不是沙,而是不化的冰屑。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_14001_5.png"
},
"goblet": {
"name": "遍结寒霜的傲骨",
"relictype": "空之杯",
"description": "用寒冰雕制成的杯盏,如冬天一般坚利。曾经的主人从中啜饮过不冻之酒。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_14001_1.png"
},
"circlet": {
"name": "破冰踏雪的回音",
"relictype": "理之冠",
"description": "梦想征服冰雪的古代英雄冠冕,是驱使它的故主直面刻骨寒冬的勇气之证。",
"icon": "https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_14001_3.png"
}
}
Loading

0 comments on commit fd2777e

Please sign in to comment.