From a65d0cfd31418af7dbc960f38d6b676607f281c1 Mon Sep 17 00:00:00 2001 From: argoneus Date: Sun, 17 May 2020 11:39:00 +0200 Subject: [PATCH 01/14] updated translation revision --- Js/Translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Js/Translations b/Js/Translations index 178ec9b..cf2e201 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 178ec9be36f504418d6aae0bb099d5006bd4186a +Subproject commit cf2e201e97c6c0bbf5117fb25f0b5a1630a0e612 From 86efedf43af7ae5a91d62a1a2e6969a159f4eafe Mon Sep 17 00:00:00 2001 From: argoneus Date: Sun, 24 May 2020 19:31:31 +0200 Subject: [PATCH 02/14] updated translations git --- Js/Translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Js/Translations b/Js/Translations index cf2e201..06a52db 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit cf2e201e97c6c0bbf5117fb25f0b5a1630a0e612 +Subproject commit 06a52db84c21ce7e584a493cc278bb6e29e940cc From d8928a381f7cfc89713a8818c033323df2ba054d Mon Sep 17 00:00:00 2001 From: argoneus Date: Fri, 31 Jul 2020 10:53:46 +0200 Subject: [PATCH 03/14] fixed player supporting global --- Js/Main.js | 4 ++-- Js/Translations | 2 +- Js/UtageParse.js | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Js/Main.js b/Js/Main.js index ccf8202..9c491ee 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -142,7 +142,7 @@ function buildQuestSelectList() { let tl_key = utage.questTranslations[cust][q.QuestMstId]; if (!tl_key) { console.log("Failed to build quest list: missing translations"); - return; + continue; } if (!tl_key.Enabled && !utage.quests[cust][q.QuestMstId].Scenes.some((s) => { return utage.sceneTranslations[cust][s].Enabled === true })) { continue; @@ -191,7 +191,7 @@ function buildSceneSelectList() { let tl_key = utage.sceneTranslations[cust][questSceneMstId]; if (!tl_key) { console.log("Failed to build scene list: missing translations"); - return; + continue; } if (!tl_key.Enabled) { continue; diff --git a/Js/Translations b/Js/Translations index 06a52db..4e3efff 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 06a52db84c21ce7e584a493cc278bb6e29e940cc +Subproject commit 4e3efff1afd08fc1022862c1d91b8aa0dd6636a1 diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 3efa61e..69387e7 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,9 @@ class UtageInfo { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { for (const s of this.quests[c][k].Scenes) { - this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; + if (c in this.sceneTranslationsInner[this.currentTranslation] && s in this.sceneTranslationsInner[this.currentTranslation][c]) { + this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; + } } } } From 59eb51d8a2452c3a22fe4ebf2c51866f02b42681 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 31 Jul 2020 10:32:42 -0400 Subject: [PATCH 04/14] make sure translation is supplied when propagating enables --- Js/UtageParse.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 69387e7..a33cde2 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,10 @@ class UtageInfo { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { for (const s of this.quests[c][k].Scenes) { - if (c in this.sceneTranslationsInner[this.currentTranslation] && s in this.sceneTranslationsInner[this.currentTranslation][c]) { + // only propagate if exists in translation file (THANKS GLOBAL) and translated name is supplied + if (c in this.sceneTranslationsInner[this.currentTranslation] + && s in this.sceneTranslationsInner[this.currentTranslation][c] + && this.sceneTranslationsInner[this.currentTranslation][c][s].Name != "") { this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; } } From 4c40e45a4f95fb6f02dd6c90969e86a8554b0233 Mon Sep 17 00:00:00 2001 From: argoneus Date: Mon, 10 Aug 2020 13:57:02 +0200 Subject: [PATCH 05/14] fixed some stories --- Js/Translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Js/Translations b/Js/Translations index 4e3efff..6bba82d 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 4e3efff1afd08fc1022862c1d91b8aa0dd6636a1 +Subproject commit 6bba82d4abc2bc143d43bf52c255d4e6173b099e From a9d48ce0587ded9445c37a7f06eb230cc4fc4b47 Mon Sep 17 00:00:00 2001 From: argoneus Date: Mon, 10 Aug 2020 14:15:27 +0200 Subject: [PATCH 06/14] updated translations --- Js/Translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Js/Translations b/Js/Translations index 6bba82d..bb6b874 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 6bba82d4abc2bc143d43bf52c255d4e6173b099e +Subproject commit bb6b8748a985ea6662300faaba12dcac2c8e0a45 From bdc076b6644e99441d5cf3040a3f6370a73e3b4d Mon Sep 17 00:00:00 2001 From: argoneus Date: Fri, 31 Jul 2020 10:53:46 +0200 Subject: [PATCH 07/14] fixed player supporting global --- Js/Main.js | 4 ++-- Js/Translations | 2 +- Js/UtageParse.js | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Js/Main.js b/Js/Main.js index ccf8202..9c491ee 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -142,7 +142,7 @@ function buildQuestSelectList() { let tl_key = utage.questTranslations[cust][q.QuestMstId]; if (!tl_key) { console.log("Failed to build quest list: missing translations"); - return; + continue; } if (!tl_key.Enabled && !utage.quests[cust][q.QuestMstId].Scenes.some((s) => { return utage.sceneTranslations[cust][s].Enabled === true })) { continue; @@ -191,7 +191,7 @@ function buildSceneSelectList() { let tl_key = utage.sceneTranslations[cust][questSceneMstId]; if (!tl_key) { console.log("Failed to build scene list: missing translations"); - return; + continue; } if (!tl_key.Enabled) { continue; diff --git a/Js/Translations b/Js/Translations index 178ec9b..ac0bfbd 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 178ec9be36f504418d6aae0bb099d5006bd4186a +Subproject commit ac0bfbd699431e9befdd843379e7c91ad1014cec diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 3efa61e..69387e7 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,9 @@ class UtageInfo { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { for (const s of this.quests[c][k].Scenes) { - this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; + if (c in this.sceneTranslationsInner[this.currentTranslation] && s in this.sceneTranslationsInner[this.currentTranslation][c]) { + this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; + } } } } From afd850fbcaa64f8a38f69a338a98645e79bb6940 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 31 Jul 2020 10:32:42 -0400 Subject: [PATCH 08/14] make sure translation is supplied when propagating enables --- Js/UtageParse.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 69387e7..a33cde2 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,10 @@ class UtageInfo { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { for (const s of this.quests[c][k].Scenes) { - if (c in this.sceneTranslationsInner[this.currentTranslation] && s in this.sceneTranslationsInner[this.currentTranslation][c]) { + // only propagate if exists in translation file (THANKS GLOBAL) and translated name is supplied + if (c in this.sceneTranslationsInner[this.currentTranslation] + && s in this.sceneTranslationsInner[this.currentTranslation][c] + && this.sceneTranslationsInner[this.currentTranslation][c][s].Name != "") { this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; } } From d6ac86ed8ca5e914dace44cb5760038d41f94b2a Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 11 Aug 2020 11:52:45 -0400 Subject: [PATCH 09/14] load name variants global stinx --- CHANGELOG.md | 6 +++++- Js/Main.js | 2 +- Js/Player.js | 21 ++++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f696757..d5b8181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,4 +43,8 @@ Fix MoveCamera macro ## V1.4.0 (2019-09-29) -Updated Pixi.js to v5 \ No newline at end of file +Updated Pixi.js to v5 + +## V1.5.0 (2020-07-31) + +XDU Global support diff --git a/Js/Main.js b/Js/Main.js index 9c491ee..0a8804e 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -11,7 +11,7 @@ const textFunc = new TextFunctions(); let audio = undefined; //Cant create a audio context without user input. const player = new Player(pixiApp, utage, textFunc, audio, shaders); const languages = ["eng", "jpn", "rus", "enm", "kor", "zho"]; -const version = "YameteTomete XDUPlayer V1.4.0"; +const version = "YameteTomete XDUPlayer V1.5.0"; let bodyLoaded = false; let utageLoaded = false; let languagesLoaded = false; diff --git a/Js/Player.js b/Js/Player.js index 99ab45e..5f9d29b 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -960,7 +960,12 @@ class Player { let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; text = commonFunctions.convertUtageTextTags(text); if(cur.Arg2 && cur.Arg2.toLowerCase() === "") { - this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1); + let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); + let nameHalfWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)}); + this.text.characterName(true, this.utage.charTranslations[cur.Arg1] + || this.utage.charTranslations[nameFullWidth] + || this.utage.charTranslations[nameHalfWidth] + || cur.Arg1); this.text.dialogText(true, commonFunctions.convertUtageTextTags(text)); } else { let found = false; @@ -975,7 +980,12 @@ class Player { if(cur.Character) { nameToUse = cur.Arg1; } - this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse); + let nameFullWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); + let nameHalfWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)}); + this.text.characterName(true, this.utage.charTranslations[nameToUse] + || this.utage.charTranslations[nameFullWidth] + || this.utage.charTranslations[nameHalfWidth] + || nameToUse); this.text.dialogText(true, text); //restoreTint is set from a colorTo command. //We want to maintain the tint change from colorTo during speaking still. @@ -1013,7 +1023,12 @@ class Player { } //If we didnt find the character just dump the text anyways with Arg1 as the name if(!found) { - this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1); + let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); + let nameHalfWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)}); + this.text.characterName(true, this.utage.charTranslations[cur.Arg1] + || this.utage.charTranslations[nameFullWidth] + || this.utage.charTranslations[nameHalfWidth] + || cur.Arg1); this.text.dialogText(true, text); } } From 1dc54f8590eaf8dc89a9d55b2b10c580a43c413b Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 12 Sep 2020 03:03:52 -0400 Subject: [PATCH 10/14] master branch tracks beta translations --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 1cfb4e8..98bd0e9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "Js/Translations"] path = Js/Translations url = https://git.poweris.moe/yttt-xdu/xdutranslations.git - branch = . + branch = beta [submodule "CustomData"] path = CustomData url = https://git.poweris.moe/yttt-xdu/customdata.git From 7b43a86b99ad043168f0e40f6c51f393fa800efc Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 12 Sep 2020 16:39:42 -0400 Subject: [PATCH 11/14] master tracks master we're just going to rebuild beta off the most recently pushed branch --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 98bd0e9..2ce17f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "Js/Translations"] path = Js/Translations url = https://git.poweris.moe/yttt-xdu/xdutranslations.git - branch = beta + branch = master [submodule "CustomData"] path = CustomData url = https://git.poweris.moe/yttt-xdu/customdata.git From 85f2815b6ab92787c5a116d4b5b848e5be562161 Mon Sep 17 00:00:00 2001 From: argoneus Date: Wed, 21 Oct 2020 23:54:33 +0200 Subject: [PATCH 12/14] added player support for new scene images --- Js/Main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Js/Main.js b/Js/Main.js index 0a8804e..495753a 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -285,6 +285,10 @@ function sceneDropDownChanged(event) { let name = scene.Name; let summary = scene.SummaryText; + let image = questSceneMstId; + if ("Image" in scene) { + image = scene.Image; + } let credits = ""; let tl_key = utage.sceneTranslations[cust][questSceneMstId]; @@ -307,8 +311,8 @@ function sceneDropDownChanged(event) { chapterSelect += `` } - let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${questSceneMstId}.png`; - let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${questSceneMstId}.png`; + let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${image}.png`; + let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${image}.png`; chapterSelect += ''; cont.innerHTML = `