mirror of
https://github.com/theBowja/GenshinData-1.git
synced 2025-04-28 18:18:13 +09:00
...........
This commit is contained in:
parent
b2fdcf4631
commit
5524329887
@ -3,13 +3,17 @@ const xpreview = getExcel('RewardPreviewExcelConfigData');
|
||||
const xdungeonentry = getExcel('DungeonEntryExcelConfigData'); // adventure handbook
|
||||
const xdisplay = getExcel('DisplayItemExcelConfigData');
|
||||
const xdisorder = getExcel('DungeonLevelEntityConfigData'); // ley line disorder
|
||||
const xcity = getExcel('CityConfigData');
|
||||
|
||||
// maps the domain type in DungeonEntryExcelConfigData to the ManualTextMapConfigData
|
||||
const mapDomainType = {
|
||||
DUNGEN_ENTRY_TYPE_RELIQUARY: "UI_ABYSSUS_RELIC",
|
||||
DUNGEN_ENTRY_TYPE_WEAPON_PROMOTE: "UI_ABYSSUS_WEAPON_PROMOTE",
|
||||
DUNGEN_ENTRY_TYPE_AVATAR_TALENT: "UI_ABYSSUS_AVATAR_PROUD"
|
||||
};
|
||||
// something inside ManualTextMapConfigData
|
||||
const domainType = {
|
||||
UI_ABYSSUS_RELIC: "UI_ABYSSUS_RELIC",
|
||||
UI_ABYSSUS_WEAPON_PROMOTE: "UI_ABYSSUS_WEAPON_PROMOTE",
|
||||
UI_ABYSSUS_AVATAR_PROUD: "UI_ABYSSUS_AVATAR_PROUD"
|
||||
}
|
||||
function getDomainTypeTextMapHash(domaintype) {
|
||||
return xmanualtext.find(ele => ele.TextMapId === domaintype).TextMapContentTextMapHash;
|
||||
}
|
||||
|
||||
/*
|
||||
"UI_DUNGEON_ENTRY_27", // "Valley of Remembrance"
|
||||
@ -77,20 +81,18 @@ function collateDomain(lang) {
|
||||
let mydomain = xdungeon.reduce((accum, obj) => {
|
||||
if(obj.Type !== "DUNGEON_DAILY_FIGHT" || obj.StateType !== "DUNGEON_STATE_RELEASE") return accum;
|
||||
if(isSundaySpecial(getLanguage('EN')[obj.NameTextMapHash])) return accum;
|
||||
|
||||
// console.log(obj.Id);
|
||||
let data = {};
|
||||
// data.Id = obj.Id;
|
||||
data.name = language[obj.NameTextMapHash];
|
||||
// data.displayname = language[obj.DisplayNameTextMapHash]; // doesn't exist for artifact domains
|
||||
data.domainentrance = language[getDomainEntranceTextMapHash(getLanguage('EN')[obj.NameTextMapHash])];// obj.EntryPicPath;
|
||||
|
||||
let entrance = xdungeonentry.find(entry => entry.PicPath === obj.EntryPicPath);
|
||||
// somehow domaintype works. otherwise just set it from rewardpreview material
|
||||
data.domaintype = language[xmanualtext.find(ele => ele.TextMapId === mapDomainType[entrance.Type]).TextMapContentTextMapHash];
|
||||
data.description = language[obj.DescTextMapHash];
|
||||
|
||||
data.region = language[xcity.find(city => city.CityId === obj.CityID).CityNameTextMapHash];
|
||||
|
||||
data.recommendedlevel = obj.ShowLevel;
|
||||
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);
|
||||
if(data.daysofweek.length === 0) delete data.daysofweek;
|
||||
|
||||
@ -101,13 +103,19 @@ function collateDomain(lang) {
|
||||
if(mat) { // is material
|
||||
let reward = { name: language[mat.NameTextMapHash] };
|
||||
if(mat.MaterialType !== 'MATERIAL_AVATAR_MATERIAL') reward.count = parseInt(repre.Count);
|
||||
if((getLanguage('EN')[mat.TypeDescTextMapHash]).includes('Weapon')) {
|
||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_WEAPON_PROMOTE)];
|
||||
} else {
|
||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_AVATAR_PROUD)];
|
||||
}
|
||||
return reward;
|
||||
} else { // is artifact
|
||||
let disp = xdisplay.find(d => d.Id === repre.Id);
|
||||
data.domaintype = language[getDomainTypeTextMapHash(domainType.UI_ABYSSUS_RELIC)];
|
||||
return { name: language[disp.NameTextMapHash], rarity: disp.RankLevel+'' };
|
||||
}
|
||||
});
|
||||
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]);
|
||||
|
||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
||||
if(filename === '') return accum;
|
||||
|
@ -17,11 +17,15 @@ function collateTalent(lang) {
|
||||
if(depot === undefined || depot.EnergySkill === undefined) return; // not a finished (traveler) character
|
||||
if(depot.TalentStarName === '') return; // unfinished
|
||||
|
||||
let filename = avatarIdToFileName[isPlayer(obj) ? obj.SkillDepotId : obj.Id];
|
||||
|
||||
data.name = language[obj.NameTextMapHash]; // client-facing name
|
||||
if(isPlayer(obj)) data.name += ` (${language[elementTextMapHash[getPlayerElement(obj.SkillDepotId)]]})`
|
||||
|
||||
let combat = depot.Skills.concat([depot.EnergySkill]) // get array of combat skills IDs
|
||||
let passive = depot.InherentProudSkillOpens.reduce((accum2, proud) => { // get array of passive skill IDs
|
||||
// console.log(depot.InherentProudSkillOpens)
|
||||
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(proud.ProudSkillGroupId) accum2.push(proud.ProudSkillGroupId);
|
||||
return accum2;
|
||||
}, [])
|
||||
@ -85,7 +89,7 @@ function collateTalent(lang) {
|
||||
data.costs = costs;
|
||||
data.parameters = parameters;
|
||||
|
||||
accum[avatarIdToFileName[isPlayer(obj) ? obj.SkillDepotId : obj.Id]] = data;
|
||||
accum[filename] = data;
|
||||
}
|
||||
|
||||
if(isPlayer(obj)) {
|
||||
|
@ -17,6 +17,8 @@ function collateWeapon(lang) {
|
||||
let myweapon = xplayableWeapon.reduce((accum, obj) => {
|
||||
|
||||
let data = {};
|
||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
||||
if(accum[filename] !== undefined) console.log(filename+' IS NOT UNIQUE');
|
||||
|
||||
data.name = language[obj.NameTextMapHash];
|
||||
data.description = language[obj.DescTextMapHash];
|
||||
@ -40,6 +42,11 @@ function collateWeapon(lang) {
|
||||
if(ref === undefined) break;
|
||||
if(offset === 0) data.effectname = language[ref.NameTextMapHash];
|
||||
let effect = language[ref.DescTextMapHash];
|
||||
if(filename === 'swordofdescension') { // has extra color
|
||||
effect = effect.replace(/<color=#.*?>/i, '').replace(/<\/color>/i, '');
|
||||
effect = effect.replace(/<color=#.*?>/i, '').replace(/<\/color>/i, '');
|
||||
}
|
||||
|
||||
effect = effect.replace(/<color=#.*?>/gi, '{').replace(/<\/color>/gi, '}');
|
||||
effect = effect.split(/{|}/);
|
||||
data['r'+(offset+1)] = [];
|
||||
@ -102,8 +109,7 @@ function collateWeapon(lang) {
|
||||
data.icon = obj.Icon;
|
||||
data.awakenicon = obj.AwakenIcon;
|
||||
|
||||
let filename = makeFileName(getLanguage('EN')[obj.NameTextMapHash]);
|
||||
if(accum[filename] !== undefined) console.log(filename+' IS NOT UNIQUE');
|
||||
|
||||
accum[filename] = data;
|
||||
return accum;
|
||||
}, {});
|
||||
|
@ -107,8 +107,8 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
||||
// exportCurve('weapons', 'WeaponCurveExcelConfigData')
|
||||
// exportData('artifacts', require('./collateArtifact.js'));
|
||||
// exportData('foods', require('./collateFood'));
|
||||
// exportData('materials', require('./collateMaterial'));
|
||||
exportData('domains', require('./collateDomain'));
|
||||
// exportData('materials', require('./collateMaterial')); // run twice
|
||||
exportData('domains', require('./collateDomain')); // run twice // remember to add back recommendedelements and disorder
|
||||
|
||||
|
||||
//console.log(collateCharacter('EN'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user