From a844453ef813bc11d76388ccd68565d3118b5f3f Mon Sep 17 00:00:00 2001 From: 1234567890num <53823593+1234567890num@users.noreply.github.com> Date: Tue, 17 Aug 2021 01:06:20 +0800 Subject: [PATCH] Update a bunch of stuff --- GoA Practice.lua | 64 +++++++++++++++++-------------------- GoA RAM Non-Rando.lua | 73 +++++++++++-------------------------------- GoA RAM.lua | 73 +++++++++++-------------------------------- 3 files changed, 66 insertions(+), 144 deletions(-) diff --git a/GoA Practice.lua b/GoA Practice.lua index a26656b..41541bd 100644 --- a/GoA Practice.lua +++ b/GoA Practice.lua @@ -1,13 +1,13 @@ --RAM Version ---Last Update: Minor Optimizations ---Todo: GoA portal color & Mining Area warps (CoR skip 2nd part) +--Last Update: PC Form Icon with GoA Companion Bugfix & CoR Room Transitions +--Todo: GoA portal color LUAGUI_NAME = "GoA RAM Practice Build" LUAGUI_AUTH = "SonicShadowSilver2 (Ported by Num)" LUAGUI_DESC = "A GoA build to let you practice various events." function _OnInit() -local VersionNum = 'GoA Version 1.52.8' +local VersionNum = 'GoA Version 1.52.9' if (GAME_ID == 0xF266B00B or GAME_ID == 0xFAF99301) and ENGINE_TYPE == "ENGINE" then --PCSX2 if ENGINE_VERSION < 3.0 then print('LuaEngine is Outdated. Things might not work properly.') @@ -291,12 +291,6 @@ if ReadShort(Btl0+0x2EB4C) == 1000 then --MCP Vanilla HP WriteShort(Btl0+0x312E6,0x01A1) --Auto Limit (Auron) WriteShort(Btl0+0x314EA,0x01A1) --Auto Limit (Beast) WriteShort(Btl0+0x315EA,0x01A1) --Auto Limit (Simba) - WriteShort(Btl0+0x31A6C,0x820E) --Dash - WriteShort(Btl0+0x31A6E,0x820D) --Running Tackle - WriteString(Obj0+0x13450,'SHOP_POINT\0') --Wallace -> Moogle - WriteString(Obj0+0x13470,'N_EX960_RTN.mset\0') - WriteShort(Sys3+0x16F40,0x001) --Stock Potion - WriteShort(Sys3+0x16F42,0x003) --Stock Ether WriteShort(Btl0+0x2EB4C,500) --Fast MCP (50% Base HP) WriteShort(Btl0+0x2EB8C,300) --Double Max Damage % WriteShort(Btl0+0x2EB8E,100) --Double Min Damage % @@ -309,6 +303,14 @@ if ReadShort(Btl0+0x2EB4C) == 1000 then --MCP Vanilla HP -- Edge of Ultima WriteShort(Sys3+0x13F16,0x1A5) --Ability: MP Hastera WriteShort(Sys3+0x13F18,0x0405) --Magic:4 Strength:5 +end +if ReadShort(Btl0+0x31A6C) == 0 then --Vanilla Lion Sora Abilities + WriteShort(Btl0+0x31A6C,0x820E) --Dash + WriteShort(Btl0+0x31A6E,0x820D) --Running Tackle + WriteString(Obj0+0x13450,'SHOP_POINT\0') --Wallace -> Moogle + WriteString(Obj0+0x13470,'N_EX960_RTN.mset\0') + WriteShort(Sys3+0x16F40,0x001) --Stock Potion + WriteShort(Sys3+0x16F42,0x003) --Stock Ether --Party EXP Requirement for Member = 0,12 do local EXPAddress = Btl0 + 0x25928 + Member*0x634 @@ -2930,37 +2932,19 @@ elseif World == 0x04 then --Hollow Bastion Spawn('Short',0x06,0x024,0x1A) Spawn('Short',0x06,0x026,0x1A) WriteShort(Sve+2,0x1A) - elseif Room == 0x15 then - if PrevPlace == 0x1804 then - if PrevBtl == 0x01 then --Mineshaft Heartless I - Warp(0x04,0x1A,0x18,0x02,0x0F,0x02) - elseif PrevBtl == 0x02 then --Mineshaft Heartless II - Warp(0x04,0x1A,0x16,0x02,0x0F,0x02) - end - elseif PrevPlace == 0x1604 then --Mining Area Valves - Warp(0x04,0x1A,0x01,0x02,0x0F,0x02) - end - elseif Room == 0x16 then - if PrevPlace == 0x1804 then --Mineshaft Heartless II - Warp(0x04,0x1A,0x16,0x02,0x0F,0x02) - elseif Events(0x01,0x01,0x01) then --Mining Area Valves - Spawn('Short',0x0F,0x032,0x04) - Spawn('Short',0x0F,0x034,0x1A) - Spawn('Short',0x0F,0x036,0x01) - end + elseif Room == 0x16 then --Mining Area Valves + Spawn('Short',0x03,0x024,0x011A) --Exit + Spawn('Short',0x04,0x024,0x011A) + Spawn('Short',0x05,0x024,0x011A) + BitNot(Save+0x1D25,0x02) --HB_FM_712_END elseif Room == 0x18 then - if PrevPlace == 0x1904 then - if PrevBtl == 0x01 then --Transport to Remembrance Nobodies I - Warp(0x04,0x1A,0x15,0x02,0x0F,0x02) - elseif PrevBtl == 0x02 then --Transport to Remembrance Nobodies II - Warp(0x04,0x1A,0x17,0x02,0x0F,0x02) - elseif PrevBtl == 0x03 then --Transport to Remembrance Nobodies III - Warp(0x04,0x1A,0x19,0x02,0x0F,0x02) - end - elseif Events(0x02,0x01,0x01) then --Mineshaft Heartless I + if Events(0x02,0x01,0x01) then --Mineshaft Heartless I Spawn('Short',0x12,0x02A,0x04) Spawn('Short',0x12,0x02C,0x1A) Spawn('Short',0x12,0x02E,0x18) + Spawn('Short',0x03,0x024,0x181A) --Exit + Spawn('Short',0x04,0x024,0x181A) + Spawn('Short',0x05,0x024,0x181A) --Softlock Prevention Spawn('Short',0x09,0x024,0x0018) --Door to Transport to Remembrance -> Mineshaft Spawn('Short',0x09,0x026,0) --Approachable from All Sides @@ -2971,20 +2955,28 @@ elseif World == 0x04 then --Hollow Bastion Spawn('Short',0x12,0x066,0x04) Spawn('Short',0x12,0x068,0x1A) Spawn('Short',0x12,0x06A,0x16) + Spawn('Short',0x03,0x024,0x161A) --Exit + Spawn('Short',0x04,0x024,0x161A) + Spawn('Short',0x05,0x024,0x161A) + Spawn('Short',0x06,0x024,0x161A) + Spawn('Short',0x07,0x024,0x161A) end elseif Room == 0x19 then if Events(0x00,0x01,0x01) then --Transport to Remembrance Nobodies I Spawn('Short',0x0B,0x02A,0x04) Spawn('Short',0x0B,0x02C,0x1A) Spawn('Short',0x0B,0x02E,0x15) + Spawn('Short',0x03,0x024,0x151A) --Exit elseif Events(0x00,0x02,0x02) then --Transport to Remembrance Nobodies II Spawn('Short',0x0B,0x066,0x04) Spawn('Short',0x0B,0x068,0x1A) Spawn('Short',0x0B,0x06A,0x17) + Spawn('Short',0x03,0x024,0x171A) --Exit elseif Events(0x00,0x03,0x03) then --Transport to Remembrance Nobodies III Spawn('Short',0x0B,0x0AA,0x04) Spawn('Short',0x0B,0x0AC,0x1A) Spawn('Short',0x0B,0x0AE,0x19) + Spawn('Short',0x03,0x024,0x191A) --Exit end elseif Room == 0x20 then if Events(0x73,0x73,0x73) then --Vexen diff --git a/GoA RAM Non-Rando.lua b/GoA RAM Non-Rando.lua index f8f969c..a964656 100644 --- a/GoA RAM Non-Rando.lua +++ b/GoA RAM Non-Rando.lua @@ -1,12 +1,12 @@ --RAM Version ---Last Update: Minor Optimizations +--Last Update: OC Demyx Bugfix, Music Code Optimizations, PC Form Icon with GoA Companion Bugfix LUAGUI_NAME = 'GoA RAM Non-Randomizer Build' LUAGUI_AUTH = 'SonicShadowSilver2 (Ported by Num)' LUAGUI_DESC = 'A GoA build for use with vanilla items.' function _OnInit() -local VersionNum = 'GoA Version 1.52.8' +local VersionNum = 'GoA Version 1.52.9' if (GAME_ID == 0xF266B00B or GAME_ID == 0xFAF99301) and ENGINE_TYPE == "ENGINE" then --PCSX2 if ENGINE_VERSION < 3.0 then print('LuaEngine is Outdated. Things might not work properly.') @@ -346,15 +346,15 @@ if ReadShort(Btl0+0x2EB4C) == 1000 then --MCP Vanilla HP WriteString(Obj0+0x2C050,'F_EX030_EH') WriteString(Obj0+0x2C070,'F_EX030.mset') end - --Change Form's Icons in PC From Analog Stick - if Platform == 1 then - WriteByte(Sys3+0x116DB,0x3B) --Valor - WriteByte(Sys3+0x116F3,0x3B) --Wisdom - WriteByte(Sys3+0x1170B,0x3B) --Limit - WriteByte(Sys3+0x11723,0x3B) --Master - WriteByte(Sys3+0x1173B,0x3B) --Final - WriteByte(Sys3+0x11753,0x3B) --Anti - end +end +--Change Form's Icons in PC From Analog Stick +if Platform == 1 and ReadByte(Sys3+0x116DB) == 0x19 then + WriteByte(Sys3+0x116DB,0x3B) --Valor + WriteByte(Sys3+0x116F3,0x3B) --Wisdom + WriteByte(Sys3+0x1170B,0x3B) --Limit + WriteByte(Sys3+0x11723,0x3B) --Master + WriteByte(Sys3+0x1173B,0x3B) --Final + WriteByte(Sys3+0x11753,0x3B) --Anti end --Start New Game 1 if Place == 0x0102 and Events(0x34,0x34,0x34) then --Opening Cutscene @@ -1739,7 +1739,7 @@ elseif Place == 0x0106 and Events(Null,Null,0x02) then --The Reunion WriteByte(Save+0x1D6F,4) elseif Place == 0x0306 and Events(Null,Null,0x05) then --Arriving in the Underworld WriteByte(Save+0x1D6F,5) -elseif Place == 0x1106 and Events(Null,Null,0x01) then --Sora and Friends vs. Demyx +elseif Place == 0x1106 and Events(0x7B,0x7B,0x7B) then --Regained Power WriteByte(Save+0x1D6F,6) elseif Place == 0x0806 and Events(Null,Null,0x01) then --Presistent Ol' Pete WriteByte(Save+0x1D6F,7) @@ -2514,11 +2514,8 @@ if ReadByte(Save+0x1D2F) == 8 then Spawn('Float',0x02,0x134,pi/2) --Sora Rotation Y Spawn('Float',0x02,0x164,700) --Party 1 Position Z Spawn('Float',0x02,0x174,pi/2) --Party 1 Rotation Y - if Events(Null,Null,0x00) then --Don't Change Music on Demyx Fight - WriteByte(BGM-4,0x91) --Music Change (Vim & Vigor) - WriteByte(BGM,0x91) - WriteByte(BGM+12,0x91) - end + WriteShort(Sys3+0x0CD10,0x91) --Castle Gate Music: Vim & Vigor (Field) + WriteShort(Sys3+0x0CD12,0x91) --Castle Gate Music: Vim & Vigor (Fight) end if Place == 0x1A04 then WriteInt(Save+0x3544,0x12020100) --Add Goofy @@ -3383,29 +3380,10 @@ if ReadByte(Save+0x1CFF) == 13 then --STT Removals WriteShort(Save+0x24F0,Store) --Change Equipped Keyblade end end - if ReadShort(Sys3+0xC0CE) == 0x35 then --STT BGM - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x35 then - WriteShort(DefaultBGM+0x0,0x76) --Lazy Afternoons - WriteShort(DefaultBGM+0x2,0x77) --Sinister Sundowns - WriteShort(DefaultBGM+0x4,0x76) - WriteShort(DefaultBGM+0x6,0x77) - WriteShort(DefaultBGM+0x8,0x76) - WriteShort(DefaultBGM+0xA,0x77) - end - end - elseif ReadByte(Save+0x3FF5) == 6 and ReadByte(Save+0x1CFE) == 0 and ReadShort(Sys3+0xC0CC) == 0x76 then --Day 6 & STT Not Cleared - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x77 then - WriteShort(DefaultBGM+0x0,0) --Remove Field Music - WriteShort(DefaultBGM+0x4,0) - WriteShort(DefaultBGM+0x8,0) - end - end + if ReadByte(Save+0x3FF5) == 6 and ReadByte(Save+0x1CFE) == 0 then --Day 6 & STT Not Cleared + WriteByte(Save+0x23EE,2) --STT Music: Sinister Sundowns (No Field Music) + else + WriteByte(Save+0x23EE,0) --STT Music: Lazy Afternoons & Sinister Sundowns end else --Restore Outside STT BitOr(Save+0x1CEA,0x01) --TT_ROXAS_END (Play as Sora) @@ -3443,20 +3421,7 @@ else --Restore Outside STT WriteByte(Save+0x35D0,ReadByte(Save+0x35D0)+1) end WriteShort(Save+0x1CF9,0) --Remove stored Keyblade - if ReadShort(Sys3+0xC0CE) == 0x77 then --TT BGM - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x77 then - WriteShort(DefaultBGM+0x0,0x34) --The Afternoon Streets - WriteShort(DefaultBGM+0x2,0x35) --Working Together - WriteShort(DefaultBGM+0x4,0x34) - WriteShort(DefaultBGM+0x6,0x35) - WriteShort(DefaultBGM+0x8,0x34) - WriteShort(DefaultBGM+0xA,0x35) - end - end - end + WriteByte(Save+0x23EE,1) --TT Music: The Afternoon Streets & Working Together end --Faster Twilight Thorn Reaction Commands if Place == 0x2202 and Events(0x9D,0x9D,0x9D) then diff --git a/GoA RAM.lua b/GoA RAM.lua index 0c238e2..c6b4a66 100644 --- a/GoA RAM.lua +++ b/GoA RAM.lua @@ -1,12 +1,12 @@ --RAM Version ---Last Update: Minor Optimizations +--Last Update: OC Demyx Bugfix, Music Code Optimizations, PC Form Icon with GoA Companion Bugfix LUAGUI_NAME = 'GoA RAM Randomizer Build' LUAGUI_AUTH = 'SonicShadowSilver2 (Ported by Num)' LUAGUI_DESC = 'A GoA build for use with the Randomizer.' function _OnInit() -local VersionNum = 'GoA Version 1.52.8' +local VersionNum = 'GoA Version 1.52.9' if (GAME_ID == 0xF266B00B or GAME_ID == 0xFAF99301) and ENGINE_TYPE == "ENGINE" then --PCSX2 if ENGINE_VERSION < 3.0 then print('LuaEngine is Outdated. Things might not work properly.') @@ -336,15 +336,15 @@ if ReadShort(Btl0+0x2EB4C) == 1000 then --MCP Vanilla HP WriteString(Obj0+0x2C050,'F_EX030_EH') WriteString(Obj0+0x2C070,'F_EX030.mset') end - --Change Form's Icons in PC From Analog Stick - if Platform == 1 then - WriteByte(Sys3+0x116DB,0x3B) --Valor - WriteByte(Sys3+0x116F3,0x3B) --Wisdom - WriteByte(Sys3+0x1170B,0x3B) --Limit - WriteByte(Sys3+0x11723,0x3B) --Master - WriteByte(Sys3+0x1173B,0x3B) --Final - WriteByte(Sys3+0x11753,0x3B) --Anti - end +end +--Change Form's Icons in PC From Analog Stick +if Platform == 1 and ReadByte(Sys3+0x116DB) == 0x19 then + WriteByte(Sys3+0x116DB,0x3B) --Valor + WriteByte(Sys3+0x116F3,0x3B) --Wisdom + WriteByte(Sys3+0x1170B,0x3B) --Limit + WriteByte(Sys3+0x11723,0x3B) --Master + WriteByte(Sys3+0x1173B,0x3B) --Final + WriteByte(Sys3+0x11753,0x3B) --Anti end --Start New Game 1 if Place == 0x0102 and Events(0x34,0x34,0x34) then --Opening Cutscene @@ -1765,7 +1765,7 @@ elseif Place == 0x0106 and Events(Null,Null,0x02) then --The Reunion WriteByte(Save+0x1D6F,4) elseif Place == 0x0306 and Events(Null,Null,0x05) then --Arriving in the Underworld WriteByte(Save+0x1D6F,5) -elseif Place == 0x1106 and Events(Null,Null,0x01) then --Sora and Friends vs. Demyx +elseif Place == 0x1106 and Events(0x7B,0x7B,0x7B) then --Regained Power WriteByte(Save+0x1D6F,6) elseif Place == 0x0806 and Events(Null,Null,0x01) then --Presistent Ol' Pete WriteByte(Save+0x1D6F,7) @@ -2531,11 +2531,8 @@ if ReadByte(Save+0x1D2F) == 8 then Spawn('Float',0x02,0x134,pi/2) --Sora Rotation Y Spawn('Float',0x02,0x164,700) --Party 1 Position Z Spawn('Float',0x02,0x174,pi/2) --Party 1 Rotation Y - if Events(Null,Null,0x00) then --Don't Change Music on Demyx Fight - WriteByte(BGM-4,0x91) --Music Change (Vim & Vigor) - WriteByte(BGM,0x91) - WriteByte(BGM+12,0x91) - end + WriteShort(Sys3+0x0CD10,0x91) --Castle Gate Music: Vim & Vigor (Field) + WriteShort(Sys3+0x0CD12,0x91) --Castle Gate Music: Vim & Vigor (Fight) end if Place == 0x1A04 then WriteInt(Save+0x3544,0x12020100) --Add Goofy @@ -3427,29 +3424,10 @@ if ReadByte(Save+0x1CFF) == 13 then --STT Removals WriteShort(Save+0x24F0,Store) --Change Equipped Keyblade end end - if ReadShort(Sys3+0xC0CE) == 0x35 then --STT BGM - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x35 then - WriteShort(DefaultBGM+0x0,0x76) --Lazy Afternoons - WriteShort(DefaultBGM+0x2,0x77) --Sinister Sundowns - WriteShort(DefaultBGM+0x4,0x76) - WriteShort(DefaultBGM+0x6,0x77) - WriteShort(DefaultBGM+0x8,0x76) - WriteShort(DefaultBGM+0xA,0x77) - end - end - elseif ReadByte(Save+0x3FF5) == 6 and ReadByte(Save+0x1CFE) == 0 and ReadShort(Sys3+0xC0CC) == 0x76 then --Day 6 & STT Not Cleared - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x77 then - WriteShort(DefaultBGM+0x0,0) --Remove Field Music - WriteShort(DefaultBGM+0x4,0) - WriteShort(DefaultBGM+0x8,0) - end - end + if ReadByte(Save+0x3FF5) == 6 and ReadByte(Save+0x1CFE) == 0 then --Day 6 & STT Not Cleared + WriteByte(Save+0x23EE,2) --STT Music: Sinister Sundowns (No Field Music) + else + WriteByte(Save+0x23EE,0) --STT Music: Lazy Afternoons & Sinister Sundowns end else --Restore Outside STT BitOr(Save+0x1CEA,0x01) --TT_ROXAS_END (Play as Sora) @@ -3487,20 +3465,7 @@ else --Restore Outside STT WriteByte(Save+0x35D0,ReadByte(Save+0x35D0)+1) end WriteShort(Save+0x1CF9,0) --Remove stored Keyblade - if ReadShort(Sys3+0xC0CE) == 0x77 then --TT BGM - local BaseDefaultBGM = Sys3 + 0xC0CC - for i = 0x00,0x29 do - local DefaultBGM = BaseDefaultBGM + 0x40*i - if ReadShort(DefaultBGM+2) == 0x77 then - WriteShort(DefaultBGM+0x0,0x34) --The Afternoon Streets - WriteShort(DefaultBGM+0x2,0x35) --Working Together - WriteShort(DefaultBGM+0x4,0x34) - WriteShort(DefaultBGM+0x6,0x35) - WriteShort(DefaultBGM+0x8,0x34) - WriteShort(DefaultBGM+0xA,0x35) - end - end - end + WriteByte(Save+0x23EE,1) --TT Music: The Afternoon Streets & Working Together end --Faster Twilight Thorn Reaction Commands if Place == 0x2202 and Events(0x9D,0x9D,0x9D) then