Custom mission support.

Some fixes.
Different Scene Titles are slightly easier to support.
Started adding new effects for bridal gears.
This commit is contained in:
fire bingo 2018-06-04 09:07:53 -07:00
parent d086fc2f71
commit c07d281948
7 changed files with 84 additions and 34 deletions

View File

@ -64,7 +64,7 @@ body { margin: 0; }
#parent-container { display: flex; flex-direction: column; align-items: center; } #parent-container { display: flex; flex-direction: column; align-items: center; }
#text-container { position: absolute; margin: auto; height: 750px; width: 1334px; font-family: 'FOT-RodinNTLGPro'; } #text-container { color: white; position: absolute; margin: auto; height: 750px; width: 1334px; font-family: 'FOT-RodinNTLGPro'; }
#text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; } #text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; }
@ -74,7 +74,7 @@ body { margin: 0; }
#text-container #main-ui-img { width: 100%; height:100%; transition: opacity 0.1s; } #text-container #main-ui-img { width: 100%; height:100%; transition: opacity 0.1s; }
#dialog-box { color: white; font-weight: bold; text-shadow: 1px 1px 6px black; transition: opacity 0.1s; } #dialog-box { font-weight: bold; text-shadow: 1px 1px 6px black; transition: opacity 0.1s; }
#dialog-box #character { position: absolute; left: 70px; font-size: 30px; cursor: default; user-select: none; } #dialog-box #character { position: absolute; left: 70px; font-size: 30px; cursor: default; user-select: none; }

View File

