From 2bfcc32b6b8486daf38c5eae2aaebf56daae3a8f Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 29 Sep 2024 19:02:28 -0700 Subject: [PATCH] add patch to clear the BB unreleased item list --- .../ClearUnreleasedItemList.59NL.patch.s | 26 +++++++++++++++++++ .../StackLimits.59NL.patch.s | 0 system/config.example.json | 22 +++++++++------- 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NL.patch.s rename system/client-functions/{StackLimits => BlueBurstExclusive}/StackLimits.59NL.patch.s (100%) diff --git a/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NL.patch.s b/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NL.patch.s new file mode 100644 index 00000000..18827f71 --- /dev/null +++ b/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NL.patch.s @@ -0,0 +1,26 @@ +# It would be a bad idea to remove `.meta hide_from_patches_menu` to make this +# patch an option for players to be able to select; either all players on the +# server should have this patch, or none should have it. + +# This patch clears the list of unreleased items on the client, so the client +# never creates buggy items when the server generates an item that wasn't +# released on the official servers. + +.meta name="Clear unreleased item list" +.meta description="" +.meta hide_from_patches_menu + +entry_ptr: +reloc0: + .offsetof start +start: + xor eax, eax + mov edx, esp + mov esp, 0x009F81B0 + mov ecx, 0x3C +again: + push 0 + dec ecx + jnz again + mov esp, edx + ret diff --git a/system/client-functions/StackLimits/StackLimits.59NL.patch.s b/system/client-functions/BlueBurstExclusive/StackLimits.59NL.patch.s similarity index 100% rename from system/client-functions/StackLimits/StackLimits.59NL.patch.s rename to system/client-functions/BlueBurstExclusive/StackLimits.59NL.patch.s diff --git a/system/config.example.json b/system/config.example.json index 43ffebce..d3fdb8c9 100644 --- a/system/config.example.json +++ b/system/config.example.json @@ -706,11 +706,11 @@ // the behavior of clients that are already patched with different stack // limits. If you want to use an unpatched BB client but still have custom // stack limits, you can use the StackLimits runtime patch by editing - // system/client-functions/StackLimits/StackLimits.59NL.patch.s to match the - // BB stack limits and adding "StackLimits" to the BBRequiredPatches list. - // The ToolLimits list is indexed by data1[1] (that is, the second byte of the - // item data); for items beyond the end of the list, the last entry's value is - // used. + // system/client-functions/BlueBurstExclusive/StackLimits.59NL.patch.s to + // match the BB stack limits and adding "StackLimits" to the BBRequiredPatches + // list. The ToolLimits list is indexed by data1[1] (that is, the second byte + // of the item data); for items beyond the end of the list, the last entry's + // value is used. "ItemStackLimits": [ {"MesetaLimit": 999999, "ToolLimits": [10]}, // DC NTE {"MesetaLimit": 999999, "ToolLimits": [10]}, // DC 11/2000 @@ -853,10 +853,14 @@ "ServerGlobalDropRateMultiplier": 1.0, // Client functions listed here are always enabled as auto patches for BB - // clients. For example, you can set this to ["StackLimits"] if you've edited - // the StackLimits patch and the ItemStackLimits field in this file, and want - // the limits to take effect on BB clients. - "BBRequiredPatches": [], + // clients. For example, you can add "StackLimits" here if you've edited the + // StackLimits patch and the ItemStackLimits field in this file, and want the + // limits to take effect on BB clients. + "BBRequiredPatches": [ + // You will probably want to uncomment the following line if you want to + // use items that were unreleased on the original Sega servers. + // "ClearUnreleasedItemList", + ], // Whether to retain server drop tables when game leaders change. The client // reloads its drop tables when the leader joins a game or returns to Pioneer