mirror of
https://github.com/theBowja/GenshinData-1.git
synced 2025-04-29 02:28:36 +09:00
bing chilling
This commit is contained in:
parent
ad1c09dca8
commit
04cdb1ce7c
@ -32,6 +32,11 @@ function collateArtifact(lang) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(data.rarity.length === 0) {
|
||||||
|
if(lang === 'EN') console.log(`Artifact set: ${setname} not available`);
|
||||||
|
return accum;
|
||||||
|
}
|
||||||
|
|
||||||
data.images = {};
|
data.images = {};
|
||||||
// relic pieces
|
// relic pieces
|
||||||
obj.ContainsList.forEach(ele => {
|
obj.ContainsList.forEach(ele => {
|
||||||
|
@ -18,6 +18,18 @@ function collateCharacter(lang) {
|
|||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.NameTextMapHash];
|
||||||
if(isPlayer(obj)) data.name = language[playerIdToTextMapHash[obj.Id]];
|
if(isPlayer(obj)) data.name = language[playerIdToTextMapHash[obj.Id]];
|
||||||
|
|
||||||
|
data.fullname = data.name;
|
||||||
|
if(!isPlayer(obj)) {
|
||||||
|
let cardimgname = obj.IconName.slice(obj.IconName.lastIndexOf('_')+1);
|
||||||
|
cardimgname = `UI_AvatarIcon_${cardimgname}_Card`;
|
||||||
|
let charmat = xmat.find(ele => ele.Icon === cardimgname);
|
||||||
|
data.fullname = language[charmat.NameTextMapHash];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(data.name !== data.fullname) console.log(`fullname diff ${lang}: ${data.name} | ${data.fullname}`);
|
||||||
|
|
||||||
|
|
||||||
//if(data.name === 'Traveler') data.name = capitalizeFirst(avatarIdToFileName[obj.Id]);
|
//if(data.name === 'Traveler') data.name = capitalizeFirst(avatarIdToFileName[obj.Id]);
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
||||||
data.weapontype = language[weaponTextMapHash[obj.WeaponType]];
|
data.weapontype = language[weaponTextMapHash[obj.WeaponType]];
|
||||||
|
@ -17,7 +17,7 @@ function collateConstellation(lang) {
|
|||||||
let stars = depot.Talents.map(talentId => xconstellation.find(ele => ele.TalentId === talentId));
|
let stars = depot.Talents.map(talentId => xconstellation.find(ele => ele.TalentId === talentId));
|
||||||
for(let i = 1; i <= 6; i++) {
|
for(let i = 1; i <= 6; i++) {
|
||||||
data['c'+i] = {
|
data['c'+i] = {
|
||||||
name: language[stars[i-1].NameTextMapHash],
|
name: sanitizeDescription(language[stars[i-1].NameTextMapHash]),
|
||||||
effect: sanitizeDescription(language[stars[i-1].DescTextMapHash])
|
effect: sanitizeDescription(language[stars[i-1].DescTextMapHash])
|
||||||
};
|
};
|
||||||
data.images['c'+i] = `https://upload-os-bbs.mihoyo.com/game_record/genshin/constellation_icon/${stars[i-1].Icon}.png`;
|
data.images['c'+i] = `https://upload-os-bbs.mihoyo.com/game_record/genshin/constellation_icon/${stars[i-1].Icon}.png`;
|
||||||
|
79
myscripts/collateFishingPoint.js
Normal file
79
myscripts/collateFishingPoint.js
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
// /*
|
||||||
|
// MATERIAL_AVATAR_MATERIAL is talent level-up material, etc.
|
||||||
|
|
||||||
|
// */
|
||||||
|
|
||||||
|
// const filter = ['MATERIAL_EXCHANGE', 'MATERIAL_WOOD', 'MATERIAL_AVATAR_MATERIAL', 'MATERIAL_EXP_FRUIT',
|
||||||
|
// 'MATERIAL_WEAPON_EXP_STONE', 'MATERIAL_CONSUME', 'MATERIAL_FISH_BAIT', 'MATERIAL_FISH_ROD'];
|
||||||
|
|
||||||
|
// // Adventure EXP, Mora, Primogems, Companionship EXP, Apple, Sunsettia
|
||||||
|
// const includeMatId = [102, 202, 201, 105, 100001, 100002];
|
||||||
|
// // Crafted Items, Primordial Essence, Raw Meat (S), Fowl (S), Original Essence (Invalidated), Original Resin (Invalidated)
|
||||||
|
// // Scarlet Quartz, Scarlet Quartz, Test Stamina Growth Item, Test Temporary stamina Growth Item
|
||||||
|
// const excludeMatId = [110000, 112001, 100086, 100087, 210, 211,
|
||||||
|
// 101005, 101007, 106000, 106001];
|
||||||
|
|
||||||
|
// function sortMaterials(mata, matb) {
|
||||||
|
// if(mata.Rank < matb.Rank) return -1;
|
||||||
|
// if(mata.Rank > matb.Rank) return 1;
|
||||||
|
// if(mata.Id < matb.Id) return -1;
|
||||||
|
// if(mata.Id > matb.Id) return 1;
|
||||||
|
// return 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function collateFishingPoint(lang) {
|
||||||
|
// const language = getLanguage(lang);
|
||||||
|
// const xsource = getExcel('MaterialSourceDataExcelConfigData');
|
||||||
|
// const xmat = getExcel('MaterialExcelConfigData').sort(sortMaterials);
|
||||||
|
// const xarchive = getExcel('MaterialCodexExcelConfigData');
|
||||||
|
// const xdungeon = getExcel('DungeonExcelConfigData');
|
||||||
|
|
||||||
|
// let sortOrder = 0;
|
||||||
|
|
||||||
|
// let mymaterial = xmat.reduce((accum, obj) => {
|
||||||
|
// sortOrder++;
|
||||||
|
// if(!includeMatId.includes(obj.Id)) {
|
||||||
|
// if(!obj.MaterialType) return accum;
|
||||||
|
// if(excludeMatId.includes(obj.Id)) return accum;
|
||||||
|
// if(!filter.includes(obj.MaterialType)) return accum;
|
||||||
|
// }
|
||||||
|
// if(obj.Icon === "UI_ItemIcon_109000") return accum; // skip recipes
|
||||||
|
// else if(obj.Icon === "UI_ItemIcon_221003") return accum; // skip diagrams
|
||||||
|
// else if(obj.Icon === "UI_ItemIcon_221035") return accum; // skip bait blueprint
|
||||||
|
// else if(obj.Icon === "UI_ItemIcon_221001") return accum; // skip instruction blueprints
|
||||||
|
|
||||||
|
// let data = {};
|
||||||
|
// data.Id = obj.Id;
|
||||||
|
// data.name = language[obj.NameTextMapHash];
|
||||||
|
// if(data.name === '') return accum;
|
||||||
|
// data.sortorder = sortOrder;
|
||||||
|
// data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
||||||
|
// data.category = obj.MaterialType ? obj.MaterialType.slice(9) : obj.ItemType;
|
||||||
|
// data.materialtype = language[obj.TypeDescTextMapHash];
|
||||||
|
// if(obj.RankLevel) data.rarity = ''+obj.RankLevel;
|
||||||
|
|
||||||
|
// let tmp = xsource.find(ele => ele.Id === obj.Id);
|
||||||
|
// let dungeonlist = tmp.DungeonList.filter(ele => ele !== 0);
|
||||||
|
// if(dungeonlist > 0) {
|
||||||
|
// if(dungeonlist.length > 1) console.log(`${data.name} drops from more than one dungeon!`);
|
||||||
|
// data.dropdomain = language[xdungeon.find(ele => ele.Id === dungeonlist[0]).DisplayNameTextMapHash]; // artifact domains don't have DisplayNameTextMapHash
|
||||||
|
// data.daysofweek = getDayWeekList(dungeonlist[0], language);
|
||||||
|
// }
|
||||||
|
// if(getLanguage('EN')[obj.TypeDescTextMapHash] === 'Fish') { // get fishing locations
|
||||||
|
|
||||||
|
// }
|
||||||
|
// data.source = tmp.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
|
|
||||||
|
// data.imagename = obj.Icon;
|
||||||
|
// if(!data.imagename) console.log(data.name+' has no icon');
|
||||||
|
|
||||||
|
// let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
||||||
|
// if(filename === '') return accum;
|
||||||
|
// if(filename.includes('shrineofdepthskey')) return accum;
|
||||||
|
// accum[filename] = data;
|
||||||
|
// return accum;
|
||||||
|
// }, {});
|
||||||
|
// return mymaterial;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// module.exports = collateMaterial;
|
@ -33,7 +33,7 @@ function collateFood(lang) {
|
|||||||
data.foodfilter = language[getManualTextMapHash(obj.FoodType)];
|
data.foodfilter = language[getManualTextMapHash(obj.FoodType)];
|
||||||
data.foodcategory = undefined;
|
data.foodcategory = undefined;
|
||||||
data.effect = obj.EffectDesc.reduce((accum, eff) => {
|
data.effect = obj.EffectDesc.reduce((accum, eff) => {
|
||||||
const tmp = stripHTML(language[eff]);
|
const tmp = replaceLayout(stripHTML(language[eff]));
|
||||||
if(tmp) accum.push(tmp);
|
if(tmp) accum.push(tmp);
|
||||||
return accum;
|
return accum;
|
||||||
}, []).join('\n');
|
}, []).join('\n');
|
||||||
@ -81,7 +81,7 @@ function collateFood(lang) {
|
|||||||
|
|
||||||
if(language[xd.InteractionTitleTextMapHash]) console.log(`specialty ${obj.Id} has interaction`);
|
if(language[xd.InteractionTitleTextMapHash]) console.log(`specialty ${obj.Id} has interaction`);
|
||||||
if(language[xd.SpecialDescTextMapHash]) console.log(`specialty ${obj.Id} has special`);
|
if(language[xd.SpecialDescTextMapHash]) console.log(`specialty ${obj.Id} has special`);
|
||||||
spdata.effect = language[xd.EffectDescTextMapHash];
|
spdata.effect = replaceLayout(language[xd.EffectDescTextMapHash]);
|
||||||
spdata.description = sanitizeDescription(language[xd.DescTextMapHash]);
|
spdata.description = sanitizeDescription(language[xd.DescTextMapHash]);
|
||||||
|
|
||||||
spdata.basedish = basedish;
|
spdata.basedish = basedish;
|
||||||
|
@ -28,6 +28,10 @@ function collateMaterial(lang) {
|
|||||||
const xarchive = getExcel('MaterialCodexExcelConfigData');
|
const xarchive = getExcel('MaterialCodexExcelConfigData');
|
||||||
const xdungeon = getExcel('DungeonExcelConfigData');
|
const xdungeon = getExcel('DungeonExcelConfigData');
|
||||||
|
|
||||||
|
const xfish = getExcel('FishExcelConfigData');
|
||||||
|
const xstock = getExcel('FishStockExcelConfigData');
|
||||||
|
const xpool = getExcel('FishPoolExcelConfigData');
|
||||||
|
|
||||||
let sortOrder = 0;
|
let sortOrder = 0;
|
||||||
|
|
||||||
let mymaterial = xmat.reduce((accum, obj) => {
|
let mymaterial = xmat.reduce((accum, obj) => {
|
||||||
@ -59,6 +63,21 @@ function collateMaterial(lang) {
|
|||||||
data.dropdomain = language[xdungeon.find(ele => ele.Id === dungeonlist[0]).DisplayNameTextMapHash]; // artifact domains don't have DisplayNameTextMapHash
|
data.dropdomain = language[xdungeon.find(ele => ele.Id === dungeonlist[0]).DisplayNameTextMapHash]; // artifact domains don't have DisplayNameTextMapHash
|
||||||
data.daysofweek = getDayWeekList(dungeonlist[0], language);
|
data.daysofweek = getDayWeekList(dungeonlist[0], language);
|
||||||
}
|
}
|
||||||
|
// get fishing locations
|
||||||
|
if(getLanguage('EN')[obj.TypeDescTextMapHash] === 'Fish') {
|
||||||
|
let fishId = xfish.find(ele => ele.ItemId === obj.Id).Id;
|
||||||
|
let stockIds = xstock.reduce((stockAccum, stockObj) => {
|
||||||
|
if(stockObj._fishWeight[fishId] !== undefined) stockAccum.push(stockObj.Id);
|
||||||
|
return stockAccum;
|
||||||
|
}, []);
|
||||||
|
data.fishinglocations = stockIds.reduce((poolAccum, stockId) => {
|
||||||
|
let pool = xpool.find(p => p._stockList.includes(stockId));
|
||||||
|
if(pool === undefined) return poolAccum;
|
||||||
|
if(!poolAccum.includes(language[pool._poolNameTextMapHash]))
|
||||||
|
poolAccum.push(language[pool._poolNameTextMapHash]);
|
||||||
|
return poolAccum;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
data.source = tmp.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
data.source = tmp.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
|
|
||||||
data.imagename = obj.Icon;
|
data.imagename = obj.Icon;
|
||||||
@ -66,6 +85,7 @@ function collateMaterial(lang) {
|
|||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
|
if(filename.includes('shrineofdepthskey')) return accum;
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
@ -36,11 +36,14 @@ function collateTalent(lang) {
|
|||||||
let talent = xtalent.find(tal => tal.Id === skId);
|
let talent = xtalent.find(tal => tal.Id === skId);
|
||||||
let combatTypeProp = talentCombatTypeMap[index];
|
let combatTypeProp = talentCombatTypeMap[index];
|
||||||
let ref = data[combatTypeProp] = {};
|
let ref = data[combatTypeProp] = {};
|
||||||
|
ref.Id = talent.Id;
|
||||||
ref.name = language[talent.NameTextMapHash];
|
ref.name = language[talent.NameTextMapHash];
|
||||||
let desc = language[talent.DescTextMapHash].split('\\n\\n<i>'); // extract out the italicized part
|
let desc = language[talent.DescTextMapHash].split('\\n\\n<i>'); // extract out the italicized part
|
||||||
ref.info = sanitizeDescription(desc[0]);
|
ref.info = sanitizeDescription(desc[0]);
|
||||||
if(desc[1]) ref.description = sanitizeDescription(desc[1]);
|
if(desc[1]) ref.description = sanitizeDescription(desc[1]);
|
||||||
|
ref.icon = talent.SkillIcon;
|
||||||
|
if(combatTypeProp === 'combat3')
|
||||||
|
ref.icon = ref.icon + '_HD';
|
||||||
|
|
||||||
ref.labels = [];
|
ref.labels = [];
|
||||||
// build the labels
|
// build the labels
|
||||||
@ -82,9 +85,10 @@ function collateTalent(lang) {
|
|||||||
passive.forEach((skId, index) => {
|
passive.forEach((skId, index) => {
|
||||||
let talent = xpassive.find(pas => pas.ProudSkillGroupId === skId);
|
let talent = xpassive.find(pas => pas.ProudSkillGroupId === skId);
|
||||||
let ref = data['passive'+(index+1)] = {}; // store reference in variable to make it easier to access
|
let ref = data['passive'+(index+1)] = {}; // store reference in variable to make it easier to access
|
||||||
|
ref.Id = skId;
|
||||||
ref.name = language[talent.NameTextMapHash];
|
ref.name = language[talent.NameTextMapHash];
|
||||||
ref.info = sanitizeDescription(language[talent.DescTextMapHash]);
|
ref.info = sanitizeDescription(language[talent.DescTextMapHash]);
|
||||||
|
ref.icon = talent.Icon;
|
||||||
});
|
});
|
||||||
data.costs = costs;
|
data.costs = costs;
|
||||||
data.parameters = parameters;
|
data.parameters = parameters;
|
||||||
|
@ -99,7 +99,7 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
|||||||
console.log("done "+folder);
|
console.log("done "+folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// exportData('characters', require('./collateCharacter.js'));
|
exportData('characters', require('./collateCharacter.js'));
|
||||||
// exportCurve('characters', 'AvatarCurveExcelConfigData');
|
// exportCurve('characters', 'AvatarCurveExcelConfigData');
|
||||||
// exportData('constellations', require('./collateConstellation'));
|
// exportData('constellations', require('./collateConstellation'));
|
||||||
// exportData('talents', require('./collateTalent.js'));
|
// exportData('talents', require('./collateTalent.js'));
|
||||||
@ -109,10 +109,10 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
|||||||
// exportData('foods', require('./collateFood'));
|
// exportData('foods', require('./collateFood'));
|
||||||
// exportData('materials', require('./collateMaterial')); // run twice
|
// exportData('materials', require('./collateMaterial')); // run twice
|
||||||
// exportData('domains', require('./collateDomain')); // run twice // remember to add back recommendedelements and disorder and entrypicpath
|
// exportData('domains', require('./collateDomain')); // run twice // remember to add back recommendedelements and disorder and entrypicpath
|
||||||
exportData('enemies', require('./collateEnemy'), true);
|
// exportData('enemies', require('./collateEnemy'));
|
||||||
// exportData('domains', require('./collateDomainMonsterList')); // run only after both domains and enemies have run. sync
|
// exportData('domains', require('./collateDomainMonsterList')); // run only after both domains and enemies have run. sync
|
||||||
// exportCurve('enemies', 'MonsterCurveExcelConfigData');
|
// exportCurve('enemies', 'MonsterCurveExcelConfigData');
|
||||||
|
// // exportData('fishingpoints', require('./collateFishingPoint'));
|
||||||
|
|
||||||
//console.log(collateCharacter('EN'))
|
//console.log(collateCharacter('EN'))
|
||||||
//console.log(collateConstellation('EN').hutao)
|
//console.log(collateConstellation('EN').hutao)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user