From 1876bb3c75bfb16c325bfdcca1d1b1b1025dbd21 Mon Sep 17 00:00:00 2001 From: AdAstra-LD <76622070+AdAstra-LD@users.noreply.github.com> Date: Mon, 1 Jul 2024 23:54:39 +0200 Subject: [PATCH] Update ScriptDatabase.cs --- DS_Map/ROMFiles/ScriptFile.cs | 2 -- DS_Map/Resources/ScriptDatabase.cs | 53 +++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/DS_Map/ROMFiles/ScriptFile.cs b/DS_Map/ROMFiles/ScriptFile.cs index 85de400..6040972 100644 --- a/DS_Map/ROMFiles/ScriptFile.cs +++ b/DS_Map/ROMFiles/ScriptFile.cs @@ -240,8 +240,6 @@ namespace DSPRE.ROMFiles { ProcessRelativeJump(dataReader, ref parameterList, ref functionOffsets); break; case 0x5E: // Movement - case 0x2A1: // Movement2 - //in the case of Movement, the first param is an overworld ID parameterList.Add(BitConverter.GetBytes(dataReader.ReadUInt16())); ProcessRelativeJump(dataReader, ref parameterList, ref actionOffsets); break; diff --git a/DS_Map/Resources/ScriptDatabase.cs b/DS_Map/Resources/ScriptDatabase.cs index 4a53f46..a4f7a5e 100644 --- a/DS_Map/Resources/ScriptDatabase.cs +++ b/DS_Map/Resources/ScriptDatabase.cs @@ -287,7 +287,7 @@ namespace DSPRE.Resources { [0x007B] = "GiveItem", [0x007C] = "TakeItem", [0x007D] = "CheckItemSpace", - [0x007E] = "CheckPlayerHasItem", + [0x007E] = "CheckItem", [0x007F] = "CheckItemIsMachine", [0x0080] = "GetItemPocket", [0x0081] = "DummyGivePCItem", @@ -544,6 +544,8 @@ namespace DSPRE.Resources { [0x01CA] = "GetPartyPokemonMove", [0x01CB] = "TextPartyPokemonMove", + [0x01CD] = "CreateJournalData", + [0x01CF] = "Strength", [0x01D0] = "Flash", [0x01D1] = "Defog", @@ -559,10 +561,14 @@ namespace DSPRE.Resources { [0x01F5] = "CheckFossil", [0x01F6] = "CountPokemonUnderLevel", [0x01F7] = "SurvivePoison", + [0x01F8] = "FinishOverworldScreen", + [0x01F9] = "DummyGetVar", + [0x01FA] = "MessageAllFromArchive", + [0x01FB] = "MessageFromArchive", [0x0200] = "GetPreviousHeaderID", [0x0201] = "GetCurrentHeaderID", - + [0x0202] = "SetSafariFlag", [0x0203] = "BattleRoomWarp", [0x0204] = "ExitBattleRoom", [0x0205] = "GeonetScreen", @@ -678,7 +684,9 @@ namespace DSPRE.Resources { [0x02C1] = "ShowSaveBox", [0x02C2] = "HideSaveBox", - [0x02C3] = "ScopeMode" + [0x02C3] = "ScopeMode", + + [0x0333] = "SetFieldVolume", }; public static Dictionary DPPtScrCmdParameters = new Dictionary() { [0x0000] = new byte[1] { 0 }, @@ -883,7 +891,7 @@ namespace DSPRE.Resources { [0x00C7] = new byte[] { 2 }, [0x00C8] = new byte[] { 1 }, [0x00C9] = new byte[] { 1 }, - [0x00CA] = new byte[1] { 0 }, + [0x00CA] = new byte[] { 2 }, [0x00CB] = new byte[] { 2 }, [0x00CC] = new byte[1] { 0 }, [0x00CD] = new byte[] { 1 }, @@ -1124,8 +1132,8 @@ namespace DSPRE.Resources { [0x01B8] = new byte[] { 2, 2 }, [0x01B9] = new byte[] { 2, 2 }, [0x01BA] = new byte[] { 2, 2 }, - [0x01BB] = new byte[1] { 0 }, - [0x01BC] = new byte[] { 2, 2 }, + [0x01BB] = new byte[] { 2, 2 }, + [0x01BC] = new byte[] { 2, 2, 2, 2 }, [0x01BD] = new byte[] { 2 }, [0x01BE] = new byte[] { 2 }, [0x01BF] = new byte[] { 2 }, @@ -1396,7 +1404,7 @@ namespace DSPRE.Resources { [0x029E] = new byte[] { 2, 2 }, [0x029F] = new byte[] { 2 }, [0x02A0] = new byte[] { 2, 2, 2 }, - [0x02A1] = new byte[1] { 0 }, + [0x02A1] = new byte[] { 2, 2, 2 }, [0x02A2] = new byte[] { 2 }, [0x02A3] = new byte[] { 2 }, [0x02A4] = new byte[] { 2 }, @@ -1494,8 +1502,11 @@ namespace DSPRE.Resources { [0x0302] = "CheckUsedRotomAppliances", + [0x0314] = "GetBattleOutcome", [0x0315] = "GetCurrentWeather", + [0x0317] = "GetPlayerPositionFull", + [0x0318] = "WildBattleFateful", [0x0319] = "GiratinaBattle", [0x031A] = "RegisterSeenPokemon", @@ -1635,7 +1646,7 @@ namespace DSPRE.Resources { [0x0331] = new byte[1] { 0 }, [0x0332] = new byte[1] { 0 }, [0x0333] = new byte[] { 2 }, - [0x0334] = new byte[1] { 0 }, + [0x0334] = new byte[] { 2, 2 }, [0x0335] = new byte[] { 2, 4 }, [0x0336] = new byte[] { 2 }, @@ -1799,7 +1810,7 @@ namespace DSPRE.Resources { [0x008D] = "CheckMoveInParty", [0x008F] = "ChooseRivalName", - + [0x0090] = "GetCounterpartSprite", [0x0091] = "UpgradePokegear", [0x0092] = "RecordPokegearNumber", //to be confirmed @@ -1834,6 +1845,7 @@ namespace DSPRE.Resources { [0x00C0] = "TextCounterpart", [0x00C1] = "TextPartyPokemon", [0x00C2] = "TextItem", + [0x00C2] = "TextPocket", [0x00C4] = "TextAttackItem", [0x00C5] = "TextMove", [0x00C6] = "TextNumber", @@ -1988,6 +2000,8 @@ namespace DSPRE.Resources { [0x01B1] = "CheckFossil", [0x01B2] = "CountPokemonUnderLevel", [0x01B3] = "SurvivePoison", + [0x01B4] = "FinishOverworldScreen", + [0x01B5] = "DummyGetVar", [0x01BD] = "GetPreviousHeaderID", [0x01BE] = "GetCurrentHeaderID", @@ -2088,7 +2102,14 @@ namespace DSPRE.Resources { [0x0290] = "CheckHeadbuttCompatibility", + [0x02AB] = "GetBattleOutcome", [0x02AC] = "GetCurrentWeather", + [0x02AD] = "GetPlayerPositionFull", + [0x02AE] = "WildBattleFateful", + [0x02AF] = "RegisterSeenPokemon", + + [0x02BF] = "SetFieldVolume", + [0x02C4] = "FloorTrapAnimation", @@ -2113,6 +2134,8 @@ namespace DSPRE.Resources { [0x02EF] = "CreateMultiTouchBox", [0x02F0] = "CloseMultiTouch", + [0x0310] = "OverlayManager", + [0x031B] = "ShowMomMoney", [0x031C] = "HideMomMoney", @@ -2514,7 +2537,7 @@ namespace DSPRE.Resources { [0x017D] = new byte[] { 2, 2 }, [0x017E] = new byte[] { 2, 2 }, [0x017F] = new byte[] { 2, 2 }, - [0x0180] = new byte[] { 1 }, + [0x0180] = new byte[] { 2, 2 }, [0x0181] = new byte[] { 2, 2 }, [0x0182] = new byte[] { 2 }, [0x0183] = new byte[] { 2 }, @@ -2850,8 +2873,8 @@ namespace DSPRE.Resources { [0x02AA] = new byte[] { 2 }, [0x02AB] = new byte[] { 2 }, [0x02AC] = new byte[] { 2 }, - [0x02AD] = new byte[] { 2, 2 }, - [0x02AE] = new byte[1] { 0 }, + [0x02AD] = new byte[] { 2, 2, 2 }, + [0x02AE] = new byte[] { 2, 2 }, [0x02AF] = new byte[] { 2 }, [0x02B0] = new byte[] { 2 }, [0x02B1] = new byte[] { 2 }, @@ -2868,7 +2891,7 @@ namespace DSPRE.Resources { [0x02BC] = new byte[] { 2 }, [0x02BD] = new byte[] { 2, 2, 2, 2 }, [0x02BE] = new byte[1] { 0 }, - [0x02BF] = new byte[1] { 0 }, + [0x02BF] = new byte[] { 2 }, [0x02C0] = new byte[] { 2 }, [0x02C1] = new byte[1] { 0 }, [0x02C2] = new byte[] { 2 }, @@ -2945,11 +2968,11 @@ namespace DSPRE.Resources { [0x0309] = new byte[] { 2, 2 }, [0x030A] = new byte[1] { 0 }, [0x030B] = new byte[] { 2, 2 }, - [0x030C] = new byte[] { 2 }, + [0x030C] = new byte[] { 1, 1 }, [0x030D] = new byte[] { 2 }, [0x030E] = new byte[1] { 0 }, [0x030F] = new byte[] { 1 }, - [0x0310] = new byte[] { 2 }, + [0x0310] = new byte[] { 1, 1 }, [0x0311] = new byte[] { 2, 1 }, [0x0312] = new byte[] { 1 }, [0x0313] = new byte[] { 2, 2, 2 },