Stranger of Paradise: Final Fantasy Origin · handler “Stranger of paradise final fantasy origin”
Version 7
Release notes
hot fixes, player nickname support added.
- Released
- Size
- 3.7 KB
- Downloads
- 94
- Check
- Verified
- SHA-256
- 903d838b36be742faf78c1ac5ff6bafedeb6688e5f54c8b6d6b87b04b01e6ce7
Files 1
| Path | Size |
|---|---|
| handler.js | 19 KB |
handler.js
Plain textHub.Handler.Version = 7; // Released at https://hub.splitscreen.me/ on Mon May 02 2022 03:25:25 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "PXjfPSTkww4XNw3yH";
Hub.Maintainer.Name = "gotenks";
Hub.Maintainer.Id = "PKW8fDRgHFm6aPaYH";
var answers0 = ["yes", "no"];
var answers1 = ["no", "very low", "low", "medium", "high", "max"];
var answers2 = ["no", "30", "60", "120"];
var answers3 = ["no", "50", "60", "70", "80", "90", "100"];
var answers4 = ["no", "low", "medium", "high"];
var answers5 = ["1", "2"];
Game.AddOption("Apply aspect ratio fix?", "Matches resolution to window size to fix stretching.", "Fix", answers0);
Game.AddOption("Change graphics settings?", "Can improve performance at the cost of visual quality.", "preset", answers1);
Game.AddOption("Set a framerate(fps) limit?", "Can improve performance at the cost of responsiveness.", "fps", answers2);
Game.AddOption("Change the resolution scale?", "Can improve performance at the cost of visual clarity.", "resscale", answers3);
Game.AddOption("Change the texture quality?", "Reduce the gpu's Vram usage, if the game stutters too much set this to low.", "texture", answers4);
Game.AddOption("PC-ID", "Enables lan play between 2 PCs, make sure each pc is set with a different id, your savegame is tied to you pc-id", "pcid", answers5);
Game.ExecutableContext = ["commontexture"];
Game.KillMutex = ["FF_ORIGIN_MUTEX"];
Game.FileSymlinkExclusions = ["EOSSDK-Win64-Shipping.dll", "xinput1_3.dll", "SOPFFO.exe"];
Game.Description =
"Tested with the latest version of the game from epic store(1.03) - this game is very heavy on the cpu and the vram, low your settings and limit your fps to 30 for better performance, low texture is recommended,the first time you launch the game make sure to get to the title screen before the windows resize, otherwise you will have to start it again, to connect the instances you have to finish the tutorial, play until you are in the world map, press start then go to the online menu with rb, select create a room , join searching the rom by id is typically better specially when playing betweeb 2 pcs.";
Game.GameName = "STRANGER OF PARADISE FINAL FANTASY ORIGIN";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = false;
Game.ExecutableName = "SOPFFO.exe";
Game.GUID = "STRANGER OF PARADISE FINAL FANTASY ORIGIN";
Game.MaxPlayers = 3;
Game.MaxPlayersOneMonitor = 4;
Game.UseGoldberg = false;
Game.UseNemirtingasEpicEmu = true;
Game.EpicEmuArgs = false;
Game.LauncherTitle = "";
Game.UserProfileSavePath = "Documents\\My Games\\STRANGER OF PARADISE FINAL FANTASY ORIGIN\\EOS";
Game.UserProfileConfigPath = "Documents\\My Games\\STRANGER OF PARADISE FINAL FANTASY ORIGIN\\EOS";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "STRANGER OF PARADISE FINAL FANTASY ORIGIN";
Game.HasDynamicWindowTitle = false;
Game.FakeFocus = true;
Game.FakeFocusInterval = 5000;
Game.SendFakeFocusMsg = true;
Game.HookFocus = true;
Game.ResetWindows = true;
Game.HookInit = false;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.PauseBetweenProcessGrab = 15;
Game.PauseBetweenStarts = 40;
//ProtoInput:
Game.SupportsMultipleKeyboardsAndMice = false;
Game.ProtoInput.InjectStartup = true;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = false;
Game.ProtoInput.FreezeExternalInputWhenInputNotLocked = false;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.FindWindowHook = true;
Game.Play = function() {
var pcid = Context.Options["pcid"];
var epicid = "";
var prodid = "";
var playerUser = Context.Nickname;
switch (true) {
case pcid == "1" && Context.PlayerID == 0:
epicid = "695c2115507b547c132912dc7e677f69";
prodid = "892abfc7554d77a33751ada9aa37a915";
break;
case pcid == "1" && Context.PlayerID == 1:
epicid = "695c21155004547c132911dc7e677f69";
prodid = "f731bfc7554d76a33752ada9aa37ae43";
break;
case pcid == "1" && Context.PlayerID == 2:
epicid = "695c21155005547c132910dc7e677f69";
prodid = "f431bfc7554d71a33753ada9aa37ae42";
break;
case pcid == "2" && Context.PlayerID == 0:
epicid = "695c2215507b547c132912dc7e687f69";
prodid = "882abfc7554d76a33752ada9aa37a96a";
playerUser = "pc2-" + Context.Nickname;
break;
case pcid == "2" && Context.PlayerID == 1:
epicid = "695c22155004547c132911dc7e687f69";
prodid = "f631bfc7554d77a33751ada9aa37ae3c";
playerUser = "pc2-" + Context.Nickname;
break;
case pcid == "2" && Context.PlayerID == 2:
epicid = "695c22155005547c132910dc7e687f69";
prodid = "f531bfc7554d70a33750ada9aa37ae3d";
playerUser = "pc2-" + Context.Nickname;
break;
}
Context.startArguments +=
"-AUTH_LOGIN=unused -AUTH_PASSWORD=cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd -AUTH_TYPE=exchangecode -epicapp=STRANGEROFPARADISEFINALFANTASYORIGIN -epicenv=Prod -EpicPortal -epiclocale=en -epicusername=" +
playerUser +
" -epicuserid=" +
epicid +
" ";
var path = Context.NucleusUserRoot + "\\Documents\\My Games\\STRANGER OF PARADISE FINAL FANTASY ORIGIN\\EOS\\" + epicid + "\\config.xml";
if (!System.IO.File.Exists(path)) {
var dir = Context.NucleusUserRoot + "\\Documents\\My Games\\STRANGER OF PARADISE FINAL FANTASY ORIGIN\\EOS\\" + epicid + "";
System.IO.Directory.CreateDirectory(dir);
var lines = [
'<?xml version="1.0" encoding="UTF-8"?>',
"<settings>",
"<CONFIG_TYPE>CUSTOM</CONFIG_TYPE>",
"<FPS>30</FPS>",
"<DISP_MODE>WINDOW</DISP_MODE>",
"<SCR_REZ>1920x1080</SCR_REZ>",
"<VSYNC>ON</VSYNC>",
"<REN_REZ>70%</REN_REZ>",
"<ANTI_ALIAS>OFF</ANTI_ALIAS>",
"<SHADOW_QUAL>LOW</SHADOW_QUAL>",
"<SHADOW_DIST>SHORT</SHADOW_DIST>",
"<DYNAMIC_FRAME>OFF</DYNAMIC_FRAME>",
"<TEXTURE_QUAL>LOW</TEXTURE_QUAL>",
"<RT_REF>OFF</RT_REF>",
"<AO>ON</AO>",
"<MOT_BLUR>ON</MOT_BLUR>",
"<CHROMA_ABERRATION>ON</CHROMA_ABERRATION>",
"<VRAM_MONITOR>OFF</VRAM_MONITOR>",
"</settings>"
];
Context.WriteTextFile(path, lines);
}
var jsonPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\nepice_settings\\NemirtingasEpicEmu.json";
var jsonPath2 = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\NemirtingasEpicEmu.json";
var params = [
"{",
' "username": ' + '"' + playerUser + '"' + ",",
' "log_level": "off",',
' "language": ' + '"' + Context.EpicLang + '"' + ",",
//' "epicid": "'+epicid+PlayerNumber+'",',
' "epicid": ' + '"' + epicid + '"' + ",", //player 1 from id-1
' "productuserid": ' + '"' + prodid + '"' + ",",
' "appid": "STRANGEROFPARADISEFINALFANTASYORIGIN",',
' "disable_online_networking": false,',
' "enable_overlay": true,',
' "enable_lan": true,',
' "unlock_dlcs": true,',
//' "log_level": true,',
//' "savepath": "appdata",',
' "signaling_servers": []',
"}"
];
Context.WriteTextFile(jsonPath, params);
Context.WriteTextFile(jsonPath2, params);
var fix = Context.Options["Fix"];
var preset = Context.Options["preset"];
var fps = Context.Options["fps"];
var resscale = Context.Options["resscale"];
var texture = Context.Options["texture"];
switch (resscale) {
case "no":
break;
case "50":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "50%");
break;
case "60":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "60%");
break;
case "70":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "70%");
break;
case "80":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "80%");
break;
case "90":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "90%");
break;
case "100":
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
break;
}
if (fix == "yes") {
var screenreswidth = Context.Width;
var screenresheight = Context.Height;
if (screenresheight == 540 && screenreswidth == 1920) {
//1080p Horizontal
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "50%");
//patch 3440x1440 res 70 0D 00 00 A0 05
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x80, 0x07, 0x00, 0x00, 0x1c, 0x02]
);
} else if (screenresheight == 1080 && screenreswidth == 960) {
//1080p vertical
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0xc0, 0x03, 0x00, 0x00, 0x38, 0x04]
);
} else if (screenresheight == 540 && screenreswidth == 960) {
//1080p 1/4
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0xc0, 0x03, 0x00, 0x00, 0x1c, 0x02]
);
} else if (screenreswidth == 1280 && screenresheight == 360) {
//720p horizontal
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "50%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x00, 0x05, 0x00, 0x00, 0x68, 0x01]
);
} else if (screenreswidth == 640 && screenresheight == 720) {
//720p vertical
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x80, 0x02, 0x00, 0x00, 0xd0, 0x02]
);
} else if (screenreswidth == 640 && screenresheight == 360) {
//720p 1/4
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x80, 0x02, 0x00, 0x00, 0x68, 0x01]
);
} else if (screenreswidth == 2560 && screenresheight == 720) {
//1440p horizontal
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "50%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x00, 0x0a, 0x00, 0x00, 0xd0, 0x02]
);
} else if (screenreswidth == 1280 && screenresheight == 1440) {
//1440p vertical
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x00, 0x05, 0x00, 0x00, 0xa0, 0x05]
);
} else if (screenresheight == 1280 && screenreswidth == 720) {
//1440p 1/4
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "1280x720");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Game.KeepAspectRatio = true;
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"), System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"), true);
} else if (screenresheight == 2160 && screenreswidth == 1920) {
//4k vertical
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "100%");
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x80, 0x07, 0x00, 0x00, 0x70, 0x08]
);
} else if (screenresheight == 1080 && screenreswidth == 3840) {
//4k Horizontal
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "3440x1440");
Context.ChangeXmlNodeInnerTextValue(path, "//REN_REZ", "50%");
//patch 3440x1440 res 70 0D 00 00 A0 05
Context.PatchFileFindAll(
System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"),
System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"),
[0x70, 0x0d, 0x00, 0x00, 0xa0, 0x05],
[0x00, 0x0f, 0x00, 0x00, 0x38, 0x04]
);
} else {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"), System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"), true);
Context.ChangeXmlNodeInnerTextValue(path, "//DISP_MODE", "WINDOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SCR_REZ", "1920x1080");
}
} else {
Game.KeepAspectRatio = true;
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "SOPFFO.exe"), System.IO.Path.Combine(Context.RootFolder, "SOPFFO.exe"), true);
}
switch (preset) {
case "no":
break;
case "very low":
Context.ChangeXmlNodeInnerTextValue(path, "//CONFIG_TYPE", "CUSTOM");
Context.ChangeXmlNodeInnerTextValue(path, "//ANTI_ALIAS", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_QUAL", "NONE");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_DIST", "SHORT");
Context.ChangeXmlNodeInnerTextValue(path, "//RT_REF", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//AO", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//MOT_BLUR", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//CHROMA_ABERRATION", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//DYNAMIC_FRAME", "OFF");
break;
case "low":
Context.ChangeXmlNodeInnerTextValue(path, "//CONFIG_TYPE", "CUSTOM");
Context.ChangeXmlNodeInnerTextValue(path, "//ANTI_ALIAS", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_QUAL", "LOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_DIST", "SHORT");
Context.ChangeXmlNodeInnerTextValue(path, "//RT_REF", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//AO", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//MOT_BLUR", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//CHROMA_ABERRATION", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//DYNAMIC_FRAME", "OFF");
break;
case "medium":
Context.ChangeXmlNodeInnerTextValue(path, "//CONFIG_TYPE", "CUSTOM");
Context.ChangeXmlNodeInnerTextValue(path, "//ANTI_ALIAS", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_QUAL", "LOW");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_DIST", "SHORT");
Context.ChangeXmlNodeInnerTextValue(path, "//RT_REF", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//AO", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//MOT_BLUR", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//CHROMA_ABERRATION", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//DYNAMIC_FRAME", "OFF");
break;
case "high":
Context.ChangeXmlNodeInnerTextValue(path, "//CONFIG_TYPE", "CUSTOM");
Context.ChangeXmlNodeInnerTextValue(path, "//ANTI_ALIAS", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_QUAL", "MIDDLE");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_DIST", "NORMAL");
Context.ChangeXmlNodeInnerTextValue(path, "//RT_REF", "OFF");
Context.ChangeXmlNodeInnerTextValue(path, "//AO", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//MOT_BLUR", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//CHROMA_ABERRATION", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//DYNAMIC_FRAME", "OFF");
break;
case "max":
Context.ChangeXmlNodeInnerTextValue(path, "//CONFIG_TYPE", "CUSTOM");
Context.ChangeXmlNodeInnerTextValue(path, "//ANTI_ALIAS", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_QUAL", "HIGH");
Context.ChangeXmlNodeInnerTextValue(path, "//SHADOW_DIST", "LONG");
Context.ChangeXmlNodeInnerTextValue(path, "//RT_REF", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//AO", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//MOT_BLUR", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//CHROMA_ABERRATION", "ON");
Context.ChangeXmlNodeInnerTextValue(path, "//DYNAMIC_FRAME", "OFF");
break;
}
switch (fps) {
case "no":
break;
case "30":
Context.ChangeXmlNodeInnerTextValue(path, "//FPS", "30");
break;
case "60":
Context.ChangeXmlNodeInnerTextValue(path, "//FPS", "60");
break;
case "120":
Context.ChangeXmlNodeInnerTextValue(path, "//FPS", "120");
break;
}
switch (texture) {
case "no":
break;
case "low":
Context.ChangeXmlNodeInnerTextValue(path, "//TEXTURE_QUAL", "LOW");
break;
case "medium":
Context.ChangeXmlNodeInnerTextValue(path, "//TEXTURE_QUAL", "MIDDLE");
break;
case "high":
Context.ChangeXmlNodeInnerTextValue(path, "//TEXTURE_QUAL", "HIGH");
break;
}
};