mirror of
https://github.com/theBowja/GenshinData-1.git
synced 2025-04-29 02:28:36 +09:00
fix property names
also added adventureranks
This commit is contained in:
parent
4c5eddac98
commit
0a0ee47d0d
@ -6,19 +6,19 @@ const xmat = getExcel('MaterialExcelConfigData');
|
|||||||
function collateAchievement(lang) {
|
function collateAchievement(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let myachievement = xachieve.reduce((accum, obj) => {
|
let myachievement = xachieve.reduce((accum, obj) => {
|
||||||
if(obj.IsDeleteWatcherAfterFinish === true) {
|
if(obj.isDisuse === true) {
|
||||||
// console.log(`disuse: ${obj.Id} ${language[obj.TitleTextMapHash]}`)
|
// console.log(`disuse: ${obj.id} ${language[obj.titleTextMapHash]}`)
|
||||||
return accum;
|
return accum;
|
||||||
}
|
}
|
||||||
if(obj.Id === 84517) return accum; // Instant Karma achievement is unobtainable
|
if(obj.id === 84517) return accum; // Instant Karma achievement is unobtainable
|
||||||
|
|
||||||
if(obj.PreStageAchievementId) {
|
if(obj.preStageAchievementId) {
|
||||||
if(language[obj.DescTextMapHash] === '') return accum;
|
if(language[obj.descTextMapHash] === '') return accum;
|
||||||
let data = Object.values(accum).find(ele => ele.Id.includes(obj.PreStageAchievementId));
|
let data = Object.values(accum).find(ele => ele.id.includes(obj.preStageAchievementId));
|
||||||
data.Id.push(obj.Id);
|
data.id.push(obj.id);
|
||||||
|
|
||||||
data.stages = data.stages + 1;
|
data.stages = data.stages + 1;
|
||||||
if(data.stages > 3) console.log(`achievement ${obj.Id} has more than 3 stages`);
|
if(data.stages > 3) console.log(`achievement ${obj.id} has more than 3 stages`);
|
||||||
|
|
||||||
data['stage'+data.stages] = addStage(obj, language);
|
data['stage'+data.stages] = addStage(obj, language);
|
||||||
|
|
||||||
@ -26,24 +26,24 @@ function collateAchievement(lang) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = [obj.Id];
|
data.id = [obj.id];
|
||||||
|
|
||||||
data.name = language[obj.TitleTextMapHash];
|
data.name = language[obj.titleTextMapHash];
|
||||||
if(data.name === '') return accum;
|
if(data.name === '') return accum;
|
||||||
|
|
||||||
data.achievementgroup = language[xgoal.find(e => e.Id === obj.GoalId).NameTextMapHash];
|
data.achievementgroup = language[xgoal.find(e => e.id === obj.goalId).nameTextMapHash];
|
||||||
data.ishidden = obj.IsShow === 'SHOWTYPE_HIDE' ? true : undefined;
|
data.ishidden = obj.isShow === 'SHOWTYPE_HIDE' ? true : undefined;
|
||||||
data.sortorder = obj.OrderId;
|
data.sortorder = obj.orderId;
|
||||||
data.stages = 1;
|
data.stages = 1;
|
||||||
|
|
||||||
data['stage'+data.stages] = addStage(obj, language);
|
data['stage'+data.stages] = addStage(obj, language);
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.TitleTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.titleTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) {
|
if(accum[filename] !== undefined) {
|
||||||
if(obj.Id !== 84004 && obj.Id !== 86007)
|
if(obj.id !== 84004 && obj.id !== 86007)
|
||||||
console.log('filename collision: ' + filename + ' disuse: ' + obj.IsDisuse);
|
console.log('filename collision: ' + filename + ' disuse: ' + obj.isDisuse);
|
||||||
filename+='a';
|
filename+='a';
|
||||||
}
|
}
|
||||||
// if(accum[filename] !== undefined) return accum;
|
// if(accum[filename] !== undefined) return accum;
|
||||||
@ -51,7 +51,7 @@ function collateAchievement(lang) {
|
|||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
const groups = [...new Set(xgoal.map(e => language[e.NameTextMapHash]))];
|
const groups = [...new Set(xgoal.map(e => language[e.nameTextMapHash]))];
|
||||||
// for(const g of groups) { showNumber(myachievement, g); };
|
// for(const g of groups) { showNumber(myachievement, g); };
|
||||||
console.log('total: ' + Object.values(myachievement).reduce((accum, ele) => { accum+=ele.stages; return accum }, 0));
|
console.log('total: ' + Object.values(myachievement).reduce((accum, ele) => { accum+=ele.stages; return accum }, 0));
|
||||||
|
|
||||||
@ -71,19 +71,19 @@ function showNumber(myachievement, group) {
|
|||||||
|
|
||||||
function addStage(obj, language) {
|
function addStage(obj, language) {
|
||||||
let out = {};
|
let out = {};
|
||||||
out.title = language[obj.TitleTextMapHash];
|
out.title = language[obj.titleTextMapHash];
|
||||||
if(language[obj.Ps5TitleTextMapHash] !== '')
|
if(language[obj.ps5TitleTextMapHash] !== '')
|
||||||
out.ps5title = language[obj.Ps5TitleTextMapHash];
|
out.ps5title = language[obj.ps5TitleTextMapHash];
|
||||||
out.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
out.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
out.progress = obj.Progress;
|
out.progress = obj.progress;
|
||||||
const rewards = xreward.find(e => e.RewardId === obj.FinishRewardId).RewardItemList.filter(f => f.ItemId);
|
const rewards = xreward.find(e => e.rewardId === obj.finishRewardId).rewardItemList.filter(f => f.itemId);
|
||||||
if(rewards.length === 0) console.log(`achievement ${obj.Id} has no rewards`);
|
if(rewards.length === 0) console.log(`achievement ${obj.id} has no rewards`);
|
||||||
if(rewards.length > 1) console.log(`achievement ${obj.Id} has multiple rewards`);
|
if(rewards.length > 1) console.log(`achievement ${obj.id} has multiple rewards`);
|
||||||
if(rewards[0].ItemId !== 201) console.log(`achievement ${obj.Id} has non-primogem reward`);
|
if(rewards[0].itemId !== 201) console.log(`achievement ${obj.id} has non-primogem reward`);
|
||||||
out.reward = rewards.map(ele => {
|
out.reward = rewards.map(ele => {
|
||||||
return {
|
return {
|
||||||
name: language[xmat.find(mat => mat.Id === ele.ItemId).NameTextMapHash],
|
name: language[xmat.find(mat => mat.id === ele.itemId).nameTextMapHash],
|
||||||
count: ele.ItemCount
|
count: ele.itemCount
|
||||||
};
|
};
|
||||||
})[0];
|
})[0];
|
||||||
return out;
|
return out;
|
||||||
|
@ -6,26 +6,26 @@ function collateAchievementGroup(lang) {
|
|||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let myachievementgroup = xgroup.reduce((accum, obj) => {
|
let myachievementgroup = xgroup.reduce((accum, obj) => {
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.sortorder = obj.OrderId;
|
data.sortorder = obj.orderId;
|
||||||
|
|
||||||
if(obj.FinishRewardId) {
|
if(obj.finishRewardId) {
|
||||||
const rewards = xreward.find(e => e.RewardId === obj.FinishRewardId).RewardItemList.filter(f => f.ItemId);
|
const rewards = xreward.find(e => e.rewardId === obj.finishRewardId).rewardItemList.filter(f => f.itemId);
|
||||||
if(rewards.length > 1) console.log(`achievementgroup ${obj.Id} has multiple rewards`);
|
if(rewards.length > 1) console.log(`achievementgroup ${obj.id} has multiple rewards`);
|
||||||
data.reward = rewards.map(ele => {
|
data.reward = rewards.map(ele => {
|
||||||
return {
|
return {
|
||||||
name: language[xmat.find(mat => mat.Id === ele.ItemId).NameTextMapHash],
|
name: language[xmat.find(mat => mat.id === ele.itemId).nameTextMapHash],
|
||||||
// count: ele.ItemCount
|
// count: ele.itemCount
|
||||||
};
|
};
|
||||||
})[0];
|
})[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
data.nameicon = obj.IconPath;
|
data.nameicon = obj.iconPath;
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
50
myscripts/collateAdventureRank.js
Normal file
50
myscripts/collateAdventureRank.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
|
const xsource = getExcel('MaterialSourceDataExcelConfigData');
|
||||||
|
const xplevel = getExcel('PlayerLevelExcelConfigData');
|
||||||
|
const xreward = getExcel('RewardExcelConfigData');
|
||||||
|
const xartifact = getExcel('ReliquaryExcelConfigData');
|
||||||
|
const xweapon = getExcel('WeaponExcelConfigData');
|
||||||
|
|
||||||
|
function collateAdventureRank(lang) {
|
||||||
|
const language = getLanguage(lang);
|
||||||
|
let myadventurerank = xplevel.reduce((accum, obj) => {
|
||||||
|
let data = {};
|
||||||
|
data.id = obj.id;
|
||||||
|
// data.rankLevel = obj.rankLevel; // all rarity 4
|
||||||
|
|
||||||
|
data.name = obj.level+"";
|
||||||
|
data.exp = obj.exp;
|
||||||
|
data.unlockdescription = sanitizeDescription(language[obj.unlockDescTextMapHash]);
|
||||||
|
|
||||||
|
if(obj.rewardId) {
|
||||||
|
const rewards = xreward.find(e => e.rewardId === obj.rewardId).rewardItemList.filter(f => f.itemId);
|
||||||
|
data.reward = rewards.map(ele => {
|
||||||
|
let item;
|
||||||
|
let type;
|
||||||
|
if(item = xmat.find(mat => mat.id === ele.itemId))
|
||||||
|
type = "MATERIAL";
|
||||||
|
else if(item = xartifact.find(d => d.id === ele.itemId))
|
||||||
|
type = "ARTIFACT";
|
||||||
|
else if(item = xweapon.find(w => w.id === ele.itemId))
|
||||||
|
type = "WEAPON";
|
||||||
|
return {
|
||||||
|
name: language[item.nameTextMapHash],
|
||||||
|
count: ele.itemCount,
|
||||||
|
type: type
|
||||||
|
};
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
data.reward = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
let filename = obj.level+"";
|
||||||
|
if(filename === '') return accum;
|
||||||
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
|
accum[filename] = data;
|
||||||
|
return accum;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
return myadventurerank;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = collateAdventureRank;
|
@ -4,26 +4,31 @@ const xcodex = getExcel('AnimalCodexExcelConfigData');
|
|||||||
const xdescribe = getExcel('AnimalDescribeExcelConfigData');
|
const xdescribe = getExcel('AnimalDescribeExcelConfigData');
|
||||||
const xcapture = getExcel('CaptureExcelConfigData');
|
const xcapture = getExcel('CaptureExcelConfigData');
|
||||||
|
|
||||||
|
// FIX THIS EVERY VERSION
|
||||||
|
const propCOUNTTYPE = "OCCLHPBCDGL";
|
||||||
|
|
||||||
function collateAnimal(lang) {
|
function collateAnimal(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let mydata = xcodex.reduce((accum, obj) => {
|
let mydata = xcodex.reduce((accum, obj) => {
|
||||||
if(obj.Type === 'CODEX_MONSTER') return accum;
|
if(obj.type === 'CODEX_MONSTER') return accum;
|
||||||
if(obj.IsDeleteWatcherAfterFinish) return accum;
|
if(obj.isDisuse) return accum;
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.Id;
|
||||||
|
|
||||||
let mydescribe = xdescribe.find(ele => ele.Id === obj.DescribeId);
|
let mydescribe = xdescribe.find(ele => ele.id === obj.describeId);
|
||||||
|
|
||||||
data.name = language[mydescribe.NameTextMapHash];
|
data.name = language[mydescribe.nameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
data.category = language[xmanualtext.find(ele => ele.TextMapId === `UI_CODEX_ANIMAL_CATEGORY_${obj.SubType.substring(obj.SubType.lastIndexOf('_')+1)}`).TextMapContentTextMapHash]
|
data.category = language[xmanualtext.find(ele => ele.textMapId === `UI_CODEX_ANIMAL_CATEGORY_${obj.subType.substring(obj.subType.lastIndexOf('_')+1)}`).textMapContentTextMapHash]
|
||||||
data.capturable = xcapture.find(ele => ele.MonsterID === obj.Id) ? true : undefined;
|
// data.capturable = xcapture.find(ele => ele.monsterID === obj.Id) ? true : undefined;
|
||||||
|
let counttype = obj[propCOUNTTYPE] || "_NONE";
|
||||||
|
data.counttype = counttype.substring(counttype.lastIndexOf('_')+1);
|
||||||
data.sortorder = obj.SortOrder;
|
data.sortorder = obj.SortOrder;
|
||||||
|
|
||||||
data.nameicon = mydescribe.Icon;
|
data.nameicon = mydescribe.icon;
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[mydescribe.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[mydescribe.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
@ -9,26 +9,26 @@ function collateArtifact(lang) {
|
|||||||
const xrefine = getExcel('EquipAffixExcelConfigData');
|
const xrefine = getExcel('EquipAffixExcelConfigData');
|
||||||
|
|
||||||
let myartifact = xsets.reduce((accum, obj) => {
|
let myartifact = xsets.reduce((accum, obj) => {
|
||||||
if(obj.SetIcon === '') return accum;
|
if(obj.setIcon === '') return accum;
|
||||||
let setname;
|
let setname;
|
||||||
let filename;
|
let filename;
|
||||||
let data = {};
|
let data = {};
|
||||||
|
|
||||||
// get available rarities
|
// get available rarities
|
||||||
data.rarity = xreliccodex.reduce((accum, relic) => {
|
data.rarity = xreliccodex.reduce((accum, relic) => {
|
||||||
if(obj.SetId !== relic.SuitId) return accum;
|
if(obj.setId !== relic.suitId) return accum;
|
||||||
relic.Level = relic.Level.toString();
|
relic.level = relic.level.toString();
|
||||||
if(accum.indexOf(relic.Level) === -1) accum.push(relic.Level);
|
if(accum.indexOf(relic.level) === -1) accum.push(relic.level);
|
||||||
return accum;
|
return accum;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// set bonus effects
|
// set bonus effects
|
||||||
obj.SetNeedNum.forEach((ele, ind) => {
|
obj.setNeedNum.forEach((ele, ind) => {
|
||||||
let effect = xrefine.find(e => e.AffixId === obj.EquipAffixId*10 + ind);
|
let effect = xrefine.find(e => e.affixId === obj.EquipAffixId*10 + ind);
|
||||||
data[ele+'pc'] = language[effect.DescTextMapHash];
|
data[ele+'pc'] = language[effect.descTextMapHash];
|
||||||
if(setname === undefined) {
|
if(setname === undefined) {
|
||||||
setname = language[effect.NameTextMapHash];
|
setname = language[effect.nameTextMapHash];
|
||||||
filename = makeFileName(getLanguage('EN')[effect.NameTextMapHash]);
|
filename = makeFileName(getLanguage('EN')[effect.nameTextMapHash]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -39,16 +39,16 @@ function collateArtifact(lang) {
|
|||||||
|
|
||||||
data.images = {};
|
data.images = {};
|
||||||
// relic pieces
|
// relic pieces
|
||||||
obj.ContainsList.forEach(ele => {
|
obj.containsList.forEach(ele => {
|
||||||
let relic = xrelics.find(e => e.Id === ele);
|
let relic = xrelics.find(e => e.id === ele);
|
||||||
let relicdata = {};
|
let relicdata = {};
|
||||||
relicdata.name = language[relic.NameTextMapHash];
|
relicdata.name = language[relic.nameTextMapHash];
|
||||||
relicdata.relictype = xmanualtext.find(ele => ele.TextMapId === relic.EquipType).TextMapContentTextMapHash;
|
relicdata.relictype = xmanualtext.find(ele => ele.textMapId === relic.equipType).textMapContentTextMapHash;
|
||||||
relicdata.relictype = language[relicdata.relictype];
|
relicdata.relictype = language[relicdata.relictype];
|
||||||
relicdata.description = language[relic.DescTextMapHash];
|
relicdata.description = language[relic.descTextMapHash];
|
||||||
data[relicTypeToPropertyName[relic.EquipType]] = relicdata;
|
data[relicTypeToPropertyName[relic.equipType]] = relicdata;
|
||||||
data.images['name'+relicTypeToPropertyName[relic.EquipType]] = relic.Icon;
|
data.images['name'+relicTypeToPropertyName[relic.equipType]] = relic.icon;
|
||||||
data.images[relicTypeToPropertyName[relic.EquipType]] = `https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/${relic.Icon}.png`;
|
data.images[relicTypeToPropertyName[relic.equipType]] = `https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/${relic.icon}.png`;
|
||||||
});
|
});
|
||||||
|
|
||||||
data.name = setname;
|
data.name = setname;
|
||||||
|
@ -3,7 +3,7 @@ const xextrainfo = getExcel('FetterInfoExcelConfigData');
|
|||||||
|
|
||||||
// object map that converts player's avatar id to TextMapHash
|
// object map that converts player's avatar id to TextMapHash
|
||||||
const playerIdToTextMapHash = { 10000005: 2329553598, 10000007: 3241049361 };
|
const playerIdToTextMapHash = { 10000005: 2329553598, 10000007: 3241049361 };
|
||||||
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.Id === 202).NameTextMapHash;
|
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.id === 202).nameTextMapHash;
|
||||||
const xmat = getExcel('MaterialExcelConfigData');
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
const xcity = getExcel('CityConfigData');
|
const xcity = getExcel('CityConfigData');
|
||||||
|
|
||||||
@ -19,78 +19,78 @@ const associationToCityId = {
|
|||||||
function collateCharacter(lang) {
|
function collateCharacter(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
const xsubstat = getExcel('AvatarPromoteExcelConfigData');
|
const xsubstat = getExcel('AvatarPromoteExcelConfigData');
|
||||||
// console.log(xplayableAvatar.map(ele => ele.ImageName));
|
// console.log(xplayableAvatar.map(ele => ele.imageName));
|
||||||
// console.log(avatarIdToFileName)
|
// console.log(avatarIdToFileName)
|
||||||
let myavatar = xplayableAvatar.reduce((accum, obj) => {
|
let myavatar = xplayableAvatar.reduce((accum, obj) => {
|
||||||
let data = {};
|
let data = {};
|
||||||
let extra = xextrainfo.find(ele => ele.AvatarId === obj.Id);
|
let extra = xextrainfo.find(ele => ele.avatarId === obj.id);
|
||||||
|
|
||||||
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;
|
data.fullname = data.name;
|
||||||
if(!isPlayer(obj)) {
|
if(!isPlayer(obj)) {
|
||||||
let cardimgname = obj.IconName.slice(obj.IconName.lastIndexOf('_')+1);
|
let cardimgname = obj.iconName.slice(obj.iconName.lastIndexOf('_')+1);
|
||||||
cardimgname = `UI_AvatarIcon_${cardimgname}_Card`;
|
cardimgname = `UI_AvatarIcon_${cardimgname}_Card`;
|
||||||
let charmat = xmat.find(ele => ele.Icon === cardimgname);
|
let charmat = xmat.find(ele => ele.icon === cardimgname);
|
||||||
data.fullname = language[charmat.NameTextMapHash];
|
data.fullname = language[charmat.nameTextMapHash];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.name !== data.fullname) console.log(`fullname diff ${lang}: ${data.name} | ${data.fullname}`);
|
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]];
|
||||||
data.body = obj.BodyType.slice(obj.BodyType.indexOf('BODY_')+5);
|
data.body = obj.bodyType.slice(obj.bodyType.indexOf('BODY_')+5);
|
||||||
data.rarity = obj.QualityType === 'QUALITY_PURPLE' ? '4' : '5';
|
data.rarity = obj.qualityType === 'QUALITY_PURPLE' ? '4' : '5';
|
||||||
if(!isPlayer(obj)) {
|
if(!isPlayer(obj)) {
|
||||||
data.birthmonth = extra.InfoBirthMonth;
|
data.birthmonth = extra.infoBirthMonth;
|
||||||
data.birthday = extra.InfoBirthDay;
|
data.birthday = extra.infoBirthDay;
|
||||||
}
|
}
|
||||||
if(isPlayer(obj) && (data.birthmonth || data.birthday)) console.log('warning player has birthday');
|
if(isPlayer(obj) && (data.birthmonth || data.birthday)) console.log('warning player has birthday');
|
||||||
data.affiliation = isPlayer(obj) ? '' : language[extra.AvatarNativeTextMapHash];
|
data.affiliation = isPlayer(obj) ? '' : language[extra.avatarNativeTextMapHash];
|
||||||
data.element = language[extra.AvatarVisionBeforTextMapHash];
|
data.element = language[extra.avatarVisionBeforTextMapHash];
|
||||||
data.constellation = language[extra.AvatarConstellationBeforTextMapHash];
|
data.constellation = language[extra.avatarConstellationBeforTextMapHash];
|
||||||
if(obj.Id === 10000030) data.constellation = language[extra.AvatarConstellationAfterTextMapHash]; // Zhongli exception
|
if(obj.id === 10000030) data.constellation = language[extra.avatarConstellationAfterTextMapHash]; // Zhongli exception
|
||||||
data.title = language[extra.AvatarTitleTextMapHash];
|
data.title = language[extra.avatarTitleTextMapHash];
|
||||||
data.association = extra.AvatarAssocType.slice(extra.AvatarAssocType.indexOf('TYPE_')+5);
|
data.association = extra.avatarAssocType.slice(extra.avatarAssocType.indexOf('TYPE_')+5);
|
||||||
if(associationToCityId[data.association] === undefined)
|
if(associationToCityId[data.association] === undefined)
|
||||||
console.log(`character missing cityId for association ${data.association}`);
|
console.log(`character missing cityId for association ${data.association}`);
|
||||||
else if(associationToCityId[data.association] === '')
|
else if(associationToCityId[data.association] === '')
|
||||||
data.region = '';
|
data.region = '';
|
||||||
else {
|
else {
|
||||||
data.region = language[xcity.find(ele => ele.CityId === associationToCityId[data.association]).CityNameTextMapHash];
|
data.region = language[xcity.find(ele => ele.cityId === associationToCityId[data.association]).cityNameTextMapHash];
|
||||||
}
|
}
|
||||||
data.cv = {
|
data.cv = {
|
||||||
english: language[extra.CvEnglishTextMapHash],
|
english: language[extra.cvEnglishTextMapHash],
|
||||||
chinese: language[extra.CvChineseTextMapHash],
|
chinese: language[extra.cvChineseTextMapHash],
|
||||||
japanese: language[extra.CvJapaneseTextMapHash],
|
japanese: language[extra.cvJapaneseTextMapHash],
|
||||||
korean: language[extra.CvKoreanTextMapHash]
|
korean: language[extra.cvKoreanTextMapHash]
|
||||||
};
|
};
|
||||||
|
|
||||||
const xsubstat = getExcel('AvatarPromoteExcelConfigData');
|
const xsubstat = getExcel('AvatarPromoteExcelConfigData');
|
||||||
const xmanualtext = getExcel('ManualTextMapConfigData');
|
const xmanualtext = getExcel('ManualTextMapConfigData');
|
||||||
|
|
||||||
let substat = xsubstat.find(ele => ele.AvatarPromoteId === obj.AvatarPromoteId).AddProps[3].PropType;
|
let substat = xsubstat.find(ele => ele.avatarPromoteId === obj.avatarPromoteId).addProps[3].propType;
|
||||||
data.substat = language[xmanualtext.find(ele => ele.TextMapId === substat).TextMapContentTextMapHash];
|
data.substat = language[xmanualtext.find(ele => ele.textMapId === substat).textMapContentTextMapHash];
|
||||||
|
|
||||||
data.icon = obj.IconName;
|
data.icon = obj.iconName;
|
||||||
data.sideicon = obj.SideIconName;
|
data.sideicon = obj.sideIconName;
|
||||||
|
|
||||||
// get the promotion costs
|
// get the promotion costs
|
||||||
let costs = {};
|
let costs = {};
|
||||||
for(let i = 1; i <= 6; i++) {
|
for(let i = 1; i <= 6; i++) {
|
||||||
let apromo = xsubstat.find(ele => ele.AvatarPromoteId === obj.AvatarPromoteId && ele.PromoteLevel === i);
|
let apromo = xsubstat.find(ele => ele.avatarPromoteId === obj.avatarPromoteId && ele.promoteLevel === i);
|
||||||
costs['ascend'+i] = [{
|
costs['ascend'+i] = [{
|
||||||
name: language[moraNameTextMapHash],
|
name: language[moraNameTextMapHash],
|
||||||
count: apromo.ScoinCost
|
count: apromo.scoinCost
|
||||||
}];
|
}];
|
||||||
for(let items of apromo.CostItems) {
|
for(let items of apromo.costItems) {
|
||||||
if(items.Id === undefined) continue;
|
if(items.id === undefined) continue;
|
||||||
costs['ascend'+i].push({
|
costs['ascend'+i].push({
|
||||||
name: language[xmat.find(ele => ele.Id === items.Id).NameTextMapHash],
|
name: language[xmat.find(ele => ele.id === items.id).nameTextMapHash],
|
||||||
count: items.Count
|
count: items.count
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,31 +98,31 @@ function collateCharacter(lang) {
|
|||||||
|
|
||||||
// INFORMATION TO CALCULATE STATS AT EACH LEVEL
|
// INFORMATION TO CALCULATE STATS AT EACH LEVEL
|
||||||
let stats = { base: {}, curve: {} };
|
let stats = { base: {}, curve: {} };
|
||||||
stats.base.hp = obj.HpBase;
|
stats.base.hp = obj.hpBase;
|
||||||
stats.base.attack = obj.AttackBase;
|
stats.base.attack = obj.attackBase;
|
||||||
stats.base.defense = obj.DefenseBase;
|
stats.base.defense = obj.defenseBase;
|
||||||
stats.base.critrate = obj.Critical;
|
stats.base.critrate = obj.critical;
|
||||||
stats.base.critdmg = obj.CriticalHurt;
|
stats.base.critdmg = obj.criticalHurt;
|
||||||
|
|
||||||
stats.curve.hp = obj.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_HP').GrowCurve;
|
stats.curve.hp = obj.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_HP').growCurve;
|
||||||
stats.curve.attack = obj.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_ATTACK').GrowCurve;
|
stats.curve.attack = obj.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_ATTACK').growCurve;
|
||||||
stats.curve.defense = obj.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_DEFENSE').GrowCurve;
|
stats.curve.defense = obj.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_DEFENSE').growCurve;
|
||||||
stats.specialized = substat;
|
stats.specialized = substat;
|
||||||
stats.promotion = xsubstat.reduce((accum, ele) => {
|
stats.promotion = xsubstat.reduce((accum, ele) => {
|
||||||
if(ele.AvatarPromoteId !== obj.AvatarPromoteId) return accum;
|
if(ele.avatarPromoteId !== obj.avatarPromoteId) return accum;
|
||||||
let promotelevel = ele.PromoteLevel || 0;
|
let promotelevel = ele.promoteLevel || 0;
|
||||||
accum[promotelevel] = {
|
accum[promotelevel] = {
|
||||||
maxlevel: ele.UnlockMaxLevel,
|
maxlevel: ele.unlockMaxLevel,
|
||||||
hp: ele.AddProps.find(ele => ele.PropType === 'FIGHT_PROP_BASE_HP').Value || 0,
|
hp: ele.addProps.find(ele => ele.propType === 'FIGHT_PROP_BASE_HP').value || 0,
|
||||||
attack: ele.AddProps.find(ele => ele.PropType === 'FIGHT_PROP_BASE_ATTACK').Value || 0,
|
attack: ele.addProps.find(ele => ele.propType === 'FIGHT_PROP_BASE_ATTACK').value || 0,
|
||||||
defense: ele.AddProps.find(ele => ele.PropType === 'FIGHT_PROP_BASE_DEFENSE').Value || 0,
|
defense: ele.addProps.find(ele => ele.propType === 'FIGHT_PROP_BASE_DEFENSE').value || 0,
|
||||||
specialized: ele.AddProps.find(ele => ele.PropType === substat).Value || 0,
|
specialized: ele.addProps.find(ele => ele.propType === substat).value || 0,
|
||||||
};
|
};
|
||||||
return accum;
|
return accum;
|
||||||
}, []);
|
}, []);
|
||||||
data.stats = stats;
|
data.stats = stats;
|
||||||
|
|
||||||
accum[avatarIdToFileName[obj.Id]] = data;
|
accum[avatarIdToFileName[obj.id]] = data;
|
||||||
return accum;
|
return accum;
|
||||||
}, {})
|
}, {})
|
||||||
return myavatar;
|
return myavatar;
|
||||||
|
@ -26,32 +26,32 @@ function collateCommission(lang) {
|
|||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let mydata = xdaily.reduce((accum, obj) => {
|
let mydata = xdaily.reduce((accum, obj) => {
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.ID;
|
data.id = obj.iD;
|
||||||
|
|
||||||
data.name = language[obj.TitleTextMapHash];
|
data.name = language[obj.titleTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescriptionTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descriptionTextMapHash]);
|
||||||
data.target = sanitizeDescription(language[obj.TargetTextMapHash]);
|
data.target = sanitizeDescription(language[obj.targetTextMapHash]);
|
||||||
|
|
||||||
data.city = language[xcity.find(e => e.CityId === obj.CityId).CityNameTextMapHash];
|
data.city = language[xcity.find(e => e.cityId === obj.cityId).cityNameTextMapHash];
|
||||||
|
|
||||||
const taskreward = xtaskreward.find(e => e.ID === obj.TaskRewardId);
|
const taskreward = xtaskreward.find(e => e.iD === obj.taskRewardId);
|
||||||
data.rewardpreviews = {};
|
data.rewardpreviews = {};
|
||||||
for(let i = 0; i < 12; i++) {
|
for(let i = 0; i < 12; i++) {
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === taskreward.DropVec[i].PreviewRewardId).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === taskreward.dropVec[i].previewRewardId).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreviews[mapRewardToAR[i]] = rewardpreview.map(repre => {
|
data.rewardpreviews[mapRewardToAR[i]] = rewardpreview.map(repre => {
|
||||||
let mat = xmat.find(m => m.Id === repre.Id);
|
let mat = xmat.find(m => m.id === repre.id);
|
||||||
let reward = { name: language[mat.NameTextMapHash] };
|
let reward = { name: language[mat.nameTextMapHash] };
|
||||||
reward.count = parseInt(repre.Count);
|
reward.count = parseInt(repre.count);
|
||||||
if(repre.Count.includes(';')) reward.countmax = parseInt(repre.Count.substring(repre.Count.indexOf(';')+1));
|
if(repre.count.includes(';')) reward.countmax = parseInt(repre.count.substring(repre.count.indexOf(';')+1));
|
||||||
return reward;
|
return reward;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
data.TaskRewardId = obj.TaskRewardId
|
data.taskRewardId = obj.taskRewardId
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.TitleTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.titleTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
while(accum[filename] !== undefined) {
|
while(accum[filename] !== undefined) {
|
||||||
filename += 'a';
|
filename += 'a';
|
||||||
|
@ -6,29 +6,29 @@ function collateConstellation(lang) {
|
|||||||
// bad practice to declare functions inside loop but i need to be able to call it multiple times for players
|
// bad practice to declare functions inside loop but i need to be able to call it multiple times for players
|
||||||
function dowork() {
|
function dowork() {
|
||||||
let data = {};
|
let data = {};
|
||||||
let depot = xskilldepot.find(ele => ele.Id === obj.SkillDepotId);
|
let depot = xskilldepot.find(ele => ele.id === obj.skillDepotId);
|
||||||
if(depot === undefined || depot.EnergySkill === undefined) return; // not a finished (traveler) character
|
if(depot === undefined || depot.energySkill === undefined) return; // not a finished (traveler) character
|
||||||
if(depot.TalentStarName === '') return; // unfinished
|
if(depot.talentStarName === '') return; // unfinished
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
if(isPlayer(obj)) data.name += ` (${language[elementTextMapHash[getPlayerElement(obj.SkillDepotId)]]})`
|
if(isPlayer(obj)) data.name += ` (${language[elementTextMapHash[getPlayerElement(obj.skillDepotId)]]})`
|
||||||
//console.log(depot)
|
//console.log(depot)
|
||||||
data.images = {};
|
data.images = {};
|
||||||
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: sanitizeDescription(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`;
|
||||||
}
|
}
|
||||||
|
|
||||||
accum[avatarIdToFileName[isPlayer(obj) ? obj.SkillDepotId : obj.Id]] = data;
|
accum[avatarIdToFileName[isPlayer(obj) ? obj.skillDepotId : obj.id]] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isPlayer(obj)) {
|
if(isPlayer(obj)) {
|
||||||
obj.CandSkillDepotIds.forEach(ele => {
|
obj.candSkillDepotIds.forEach(ele => {
|
||||||
obj.SkillDepotId = ele;
|
obj.skillDepotId = ele;
|
||||||
dowork();
|
dowork();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -12,7 +12,7 @@ const domainType = {
|
|||||||
UI_ABYSSUS_AVATAR_PROUD: "UI_ABYSSUS_AVATAR_PROUD"
|
UI_ABYSSUS_AVATAR_PROUD: "UI_ABYSSUS_AVATAR_PROUD"
|
||||||
}
|
}
|
||||||
function getDomainTypeTextMapHash(domaintype) {
|
function getDomainTypeTextMapHash(domaintype) {
|
||||||
return xmanualtext.find(ele => ele.TextMapId === domaintype).TextMapContentTextMapHash;
|
return xmanualtext.find(ele => ele.textMapId === domaintype).textMapContentTextMapHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -35,7 +35,7 @@ function getDomainTypeTextMapHash(domaintype) {
|
|||||||
*/
|
*/
|
||||||
function getDomainEntranceTextMapHash(englishname) {
|
function getDomainEntranceTextMapHash(englishname) {
|
||||||
englishname = englishname.toLowerCase();
|
englishname = englishname.toLowerCase();
|
||||||
function mapping(textmapid) { return xmanualtext.find(ele => ele.TextMapId === textmapid).TextMapContentTextMapHash; }
|
function mapping(textmapid) { return xmanualtext.find(ele => ele.textMapId === textmapid).textMapContentTextMapHash; }
|
||||||
|
|
||||||
if(englishname.includes('dance of steel'))
|
if(englishname.includes('dance of steel'))
|
||||||
return mapping("UI_DUNGEON_ENTRY_27");
|
return mapping("UI_DUNGEON_ENTRY_27");
|
||||||
@ -57,7 +57,7 @@ function getDomainEntranceTextMapHash(englishname) {
|
|||||||
return mapping("UI_DUNGEON_ENTRY_54");
|
return mapping("UI_DUNGEON_ENTRY_54");
|
||||||
else if(englishname.includes('unyielding'))
|
else if(englishname.includes('unyielding'))
|
||||||
return mapping("UI_DUNGEON_ENTRY_282");
|
return mapping("UI_DUNGEON_ENTRY_282");
|
||||||
else if(englishname.includes('elegaic rime'))
|
else if(englishname.includes('elegiac rime'))
|
||||||
return mapping("UI_DUNGEON_ENTRY_221");
|
return mapping("UI_DUNGEON_ENTRY_221");
|
||||||
else if(englishname.includes('autumn hunt'))
|
else if(englishname.includes('autumn hunt'))
|
||||||
return mapping("UI_DUNGEON_ENTRY_361");
|
return mapping("UI_DUNGEON_ENTRY_361");
|
||||||
@ -83,55 +83,56 @@ function isSundaySpecial(englishname) {
|
|||||||
function collateDomain(lang) {
|
function collateDomain(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
const xmat = getExcel('MaterialExcelConfigData');
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
xdungeon = moredungeons.concat(xdungeon);
|
// xdungeon = moredungeons.concat(xdungeon);
|
||||||
let mydomain = xdungeon.reduce((accum, obj) => {
|
let mydomain = xdungeon.reduce((accum, obj) => {
|
||||||
if(obj.Type !== "DUNGEON_DAILY_FIGHT" || obj.StateType !== "DUNGEON_STATE_RELEASE") return accum;
|
if(obj.type !== "DUNGEON_DAILY_FIGHT" || obj.stateType !== "DUNGEON_STATE_RELEASE") return accum;
|
||||||
if(isSundaySpecial(getLanguage('EN')[obj.NameTextMapHash])) return accum;
|
if(isSundaySpecial(getLanguage('EN')[obj.nameTextMapHash])) return accum;
|
||||||
// console.log(obj.Id);
|
// console.log(obj.id);
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
// data.displayname = language[obj.DisplayNameTextMapHash]; // doesn't exist for artifact domains
|
// data.displayname = language[obj.displayNameTextMapHash]; // doesn't exist for artifact domains
|
||||||
data.domainentrance = language[getDomainEntranceTextMapHash(getLanguage('EN')[obj.NameTextMapHash])];// obj.EntryPicPath;
|
data.domainentrance = language[getDomainEntranceTextMapHash(getLanguage('EN')[obj.nameTextMapHash])];// obj.entryPicPath;
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
|
|
||||||
if(obj.Id === 5120 || obj.Id === 5121 || obj.Id === 5122 || obj.Id === 5123) obj.CityID = 1; // Peak of Vindagnyr region fix from Liyue to Mondstadt
|
// CITY FIX // fix no longer needed 2.7
|
||||||
if(obj.Id >= 5258 && obj.Id <= 5265) obj.CityID = 2; // Taishan Mansion in Liyue
|
// if(obj.id === 5120 || obj.id === 5121 || obj.id === 5122 || obj.id === 5123) obj.cityID = 1; // Peak of Vindagnyr region fix from Liyue to Mondstadt
|
||||||
if(obj.Id >= 5214 && obj.Id <= 5225) obj.CityID = 2; // Hidden Palace of Lianshan Formula in Liyue
|
// if(obj.id >= 5258 && obj.id <= 5265) obj.cityID = 2; // Taishan Mansion in Liyue
|
||||||
if(obj.Id >= 5200 && obj.Id <= 5207) obj.CityID = 3; // Slumbering Court in Inazuma, and Momiji-Dyed Court
|
// if(obj.id >= 5214 && obj.id <= 5225) obj.cityID = 2; // Hidden Palace of Lianshan Formula in Liyue
|
||||||
|
// if(obj.id >= 5200 && obj.id <= 5207) obj.cityID = 3; // Slumbering Court in Inazuma, and Momiji-Dyed Court
|
||||||
|
|
||||||
data.region = language[xcity.find(city => city.CityId === obj.CityID).CityNameTextMapHash];
|
data.region = language[xcity.find(city => city.cityId === obj.cityID).cityNameTextMapHash];
|
||||||
|
|
||||||
data.recommendedlevel = obj.ShowLevel;
|
data.recommendedlevel = obj.showLevel;
|
||||||
if(typeof obj.RecommendElementTypes[0] === 'string')
|
if(typeof obj.recommendElementTypes[0] === 'string')
|
||||||
data.recommendedelements = obj.RecommendElementTypes.filter(ele => ele !== 'None').map(ele => language[xmanualtext.find(man => man.TextMapId === ele).TextMapContentTextMapHash]);
|
data.recommendedelements = obj.recommendElementTypes.filter(ele => ele !== 'None').map(ele => language[xmanualtext.find(man => man.textMapId === ele).textMapContentTextMapHash]);
|
||||||
data.daysofweek = getDayWeekList(obj.Id, language);
|
data.daysofweek = getDayWeekList(obj.id, language);
|
||||||
if(data.daysofweek.length === 0) delete data.daysofweek;
|
if(data.daysofweek.length === 0) delete data.daysofweek;
|
||||||
|
|
||||||
data.unlockrank = obj.LimitLevel;
|
data.unlockrank = obj.limitLevel;
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === obj.PassRewardPreviewID).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === obj.passRewardPreviewID).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = rewardpreview.map(repre => {
|
data.rewardpreview = rewardpreview.map(repre => {
|
||||||
let mat = xmat.find(m => m.Id === repre.Id);
|
let mat = xmat.find(m => m.id === repre.id);
|
||||||
if(mat) { // is material
|
if(mat) { // is material
|
||||||
let reward = { name: language[mat.NameTextMapHash] };
|
let reward = { name: language[mat.nameTextMapHash] };
|
||||||
if(mat.MaterialType !== 'MATERIAL_AVATAR_MATERIAL') reward.count = parseInt(repre.Count);
|
if(mat.materialType !== 'MATERIAL_AVATAR_MATERIAL') reward.count = parseInt(repre.count);
|
||||||
if((getLanguage('EN')[mat.TypeDescTextMapHash]).includes('Weapon')) {
|
if((getLanguage('EN')[mat.typeDescTextMapHash]).includes('Weapon')) {
|
||||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_WEAPON_PROMOTE)];
|
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_WEAPON_PROMOTE)];
|
||||||
} else {
|
} else {
|
||||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_AVATAR_PROUD)];
|
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_AVATAR_PROUD)];
|
||||||
}
|
}
|
||||||
return reward;
|
return reward;
|
||||||
} else { // is artifact
|
} else { // is artifact
|
||||||
let disp = xdisplay.find(d => d.Id === repre.Id);
|
let disp = xdisplay.find(d => d.id === repre.id);
|
||||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_RELIC)];
|
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_RELIC)];
|
||||||
return { name: language[disp.NameTextMapHash], rarity: disp.RankLevel+'' };
|
return { name: language[disp.nameTextMapHash], rarity: disp.rankLevel+'' };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(obj.disorderoverride) data.disorder = obj.disorderoverride.map(d => language[d]);
|
// if(obj.disorderoverride) data.disorder = obj.disorderoverride.map(d => language[d]); // fix not needed anymore
|
||||||
//data.disorder = xdisorder.filter(d => d.Id+'' === Object.keys(obj.LevelConfigMap)[0]).map(d => language[d.DescTextMapHash]);
|
data.disorder = xdisorder.filter(d => d.id+'' === Object.keys(obj.levelConfigMap)[0]).map(d => language[d.descTextMapHash]);
|
||||||
data.imagename = obj.EntryPicPath;
|
data.imagename = obj.entryPicPath;
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
return accum;
|
return accum;
|
||||||
@ -142,7 +143,7 @@ function collateDomain(lang) {
|
|||||||
// format returned is translated and sorted array ["Monday", "Thursday", "Sunday"]
|
// format returned is translated and sorted array ["Monday", "Thursday", "Sunday"]
|
||||||
function getDayWeekList(dungeonId, langmap) {
|
function getDayWeekList(dungeonId, langmap) {
|
||||||
const xdailyd = getExcel('DailyDungeonConfigData');
|
const xdailyd = getExcel('DailyDungeonConfigData');
|
||||||
const mapENtoNum = { 'Monday': 1, 'Tuesday': 2, 'Wednesday': 3, 'Thursday': 4, 'Friday': 5, 'Saturday': 6, 'Sunday': 7 };
|
const mapENtoNum = { 'monday': 1, 'tuesday': 2, 'wednesday': 3, 'thursday': 4, 'friday': 5, 'saturday': 6, 'sunday': 7 };
|
||||||
let mylist = [];
|
let mylist = [];
|
||||||
for(const ele of xdailyd)
|
for(const ele of xdailyd)
|
||||||
for(const [key, value] of Object.entries(mapENtoNum))
|
for(const [key, value] of Object.entries(mapENtoNum))
|
||||||
@ -163,65 +164,66 @@ function cleanupDungeonFile() {
|
|||||||
fs.writeFileSync('../ExcelBinOutput/DungeonExcelConfigData.json', data);
|
fs.writeFileSync('../ExcelBinOutput/DungeonExcelConfigData.json', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanupDungeonFile();
|
// cleanupDungeonFile();
|
||||||
|
|
||||||
// Fire, Water, Ice, Rock, Electric, Wind, Grass
|
// Fire, Water, Ice, Rock, Electric, Wind, Grass
|
||||||
|
|
||||||
let moredungeons = [
|
// not used anymore since it was fixed 2.7
|
||||||
{ // machine nest 1
|
// let moredungeons = [
|
||||||
Id: 99991,
|
// { // machine nest 1
|
||||||
Type: "DUNGEON_DAILY_FIGHT",
|
// Id: 99991,
|
||||||
StateType: "DUNGEON_STATE_RELEASE",
|
// Type: "DUNGEON_DAILY_FIGHT",
|
||||||
NameTextMapHash: 4233644080,
|
// StateType: "DUNGEON_STATE_RELEASE",
|
||||||
DescTextMapHash: 1269716077,
|
// NameTextMapHash: 4233644080,
|
||||||
CityID: 2,
|
// DescTextMapHash: 1269716077,
|
||||||
ShowLevel: 59,
|
// CityID: 2,
|
||||||
RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
// ShowLevel: 59,
|
||||||
LimitLevel: 30,
|
// RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
||||||
PassRewardPreviewID: 22443,
|
// LimitLevel: 30,
|
||||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
// PassRewardPreviewID: 22443,
|
||||||
disorderoverride: [4145618250]
|
// EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||||
},
|
// disorderoverride: [4145618250]
|
||||||
{ // machine nest 2
|
// },
|
||||||
Id: 99992,
|
// { // machine nest 2
|
||||||
Type: "DUNGEON_DAILY_FIGHT",
|
// Id: 99992,
|
||||||
StateType: "DUNGEON_STATE_RELEASE",
|
// Type: "DUNGEON_DAILY_FIGHT",
|
||||||
NameTextMapHash: 1948966872,
|
// StateType: "DUNGEON_STATE_RELEASE",
|
||||||
DescTextMapHash: 1269716077,
|
// NameTextMapHash: 1948966872,
|
||||||
CityID: 2,
|
// DescTextMapHash: 1269716077,
|
||||||
ShowLevel: 59,
|
// CityID: 2,
|
||||||
RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
// ShowLevel: 59,
|
||||||
LimitLevel: 35,
|
// RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
||||||
PassRewardPreviewID: 22444,
|
// LimitLevel: 35,
|
||||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
// PassRewardPreviewID: 22444,
|
||||||
disorderoverride: [4145618250]
|
// EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||||
},
|
// disorderoverride: [4145618250]
|
||||||
{ // machine nest 3
|
// },
|
||||||
Id: 99993,
|
// { // machine nest 3
|
||||||
Type: "DUNGEON_DAILY_FIGHT",
|
// Id: 99993,
|
||||||
StateType: "DUNGEON_STATE_RELEASE",
|
// Type: "DUNGEON_DAILY_FIGHT",
|
||||||
NameTextMapHash: 2797186184,
|
// StateType: "DUNGEON_STATE_RELEASE",
|
||||||
DescTextMapHash: 1269716077,
|
// NameTextMapHash: 2797186184,
|
||||||
CityID: 2,
|
// DescTextMapHash: 1269716077,
|
||||||
ShowLevel: 59,
|
// CityID: 2,
|
||||||
RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
// ShowLevel: 59,
|
||||||
LimitLevel: 40,
|
// RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
||||||
PassRewardPreviewID: 22445,
|
// LimitLevel: 40,
|
||||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
// PassRewardPreviewID: 22445,
|
||||||
disorderoverride: [4145618250]
|
// EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||||
},
|
// disorderoverride: [4145618250]
|
||||||
{ // machine nest 4
|
// },
|
||||||
Id: 99994,
|
// { // machine nest 4
|
||||||
Type: "DUNGEON_DAILY_FIGHT",
|
// Id: 99994,
|
||||||
StateType: "DUNGEON_STATE_RELEASE",
|
// Type: "DUNGEON_DAILY_FIGHT",
|
||||||
NameTextMapHash: 1531297112,
|
// StateType: "DUNGEON_STATE_RELEASE",
|
||||||
DescTextMapHash: 1269716077,
|
// NameTextMapHash: 1531297112,
|
||||||
CityID: 2,
|
// DescTextMapHash: 1269716077,
|
||||||
ShowLevel: 59,
|
// CityID: 2,
|
||||||
RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
// ShowLevel: 59,
|
||||||
LimitLevel: 45,
|
// RecommendElementTypes: ['Fire', 'Electric', 'Rock', 'Wind'],
|
||||||
PassRewardPreviewID: 22446,
|
// LimitLevel: 45,
|
||||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
// PassRewardPreviewID: 22446,
|
||||||
disorderoverride: [4145618250]
|
// EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||||
},
|
// disorderoverride: [4145618250]
|
||||||
];
|
// },
|
||||||
|
// ];
|
@ -15,10 +15,10 @@ const monsterMap = {
|
|||||||
"bless dance steel iv": ['pyro agent', 'fa el ci mage', 'th pyro pot', 'th hy pot', 'th el pot', 'th cry pot', 'th seaman'],
|
"bless dance steel iv": ['pyro agent', 'fa el ci mage', 'th pyro pot', 'th hy pot', 'th el pot', 'th cry pot', 'th seaman'],
|
||||||
"bless dance steel v": ['pyro agent', 'fa el ci mage', 'th cry pot'],
|
"bless dance steel v": ['pyro agent', 'fa el ci mage', 'th cry pot'],
|
||||||
|
|
||||||
"bless elegaic r i": ['cr slime', 'la cry slime', 'ice shield mita'],
|
"bless eleg r i": ['cr slime', 'la cry slime', 'ice shield mita'],
|
||||||
"bless elegaic r ii": ['cr slime', 'la cr slime', 'cr hili grenad', 'ice shield mita'],
|
"bless eleg r ii": ['cr slime', 'la cr slime', 'cr hili grenad', 'ice shield mita'],
|
||||||
"bless elegaic r iii": ['la cr slime', 'cr hili grenad', 'ice shield mita', 'cr ab mage'],
|
"bless eleg r iii": ['la cr slime', 'cr hili grenad', 'ice shield mita', 'cr ab mage'],
|
||||||
"bless elegaic r iv": ['frostarm lawa', 'cr ab mage'],
|
"bless eleg r iv": ['frostarm lawa', 'cr ab mage'],
|
||||||
|
|
||||||
"bless fire puri i": ['cryo slime', 'large cryo slime', 'large hydro slime', 'wood shield hili guard', 'cryo mage'],
|
"bless fire puri i": ['cryo slime', 'large cryo slime', 'large hydro slime', 'wood shield hili guard', 'cryo mage'],
|
||||||
"bless fire puri ii": ['elec slime', 'lar elec slime', 'muta ele slime', 'fat ele cic mage'],
|
"bless fire puri ii": ['elec slime', 'lar elec slime', 'muta ele slime', 'fat ele cic mage'],
|
||||||
@ -174,12 +174,12 @@ function collateDomainMonsterList(lang) {
|
|||||||
let mydomain = require(`./export/${lang}/domains.json`);
|
let mydomain = require(`./export/${lang}/domains.json`);
|
||||||
|
|
||||||
for(let [dom, monList] of Object.entries(autoMonsterMap)) {
|
for(let [dom, monList] of Object.entries(autoMonsterMap)) {
|
||||||
const domId = Object.values(ENdomain).find(ele => ele.name === dom).Id;
|
const domId = Object.values(ENdomain).find(ele => ele.name === dom).id;
|
||||||
const monNameHashList = monList.map(ele => Object.values(ENmonster).find(tmp => tmp.name === ele).NameTextMapHash);
|
const monNameHashList = monList.map(ele => Object.values(ENmonster).find(tmp => tmp.name === ele).nameTextMapHash);
|
||||||
|
|
||||||
const monsterlist = monNameHashList.map(NameTextMapHash => language[NameTextMapHash]);
|
const monsterlist = monNameHashList.map(NameTextMapHash => language[NameTextMapHash]);
|
||||||
|
|
||||||
Object.values(mydomain).find(ele => ele.Id === domId).monsterlist = monsterlist;
|
Object.values(mydomain).find(ele => ele.id === domId).monsterlist = monsterlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let dom of Object.values(mydomain)) {
|
for(let dom of Object.values(mydomain)) {
|
||||||
|
@ -29,30 +29,30 @@ function collateEnemy(lang) {
|
|||||||
const xmat = getExcel('MaterialExcelConfigData');
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
|
|
||||||
let mymonster = xcodex.reduce((accum, obj) => {
|
let mymonster = xcodex.reduce((accum, obj) => {
|
||||||
if(obj.Type !== 'CODEX_MONSTER') return accum;
|
if(obj.type !== 'CODEX_MONSTER') return accum;
|
||||||
if(obj.IsDeleteWatcherAfterFinish) return accum;
|
if(obj.isDisuse) return accum;
|
||||||
if(obj.Id === 29010101) obj.Id = 29010104; // use correct stormterror
|
if(obj.Id === 29010101) obj.Id = 29010104; // use correct stormterror
|
||||||
let mon = xmonster.find(m => m.Id === obj.Id);
|
let mon = xmonster.find(m => m.id === obj.Id);
|
||||||
let des = xdescribe.find(d => d.Id === obj.DescribeId);
|
let des = xdescribe.find(d => d.id === obj.describeId);
|
||||||
let spe = xspecial.find(s => s.SpecialNameLabID === des.SpecialNameLabID);
|
let spe = xspecial.find(s => s.specialNameLabID === des.specialNameLabID);
|
||||||
let inv = findInvestigation(obj.Id);
|
let inv = findInvestigation(obj.Id);
|
||||||
if(!spe) console.log('no special for '+obj.Id);
|
if(!spe) console.log('no special for '+obj.Id);
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.Id;
|
||||||
|
|
||||||
data.NameTextMapHash = des.NameTextMapHash;
|
data.nameTextMapHash = des.nameTextMapHash;
|
||||||
data.name = language[des.NameTextMapHash];
|
data.name = language[des.nameTextMapHash];
|
||||||
data.specialname = language[spe.SpecialNameTextMapHash];
|
data.specialname = language[spe.specialNameTextMapHash];
|
||||||
if(inv) {
|
if(inv) {
|
||||||
data.investigation = {};
|
data.investigation = {};
|
||||||
data.investigation.name = language[inv.NameTextMapHash];
|
data.investigation.name = language[inv.nameTextMapHash];
|
||||||
data.investigation.category = language[xmanualtext.find(e => e.TextMapId === `INVESTIGATION_${inv.MonsterCategory.toUpperCase()}_MONSTER`).TextMapContentTextMapHash];
|
data.investigation.category = language[xmanualtext.find(e => e.textMapId === `INVESTIGATION_${inv.monsterCategory.toUpperCase()}_MONSTER`).textMapContentTextMapHash];
|
||||||
data.investigation.description = language[inv.DescTextMapHash];
|
data.investigation.description = language[inv.descTextMapHash];
|
||||||
if(language[inv.LockDescTextMapHash] !== "") data.investigation.lockdesc = language[inv.LockDescTextMapHash];
|
if(language[inv.lockDescTextMapHash] !== "") data.investigation.lockdesc = language[inv.lockDescTextMapHash];
|
||||||
data.investigationicon = inv.Icon;
|
data.investigationicon = inv.icon;
|
||||||
// REWARD PREVIEW
|
// REWARD PREVIEW
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === inv.RewardPreviewId).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === inv.rewardPreviewId).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else {
|
} else {
|
||||||
if(obj.Id === 20020101) { // Eye of the Storm
|
if(obj.Id === 20020101) { // Eye of the Storm
|
||||||
@ -64,83 +64,86 @@ function collateEnemy(lang) {
|
|||||||
// Abyss Lector: Violet Lightning, Abyss Herald: Wicked Torrents, Abyss Lector: Fathomless Flames
|
// Abyss Lector: Violet Lightning, Abyss Herald: Wicked Torrents, Abyss Lector: Fathomless Flames
|
||||||
// Hydro Cicin, Electro Cicin, Cryo Cicin
|
// Hydro Cicin, Electro Cicin, Cryo Cicin
|
||||||
data.rewardpreview = [];
|
data.rewardpreview = [];
|
||||||
|
} else if(obj.Id === 26090101) { // Floating Hydro Fungus
|
||||||
|
let rewardpreview = xpreview.find(pre => pre.id === 16012).previewItems.filter(pre => pre.id);
|
||||||
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29010104) { // dvalin lvl90
|
} else if(obj.Id === 29010104) { // dvalin lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15005).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15005).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29020101) { // wolfboss lvl90
|
} else if(obj.Id === 29020101) { // wolfboss lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15010).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15010).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29030101) { // childe lvl90
|
} else if(obj.Id === 29030101) { // childe lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15014).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15014).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29040101) { // azhdaha lvl90
|
} else if(obj.Id === 29040101) { // azhdaha lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15018).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15018).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29050101) { // signora lvl90
|
} else if(obj.Id === 29050101) { // signora lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15034).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15034).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 26050801) {
|
} else if(obj.Id === 26050801) {
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15177).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15177).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
} else if(obj.Id === 29060201) { // raiden shogun lvl90
|
} else if(obj.Id === 29060201) { // raiden shogun lvl90
|
||||||
let rewardpreview = xpreview.find(pre => pre.Id === 15038).PreviewItems.filter(pre => pre.Id);
|
let rewardpreview = xpreview.find(pre => pre.id === 15038).previewItems.filter(pre => pre.id);
|
||||||
data.rewardpreview = mapRewardList(rewardpreview, language);
|
data.rewardpreview = mapRewardList(rewardpreview, language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!data.rewardpreview) {
|
if(!data.rewardpreview) {
|
||||||
console.log('no reward list for '+data.name);
|
console.log('no reward list for '+obj.Id+' : '+data.name);
|
||||||
data.rewardpreview = [];
|
data.rewardpreview = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let sub = obj.SubType || 'CODEX_SUBTYPE_ELEMENTAL';
|
let sub = obj.subType || 'CODEX_SUBTYPE_ELEMENTAL';
|
||||||
sub = sub.slice(sub.lastIndexOf('_')+1);
|
sub = sub.slice(sub.lastIndexOf('_')+1);
|
||||||
// console.log(obj.Id);
|
// console.log(obj.Id);
|
||||||
// console.log(sub);
|
// console.log(sub);
|
||||||
sub = xmanualtext.find(m => m.TextMapId === `UI_CODEX_ANIMAL_CATEGORY_${sub}`).TextMapContentTextMapHash;
|
sub = xmanualtext.find(m => m.textMapId === `UI_CODEX_ANIMAL_CATEGORY_${sub}`).textMapContentTextMapHash;
|
||||||
data.enemytype = mon.SecurityLevel || 'COMMON';
|
data.enemytype = mon.securityLevel || 'COMMON';
|
||||||
data.category = language[sub];
|
data.category = language[sub];
|
||||||
data.imageicon = des.Icon;
|
data.imageicon = des.icon;
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
|
|
||||||
data.aggrorange = mon.VisionLevel;
|
data.aggrorange = mon.visionLevel;
|
||||||
data.bgm = mon.CombatBGMLevel;
|
data.bgm = mon.combatBGMLevel;
|
||||||
data.budget = mon.EntityBudgetLevel;
|
data.budget = mon.entityBudgetLevel;
|
||||||
|
|
||||||
// particle drops
|
// particle drops
|
||||||
let drops = [];
|
let drops = [];
|
||||||
for(let x of mon.HpDrops) {
|
for(let x of mon.hpDrops) {
|
||||||
if(x.DropId) drops.push(x.DropId);
|
if(x.dropId) drops.push(x.dropId);
|
||||||
}
|
}
|
||||||
drops.push(mon.KillDropId);
|
drops.push(mon.killDropId);
|
||||||
data.drops = drops;
|
data.drops = drops;
|
||||||
|
|
||||||
let stats = {};
|
let stats = {};
|
||||||
stats.resistance = {};
|
stats.resistance = {};
|
||||||
stats.resistance.physical = round(mon.PhysicalSubHurt, 2) || 0;
|
stats.resistance.physical = round(mon.physicalSubHurt, 2) || 0;
|
||||||
stats.resistance.pyro = round(mon.FireSubHurt, 2) || 0;
|
stats.resistance.pyro = round(mon.fireSubHurt, 2) || 0;
|
||||||
stats.resistance.dendro = round(mon.GrassSubHurt, 2) || 0;
|
stats.resistance.dendro = round(mon.grassSubHurt, 2) || 0;
|
||||||
stats.resistance.hydro = round(mon.WaterSubHurt, 2) || 0;
|
stats.resistance.hydro = round(mon.waterSubHurt, 2) || 0;
|
||||||
stats.resistance.geo = round(mon.RockSubHurt, 2) || 0;
|
stats.resistance.geo = round(mon.rockSubHurt, 2) || 0;
|
||||||
stats.resistance.anemo = round(mon.WindSubHurt, 2) || 0;
|
stats.resistance.anemo = round(mon.windSubHurt, 2) || 0;
|
||||||
stats.resistance.cryo = round(mon.IceSubHurt, 2) || 0;
|
stats.resistance.cryo = round(mon.iceSubHurt, 2) || 0;
|
||||||
stats.resistance.electro = round(mon.ElecSubHurt, 2) || 0;
|
stats.resistance.electro = round(mon.elecSubHurt, 2) || 0;
|
||||||
stats.base = {};
|
stats.base = {};
|
||||||
stats.base.hp = mon.HpBase;
|
stats.base.hp = mon.hpBase;
|
||||||
stats.base.attack = mon.AttackBase;
|
stats.base.attack = mon.attackBase;
|
||||||
stats.base.defense = mon.DefenseBase;
|
stats.base.defense = mon.defenseBase;
|
||||||
stats.curve = {};
|
stats.curve = {};
|
||||||
try {
|
try {
|
||||||
// if(obj.Id === 29010101) console.log(mon.PropGrowCurves);
|
// if(obj.Id === 29010101) console.log(mon.propGrowCurves);
|
||||||
stats.curve.hp = mon.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_HP').GrowCurve;
|
stats.curve.hp = mon.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_HP').growCurve;
|
||||||
stats.curve.attack = mon.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_ATTACK').GrowCurve;
|
stats.curve.attack = mon.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_ATTACK').growCurve;
|
||||||
stats.curve.defense = mon.PropGrowCurves.find(ele => ele.Type === 'FIGHT_PROP_BASE_DEFENSE').GrowCurve;
|
stats.curve.defense = mon.propGrowCurves.find(ele => ele.type === 'FIGHT_PROP_BASE_DEFENSE').growCurve;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(obj.Id + " - " + data.name + " - failed PropGrowCurves");
|
console.log(obj.Id + " - " + data.name + " - failed PropGrowCurves");
|
||||||
}
|
}
|
||||||
|
|
||||||
data.stats = stats;
|
data.stats = stats;
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[des.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[des.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
|
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
@ -149,83 +152,85 @@ function collateEnemy(lang) {
|
|||||||
return mymonster;
|
return mymonster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mapping for monsters that don't have rewardlist to use another monster's rewardlist
|
||||||
|
const noRewardListMonsterMap = {
|
||||||
|
21011601: 21010601, // Electro Hilichurl Grenadier
|
||||||
|
21020701: 21020101, // Crackling Axe Mitachurl
|
||||||
|
21020801: 21020401, // Thunderhelm Lawachurl
|
||||||
|
21030601: 21030101, // Electro Samachurl
|
||||||
|
22010401: 22010101, // Electro Abyss Mage
|
||||||
|
26010301: 26010201, // Electro Whopperflower
|
||||||
|
20060601: 20060201, // Pyro Specter
|
||||||
|
20060501: 20060201, // Electro Specter
|
||||||
|
20060401: 20060201, // Cryo Specter
|
||||||
|
22080101: 22070101, // Black Serpent Knight: Windcutter
|
||||||
|
25010101: 25010201, // Treasure Hoarders: Liuliu
|
||||||
|
25020101: 25010201, // Treasure Hoarders: Raptor
|
||||||
|
25030101: 25010201, // Treasure Hoarders: Carmen
|
||||||
|
25040101: 25010201, // Treasure Hoarders: Boss
|
||||||
|
25050101: 25010201, // Millelith Soldier
|
||||||
|
25050201: 25010201 // Millelith Sergeant
|
||||||
|
}
|
||||||
|
|
||||||
|
// makes sure each monster has a corresponding "investigation" data
|
||||||
function findInvestigation(monId) {
|
function findInvestigation(monId) {
|
||||||
const xinvest = getExcel('InvestigationMonsterConfigData');
|
const xinvest = getExcel('InvestigationMonsterConfigData');
|
||||||
if(monId === 21011601) monId = 21010601; // Electro Hilichurl Grenadier
|
if(noRewardListMonsterMap[monId]) monId = noRewardListMonsterMap[monId];
|
||||||
else if(monId === 21020701) monId = 21020101; // Crackling Axe Mitachurl
|
return xinvest.find(i => i.monsterIdList.includes(monId));
|
||||||
else if(monId === 21020801) monId = 21020401; // Thunderhelm Lawachurl
|
|
||||||
else if(monId === 21030601) monId = 21030101; // Electro Samachurl
|
|
||||||
else if(monId === 22010401) monId = 22010101; // Electro Abyss Mage
|
|
||||||
else if(monId === 26010301) monId = 26010201; // Electro Whopperflower
|
|
||||||
else if(monId === 20060601) monId = 20060201; // Pyro Specter
|
|
||||||
else if(monId === 20060501) monId = 20060201; // Electro Specter
|
|
||||||
else if(monId === 20060401) monId = 20060201; // Cryo Specter
|
|
||||||
// else if
|
|
||||||
|
|
||||||
// Hydro Cicin
|
|
||||||
// Electro Cicin
|
|
||||||
// Cryo Cicin
|
|
||||||
// Stormterror
|
|
||||||
// Lupus Boreas, Dominator of Wolves
|
|
||||||
// Childe
|
|
||||||
// Azhdaha
|
|
||||||
// La Signora
|
|
||||||
|
|
||||||
return xinvest.find(i => i.MonsterIdList.includes(monId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapRewardList(rewardlist, language) {
|
function mapRewardList(rewardlist, language) {
|
||||||
const xmat = getExcel('MaterialExcelConfigData');
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
const xdisplay = getExcel('DisplayItemExcelConfigData');
|
const xdisplay = getExcel('DisplayItemExcelConfigData');
|
||||||
return rewardlist.map(repre => {
|
return rewardlist.map(repre => {
|
||||||
let mat = xmat.find(m => m.Id === repre.Id);
|
let mat = xmat.find(m => m.id === repre.id);
|
||||||
if(mat) { // is material
|
if(mat) { // is material
|
||||||
let reward = { name: language[mat.NameTextMapHash] };
|
let reward = { name: language[mat.nameTextMapHash] };
|
||||||
if(repre.Count && repre.Count !== "") reward.count = parseFloat(repre.Count);
|
if(repre.count && repre.count !== "") reward.count = parseFloat(repre.count);
|
||||||
return reward;
|
return reward;
|
||||||
} else { // is artifact
|
} else { // is artifact
|
||||||
let disp = xdisplay.find(d => d.Id === repre.Id);
|
let disp = xdisplay.find(d => d.id === repre.id);
|
||||||
return { name: language[disp.NameTextMapHash], rarity: disp.RankLevel+'' };
|
return { name: language[disp.nameTextMapHash], rarity: disp.rankLevel+'' };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const eyestormreward = [
|
const eyestormreward = [
|
||||||
{
|
{
|
||||||
"Id": 202
|
"id": 202
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400022
|
"id": 400022
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400032
|
"id": 400032
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400042
|
"id": 400042
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400062
|
"id": 400062
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400023
|
"id": 400023
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400033
|
"id": 400033
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 400043
|
"id": 400043
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const unusualreward = [
|
const unusualreward = [
|
||||||
{
|
{
|
||||||
"Id": 102 // Adventure EXP
|
"id": 102 // Adventure EXP
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 202 // Mora
|
"id": 202 // Mora
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 100018// Cabbage
|
"id": 100018// Cabbage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -236,18 +241,18 @@ function fixAnimalCodexSubType() {
|
|||||||
let obfu = require('../[Obfuscated] ExcelBinOutput/AnimalCodexExcelConfigData.json');
|
let obfu = require('../[Obfuscated] ExcelBinOutput/AnimalCodexExcelConfigData.json');
|
||||||
let out = require('../ExcelBinOutput/AnimalCodexExcelConfigData.json');
|
let out = require('../ExcelBinOutput/AnimalCodexExcelConfigData.json');
|
||||||
for(let ob of obfu) {
|
for(let ob of obfu) {
|
||||||
let match = out.find(ele => ele.Id === ob.KABAHENDGOO); // replace with ID
|
let match = out.find(ele => ele.id === ob.KABAHENDGOO); // replace with ID
|
||||||
match.SubType = ob.JKOLEMPKHMI; // replace with CODEX_SUBTYPE_HILICHURL
|
match.subType = ob.JKOLEMPKHMI; // replace with CODEX_SUBTYPE_HILICHURL
|
||||||
}
|
}
|
||||||
// manual fixes for 2.6 update
|
// manual fixes for 2.6 update
|
||||||
out.find(ele => ele.Id === 22080101).SubType = "CODEX_SUBTYPE_ABYSS";
|
out.find(ele => ele.Id === 22080101).subType = "CODEX_SUBTYPE_ABYSS";
|
||||||
out.find(ele => ele.Id === 24010401).SubType = "CODEX_SUBTYPE_AUTOMATRON";
|
out.find(ele => ele.Id === 24010401).subType = "CODEX_SUBTYPE_AUTOMATRON";
|
||||||
out.find(ele => ele.Id === 26090101).SubType = "CODEX_SUBTYPE_BEAST";
|
out.find(ele => ele.Id === 26090101).subType = "CODEX_SUBTYPE_BEAST";
|
||||||
|
|
||||||
out = JSON.stringify(out, null, '\t');
|
out = JSON.stringify(out, null, '\t');
|
||||||
fs.writeFileSync('../ExcelBinOutput/AnimalCodexExcelConfigData.json', out);
|
fs.writeFileSync('../ExcelBinOutput/AnimalCodexExcelConfigData.json', out);
|
||||||
}
|
}
|
||||||
fixAnimalCodexSubType();
|
// fixAnimalCodexSubType();
|
||||||
|
|
||||||
function fixInvestigationMonsterList() {
|
function fixInvestigationMonsterList() {
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@ -255,13 +260,13 @@ function fixInvestigationMonsterList() {
|
|||||||
let out = require('../ExcelBinOutput/InvestigationMonsterConfigData.json');
|
let out = require('../ExcelBinOutput/InvestigationMonsterConfigData.json');
|
||||||
|
|
||||||
for(let ob of obfu) {
|
for(let ob of obfu) {
|
||||||
let match = out.find(ele => ele.Id === ob.JNAAGOAENLE); // replace with ID
|
let match = out.find(ele => ele.id === ob.JNAAGOAENLE); // replace with ID
|
||||||
match.MonsterIdList = ob.ENEMLKMDNFJ; // replace with CODEX_SUBTYPE_HILICHURL
|
match.monsterIdList = ob.ENEMLKMDNFJ; // replace with CODEX_SUBTYPE_HILICHURL
|
||||||
}
|
}
|
||||||
|
|
||||||
out = JSON.stringify(out, null, '\t');
|
out = JSON.stringify(out, null, '\t');
|
||||||
fs.writeFileSync('../ExcelBinOutput/InvestigationMonsterConfigData.json', out);
|
fs.writeFileSync('../ExcelBinOutput/InvestigationMonsterConfigData.json', out);
|
||||||
}
|
}
|
||||||
fixInvestigationMonsterList();
|
// fixInvestigationMonsterList();
|
||||||
|
|
||||||
module.exports = collateEnemy;
|
module.exports = collateEnemy;
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
// 101005, 101007, 106000, 106001];
|
// 101005, 101007, 106000, 106001];
|
||||||
|
|
||||||
// function sortMaterials(mata, matb) {
|
// function sortMaterials(mata, matb) {
|
||||||
// if(mata.Rank < matb.Rank) return -1;
|
// if(mata.rank < matb.rank) return -1;
|
||||||
// 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;
|
||||||
// if(mata.Id > matb.Id) return 1;
|
// if(mata.id > matb.id) return 1;
|
||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -32,42 +32,42 @@
|
|||||||
|
|
||||||
// let mymaterial = xmat.reduce((accum, obj) => {
|
// let mymaterial = xmat.reduce((accum, obj) => {
|
||||||
// sortOrder++;
|
// sortOrder++;
|
||||||
// if(!includeMatId.includes(obj.Id)) {
|
// if(!includeMatId.includes(obj.id)) {
|
||||||
// if(!obj.MaterialType) return accum;
|
// if(!obj.materialType) return accum;
|
||||||
// if(excludeMatId.includes(obj.Id)) return accum;
|
// if(excludeMatId.includes(obj.id)) return accum;
|
||||||
// if(!filter.includes(obj.MaterialType)) return accum;
|
// if(!filter.includes(obj.materialType)) return accum;
|
||||||
// }
|
// }
|
||||||
// if(obj.Icon === "UI_ItemIcon_109000") return accum; // skip recipes
|
// 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_221003") return accum; // skip diagrams
|
||||||
// else if(obj.Icon === "UI_ItemIcon_221035") return accum; // skip bait blueprint
|
// else if(obj.icon === "UI_ItemIcon_221035") return accum; // skip bait blueprint
|
||||||
// else if(obj.Icon === "UI_ItemIcon_221001") return accum; // skip instruction blueprints
|
// else if(obj.icon === "UI_ItemIcon_221001") return accum; // skip instruction blueprints
|
||||||
|
|
||||||
// let data = {};
|
// let data = {};
|
||||||
// data.Id = obj.Id;
|
// data.id = obj.id;
|
||||||
// data.name = language[obj.NameTextMapHash];
|
// data.name = language[obj.nameTextMapHash];
|
||||||
// if(data.name === '') return accum;
|
// if(data.name === '') return accum;
|
||||||
// data.sortorder = sortOrder;
|
// data.sortorder = sortOrder;
|
||||||
// data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
// data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
// data.category = obj.MaterialType ? obj.MaterialType.slice(9) : obj.ItemType;
|
// data.category = obj.materialType ? obj.materialType.slice(9) : obj.itemType;
|
||||||
// data.materialtype = language[obj.TypeDescTextMapHash];
|
// data.materialtype = language[obj.typeDescTextMapHash];
|
||||||
// if(obj.RankLevel) data.rarity = ''+obj.RankLevel;
|
// if(obj.rankLevel) data.rarity = ''+obj.rankLevel;
|
||||||
|
|
||||||
// let tmp = xsource.find(ele => ele.Id === obj.Id);
|
// let tmp = xsource.find(ele => ele.id === obj.id);
|
||||||
// let dungeonlist = tmp.DungeonList.filter(ele => ele !== 0);
|
// let dungeonlist = tmp.dungeonList.filter(ele => ele !== 0);
|
||||||
// if(dungeonlist > 0) {
|
// if(dungeonlist > 0) {
|
||||||
// if(dungeonlist.length > 1) console.log(`${data.name} drops from more than one dungeon!`);
|
// 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.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);
|
||||||
// }
|
// }
|
||||||
// if(getLanguage('EN')[obj.TypeDescTextMapHash] === 'Fish') { // get fishing locations
|
// if(getLanguage('EN')[obj.typeDescTextMapHash] === 'Fish') { // get fishing locations
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// 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;
|
||||||
// if(!data.imagename) console.log(data.name+' has no icon');
|
// if(!data.imagename) console.log(data.name+' has no icon');
|
||||||
|
|
||||||
// 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;
|
// if(filename.includes('shrineofdepthskey')) return accum;
|
||||||
// accum[filename] = data;
|
// accum[filename] = data;
|
||||||
|
@ -4,12 +4,12 @@ const xsource = getExcel('MaterialSourceDataExcelConfigData');
|
|||||||
const xspecialty = getExcel('CookBonusExcelConfigData');
|
const xspecialty = getExcel('CookBonusExcelConfigData');
|
||||||
const xavatar = getExcel('AvatarExcelConfigData');
|
const xavatar = getExcel('AvatarExcelConfigData');
|
||||||
|
|
||||||
function getSpecialty(id) { return xspecialty.find(ele => ele.RecipeId === id); }
|
function getSpecialty(id) { return xspecialty.find(ele => ele.recipeId === id); }
|
||||||
function getMaterial(id) { return xmaterial.find(ele => ele.Id === id); }
|
function getMaterial(id) { return xmaterial.find(ele => ele.id === id); }
|
||||||
function getAvatar(id) { return xavatar.find(ele => ele.Id === id); }
|
function getAvatar(id) { return xavatar.find(ele => ele.id === id); }
|
||||||
function getManualTextMapHash(id) {
|
function getManualTextMapHash(id) {
|
||||||
if(id === 'COOK_FOOD_DEFENSE') id = 'COOK_FOOD_DEFENCE';
|
if(id === 'COOK_FOOD_DEFENSE') id = 'COOK_FOOD_DEFENCE';
|
||||||
return xmanualtext.find(ele => ele.TextMapId === id).TextMapContentTextMapHash;
|
return xmanualtext.find(ele => ele.textMapId === id).textMapContentTextMapHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapQualityToProp = {
|
const mapQualityToProp = {
|
||||||
@ -22,75 +22,75 @@ function collateFood(lang) {
|
|||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
|
|
||||||
let myfood = xrecipe.reduce((accum, obj) => {
|
let myfood = xrecipe.reduce((accum, obj) => {
|
||||||
//if(obj.Id !== 1003) return accum;
|
//if(obj.id !== 1003) return accum;
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
data.rarity = obj.RankLevel;
|
data.rarity = obj.rankLevel;
|
||||||
data.foodtype = 'NORMAL';
|
data.foodtype = 'NORMAL';
|
||||||
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 = replaceLayout(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');
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
// check error
|
// check error
|
||||||
for(let i = 2; i <= 3; i++) { const tmp = language[obj.EffectDesc[i]]; if(tmp) console.log(`${obj.Id} ${data.name}: ${tmp}`); }
|
for(let i = 2; i <= 3; i++) { const tmp = language[obj.effectDesc[i]]; if(tmp) console.log(`${obj.id} ${data.name}: ${tmp}`); }
|
||||||
|
|
||||||
// get suspicious, normal, delicious
|
// get suspicious, normal, delicious
|
||||||
for(let xd of obj.QualityOutputVec) {
|
for(let xd of obj.qualityOutputVec) {
|
||||||
xd = getMaterial(xd.Id);
|
xd = getMaterial(xd.id);
|
||||||
let subdata = {};
|
let subdata = {};
|
||||||
if(language[xd.InteractionTitleTextMapHash]) console.log(`food ${obj.Id} has interaction`);
|
if(language[xd.interactionTitleTextMapHash]) console.log(`food ${obj.id} has interaction`);
|
||||||
if(language[xd.SpecialDescTextMapHash]) console.log(`food ${obj.Id} has special`);
|
if(language[xd.specialDescTextMapHash]) console.log(`food ${obj.id} has special`);
|
||||||
subdata.effect = language[xd.EffectDescTextMapHash];
|
subdata.effect = language[xd.effectDescTextMapHash];
|
||||||
subdata.description = sanitizeDescription(language[xd.DescTextMapHash]);
|
subdata.description = sanitizeDescription(language[xd.descTextMapHash]);
|
||||||
data[mapQualityToProp[xd.FoodQuality]] = subdata;
|
data[mapQualityToProp[xd.foodQuality]] = subdata;
|
||||||
data.foodcategory = xd.EffectIcon.substring(13);
|
data.foodcategory = xd.effectIcon.substring(13);
|
||||||
}
|
}
|
||||||
data.ingredients = obj.InputVec.reduce((accum, ing) => {
|
data.ingredients = obj.inputVec.reduce((accum, ing) => {
|
||||||
if(ing.Id === undefined) return accum;
|
if(ing.id === undefined) return accum;
|
||||||
const mat = getMaterial(ing.Id);
|
const mat = getMaterial(ing.id);
|
||||||
accum.push({ name: language[mat.NameTextMapHash], count: ing.Count });
|
accum.push({ name: language[mat.nameTextMapHash], count: ing.count });
|
||||||
return accum;
|
return accum;
|
||||||
}, []);
|
}, []);
|
||||||
// data.source =
|
// data.source =
|
||||||
data.imagename = obj.Icon;
|
data.imagename = obj.icon;
|
||||||
|
|
||||||
accum[makeFileName(getLanguage('EN')[obj.NameTextMapHash])] = data;
|
accum[makeFileName(getLanguage('EN')[obj.nameTextMapHash])] = data;
|
||||||
|
|
||||||
// check if there is a specialty
|
// check if there is a specialty
|
||||||
let myspec = getSpecialty(obj.Id);
|
let myspec = getSpecialty(obj.id);
|
||||||
if(myspec === undefined) return accum;
|
if(myspec === undefined) return accum;
|
||||||
let xd = getMaterial(myspec.ParamVec[0]);
|
let xd = getMaterial(myspec.paramVec[0]);
|
||||||
// if(xd === undefined) return accum;
|
// if(xd === undefined) return accum;
|
||||||
let foodfilter = data.foodfilter;
|
let foodfilter = data.foodfilter;
|
||||||
let basedish = data.name;
|
let basedish = data.name;
|
||||||
let ingredients = data.ingredients;
|
let ingredients = data.ingredients;
|
||||||
|
|
||||||
let spdata = {};
|
let spdata = {};
|
||||||
spdata.name = language[xd.NameTextMapHash];
|
spdata.name = language[xd.nameTextMapHash];
|
||||||
spdata.rarity = xd.RankLevel;
|
spdata.rarity = xd.rankLevel;
|
||||||
spdata.foodtype = 'SPECIALTY';
|
spdata.foodtype = 'SPECIALTY';
|
||||||
spdata.foodfilter = foodfilter;
|
spdata.foodfilter = foodfilter;
|
||||||
spdata.foodcategory = xd.EffectIcon.substring(13);
|
spdata.foodcategory = xd.effectIcon.substring(13);
|
||||||
|
|
||||||
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 = replaceLayout(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;
|
||||||
spdata.character = language[getAvatar(myspec.AvatarId).NameTextMapHash];
|
spdata.character = language[getAvatar(myspec.avatarId).nameTextMapHash];
|
||||||
|
|
||||||
spdata.ingredients = ingredients;
|
spdata.ingredients = ingredients;
|
||||||
spdata.imagename = xd.Icon;
|
spdata.imagename = xd.icon;
|
||||||
|
|
||||||
accum[makeFileName(getLanguage('EN')[xd.NameTextMapHash])] = spdata;
|
accum[makeFileName(getLanguage('EN')[xd.nameTextMapHash])] = spdata;
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
// console.log(myfood);
|
// console.log(myfood);
|
||||||
|
@ -8,21 +8,20 @@ function collageGeography(lang) {
|
|||||||
let mygeography = xview.reduce((accum, obj) => {
|
let mygeography = xview.reduce((accum, obj) => {
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.Id;
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.area = language[xarea.find(area => area.ID === obj.WorldAreaId).AreaNameTextMapHash];
|
data.area = language[xarea.find(area => area.ID === obj.worldAreaId).AreaNameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
data.region = language[xcity.find(city => city.CityId === obj.CityId).CityNameTextMapHash];
|
data.region = language[xcity.find(city => city.cityId === obj.cityId).cityNameTextMapHash];
|
||||||
data.hiddenactive = obj.IsSeenActive ? true : undefined;
|
data.showonlyunlocked = obj.showOnlyUnlocked ? true : undefined;
|
||||||
data.sortorder = obj.SortOrder;
|
data.sortorder = obj.SortOrder;
|
||||||
|
|
||||||
|
// console.log(obj.cityID);
|
||||||
|
|
||||||
// console.log(obj.CityID);
|
data.nameimage = obj.image;
|
||||||
|
|
||||||
data.nameimage = obj.Image;
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
@ -34,10 +34,14 @@ const excludeMatId = [110000, 112001, 100086, 100087, 210, 211,
|
|||||||
101005, 101007, 106000, 106001];
|
101005, 101007, 106000, 106001];
|
||||||
|
|
||||||
function sortMaterials(mata, matb) {
|
function sortMaterials(mata, matb) {
|
||||||
if(mata.Rank < matb.Rank) return -1;
|
if(mata.rank === undefined) mata.rank = 99999999;
|
||||||
if(mata.Rank > matb.Rank) return 1;
|
if(matb.rank === undefined) matb.rank = 99999999;
|
||||||
if(mata.Id < matb.Id) return -1;
|
if(mata.rank < matb.rank) return -1;
|
||||||
if(mata.Id > matb.Id) return 1;
|
if(mata.rank > matb.rank) return 1;
|
||||||
|
if((mata.rankLevel || 0) > (matb.rankLevel || 0)) return -1;
|
||||||
|
if((mata.rankLevel || 0) < (matb.rankLevel || 0)) return 1;
|
||||||
|
if(mata.id < matb.id) return -1;
|
||||||
|
if(mata.id > matb.id) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,40 +60,41 @@ function collateMaterial(lang) {
|
|||||||
|
|
||||||
let mymaterial = xmat.reduce((accum, obj) => {
|
let mymaterial = xmat.reduce((accum, obj) => {
|
||||||
sortOrder++;
|
sortOrder++;
|
||||||
if(!includeMatId.includes(obj.Id)) {
|
if(!includeMatId.includes(obj.id)) {
|
||||||
if(!obj.MaterialType) return accum;
|
if(!obj.materialType) return accum;
|
||||||
if(excludeMatId.includes(obj.Id)) return accum;
|
if(excludeMatId.includes(obj.id)) return accum;
|
||||||
if(!filter.includes(obj.MaterialType)) return accum;
|
if(!filter.includes(obj.materialType)) return accum;
|
||||||
}
|
}
|
||||||
if(obj.Icon === "UI_ItemIcon_109000") return accum; // skip recipes
|
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_221003") return accum; // skip diagrams
|
||||||
else if(obj.Icon === "UI_ItemIcon_221035") return accum; // skip bait blueprint
|
else if(obj.icon === "UI_ItemIcon_221035") return accum; // skip bait blueprint
|
||||||
else if(obj.Icon === "UI_ItemIcon_221001") return accum; // skip instruction blueprints
|
else if(obj.icon === "UI_ItemIcon_221001") return accum; // skip instruction blueprints
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
if(data.name === '') return accum;
|
if(data.name === '') return accum;
|
||||||
data.sortorder = sortOrder;
|
data.sortorder = sortOrder;
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
data.category = obj.MaterialType ? obj.MaterialType.slice(9) : obj.ItemType;
|
data.category = obj.materialType ? obj.materialType.slice(9) : obj.itemType;
|
||||||
data.materialtype = language[obj.TypeDescTextMapHash];
|
data.materialtype = language[obj.typeDescTextMapHash];
|
||||||
if(obj.RankLevel) data.rarity = ''+obj.RankLevel;
|
// data.bagtab =
|
||||||
|
if(obj.rankLevel) data.rarity = ''+obj.rankLevel;
|
||||||
|
|
||||||
let tmp = xsource.find(ele => ele.Id === obj.Id);
|
let tmp = xsource.find(ele => ele.id === obj.id);
|
||||||
let dungeonlist = tmp.DungeonList.filter(ele => ele !== 0);
|
let dungeonlist = tmp.dungeonList.filter(ele => ele !== 0);
|
||||||
if(dungeonlist > 0) {
|
if(dungeonlist > 0) {
|
||||||
if(dungeonlist.length > 1) console.log(`${data.name} drops from more than one dungeon!`);
|
if(dungeonlist.length > 1) console.log(`${data.name} drops from more than one dungeon!`);
|
||||||
if(xdungeon.find(ele => ele.Id === dungeonlist[0])) {
|
if(xdungeon.find(ele => ele.id === dungeonlist[0])) {
|
||||||
// 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
|
// get fishing locations
|
||||||
if(getLanguage('EN')[obj.TypeDescTextMapHash] === 'Fish') {
|
if(getLanguage('EN')[obj.typeDescTextMapHash] === 'Fish') {
|
||||||
let fishId = xfish.find(ele => ele.ItemId === obj.Id).Id;
|
let fishId = xfish.find(ele => ele.itemId === obj.id).id;
|
||||||
let stockIds = xstock.reduce((stockAccum, stockObj) => {
|
let stockIds = xstock.reduce((stockAccum, stockObj) => {
|
||||||
if(stockObj._fishWeight[fishId] !== undefined) stockAccum.push(stockObj.Id);
|
if(stockObj._fishWeight[fishId] !== undefined) stockAccum.push(stockObj.id);
|
||||||
return stockAccum;
|
return stockAccum;
|
||||||
}, []);
|
}, []);
|
||||||
data.fishinglocations = stockIds.reduce((poolAccum, stockId) => {
|
data.fishinglocations = stockIds.reduce((poolAccum, stockId) => {
|
||||||
@ -100,18 +105,22 @@ function collateMaterial(lang) {
|
|||||||
return poolAccum;
|
return poolAccum;
|
||||||
}, []);
|
}, []);
|
||||||
}
|
}
|
||||||
const sourcelist = tmp.TextList.concat(tmp.JumpList);
|
const sourcelist = tmp.textList.concat(tmp.jumpList);
|
||||||
data.source = sourcelist.map(ele => language[ele]).filter(ele => ele !== ''); // TextList/JumpList
|
data.source = sourcelist.map(ele => language[ele]).filter(ele => ele !== ''); // TextList/JumpList
|
||||||
|
|
||||||
data.imagename = obj.Icon;
|
data.imagename = obj.icon;
|
||||||
if(!data.imagename) console.log(data.name+' has no icon');
|
if(!data.imagename) console.log(data.name+' has no icon');
|
||||||
|
|
||||||
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;
|
if(filename.includes('shrineofdepthskey')) return accum;
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
|
// console.log(Object.values(mymaterial).filter(e => e.materialtype === "Material").map(e => e.name));
|
||||||
|
// console.log(Object.values(mymaterial).map(e => e.name));
|
||||||
|
|
||||||
return mymaterial;
|
return mymaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,25 +4,25 @@ const xsource = getExcel('MaterialSourceDataExcelConfigData');
|
|||||||
function collateNamecard(lang) {
|
function collateNamecard(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let mynamecard = xmat.reduce((accum, obj) => {
|
let mynamecard = xmat.reduce((accum, obj) => {
|
||||||
if(obj.MaterialType !== 'MATERIAL_NAMECARD') return accum;
|
if(obj.materialType !== 'MATERIAL_NAMECARD') return accum;
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
// data.RankLevel = obj.RankLevel; // all rarity 4
|
// data.rankLevel = obj.rankLevel; // all rarity 4
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
data.sortorder = obj.Id;
|
data.sortorder = obj.id;
|
||||||
|
|
||||||
let sauce = xsource.find(ele => ele.Id === obj.Id);
|
let sauce = xsource.find(ele => ele.id === obj.id);
|
||||||
data.source = sauce.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
data.source = sauce.textList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
|
|
||||||
|
|
||||||
data.nameicon = obj.Icon;
|
data.nameicon = obj.icon;
|
||||||
data.namebanner = obj.UseParam[0] !== "" ? obj.UseParam[0] : undefined;
|
data.namebanner = obj.picPath[0] !== "" ? obj.picPath[0] : undefined;
|
||||||
data.namebackground = obj.UseParam[1];
|
data.namebackground = obj.picPath[1];
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
@ -5,9 +5,9 @@ const xavatar = getExcel('AvatarExcelConfigData');
|
|||||||
|
|
||||||
// for AvatarCostumeExcelConfigData
|
// for AvatarCostumeExcelConfigData
|
||||||
const propertyMap = {
|
const propertyMap = {
|
||||||
Id: 'OBACDKHOCAM', // 200301
|
id: 'GMECDCKBFJM', // 200301
|
||||||
AvatarId: 'BPAMNILGFPK', // 10000003
|
avatarId: 'FMAJGGBGKKN', // 10000003
|
||||||
IconName: 'DANEMGDCNIM' // UI_AvatarIcon_QinCostumeSea
|
iconName: 'FOINIGFDKIP' // UI_AvatarIcon_QinCostumeSea
|
||||||
}
|
}
|
||||||
|
|
||||||
// taken from collateCharacter.js
|
// taken from collateCharacter.js
|
||||||
@ -18,43 +18,43 @@ function collateOutfit(lang) {
|
|||||||
let myoutfit = xcostume.reduce((accum, obj) => {
|
let myoutfit = xcostume.reduce((accum, obj) => {
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj[propertyMap.Id];
|
data.id = obj[propertyMap.id];
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
|
|
||||||
data.isdefault = obj.IsDefault === true;
|
data.isdefault = obj.isDefault === true;
|
||||||
|
|
||||||
const AvatarId = obj[propertyMap.AvatarId];
|
const AvatarId = obj[propertyMap.avatarId];
|
||||||
if(playerIdToTextMapHash[AvatarId])
|
if(playerIdToTextMapHash[AvatarId])
|
||||||
data.character = language[playerIdToTextMapHash[AvatarId]];
|
data.character = language[playerIdToTextMapHash[AvatarId]];
|
||||||
else
|
else
|
||||||
data.character = language[xavatar.find(ele => ele.Id === obj[propertyMap.AvatarId]).NameTextMapHash];
|
data.character = language[xavatar.find(ele => ele.id === obj[propertyMap.avatarId]).nameTextMapHash];
|
||||||
|
|
||||||
if(obj.ItemId) {
|
if(obj.itemId) {
|
||||||
let sauce = xsource.find(ele => ele.Id === obj.ItemId);
|
let sauce = xsource.find(ele => ele.id === obj.itemId);
|
||||||
data.source = sauce.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
data.source = sauce.textList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
|
|
||||||
data.namecard = xmat.find(ele => ele.Id === obj.ItemId).Icon;
|
data.namecard = xmat.find(ele => ele.id === obj.itemId).icon;
|
||||||
} else {
|
} else {
|
||||||
data.namecard = 'UI_AvatarIcon_Costume_Card';
|
data.namecard = 'UI_AvatarIcon_Costume_Card';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj[propertyMap.IconName]) {
|
if(obj[propertyMap.iconName]) {
|
||||||
data.nameicon = obj[propertyMap.IconName];
|
data.nameicon = obj[propertyMap.iconName];
|
||||||
const name = data.nameicon.slice(data.nameicon.lastIndexOf('_')+1);
|
const name = data.nameicon.slice(data.nameicon.lastIndexOf('_')+1);
|
||||||
data.namesplash = `UI_Costume_${name}`;
|
data.namesplash = `UI_Costume_${name}`;
|
||||||
}
|
}
|
||||||
if(obj.SideIconName)
|
if(obj.sideIconName)
|
||||||
data.namesideicon = obj.SideIconName;
|
data.namesideicon = obj.sideIconName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// data.nameicon = obj.Icon;
|
// data.nameicon = obj.icon;
|
||||||
// data.namebanner = obj.UseParam[0] !== "" ? obj.UseParam[0] : undefined;
|
// data.namebanner = obj.useParam[0] !== "" ? obj.useParam[0] : undefined;
|
||||||
// data.namebackground = obj.UseParam[1];
|
// data.namebackground = obj.useParam[1];
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(filename === 'defaultoutfit') return accum;
|
if(filename === 'defaultoutfit') return accum;
|
||||||
if(playerIdToTextMapHash[AvatarId])
|
if(playerIdToTextMapHash[AvatarId])
|
||||||
|
@ -4,7 +4,7 @@ const xpassive = getExcel('ProudSkillExcelConfigData'); // passive talents. also
|
|||||||
// object map that converts index to the talent type
|
// object map that converts index to the talent type
|
||||||
const talentCombatTypeMap = { '0': 'combat1', '1': 'combat2', '2': 'combatsp', '4': 'combat3' };
|
const talentCombatTypeMap = { '0': 'combat1', '1': 'combat2', '2': 'combatsp', '4': 'combat3' };
|
||||||
|
|
||||||
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.Id === 202).NameTextMapHash;
|
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.id === 202).nameTextMapHash;
|
||||||
|
|
||||||
function collateTalent(lang) {
|
function collateTalent(lang) {
|
||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
@ -13,42 +13,42 @@ function collateTalent(lang) {
|
|||||||
// bad practice to declare functions inside loop but i need to be able to call it multiple times for players
|
// bad practice to declare functions inside loop but i need to be able to call it multiple times for players
|
||||||
function dowork() {
|
function dowork() {
|
||||||
let data = {};
|
let data = {};
|
||||||
let depot = xskilldepot.find(ele => ele.Id === obj.SkillDepotId);
|
let depot = xskilldepot.find(ele => ele.id === obj.skillDepotId);
|
||||||
if(depot === undefined || depot.EnergySkill === undefined) return; // not a finished (traveler) character
|
if(depot === undefined || depot.energySkill === undefined) return; // not a finished (traveler) character
|
||||||
if(depot.TalentStarName === '') return; // unfinished
|
if(depot.talentStarName === '') return; // unfinished
|
||||||
|
|
||||||
let filename = avatarIdToFileName[isPlayer(obj) ? obj.SkillDepotId : obj.Id];
|
let filename = avatarIdToFileName[isPlayer(obj) ? obj.skillDepotId : obj.id];
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash]; // client-facing name
|
data.name = language[obj.nameTextMapHash]; // client-facing name
|
||||||
if(isPlayer(obj)) data.name += ` (${language[elementTextMapHash[getPlayerElement(obj.SkillDepotId)]]})`
|
if(isPlayer(obj)) data.name += ` (${language[elementTextMapHash[getPlayerElement(obj.skillDepotId)]]})`
|
||||||
|
|
||||||
let combat = depot.Skills.concat([depot.EnergySkill]) // get array of combat skills IDs
|
let combat = depot.skills.concat([depot.energySkill]) // get array of combat skills IDs
|
||||||
// console.log(depot.InherentProudSkillOpens)
|
// console.log(depot.inherentProudSkillOpens)
|
||||||
let passive = depot.InherentProudSkillOpens.reduce((accum2, proud, index) => { // get array of passive skill IDs
|
let passive = depot.inherentProudSkillOpens.reduce((accum2, proud, index) => { // get array of passive skill IDs
|
||||||
if(filename === 'raidenshogun' && index === 2) return accum2; // skip hidden cannot cook passive
|
if(filename === 'raidenshogun' && index === 2) return accum2; // skip hidden cannot cook passive
|
||||||
if(proud.ProudSkillGroupId) accum2.push(proud.ProudSkillGroupId);
|
if(proud.proudSkillGroupId) accum2.push(proud.proudSkillGroupId);
|
||||||
return accum2;
|
return accum2;
|
||||||
}, []);
|
}, []);
|
||||||
let parameters = {};
|
let parameters = {};
|
||||||
let costs = {};
|
let costs = {};
|
||||||
combat.forEach((skId, index) => {
|
combat.forEach((skId, index) => {
|
||||||
if(skId === 0) return;
|
if(skId === 0) return;
|
||||||
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.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;
|
ref.icon = talent.skillIcon;
|
||||||
if(combatTypeProp === 'combat3')
|
if(combatTypeProp === 'combat3')
|
||||||
ref.icon = ref.icon + '_HD';
|
ref.icon = ref.icon + '_HD';
|
||||||
|
|
||||||
ref.labels = [];
|
ref.labels = [];
|
||||||
// build the labels
|
// build the labels
|
||||||
let attTalent = xpassive.find(tal => (tal.ProudSkillGroupId === talent.ProudSkillGroupId && tal.Level === 1));
|
let attTalent = xpassive.find(tal => (tal.proudSkillGroupId === talent.proudSkillGroupId && tal.level === 1));
|
||||||
for(let labelTextMap of attTalent.ParamDescList) {
|
for(let labelTextMap of attTalent.paramDescList) {
|
||||||
if(language[labelTextMap] === "") continue;
|
if(language[labelTextMap] === "") continue;
|
||||||
ref.labels.push(replaceLayout(language[labelTextMap]));
|
ref.labels.push(replaceLayout(language[labelTextMap]));
|
||||||
}
|
}
|
||||||
@ -56,8 +56,8 @@ function collateTalent(lang) {
|
|||||||
parameters[combatTypeProp] = {};
|
parameters[combatTypeProp] = {};
|
||||||
for(let lvl = 1; lvl <= 15; lvl++) {
|
for(let lvl = 1; lvl <= 15; lvl++) {
|
||||||
if(lvl !== 1 && index === 2) continue; // sprint skills don't have level-up
|
if(lvl !== 1 && index === 2) continue; // sprint skills don't have level-up
|
||||||
let attTalent = xpassive.find(tal => (tal.ProudSkillGroupId === talent.ProudSkillGroupId && tal.Level === lvl));
|
let attTalent = xpassive.find(tal => (tal.proudSkillGroupId === talent.proudSkillGroupId && tal.level === lvl));
|
||||||
attTalent.ParamList.forEach((value, paramIndex) => {
|
attTalent.paramList.forEach((value, paramIndex) => {
|
||||||
const name = `param${paramIndex+1}`;
|
const name = `param${paramIndex+1}`;
|
||||||
if(value === 0) { // exclude those with values of 0
|
if(value === 0) { // exclude those with values of 0
|
||||||
if(lvl !== 1 && parameters[combatTypeProp][name] !== undefined) console.log(`talent ${ref.name} value 0`);
|
if(lvl !== 1 && parameters[combatTypeProp][name] !== undefined) console.log(`talent ${ref.name} value 0`);
|
||||||
@ -69,13 +69,13 @@ function collateTalent(lang) {
|
|||||||
if(lvl >= 2 && lvl <= 10) { // get upgrade costs
|
if(lvl >= 2 && lvl <= 10) { // get upgrade costs
|
||||||
costs['lvl'+lvl] = [{
|
costs['lvl'+lvl] = [{
|
||||||
name: language[moraNameTextMapHash],
|
name: language[moraNameTextMapHash],
|
||||||
count: attTalent.CoinCost
|
count: attTalent.coinCost
|
||||||
}];
|
}];
|
||||||
for(let items of attTalent.CostItems) {
|
for(let items of attTalent.costItems) {
|
||||||
if(items.Id === undefined) continue;
|
if(items.id === undefined) continue;
|
||||||
costs['lvl'+lvl].push({
|
costs['lvl'+lvl].push({
|
||||||
name: language[xmat.find(ele => ele.Id === items.Id).NameTextMapHash],
|
name: language[xmat.find(ele => ele.id === items.id).nameTextMapHash],
|
||||||
count: items.Count
|
count: items.count
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,12 +83,12 @@ 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.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;
|
ref.icon = talent.icon;
|
||||||
});
|
});
|
||||||
data.costs = costs;
|
data.costs = costs;
|
||||||
data.parameters = parameters;
|
data.parameters = parameters;
|
||||||
@ -97,8 +97,8 @@ function collateTalent(lang) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isPlayer(obj)) {
|
if(isPlayer(obj)) {
|
||||||
obj.CandSkillDepotIds.forEach(ele => {
|
obj.candSkillDepotIds.forEach(ele => {
|
||||||
obj.SkillDepotId = ele;
|
obj.skillDepotId = ele;
|
||||||
dowork();
|
dowork();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -10,37 +10,37 @@ function collateVoiceover(lang) {
|
|||||||
|
|
||||||
let mynamecard = xplayableAvatar.reduce((accum, obj) => {
|
let mynamecard = xplayableAvatar.reduce((accum, obj) => {
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
|
|
||||||
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.story = [];
|
data.story = [];
|
||||||
data.combat = [];
|
data.combat = [];
|
||||||
let xvoices = xfetter.filter(ele => ele.AvatarId === obj.Id);
|
let xvoices = xfetter.filter(ele => ele.avatarId === obj.id);
|
||||||
xvoices.forEach(ele => {
|
xvoices.forEach(ele => {
|
||||||
let tmp = {
|
let tmp = {
|
||||||
Id: ele.FetterId, // DEBUG
|
Id: ele.fetterId, // DEBUG
|
||||||
title: language[ele.VoiceTitleTextMapHash],
|
title: language[ele.voiceTitleTextMapHash],
|
||||||
text: sanitizeDescription(language[ele.VoiceFileTextTextMapHash]),
|
text: sanitizeDescription(language[ele.voiceFileTextTextMapHash]),
|
||||||
unlock: ele.Tips.map(e => language[e]).filter(e => e !== '') // TextList/JumpList
|
unlock: ele.tips.map(e => language[e]).filter(e => e !== '') // TextList/JumpList
|
||||||
}
|
}
|
||||||
if(tmp.unlock.length === 0) delete tmp.unlock;
|
if(tmp.unlock.length === 0) delete tmp.unlock;
|
||||||
|
|
||||||
if(ele.IsHiden === 1) data.story.push(tmp);
|
if(ele.isHiden === 1) data.story.push(tmp);
|
||||||
else if(ele.IsHiden === 2) data.combat.push(tmp);
|
else if(ele.isHiden === 2) data.combat.push(tmp);
|
||||||
else console.log('unknown voiceover tab: ' + ele.FetterId);
|
else console.log('unknown voiceover tab: ' + ele.fetterId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
// data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
// data.sortorder = obj.Id;
|
// data.sortorder = obj.id;
|
||||||
|
|
||||||
// let sauce = xsource.find(ele => ele.Id === obj.Id);
|
// let sauce = xsource.find(ele => ele.id === obj.id);
|
||||||
// data.source = sauce.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
// data.source = sauce.textList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[isPlayer(obj) ? playerIdToTextMapHash[obj.Id] : obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[isPlayer(obj) ? playerIdToTextMapHash[obj.id] : obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
const xweapon = getExcel('WeaponExcelConfigData');
|
const xweapon = getExcel('WeaponExcelConfigData');
|
||||||
const xrefine = getExcel('EquipAffixExcelConfigData');
|
const xrefine = getExcel('EquipAffixExcelConfigData');
|
||||||
|
|
||||||
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.Id === 202).NameTextMapHash;
|
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.id === 202).nameTextMapHash;
|
||||||
const xmat = getExcel('MaterialExcelConfigData');
|
const xmat = getExcel('MaterialExcelConfigData');
|
||||||
|
|
||||||
const xplayableWeapon = xweapon.filter(obj => {
|
const xplayableWeapon = xweapon.filter(obj => {
|
||||||
if(obj.RankLevel >= 3 && obj.SkillAffix[0] === 0) return false;
|
if(obj.rankLevel >= 3 && obj.skillAffix[0] === 0) return false;
|
||||||
if(obj.SkillAffix[1] !== 0) { console.log('danger'); return false };
|
if(obj.skillAffix[1] !== 0) { console.log('danger'); return false };
|
||||||
const name = getLanguage('EN')[obj.NameTextMapHash];
|
const name = getLanguage('EN')[obj.nameTextMapHash];
|
||||||
if(name === '') return false;
|
if(name === '') return false;
|
||||||
else if(name === 'The Flagstaff' || name === 'Quartz' || name === 'Ebony Bow' || name === 'Amber Bead') return false;
|
else if(name === 'The Flagstaff' || name === 'Quartz' || name === 'Ebony Bow' || name === 'Amber Bead') return false;
|
||||||
return true;
|
return true;
|
||||||
@ -19,32 +19,32 @@ function collateWeapon(lang) {
|
|||||||
let myweapon = xplayableWeapon.reduce((accum, obj) => {
|
let myweapon = xplayableWeapon.reduce((accum, obj) => {
|
||||||
|
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.Id;
|
data.id = obj.id;
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(accum[filename] !== undefined) console.log(filename+' IS NOT UNIQUE');
|
if(accum[filename] !== undefined) console.log(filename+' IS NOT UNIQUE');
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
data.weapontype = language[weaponTextMapHash[obj.WeaponType]];
|
data.weapontype = language[weaponTextMapHash[obj.weaponType]];
|
||||||
data.rarity = ''+obj.RankLevel;
|
data.rarity = ''+obj.rankLevel;
|
||||||
|
|
||||||
if(obj.WeaponProp[0].PropType !== 'FIGHT_PROP_BASE_ATTACK') console.log(obj,'weapon did not find base atk');
|
if(obj.weaponProp[0].propType !== 'FIGHT_PROP_BASE_ATTACK') console.log(obj,'weapon did not find base atk');
|
||||||
data.baseatk = obj.WeaponProp.find(obj => obj.PropType === 'FIGHT_PROP_BASE_ATTACK').InitValue;
|
data.baseatk = obj.weaponProp.find(obj => obj.propType === 'FIGHT_PROP_BASE_ATTACK').initValue;
|
||||||
|
|
||||||
let substat = obj.WeaponProp[1].PropType;
|
let substat = obj.weaponProp[1].propType;
|
||||||
if(substat !== undefined) {
|
if(substat !== undefined) {
|
||||||
data.substat = language[xmanualtext.find(ele => ele.TextMapId === substat).TextMapContentTextMapHash];
|
data.substat = language[xmanualtext.find(ele => ele.textMapId === substat).textMapContentTextMapHash];
|
||||||
let subvalue = obj.WeaponProp[1].InitValue;
|
let subvalue = obj.weaponProp[1].initValue;
|
||||||
data.subvalue = subvalue;
|
data.subvalue = subvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.SkillAffix[0] !== 0) {
|
if(obj.skillAffix[0] !== 0) {
|
||||||
let affixId = obj.SkillAffix[0] * 10;
|
let affixId = obj.skillAffix[0] * 10;
|
||||||
for(let offset = 0; offset < 5; offset++) {
|
for(let offset = 0; offset < 5; offset++) {
|
||||||
let ref = xrefine.find(ele => ele.AffixId === affixId+offset);
|
let ref = xrefine.find(ele => ele.affixId === affixId+offset);
|
||||||
if(ref === undefined) break;
|
if(ref === undefined) break;
|
||||||
if(offset === 0) data.effectname = language[ref.NameTextMapHash];
|
if(offset === 0) data.effectname = language[ref.nameTextMapHash];
|
||||||
let effect = language[ref.DescTextMapHash];
|
let effect = language[ref.descTextMapHash];
|
||||||
effect = effect.replaceAll('{NON_BREAK_SPACE}', ' ');
|
effect = effect.replaceAll('{NON_BREAK_SPACE}', ' ');
|
||||||
effect = effect.replace(/<\/color>s/g, 's<\/color>');
|
effect = effect.replace(/<\/color>s/g, 's<\/color>');
|
||||||
if(filename === 'swordofdescension' || filename === 'predator') { // has extra color
|
if(filename === 'swordofdescension' || filename === 'predator') { // has extra color
|
||||||
@ -70,19 +70,19 @@ function collateWeapon(lang) {
|
|||||||
|
|
||||||
// get the promotion costs
|
// get the promotion costs
|
||||||
let costs = {};
|
let costs = {};
|
||||||
for(let i = 1; i <= (obj.RankLevel <= 2 ? 4 : 6); i++) {
|
for(let i = 1; i <= (obj.rankLevel <= 2 ? 4 : 6); i++) {
|
||||||
// 1 and 2 star weapons only have 4 ascensions instead of 6
|
// 1 and 2 star weapons only have 4 ascensions instead of 6
|
||||||
let apromo = xsubstat.find(ele => ele.WeaponPromoteId === obj.WeaponPromoteId && ele.PromoteLevel === i);
|
let apromo = xsubstat.find(ele => ele.weaponPromoteId === obj.weaponPromoteId && ele.promoteLevel === i);
|
||||||
costs['ascend'+i] = [{
|
costs['ascend'+i] = [{
|
||||||
name: language[moraNameTextMapHash],
|
name: language[moraNameTextMapHash],
|
||||||
count: apromo.CoinCost
|
count: apromo.coinCost
|
||||||
}];
|
}];
|
||||||
|
|
||||||
for(let items of apromo.CostItems) {
|
for(let items of apromo.costItems) {
|
||||||
if(items.Id === undefined) continue;
|
if(items.id === undefined) continue;
|
||||||
costs['ascend'+i].push({
|
costs['ascend'+i].push({
|
||||||
name: language[xmat.find(ele => ele.Id === items.Id).NameTextMapHash],
|
name: language[xmat.find(ele => ele.id === items.id).nameTextMapHash],
|
||||||
count: items.Count
|
count: items.count
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,31 +90,31 @@ function collateWeapon(lang) {
|
|||||||
|
|
||||||
// INFORMATION TO CALCULATE STATS AT EACH LEVEL
|
// INFORMATION TO CALCULATE STATS AT EACH LEVEL
|
||||||
let stats = { base: {}, curve: {} };
|
let stats = { base: {}, curve: {} };
|
||||||
stats.base.attack = obj.WeaponProp[0].InitValue;
|
stats.base.attack = obj.weaponProp[0].initValue;
|
||||||
stats.base.specialized = obj.WeaponProp[1].InitValue || 0;
|
stats.base.specialized = obj.weaponProp[1].initValue || 0;
|
||||||
|
|
||||||
stats.curve.attack = obj.WeaponProp[0].Type;
|
stats.curve.attack = obj.weaponProp[0].type;
|
||||||
stats.curve.specialized = obj.WeaponProp[1].Type;
|
stats.curve.specialized = obj.weaponProp[1].type;
|
||||||
stats.specialized = substat;
|
stats.specialized = substat;
|
||||||
stats.promotion = xsubstat.reduce((accum, ele) => {
|
stats.promotion = xsubstat.reduce((accum, ele) => {
|
||||||
if(ele.WeaponPromoteId !== obj.WeaponPromoteId) return accum;
|
if(ele.weaponPromoteId !== obj.weaponPromoteId) return accum;
|
||||||
let promotelevel = ele.PromoteLevel || 0;
|
let promotelevel = ele.promoteLevel || 0;
|
||||||
accum[promotelevel] = {
|
accum[promotelevel] = {
|
||||||
maxlevel: ele.UnlockMaxLevel,
|
maxlevel: ele.unlockMaxLevel,
|
||||||
attack: ele.AddProps.find(ele => ele.PropType === 'FIGHT_PROP_BASE_ATTACK').Value || 0
|
attack: ele.addProps.find(ele => ele.propType === 'FIGHT_PROP_BASE_ATTACK').value || 0
|
||||||
};
|
};
|
||||||
let special = ele.AddProps.find(ele => ele.PropType === substat);//.Value;
|
let special = ele.addProps.find(ele => ele.propType === substat);//.value;
|
||||||
if(special) special = special.Value;
|
if(special) special = special.value;
|
||||||
if(special !== undefined) {
|
if(special !== undefined) {
|
||||||
console.log('WEAPON SPECIAL SUBSTAT FOUND: ' + obj.Id)
|
console.log('WEAPON SPECIAL SUBSTAT FOUND: ' + obj.id)
|
||||||
accum[promotelevel].specialized = special;
|
accum[promotelevel].specialized = special;
|
||||||
}
|
}
|
||||||
return accum;
|
return accum;
|
||||||
}, [])
|
}, [])
|
||||||
data.stats = stats;
|
data.stats = stats;
|
||||||
|
|
||||||
data.icon = obj.Icon;
|
data.icon = obj.icon;
|
||||||
data.awakenicon = obj.AwakenIcon;
|
data.awakenicon = obj.awakenIcon;
|
||||||
|
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
return accum;
|
return accum;
|
||||||
|
@ -6,26 +6,26 @@ function collateWindGlider(lang) {
|
|||||||
const language = getLanguage(lang);
|
const language = getLanguage(lang);
|
||||||
let mydata = xfly.reduce((accum, obj) => {
|
let mydata = xfly.reduce((accum, obj) => {
|
||||||
let data = {};
|
let data = {};
|
||||||
data.Id = obj.FlycloakId;
|
data.id = obj.flycloakId;
|
||||||
|
|
||||||
data.name = language[obj.NameTextMapHash];
|
data.name = language[obj.nameTextMapHash];
|
||||||
data.description = sanitizeDescription(language[obj.DescTextMapHash]);
|
data.description = sanitizeDescription(language[obj.descTextMapHash]);
|
||||||
|
|
||||||
let flymat = xmat.find(ele => ele.Id === obj.MaterialId) || {};
|
let flymat = xmat.find(ele => ele.id === obj.materialId) || {};
|
||||||
|
|
||||||
data.rarity = flymat.RankLevel+"";
|
data.rarity = flymat.rankLevel+"";
|
||||||
data.sortorder = obj.FlycloakId;
|
data.sortorder = obj.flycloakId;
|
||||||
data.ishidden = obj.Hide ? true : undefined;
|
data.ishidden = obj.hide ? true : undefined;
|
||||||
|
|
||||||
// let sauce = xsource.find(ele => ele.Id === obj.Id);
|
// let sauce = xsource.find(ele => ele.id === obj.id);
|
||||||
// data.source = sauce.TextList.map(ele => language[ele]).filter(ele => ele !== '');
|
// data.source = sauce.textList.map(ele => language[ele]).filter(ele => ele !== '');
|
||||||
data.source = getMatSourceText(obj.MaterialId, language);
|
data.source = getMatSourceText(obj.materialId, language);
|
||||||
|
|
||||||
data.nameicon = flymat.Icon;
|
data.nameicon = flymat.icon;
|
||||||
data.namegacha = obj.Icon;
|
data.namegacha = obj.icon;
|
||||||
|
|
||||||
|
|
||||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
let filename = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(filename === '') return accum;
|
if(filename === '') return accum;
|
||||||
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
if(accum[filename] !== undefined) console.log('filename collision: ' + filename);
|
||||||
accum[filename] = data;
|
accum[filename] = data;
|
||||||
|
@ -15,7 +15,7 @@ const langcodes = ['CHS', 'CHT', 'DE', 'EN', 'ES', 'FR', 'ID', 'JP', 'KR', 'PT',
|
|||||||
|
|
||||||
|
|
||||||
// const weaponIdToFileName = xweapon.reduce((accum, obj) => {
|
// const weaponIdToFileName = xweapon.reduce((accum, obj) => {
|
||||||
// accum[obj.Id] =
|
// accum[obj.id] =
|
||||||
|
|
||||||
// }, {})
|
// }, {})
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ const langcodes = ['CHS', 'CHT', 'DE', 'EN', 'ES', 'FR', 'ID', 'JP', 'KR', 'PT',
|
|||||||
// UNUSED object map that converts AvatarAssocType into a TextMapHash
|
// UNUSED object map that converts AvatarAssocType into a TextMapHash
|
||||||
const assocTextMapHash = ['ASSOC_TYPE_MONDSTADT', 'ASSOC_TYPE_LIYUE', 'ASSOC_TYPE_FATUI'];
|
const assocTextMapHash = ['ASSOC_TYPE_MONDSTADT', 'ASSOC_TYPE_LIYUE', 'ASSOC_TYPE_FATUI'];
|
||||||
|
|
||||||
global.isPlayer = function(data) { return data.CandSkillDepotIds && data.CandSkillDepotIds.length !== 0; }
|
global.isPlayer = function(data) { return data.candSkillDepotIds && data.candSkillDepotIds.length !== 0; }
|
||||||
global.getPlayerElement = function(SkillDepotId) { let tmp = xskilldepot.find(ele => ele.Id === SkillDepotId); return tmp === undefined ? tmp : tmp.TalentStarName.split('_').pop(); }
|
global.getPlayerElement = function(SkillDepotId) { let tmp = xskilldepot.find(ele => ele.id === SkillDepotId); return tmp === undefined ? tmp : tmp.talentStarName.split('_').pop(); }
|
||||||
global.getLanguage = function(abbriev) { return getTextMap(abbriev.toUpperCase()); }
|
global.getLanguage = function(abbriev) { return getTextMap(abbriev.toUpperCase()); }
|
||||||
global.normalizeStr = function(str) { return str.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); }
|
global.normalizeStr = function(str) { return str.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); }
|
||||||
global.makeFileName = function(str, lang) { return normalizeStr(str).toLowerCase().replace(/[^a-z]/g,''); }
|
global.makeFileName = function(str, lang) { return normalizeStr(str).toLowerCase().replace(/[^a-z]/g,''); }
|
||||||
@ -34,26 +34,26 @@ global.capitalizeFirst = function(str) { return str[0].toUpperCase() + str.toLow
|
|||||||
global.replaceLayout = function(str) { return str.replace(/{LAYOUT_MOBILE#.*?}{LAYOUT_PC#(.*?)}{LAYOUT_PS#.*?}/gi,'$1').replace('#','').replaceAll('{NON_BREAK_SPACE}', ' '); }
|
global.replaceLayout = function(str) { return str.replace(/{LAYOUT_MOBILE#.*?}{LAYOUT_PC#(.*?)}{LAYOUT_PS#.*?}/gi,'$1').replace('#','').replaceAll('{NON_BREAK_SPACE}', ' '); }
|
||||||
global.replaceNewline = function(str) { return str.replace(/\\n/gi, '\n'); }
|
global.replaceNewline = function(str) { return str.replace(/\\n/gi, '\n'); }
|
||||||
global.sanitizeDescription = function(str) { return replaceNewline(replaceLayout(stripHTML(convertBold(str || '')))); }
|
global.sanitizeDescription = function(str) { return replaceNewline(replaceLayout(stripHTML(convertBold(str || '')))); }
|
||||||
global.getMatSourceText = function(id, textmap) { return getExcel('MaterialSourceDataExcelConfigData').find(e => e.Id === id).TextList.map(e => textmap[e]).filter(e => e !== ''); }
|
global.getMatSourceText = function(id, textmap) { return getExcel('MaterialSourceDataExcelConfigData').find(e => e.id === id).textList.map(e => textmap[e]).filter(e => e !== ''); }
|
||||||
/* ======================================================================================= */
|
/* ======================================================================================= */
|
||||||
|
|
||||||
// object map that converts the genshin coded element into a TextMapHash
|
// object map that converts the genshin coded element into a TextMapHash
|
||||||
global.elementTextMapHash = ['Fire', 'Water', 'Grass', 'Electric', 'Wind', 'Ice', 'Rock'].reduce((accum, element) => {
|
global.elementTextMapHash = ['Fire', 'Water', 'Grass', 'Electric', 'Wind', 'Ice', 'Rock'].reduce((accum, element) => {
|
||||||
accum[element] = xmanualtext.find(ele => ele.TextMapId === element).TextMapContentTextMapHash;
|
accum[element] = xmanualtext.find(ele => ele.textMapId === element).textMapContentTextMapHash;
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
global.xplayableAvatar = xavatar.filter(obj => obj.AvatarPromoteId !== 2 || obj.Id === 10000002); // array
|
global.xplayableAvatar = xavatar.filter(obj => obj.avatarPromoteId !== 2 || obj.id === 10000002); // array
|
||||||
// object map that converts an avatar Id or traveler SkillDepotId to filename
|
// object map that converts an avatar Id or traveler SkillDepotId to filename
|
||||||
global.avatarIdToFileName = xplayableAvatar.reduce((accum, obj) => {
|
global.avatarIdToFileName = xplayableAvatar.reduce((accum, obj) => {
|
||||||
if(obj.Id === 10000005) accum[obj.Id] = 'aether';
|
if(obj.id === 10000005) accum[obj.id] = 'aether';
|
||||||
else if(obj.Id === 10000007) accum[obj.Id] = 'lumine';
|
else if(obj.id === 10000007) accum[obj.id] = 'lumine';
|
||||||
else accum[obj.Id] = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
else accum[obj.id] = makeFileName(getLanguage('EN')[obj.nameTextMapHash]);
|
||||||
if(isPlayer(obj)) { //
|
if(isPlayer(obj)) { //
|
||||||
obj.CandSkillDepotIds.forEach(skdeId => {
|
obj.candSkillDepotIds.forEach(skdeId => {
|
||||||
let trelement = elementTextMapHash[getPlayerElement(skdeId)];
|
let trelement = elementTextMapHash[getPlayerElement(skdeId)];
|
||||||
if(trelement === undefined) return;
|
if(trelement === undefined) return;
|
||||||
accum[skdeId] = makeFileName(getLanguage('EN')[obj.NameTextMapHash] + getLanguage('EN')[trelement]);
|
accum[skdeId] = makeFileName(getLanguage('EN')[obj.nameTextMapHash] + getLanguage('EN')[trelement]);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return accum;
|
return accum;
|
||||||
@ -61,18 +61,18 @@ global.avatarIdToFileName = xplayableAvatar.reduce((accum, obj) => {
|
|||||||
|
|
||||||
// object map that converts a WeaponType into a TextMapHash
|
// object map that converts a WeaponType into a TextMapHash
|
||||||
global.weaponTextMapHash = ['WEAPON_SWORD_ONE_HAND', 'WEAPON_CATALYST', 'WEAPON_CLAYMORE', 'WEAPON_BOW', 'WEAPON_POLE'].reduce((accum, str) => {
|
global.weaponTextMapHash = ['WEAPON_SWORD_ONE_HAND', 'WEAPON_CATALYST', 'WEAPON_CLAYMORE', 'WEAPON_BOW', 'WEAPON_POLE'].reduce((accum, str) => {
|
||||||
accum[str] = xmanualtext.find(ele => ele.TextMapId === str).TextMapContentTextMapHash;
|
accum[str] = xmanualtext.find(ele => ele.textMapId === str).textMapContentTextMapHash;
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
// translates day of the week. 1 => Monday, etc. Returns textmaphash
|
// translates day of the week. 1 => Monday, etc. Returns textmaphash
|
||||||
global.dayOfWeek = function(num) {
|
global.dayOfWeek = function(num) {
|
||||||
return xmanualtext.find(ele => ele.TextMapId === 'UI_ABYSSUS_DATE'+num).TextMapContentTextMapHash;
|
return xmanualtext.find(ele => ele.textMapId === 'UI_ABYSSUS_DATE'+num).textMapContentTextMapHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
const xcity = getExcel('CityConfigData');
|
const xcity = getExcel('CityConfigData');
|
||||||
// adds Snezhnaya manually
|
// adds Snezhnaya manually
|
||||||
if(!xcity.find(ele => getLanguage('EN')[ele.CityNameTextMapHash] === 'Snezhnaya')) {
|
if(!xcity.find(ele => getLanguage('EN')[ele.cityNameTextMapHash] === 'Snezhnaya')) {
|
||||||
getLanguage('CHS')['Snezhnaya'] = '至冬国';
|
getLanguage('CHS')['Snezhnaya'] = '至冬国';
|
||||||
getLanguage('CHT')['Snezhnaya'] = '至冬國';
|
getLanguage('CHT')['Snezhnaya'] = '至冬國';
|
||||||
getLanguage('DE')['Snezhnaya'] = 'Snezhnaya';
|
getLanguage('DE')['Snezhnaya'] = 'Snezhnaya';
|
||||||
@ -87,7 +87,7 @@ if(!xcity.find(ele => getLanguage('EN')[ele.CityNameTextMapHash] === 'Snezhnaya'
|
|||||||
getLanguage('TH')['Snezhnaya'] = 'Snezhnaya';
|
getLanguage('TH')['Snezhnaya'] = 'Snezhnaya';
|
||||||
getLanguage('VI')['Snezhnaya'] = 'Snezhnaya';
|
getLanguage('VI')['Snezhnaya'] = 'Snezhnaya';
|
||||||
|
|
||||||
xcity.push({ CityId: 8758412, CityNameTextMapHash: 'Snezhnaya'})
|
xcity.push({ cityId: 8758412, cityNameTextMapHash: 'Snezhnaya'})
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =========================================================================================== */
|
/* =========================================================================================== */
|
||||||
@ -97,10 +97,10 @@ function exportCurve(folder, file) {
|
|||||||
let output = {};
|
let output = {};
|
||||||
xcurve.forEach(ele => {
|
xcurve.forEach(ele => {
|
||||||
let curveinfo = {};
|
let curveinfo = {};
|
||||||
ele.CurveInfos.forEach(ele => {
|
ele.curveInfos.forEach(ele => {
|
||||||
curveinfo[ele.Type] = ele.Value;
|
curveinfo[ele.type] = ele.value;
|
||||||
});
|
});
|
||||||
output[ele.Level] = curveinfo;
|
output[ele.level] = curveinfo;
|
||||||
});
|
});
|
||||||
fs.mkdirSync(`./export/curve`, { recursive: true });
|
fs.mkdirSync(`./export/curve`, { recursive: true });
|
||||||
fs.writeFileSync(`./export/curve/${folder}.json`, JSON.stringify(output, null, '\t'));
|
fs.writeFileSync(`./export/curve/${folder}.json`, JSON.stringify(output, null, '\t'));
|
||||||
@ -128,24 +128,26 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
|||||||
// exportCurve('weapons', 'WeaponCurveExcelConfigData')
|
// exportCurve('weapons', 'WeaponCurveExcelConfigData')
|
||||||
// exportData('artifacts', require('./collateArtifact.js'));
|
// exportData('artifacts', require('./collateArtifact.js'));
|
||||||
// exportData('foods', require('./collateFood'));
|
// exportData('foods', require('./collateFood'));
|
||||||
// exportData('materials', require('./collateMaterial'), false); // change: used both TextList/JumpList. temp removed dropdomain/daysofweek
|
// exportData('materials', require('./collateMaterial')); // change: used both TextList/JumpList. temp removed dropdomain/daysofweek
|
||||||
// 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'));
|
||||||
// exportCurve('enemies', 'MonsterCurveExcelConfigData');
|
// exportCurve('enemies', 'MonsterCurveExcelConfigData');
|
||||||
|
|
||||||
// exportData('domains', require('./collateDomainMonsterList')); // MUST do run only after both domains and enemies have run. sync.
|
// exportData('domains', require('./collateDomainMonsterList')); // MUST do run only after both domains and enemies have run. sync.
|
||||||
|
|
||||||
// exportData('outfits', require('./collateOutfit')); // Fix obfuscated keys!
|
// exportData('outfits', require('./collateOutfit')); // Fix obfuscated keys after every version update
|
||||||
// exportData('windgliders', require('./collateWindGlider'));
|
// exportData('windgliders', require('./collateWindGlider'));
|
||||||
// exportData('animals', require('./collateAnimal'));
|
// exportData('animals', require('./collateAnimal')); // Fix obfuscated keys after every version update
|
||||||
// exportData('namecards', require('./collateNamecard'));
|
// exportData('namecards', require('./collateNamecard'));
|
||||||
// exportData('geographies', require('./collateGeography'));
|
// exportData('geographies', require('./collateGeography'));
|
||||||
// exportData('achievements', require('./collateAchievement'));
|
// exportData('achievements', require('./collateAchievement'));
|
||||||
// exportData('achievementgroups', require('./collateAchievementGroup'));
|
// exportData('achievementgroups', require('./collateAchievementGroup'));
|
||||||
// exportData('commissions', require('./collateCommission'), true);
|
// exportData('adventureranks', require('./collateAdventureRank'));
|
||||||
exportData('voiceovers', require('./collateVoiceover'), true);
|
|
||||||
|
|
||||||
// // exportData('fishingpoints', require('./collateFishingPoint'));
|
// exportData('commissions', require('./collateCommission'), true); // unfinished
|
||||||
|
// exportData('voiceovers', require('./collateVoiceover'), true); // unfinished
|
||||||
|
|
||||||
|
// // exportData('fishingpoints', require('./collateFishingPoint')); // unfinished
|
||||||
|
|
||||||
//console.log(collateCharacter('EN'))
|
//console.log(collateCharacter('EN'))
|
||||||
//console.log(collateConstellation('EN').hutao)
|
//console.log(collateConstellation('EN').hutao)
|
||||||
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -5,20 +5,20 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fuzzysort": "^1.1.4"
|
"fuzzysort": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fuzzysort": {
|
"node_modules/fuzzysort": {
|
||||||
"version": "1.1.4",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-2.0.1.tgz",
|
||||||
"integrity": "sha512-JzK/lHjVZ6joAg3OnCjylwYXYVjRiwTY6Yb25LvfpJHK8bjisfnZJ5bY8aVWwTwCXgxPNgLAtmHL+Hs5q1ddLQ=="
|
"integrity": "sha512-SlgbPAq0eQ6JQ1h3l4MNeGH/t9DHKH8GGM0RD/6RhmJrNnSoWt3oIVaiQm9g9BPB+wAhRMeMqlUTbhbd7+Ufcg=="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fuzzysort": {
|
"fuzzysort": {
|
||||||
"version": "1.1.4",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-2.0.1.tgz",
|
||||||
"integrity": "sha512-JzK/lHjVZ6joAg3OnCjylwYXYVjRiwTY6Yb25LvfpJHK8bjisfnZJ5bY8aVWwTwCXgxPNgLAtmHL+Hs5q1ddLQ=="
|
"integrity": "sha512-SlgbPAq0eQ6JQ1h3l4MNeGH/t9DHKH8GGM0RD/6RhmJrNnSoWt3oIVaiQm9g9BPB+wAhRMeMqlUTbhbd7+Ufcg=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fuzzysort": "^1.1.4"
|
"fuzzysort": "^2.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user