mirror of
https://github.com/theBowja/GenshinData-1.git
synced 2025-04-29 02:28:36 +09:00
add translated region for characters
This commit is contained in:
parent
a6df2b6178
commit
a17e4c8996
@ -5,7 +5,16 @@ const xextrainfo = getExcel('FetterInfoExcelConfigData');
|
||||
const playerIdToTextMapHash = { 10000005: 2329553598, 10000007: 3241049361 };
|
||||
const moraNameTextMapHash = getExcel('MaterialExcelConfigData').find(ele => ele.Id === 202).NameTextMapHash;
|
||||
const xmat = getExcel('MaterialExcelConfigData');
|
||||
const xcity = getExcel('CityConfigData');
|
||||
|
||||
const associationToCityId = {
|
||||
'LIYUE': 2,
|
||||
'MONDSTADT': 1,
|
||||
'FATUI': 8758412,
|
||||
'INAZUMA': 3,
|
||||
'MAINACTOR': '',
|
||||
'RANGER': '',
|
||||
}
|
||||
|
||||
function collateCharacter(lang) {
|
||||
const language = getLanguage(lang);
|
||||
@ -46,6 +55,13 @@ function collateCharacter(lang) {
|
||||
if(obj.Id === 10000030) data.constellation = language[extra.AvatarConstellationAfterTextMapHash]; // Zhongli exception
|
||||
data.title = language[extra.AvatarTitleTextMapHash];
|
||||
data.association = extra.AvatarAssocType.slice(extra.AvatarAssocType.indexOf('TYPE_')+5);
|
||||
if(associationToCityId[data.association] === undefined)
|
||||
console.log(`character missing cityId for association ${data.association}`);
|
||||
else if(associationToCityId[data.association] === '')
|
||||
data.region = '';
|
||||
else {
|
||||
data.region = language[xcity.find(ele => ele.CityId === associationToCityId[data.association]).CityNameTextMapHash];
|
||||
}
|
||||
data.cv = {
|
||||
english: language[extra.CvEnglishTextMapHash],
|
||||
chinese: language[extra.CvChineseTextMapHash],
|
||||
|
@ -127,7 +127,7 @@ function collateDomain(lang) {
|
||||
return { name: language[disp.NameTextMapHash], rarity: disp.RankLevel+'' };
|
||||
}
|
||||
});
|
||||
if(obj.disorderoverride) data.disorder = language[obj.disorderoverride];
|
||||
if(obj.disorderoverride) data.disorder = obj.disorderoverride.map(d => language[d]);
|
||||
//data.disorder = xdisorder.filter(d => d.Id+'' === Object.keys(obj.LevelConfigMap)[0]).map(d => language[d.DescTextMapHash]);
|
||||
data.imagename = obj.EntryPicPath;
|
||||
|
||||
@ -180,7 +180,7 @@ let moredungeons = [
|
||||
LimitLevel: 30,
|
||||
PassRewardPreviewID: 22443,
|
||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||
disorderoverride: 4145618250
|
||||
disorderoverride: [4145618250]
|
||||
},
|
||||
{ // machine nest 2
|
||||
Id: 99992,
|
||||
@ -194,7 +194,7 @@ let moredungeons = [
|
||||
LimitLevel: 35,
|
||||
PassRewardPreviewID: 22444,
|
||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||
disorderoverride: 4145618250
|
||||
disorderoverride: [4145618250]
|
||||
},
|
||||
{ // machine nest 3
|
||||
Id: 99993,
|
||||
@ -208,7 +208,7 @@ let moredungeons = [
|
||||
LimitLevel: 40,
|
||||
PassRewardPreviewID: 22445,
|
||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||
disorderoverride: 4145618250
|
||||
disorderoverride: [4145618250]
|
||||
},
|
||||
{ // machine nest 4
|
||||
Id: 99994,
|
||||
@ -222,6 +222,6 @@ let moredungeons = [
|
||||
LimitLevel: 45,
|
||||
PassRewardPreviewID: 22446,
|
||||
EntryPicPath: 'UI_DungeonPic_CycleDungeonChasm',
|
||||
disorderoverride: 4145618250
|
||||
disorderoverride: [4145618250]
|
||||
},
|
||||
];
|
@ -70,6 +70,26 @@ global.dayOfWeek = function(num) {
|
||||
return xmanualtext.find(ele => ele.TextMapId === 'UI_ABYSSUS_DATE'+num).TextMapContentTextMapHash;
|
||||
}
|
||||
|
||||
const xcity = getExcel('CityConfigData');
|
||||
// adds Snezhnaya manually
|
||||
if(!xcity.find(ele => getLanguage('EN')[ele.CityNameTextMapHash] === 'Snezhnaya')) {
|
||||
getLanguage('CHS')['Snezhnaya'] = '至冬国';
|
||||
getLanguage('CHT')['Snezhnaya'] = '至冬國';
|
||||
getLanguage('DE')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('EN')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('ES')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('FR')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('ID')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('JP')['Snezhnaya'] = 'スネージナヤ';
|
||||
getLanguage('KR')['Snezhnaya'] = '스네즈나야';
|
||||
getLanguage('PT')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('RU')['Snezhnaya'] = 'Снежной';
|
||||
getLanguage('TH')['Snezhnaya'] = 'Snezhnaya';
|
||||
getLanguage('VI')['Snezhnaya'] = 'Snezhnaya';
|
||||
|
||||
xcity.push({ CityId: 8758412, CityNameTextMapHash: 'Snezhnaya'})
|
||||
}
|
||||
|
||||
/* =========================================================================================== */
|
||||
|
||||
function exportCurve(folder, file) {
|
||||
@ -100,7 +120,7 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
||||
console.log("done "+folder);
|
||||
}
|
||||
|
||||
// exportData('characters', require('./collateCharacter.js'));
|
||||
exportData('characters', require('./collateCharacter.js'));
|
||||
// exportCurve('characters', 'AvatarCurveExcelConfigData');
|
||||
// exportData('constellations', require('./collateConstellation'));
|
||||
// exportData('talents', require('./collateTalent.js'));
|
||||
@ -109,11 +129,11 @@ function exportData(folder, collateFunc, englishonly, skipwrite) {
|
||||
// exportData('artifacts', require('./collateArtifact.js'));
|
||||
// exportData('foods', require('./collateFood'));
|
||||
// exportData('materials', require('./collateMaterial'), false); // 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);
|
||||
// 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('windgliders', require('./collateWindGlider'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user