mirror of
https://github.com/theBowja/GenshinData-1.git
synced 2025-04-28 18:18:13 +09:00
change
This commit is contained in:
parent
249204318f
commit
09c2ec858c
@ -5,7 +5,12 @@ const xdescribe = getExcel('AnimalDescribeExcelConfigData');
|
||||
const xcapture = getExcel('CaptureExcelConfigData');
|
||||
|
||||
// FIX THIS EVERY VERSION
|
||||
const propCOUNTTYPE = "FEBIEOGMDMF"; // AnimalCodexExcelConfigData
|
||||
let propCOUNTTYPE = "FEBIEOGMDMF"; // AnimalCodexExcelConfigData
|
||||
|
||||
// find property names
|
||||
for([key, value] of Object.entries(xcodex[0])) {
|
||||
if(value === "CODEX_COUNT_TYPE_KILL") propCOUNTTYPE = key;
|
||||
}
|
||||
|
||||
function collateAnimal(lang) {
|
||||
const language = getLanguage(lang);
|
||||
|
@ -14,6 +14,7 @@ const associationToCityId = {
|
||||
'INAZUMA': 3,
|
||||
'MAINACTOR': '',
|
||||
'RANGER': '',
|
||||
'SUMERU': 4,
|
||||
}
|
||||
|
||||
function collateCharacter(lang) {
|
||||
|
57
myscripts/collateCraft.js
Normal file
57
myscripts/collateCraft.js
Normal file
@ -0,0 +1,57 @@
|
||||
const xmat = getExcel('MaterialExcelConfigData');
|
||||
const xsource = getExcel('MaterialSourceDataExcelConfigData');
|
||||
const xcombine = getExcel('CombineExcelConfigData');
|
||||
|
||||
function collateCraft(lang) {
|
||||
const language = getLanguage(lang);
|
||||
|
||||
const sortordermap = {};
|
||||
|
||||
let mycraft = xcombine.reduce((accum, obj) => {
|
||||
if (obj.recipeType === "RECIPE_TYPE_CONVERT") return accum; // skip convert recipes
|
||||
|
||||
let data = {};
|
||||
data.id = obj.combineId;
|
||||
|
||||
const mat = xmat.find(ele => ele.id === obj.resultItemId);
|
||||
|
||||
data.name = language[mat.nameTextMapHash];
|
||||
data.sortorder = getUniqueSortOrder(obj.subCombineType, obj.resultItemId, sortordermap);
|
||||
data.filter = language[obj.effectDescTextMapHash];
|
||||
|
||||
data.unlockrank = obj.playerLevel;
|
||||
data.resultcount = obj.resultItemCount;
|
||||
|
||||
data.moracost = obj.scoinCost;
|
||||
data.recipe = [];
|
||||
for (let matitem of obj.materialItems) {
|
||||
if (!matitem.id) continue;
|
||||
const item = xmat.find(ele => ele.id === matitem.id);
|
||||
data.recipe.push({ name: language[item.nameTextMapHash], count: matitem.count })
|
||||
}
|
||||
|
||||
let filename = makeFileName(getLanguage('EN')[mat.nameTextMapHash]);
|
||||
if(filename === '') return accum;
|
||||
if(accum[filename] !== undefined) {
|
||||
if (accum[filename].altrecipes === undefined) accum[filename].altrecipes = [];
|
||||
accum[filename].altrecipes.push(data.recipe);
|
||||
} else {
|
||||
accum[filename] = data;
|
||||
}
|
||||
return accum;
|
||||
}, {});
|
||||
|
||||
return mycraft;
|
||||
}
|
||||
|
||||
function getUniqueSortOrder(subCombineType, resultItemId, sortordermap) {
|
||||
let sortorder = subCombineType;
|
||||
while (sortordermap[sortorder]) {
|
||||
if (sortordermap[sortorder] > resultItemId) sortorder++;
|
||||
else sortorder--;
|
||||
}
|
||||
sortordermap[sortorder] = resultItemId;
|
||||
return sortorder;
|
||||
}
|
||||
|
||||
module.exports = collateCraft;
|
@ -32,6 +32,9 @@ function getDomainTypeTextMapHash(domaintype) {
|
||||
"UI_DUNGEON_ENTRY_368", // "Court of Flowing Sand"
|
||||
"UI_DUNGEON_ENTRY_433", // "Slumbering Court"
|
||||
"UI_DUNGEON_ENTRY_516", // "The Lost Valley"
|
||||
"UI_DUNGEON_ENTRY_505", // "Steeple of Ignorance"
|
||||
"UI_DUNGEON_ENTRY_507", // "Spire of Solitary Enlightenment"
|
||||
"UI_DUNGEON_ENTRY_509", // "Tower of Abject Pride"
|
||||
*/
|
||||
function getDomainEntranceTextMapHash(englishname) {
|
||||
englishname = englishname.toLowerCase();
|
||||
@ -69,6 +72,12 @@ function getDomainEntranceTextMapHash(englishname) {
|
||||
return mapping("UI_DUNGEON_ENTRY_433");
|
||||
else if(englishname.includes('machine nest'))
|
||||
return mapping("UI_DUNGEON_ENTRY_516");
|
||||
else if(englishname.includes('seven sense'))
|
||||
return mapping("UI_DUNGEON_ENTRY_507");
|
||||
else if(englishname.includes('full moon') || englishname.includes('witticism') || englishname.includes('basket of'))
|
||||
return mapping("UI_DUNGEON_ENTRY_505");
|
||||
else if(englishname.includes('tainted cloud') || englishname.includes('leading karma') || englishname.includes('obsession'))
|
||||
return mapping("UI_DUNGEON_ENTRY_509");
|
||||
else
|
||||
console.log('no domain entrance mapping found for '+englishname);
|
||||
}
|
||||
|
@ -58,6 +58,11 @@ const monsterMap = {
|
||||
"bless machine nest iii": ['ru scout', 'ru cruiser', 'ru destroy'],
|
||||
"bless machine nest iv": ['ru grader', 'ru cruiser', 'ru destroy'],
|
||||
|
||||
"bless seven sense i": ['ere sunfrost', 'ere cross', 'ere sword', 'ere halberd'],
|
||||
"bless seven sense ii": ['ere daythun', 'ere clear', 'ere cross', 'ere sword', 'ere vanguard'],
|
||||
"bless seven sense iii": ['ere daythun', 'ere clear', 'ere sunfrost', 'ere cross', 'ere lineb', 'ere halberd'],
|
||||
"bless seven sense iv": ['ere daythun', 'ere clear', 'ere sunfrost'],
|
||||
|
||||
"forge alt sand i": ['hy slime', 'la hy slime', 'py slime', 'la py slime'],
|
||||
"forge alt sand ii": ['la hy slime', 'la py slime'],
|
||||
"forge alt sand iii": ['la hy slime', 'la py slime', 'hy ab mage', 'py ab mage'],
|
||||
@ -103,6 +108,21 @@ const monsterMap = {
|
||||
"forge trial thunder iii": ['la el slime', 'mu el slime', 'fa el ci mage'],
|
||||
"forge trial thunder iv": ['la el slime', 'mu el slime', 'fa el ci mage'],
|
||||
|
||||
"forge tainted clouds i": ['pyro fungus', 'dendro fungus', 'hydro fungus', 'electro fungus'],
|
||||
"forge tainted clouds ii": ['cryo fungus', 'pyro fungus', 'geo fungus', 'dendro fungus', 'electro fungus'],
|
||||
"forge tainted clouds iii": ['pyro fungus', 'cryo fungus', 'geo fungus', 'electro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
"forge tainted clouds iv": ['hydro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
|
||||
"forge obsession i": ['pyro fungus', 'dendro fungus', 'hydro fungus', 'electro fungus'],
|
||||
"forge obsession ii": ['cryo fungus', 'pyro fungus', 'geo fungus', 'dendro fungus', 'electro fungus'],
|
||||
"forge obsession iii": ['pyro fungus', 'cryo fungus', 'geo fungus', 'electro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
"forge obsession iv": ['hydro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
|
||||
"forge lead karma i": ['pyro fungus', 'dendro fungus', 'hydro fungus', 'electro fungus'],
|
||||
"forge lead karma ii": ['cryo fungus', 'pyro fungus', 'geo fungus', 'dendro fungus', 'electro fungus'],
|
||||
"forge lead karma iii": ['pyro fungus', 'cryo fungus', 'geo fungus', 'electro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
"forge lead karma iv": ['hydro fungus', 'dendro fungus', 'hydroshroom', 'dendroshroom'],
|
||||
|
||||
"maste alt flame i": ['py slime', 'la py slime', 'py ab mage'],
|
||||
"maste alt flame ii": ['py slime', 'la py slime', 'py ab mage'],
|
||||
"maste alt flame iii": ['la py slime', 'py ab mage'],
|
||||
@ -147,6 +167,21 @@ const monsterMap = {
|
||||
"maste vine ruin ii": ['nobu jintou', 'nobu hitsuke', 'nobu kikou', 'th pyro pot', 'th elec pot'],
|
||||
"maste vine ruin iii": ['nobu hitsuke', 'nobu kikou', 'th pyro pot', 'th el pot', 'kairagi fiery'],
|
||||
"maste vine ruin iv": ['th cryo pot', 'kairagi thunder', 'kairagi fiery'],
|
||||
|
||||
"maste full moon i": ['ruin guard', 'ruin earthguard'],
|
||||
"maste full moon ii": ['ruin earthguard', 'ruin destroy', 'ruin scout'],
|
||||
"maste full moon iii": ['ruin earthguard', 'ruin skywatch'],
|
||||
"maste full moon iv": ['ruin earthguard', 'ruin skywatch'],
|
||||
|
||||
"maste witticism i": ['ruin guard', 'ruin earthguard'],
|
||||
"maste witticism ii": ['ruin earthguard', 'ruin destroy', 'ruin scout'],
|
||||
"maste witticism iii": ['ruin earthguard', 'ruin skywatch'],
|
||||
"maste witticism iv": ['ruin earthguard', 'ruin skywatch'],
|
||||
|
||||
"maste basket of i": ['ruin guard', 'ruin earthguard'],
|
||||
"maste basket of ii": ['ruin earthguard', 'ruin destroy', 'ruin scout'],
|
||||
"maste basket of iii": ['ruin earthguard', 'ruin skywatch'],
|
||||
"maste basket of iv": ['ruin earthguard', 'ruin skywatch'],
|
||||
}
|
||||
|
||||
function autocomplete(input, dict) {
|
||||
|
@ -86,8 +86,8 @@ function collateMaterial(lang) {
|
||||
if(dungeonlist > 0) {
|
||||
if(dungeonlist.length > 1) console.log(`${data.name} drops from more than one dungeon!`);
|
||||
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.daysofweek = getDayWeekList(dungeonlist[0], language);
|
||||
data.dropdomain = language[xdungeon.find(ele => ele.id === dungeonlist[0]).displayNameTextMapHash]; // artifact domains don't have DisplayNameTextMapHash
|
||||
data.daysofweek = getDayWeekList(dungeonlist[0], language);
|
||||
}
|
||||
}
|
||||
// get fishing locations
|
||||
@ -131,7 +131,7 @@ function getDayWeekList(dungeonId, langmap) {
|
||||
let mylist = [];
|
||||
for(const ele of xdailyd)
|
||||
for(const [key, value] of Object.entries(mapENtoNum))
|
||||
if(ele[key].includes(dungeonId)) mylist.push(value);
|
||||
if(ele[key.toLowerCase()].includes(dungeonId)) mylist.push(value);
|
||||
mylist = mylist.sort((a, b) => a - b);
|
||||
return mylist.map(ele => langmap[dayOfWeek(ele)]);
|
||||
}
|
||||
|
@ -10,6 +10,13 @@ const propertyMap = {
|
||||
iconName: 'MKPEEANCLCO' // UI_AvatarIcon_QinCostumeSea
|
||||
}
|
||||
|
||||
// find property names
|
||||
for([key, value] of Object.entries(xcostume[0])) {
|
||||
if(value === 200301) propertyMap.id = key;
|
||||
else if(value === 10000003) propertyMap.avatarId = key;
|
||||
else if(value === "UI_AvatarIcon_QinCostumeSea") propertyMap.iconName = key;
|
||||
}
|
||||
|
||||
// taken from collateCharacter.js
|
||||
const playerIdToTextMapHash = { 10000005: 2329553598, 10000007: 3241049361 };
|
||||
|
||||
|
@ -137,26 +137,27 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
||||
// exportData('characters', require('./collateCharacter.js'));
|
||||
// exportCurve('characters', 'AvatarCurveExcelConfigData');
|
||||
// exportData('constellations', require('./collateConstellation'));
|
||||
exportData('talents', require('./collateTalent.js'));
|
||||
// exportData('talents', require('./collateTalent.js'));
|
||||
// exportData('weapons', require('./collateWeapon.js'));
|
||||
// exportCurve('weapons', 'WeaponCurveExcelConfigData')
|
||||
// exportData('artifacts', require('./collateArtifact.js'));
|
||||
// exportData('foods', require('./collateFood'));
|
||||
// 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('materials', require('./collateMaterial')); // change: used both TextList/JumpList.
|
||||
// exportData('domains', require('./collateDomain')); // run twice
|
||||
// exportData('enemies', require('./collateEnemy'));
|
||||
// exportCurve('enemies', 'MonsterCurveExcelConfigData');
|
||||
|
||||
// exportData('domains', require('./collateDomainMonsterList')); // MUST do run only after both domains and enemies have run. sync.
|
||||
|
||||
// exportData('outfits', require('./collateOutfit')); // Fix obfuscated keys after every version update
|
||||
// exportData('outfits', require('./collateOutfit'));
|
||||
// exportData('windgliders', require('./collateWindGlider'));
|
||||
// exportData('animals', require('./collateAnimal')); // Fix obfuscated keys after every version update
|
||||
// exportData('animals', require('./collateAnimal'));
|
||||
// exportData('namecards', require('./collateNamecard'));
|
||||
// exportData('geographies', require('./collateGeography'));
|
||||
// exportData('achievements', require('./collateAchievement'));
|
||||
// exportData('achievementgroups', require('./collateAchievementGroup'));
|
||||
// exportData('adventureranks', require('./collateAdventureRank'));
|
||||
exportData('crafts', require('./collateCraft'));
|
||||
|
||||
// exportData('commissions', require('./collateCommission'), true); // unfinished
|
||||
// exportData('voiceovers', require('./collateVoiceover'), true); // unfinished
|
||||
|
Loading…
x
Reference in New Issue
Block a user