@ -26,7 +26,7 @@ let screenSizeTimeout = undefined;
let isMuted = false; let isMuted = false;
let volume = 0.5; let volume = 0.5;
let prevMission = '{Select}'; let prevMission = '{Select}';
const availableMstIds = [202070, 202013]; const availableMstIds = [202070, 202013, 338003];
function onBodyLoaded() { function onBodyLoaded() {
bodyLoaded = true; bodyLoaded = true;

View File

@ -159,31 +159,42 @@ class Player {
} }
break; break;
} }
case "somethingnew_appearance01":
case "unhappyseed_appearance01":
case "unhappyseed_appearance02":
case "arcanoise_appearance02": case "arcanoise_appearance02":
case "arcanoise_appearance03": { case "arcanoise_appearance03": {
let Pat = this.defaultCharPattern; let pat = this.defaultCharPattern;
if(c.Arg1) { if(c.Arg1) {
if(this.utage.characterInfo[c.Arg1] && this.utage.characterInfo[c.Arg1][Pat]) { if(this.utage.characterInfo[c.Arg1] && this.utage.characterInfo[c.Arg1][pat]) {
if(!this.loader.resources[`char|${c.Arg1}|${Pat}`]) { if(!this.loader.resources[`char|${c.Arg1}|${pat}`]) {
this.loader.add(`char|${c.Arg1}|${Pat}`, this.utage.characterInfo[c.Arg1][Pat].FileName); this.loader.add(`char|${c.Arg1}|${pat}`, this.utage.characterInfo[c.Arg1][pat].FileName);
} }
} }
} }
if(c.Arg2) { if(c.Arg2) {
if(this.utage.characterInfo[c.Arg2] && this.utage.characterInfo[c.Arg2][Pat]) { if(this.utage.characterInfo[c.Arg2] && this.utage.characterInfo[c.Arg2][pat]) {
if(!this.loader.resources[`char|${c.Arg2}|${Pat}`]) { if(!this.loader.resources[`char|${c.Arg2}|${pat}`]) {
this.loader.add(`char|${c.Arg2}|${Pat}`, this.utage.characterInfo[c.Arg2][Pat].FileName); this.loader.add(`char|${c.Arg2}|${pat}`, this.utage.characterInfo[c.Arg2][pat].FileName);
} }
} }
} }
if(c.Arg3) { if(c.Arg3) {
if(this.utage.characterInfo[c.Arg3] && this.utage.characterInfo[c.Arg3][Pat]) { if(this.utage.characterInfo[c.Arg3] && this.utage.characterInfo[c.Arg3][pat]) {
if(!this.loader.resources[`char|${c.Arg3}|${Pat}`]) { if(!this.loader.resources[`char|${c.Arg3}|${pat}`]) {
this.loader.add(`char|${c.Arg3}|${Pat}`, this.utage.characterInfo[c.Arg3][Pat].FileName); this.loader.add(`char|${c.Arg3}|${pat}`, this.utage.characterInfo[c.Arg3][pat].FileName);
} }
} }
} }
break;
} }
case "scenetitle01":
//this isint in the texture file.
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/bg_title.jpg`);
break;
case "scenetitle13":
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/event0010.png`);
break;
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -202,8 +213,6 @@ class Player {
}); });
//Manually load white bg for fading. Can be tinted to change color. //Manually load white bg for fading. Can be tinted to change color.
this.loader.add('bg|whiteFade', `${this.utage.rootDirectory}Images/white.png`); this.loader.add('bg|whiteFade', `${this.utage.rootDirectory}Images/white.png`);
//this isint in the texture file.
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/bg_title.jpg`)
this.loader this.loader
.on("progress", (loader, resource) => { .on("progress", (loader, resource) => {
this.onPixiProgress(loader, resource); this.onPixiProgress(loader, resource);
@ -430,8 +439,11 @@ class Player {
if(cur.Arg2 === 'Off>') { if(cur.Arg2 === 'Off>') {
cur.Arg2 = '<off>'; cur.Arg2 = '<off>';
} }
if ((cur.Command || "").toLowerCase().includes('scenetitle')) {
cur.Command = 'scenetitle';
}
switch((cur.Command || "").toLowerCase()) { switch((cur.Command || "").toLowerCase()) {
case "scenetitle01": { case "scenetitle": {
this.waitTime = this.titleWaitTime * 1000; this.waitTime = this.titleWaitTime * 1000;
try { try {
let container = this.layers[this.bgLayerName].container; let container = this.layers[this.bgLayerName].container;
@ -447,9 +459,6 @@ class Player {
let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text; let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text;
this.text.titleText(true, text); this.text.titleText(true, text);
break; break;
}
case "scenetitle13": {
} }
case "divaeffect": { case "divaeffect": {
this.waitTime = Number(cur.Arg5) * 1000; this.waitTime = Number(cur.Arg5) * 1000;
@ -610,8 +619,12 @@ class Player {
break; break;
} }
case "characteroff": { case "characteroff": {
if(cur.Text) {
checkPutText(cur);
} else {
this.text.dialogText(false, ""); this.text.dialogText(false, "");
this.text.characterName(false, ""); this.text.characterName(false, "");
}
for(let c of Object.keys(this.currentCharacters)) { for(let c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; } if(!this.currentCharacters[c]) { continue; }
let curChar = this.currentCharacters[c]; let curChar = this.currentCharacters[c];
@ -623,6 +636,7 @@ class Player {
break; break;
} }
} }
break;
} }
case "tween": case "tween":
this.processTween(delta, cur); this.processTween(delta, cur);
@ -683,6 +697,12 @@ class Player {
break; break;
case "skillmovie": //103500341 case "skillmovie": //103500341
break; break;
case "unhappyseed_appearance01": { //312000112
let customCommand = { Command: "", Arg1: cur.Arg1, Arg2: this.defaultCharPattern, Arg3: 'キャラ中央', Arg6: .5 };
this.checkPutCharacterScreen(customCommand, false);
break;
}
case "unhappyseed_appearance02": //312000111
case "arcanoise_appearance02": { //103500341 case "arcanoise_appearance02": { //103500341
if(cur.Arg1 && cur.Arg2) { if(cur.Arg1 && cur.Arg2) {
this.waitTime = 1000; this.waitTime = 1000;
@ -754,10 +774,6 @@ class Player {
break; break;
case "somethingnew_appearance01": //312000111 case "somethingnew_appearance01": //312000111
break; break;
case "unhappyseed_appearance01"://312000112
break;
case "unhappyseed_appearance02": //312000111
break;
case "continue01": case "continue01":
break; break;
} }
@ -1188,11 +1204,11 @@ class Player {
processEndCommand(delta) { processEndCommand(delta) {
let cur = this.currentCommand; let cur = this.currentCommand;
switch(cur.Command) { switch((cur.Command || "").toLowerCase()) {
case "SceneTitle01": case "scenetitle":
this.text.titleText(false, ''); this.text.titleText(false, '');
break; break;
case "DivaEffect": case "divaeffect":
this.text.divaText(false, ''); this.text.divaText(false, '');
break; break;
} }

@ -1 +1 @@
Subproject commit 1f88521db3728137541cde68c0389562cb390fc6 Subproject commit 5687378f81f332e32668763f04335f3883f35e4e

View File

@ -32,10 +32,11 @@ class UtageInfo {
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`), commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/XduMissionsCustom.json`),
]; ];
Promise.all(promises) Promise.all(promises)
.then((success) => { .then((success) => {
this.groupMissions(success[0]); this.groupMissions(success[0], success[8]);
this.missionsList = Object.keys(this.groupedMissions).map((k) => { this.missionsList = Object.keys(this.groupedMissions).map((k) => {
return {Name: this.groupedMissions[k].Name, MstId: this.groupedMissions[k].MstId}; return {Name: this.groupedMissions[k].Name, MstId: this.groupedMissions[k].MstId};
}); });
@ -81,7 +82,7 @@ class UtageInfo {
} }
groupMissions(missions) { groupMissions(missions, customMissions) {
for(let key of Object.keys(missions)) { for(let key of Object.keys(missions)) {
let mis = missions[key]; let mis = missions[key];
if(!this.groupedMissions[mis.MstId]) { if(!this.groupedMissions[mis.MstId]) {
@ -96,6 +97,20 @@ class UtageInfo {
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path }; this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path };
} }
} }
for(let key of Object.keys(customMissions)) {
let mis = customMissions[key];
if(!this.groupedMissions[mis.MstId]) {
this.groupedMissions[mis.MstId] = {
Name: mis.Name,
SummaryText: mis.SummaryText,
MstId: mis.MstId,
Missions: {}
}
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path };
} else {
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path };
}
}
} }
get translations() { get translations() {
@ -167,9 +182,16 @@ class UtageInfo {
if(this.missionTranslationsInner[this.currentTranslation]) { if(this.missionTranslationsInner[this.currentTranslation]) {
resolve(); resolve();
} else { } else {
commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNames_${this.currentTranslation}.json`) var promises = [
commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNamesCustom_${this.currentTranslation}.json`),
commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNamesCustom_${this.currentTranslation}.json`)
];
Promise.all(promises)
.then((success) => { .then((success) => {
this.missionTranslationsInner[this.currentTranslation] = success; for(let m of Object.keys(success[1])) {
success[0][m] = success[1][m];
}
this.missionTranslationsInner[this.currentTranslation] = success[0];
resolve(); resolve();
}, (failure) => { }, (failure) => {
console.log(failure); console.log(failure);

11
Js/XduMissionsCustom.json Normal file
View File

@ -0,0 +1,11 @@
{
"312000111": {
"Path": "Asset/Utage/event011/Scenario/312000111.tsv.utage",
"MstId": 338003,
"Id": "312000111",
"LastUpdateTime": 636340306980000000,
"Type": 1,
"Name": "EV11-1:BG",
"SummaryText": ""
}
}

View File

@ -28,7 +28,8 @@ const cssToCopy = [
]; ];
const jsonFiles = [ const jsonFiles = [
"Js/BgmLoop.json", "Js/BgmLoop.json",
"Js/XduMissions.json" "Js/XduMissions.json",
"Js/XduMissionsCustom.json"
]; ];
const translations = [ const translations = [
"Js/Translations/**" "Js/Translations/**"