initial
This commit is contained in:
24
tweaks/Grand Star warps Mario.json
Normal file
24
tweaks/Grand Star warps Mario.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"Name": "Grand Star warps Mario",
|
||||
"Scripts": [
|
||||
{
|
||||
"Name": "Enable",
|
||||
"Script": "Imports Microsoft.VisualBasic\nImports System\nImports System.Collections.Generic\nImports System.IO\nImports System.Linq\nImports System.Windows.Forms\nImports SM64Lib\nImports SM64Lib.Data\nImports SM64Lib.Behaviors\nImports SM64Lib.Behaviors.Script\nImports DevComponents.DotNetBar\n\nModule Script\n\n Private Const VALUE_PATCHED As Byte = &H20\n Private Const VALUE_VANILLA As Byte = &H10\n Private Const BEHAVIOR_ADDRESS As Integer = &H13001714\n Private Const COMMAND_ID = BehaviorscriptCommandTypes.x2F_SetInteraction\n\n Sub Main(params As IReadOnlyDictionary(Of String, Object))\n Dim mgr As RomManager = params(\"rommgr\")\n Dim msgRes = MessageBox.Show(\"Do you want to enable (Yes) or disable (No) this patch?\", \"Grand Star Warps Mario\", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)\n \n If msgRes <> DialogResult.Cancel Then\n Dim valueToPatch As Byte\n If msgRes = DialogResult.Yes\n valueToPatch = VALUE_PATCHED\n Else\n valueToPatch = VALUE_VANILLA\n End If\n \n 'Check if Global Behavior Bank is enabled\n If mgr.GlobalBehaviorBank.Config.Enabled Then\n 'Try getting behavior by segmented address\n Dim behav = mgr.GlobalBehaviorBank.GetBehaviorByBankAddress(BEHAVIOR_ADDRESS)\n \n 'If behav exists, check every behaviorscript command\n If behav IsNot Nothing Then\n Dim cmd = behav.Script.FirstOfType(COMMAND_ID)\n \n 'If command is that we are searching for, then write the new value to it\n cmd.Position = 6\n cmd.Write(valueToPatch)\n cmd.Position = 0\n End If\n Else\n 'Write directly to ROM\n Dim rom = mgr.GetBinaryRom(FileAccess.ReadWrite)\n rom.Position = &H21B522\n rom.Write(valueToPatch)\n rom.Close()\n End If\n End If\n End Sub\n\nEnd Module\n",
|
||||
"Type": "VisualBasic",
|
||||
"Description": "",
|
||||
"ReferencesV2": [],
|
||||
"ID": "AF4235B7DD6377A512307A108F4A7564",
|
||||
"AllowRevert": false
|
||||
}
|
||||
],
|
||||
"Version": "1.0.0.0",
|
||||
"MinVersion": "1.0.0.0",
|
||||
"MaxVersion": "0.0.0.0",
|
||||
"Description": "The Grand Star that the final Bowser fight drops warps Mario instead of starting a cutscene. In order to use this, in your hack's 3rd Bowser fight, go to editor, go to the warps tab (the one next to the objects tab and the collision tab). Create a warp with ID 0, and then set the destination of the warp to someplace valid, note that the End Cake screen is a valid destination. This tweak is identical to the Grand Star Warps to Credits Level tweak, barring requiring to set up the warp without aid of the tweak and being a little safer to apply.\n",
|
||||
"EmbeddedFiles": {
|
||||
"CompressedFiles": {}
|
||||
},
|
||||
"ID": "01042C58FE75659FC789BE9C4AA2751D",
|
||||
"Official": false,
|
||||
"Recommended": false
|
||||
}
|
||||
Reference in New Issue
Block a user