Closed lisxck closed 1 year ago
Thank you for your issue.
Weapons which getAllWeapons() returns include some weird ones, whose names, icons, or other properties do not exist.
We will make getAllWeapons() return valid weapons.
Temporarily, you can do like this.
weapons.map(x => {
try {
return x.name.get("jp");
} catch (e) {
return null;
}
}).filter(x => x !== null)
Don't worry about the excluded weapons. They don't actually exist in the game.
Thank you. I was able to do what I wanted to do with the above code.
But it is not in jp.json 11101 which is not in jp.json?
11101 is weapon id. A weapon has other ids, which are for its name or description.
I see! I understand. Thank you!
次からは日本語でも大丈夫ですよ! こちらからしても楽なので
バージョン 1.6.6 からEnkaClient#getAllWeapons()は実在する武器のみ返すようになりました。 先述したコード
weapons.map(x => { try { return x.name.get("jp"); } catch (e) { return null; } }).filter(x => x !== null)
では、余計な武器が除かれずに残っていたりしたため、 新しいバージョンのEnkaClient#getAllWeapons()を使用することをおすすめします。
不明な点があれば、気軽に質問してください!
Error
I've been trying to figure out why these are not working.
Not sure if they are related. https://github.com/Dimbreath/GenshinData The above repositories are 404'd. https://i.imgur.com/NMl7oSr.png The enka-network document mentions https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/WeaponExcelConfigData.json also returns 404 as a matter of course.
11101
This is the same as
The id obtained. node_modules\enka-network-api\cache\langs\jp.json I tried to find the target id (11101), but it did not exist My guess is that when the cache is created, it is trying to get all the weapons information from enka-network in some way. but because it could not be retrieved, the cache of weapon information is not generated. That is why I guessed the above error occurs.
To fix this, you need to get the weapons information for all languages from another service or from another source.
If you can find a service that can retrieve the weapons information in all languages, please update the module. Also, if you have difficulty updating the module, please let me know. I look forward to hearing from you!