Super Mario 64 PC Port · handler “SuperMario64PCPort”
Version 1
Release notes
2 player coop mod using the native PC port of Super Mario 64 from the decompilation project.
- Released
- Size
- 2.2 KB
- Downloads
- 6
- Check
- Unverified
- SHA-256
- c4d53985ff33fc6b6635e388c0f83333f6df1d3230935634fdd387a194eee053
Files 1
| Path | Size |
|---|---|
| handler.js | 5.5 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Thu Oct 08 2020 02:02:04 GMT+0000 (UTC).
Hub.Handler.Id = "3w7cDHG6f2dMv6uXo";
Hub.Maintainer.Name = "Zense";
Hub.Maintainer.Id = "xsaAXYeKK9Y22x9MZ";
var preset = ["Current Settings", "Yes"];
Game.AddOption(
"Load a custom controller preset?",
"This conveniently sets all the controller mappings for you before you start. \nThe option 'Current Settings' keeps the last used controller mappings.",
"CONF",
preset
);
var skip = ["No", "Yes"];
Game.AddOption("Skip intro?", "This skips the new game intro cutscene with Peach and some of the \ninitial dialogues. This is only relevant if starting a new game.", "INTRO", skip);
var moves = ["No", "Yes"];
Game.AddOption(
"Are you using the extended moveset patch?",
"This moves the camera switch button to the right shoulder button (:R1) \ninstead of the the right trigger (:R2). This only needs to be applied once.",
"EXMOVE",
moves
);
Game.HandlerInterval = 100;
Game.SymlinkGame = true;
Game.SymlinkExe = false;
Game.SupportsKeyboard = true;
Game.ExecutableName = "sm64.us.f3dex2e.exe";
Game.GUID = "us_pc";
Game.GameName = "Super Mario 64 PC Port";
Game.MaxPlayers = 2;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "";
Game.WorkingFolder = "";
Game.HideTaskbar = true;
Game.ForceFinishOnPlay = true;
Game.SupportsPositioning = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Super Mario 64";
Game.HasDynamicWindowTitle = true; //This is needed because build number and render API are in the window title and they can change.
Game.Hook.XInputEnabled = true;
Game.Hook.XInputNames = ["xinput1_4.dll"];
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.Hook.CustomDllEnabled = false;
Game.Hook.BlockKeyboardEvents = false;
Game.Hook.BlockMouseEvents = true;
Game.Hook.BlockInputEvents = false;
Game.Description =
"This is the native PC port, not emulated. Only 2 player coop at the moment. Supports extra features like Render96 assets, better camera and extended moveset. Issues with the mod are still being fixed. Game is completable. Press A or B on the initial discord error message screen to continue. Player 2 has to press enter to finally connect and might need to have focus on its window.";
//Game.PauseBetweenContextAndLaunch = 10; //Number of seconds to wait after running additional files but before continuing with player setup
//Game.PauseBetweenStarts = 20;//Pause between game intances starts in milliseconds.
//Game.SetWindowHookStart = true; //Prevent games from resizing window on their own | Hooks upon game starting up (see Game.SetWindowHook for an alternative)
Game.LockMouse = false; //This object property, whether assigned true or false, is necessary for the A button among others on an xinput controller to work, for some unknown reason.
Game.HideCursor = true;
Game.DPIHandling = true;
Game.FakeFocus = true;
Game.HookFocus = true;
Game.ResetWindows = false;
Game.UseNucleusEnvironment = true;
Game.UserProfileConfigPath = "AppData\\Roaming\\sm64ex-coop";
Game.Play = function() {
var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\sm64config.txt";
var musLine = Context.FindLineNumberInTextFile(txtPath, "music_volume", Nucleus.SearchType.Contains);
var SkipLine = Context.FindLineNumberInTextFile(txtPath, "skip_intro", Nucleus.SearchType.Contains);
var localIP = Context.FindLineNumberInTextFile(txtPath, "coop_join_ip", Nucleus.SearchType.Contains);
var KeyaLine = Context.FindLineNumberInTextFile(txtPath, "key_a", Nucleus.SearchType.Contains);
var netSys = Context.FindLineNumberInTextFile(txtPath, "coop_network_system", Nucleus.SearchType.Contains);
var keyStick = Context.FindLineNumberInTextFile(txtPath, "key_stickup", Nucleus.SearchType.Contains);
var keyChat = Context.FindLineNumberInTextFile(txtPath, "key_chat", Nucleus.SearchType.Contains);
var dict = [SkipLine + "|skip_intro false", localIP + "|coop_join_ip " + Context.LocalIP, netSys + "|coop_network_system 1", keyChat + "|key_chat ffff ffff ffff"];
Context.ReplaceLinesInTextFile(txtPath, dict);
if (Context.PlayerID > 0) {
var musLine = Context.FindLineNumberInTextFile(txtPath, "music_volume", Nucleus.SearchType.Contains);
var dict = [musLine + "|music_volume 0"];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
var conf = Context.Options["CONF"];
if (conf == "Yes") {
var lines = [
KeyaLine + "|key_a 1001 ffff 002e",
KeyaLine + 1 + "|key_b 1000 ffff 002d",
KeyaLine + 2 + "|key_start 1006 ffff 0039",
KeyaLine + 3 + "|key_l 1009 ffff 0010",
KeyaLine + 4 + "|key_r 100a ffff 0020",
KeyaLine + 5 + "|key_z 101a 101b 002c",
KeyaLine + 6 + "|key_cup 100b 100b 0021",
KeyaLine + 7 + "|key_cdown 100c ffff 002f",
KeyaLine + 8 + "|key_cleft 100d ffff 001e",
KeyaLine + 9 + "|key_cright 100e ffff 001f",
keyStick + "|key_stickup 0148 ffff ffff",
keyStick + 1 + "|key_stickdown 0150 ffff ffff",
keyStick + 2 + "|key_stickleft 014b ffff ffff",
keyStick + 3 + "|key_stickright 014d ffff ffff"
];
Context.ReplaceLinesInTextFile(txtPath, lines);
}
var intro = Context.Options["INTRO"];
if (intro == "Yes") {
var SkipIn = [SkipLine + "|skip_intro true"];
Context.ReplaceLinesInTextFile(txtPath, SkipIn);
}
var camR1 = Context.Options["EXMOVE"];
if (camR1 == "Yes") {
var dpadright = Context.FindLineNumberInTextFile(txtPath, "key_dpadright", Nucleus.SearchType.Contains);
var unbindR2 = [dpadright + "|key_dpadright 100a ffff ffff"];
Context.ReplaceLinesInTextFile(txtPath, unbindR2);
}
};