MMBN3: Modernizations and Minor Bugfixes (#2991)

This commit is contained in:
digiholic
2024-04-18 11:02:01 -06:00
committed by GitHub
parent 727915040d
commit f89cee4b15
4 changed files with 51 additions and 267 deletions

View File

@@ -1,4 +1,5 @@
from Options import Choice, Range, DefaultOnToggle
from dataclasses import dataclass
from Options import Choice, Range, DefaultOnToggle, PerGameCommonOptions
class ExtraRanks(Range):
@@ -41,8 +42,9 @@ class TradeQuestHinting(Choice):
default = 2
MMBN3Options = {
"extra_ranks": ExtraRanks,
"include_jobs": IncludeJobs,
"trade_quest_hinting": TradeQuestHinting,
}
@dataclass
class MMBN3Options(PerGameCommonOptions):
extra_ranks: ExtraRanks
include_jobs: IncludeJobs
trade_quest_hinting: TradeQuestHinting

View File

@@ -7,6 +7,7 @@ from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification, Region,
LocationProgressType
from worlds.AutoWorld import WebWorld, World
from .Rom import MMBN3DeltaPatch, LocalRom, get_base_rom_path
from .Items import MMBN3Item, ItemData, item_table, all_items, item_frequencies, items_by_id, ItemType
from .Locations import Location, MMBN3Location, all_locations, location_table, location_data_table, \
@@ -51,7 +52,8 @@ class MMBN3World(World):
threat the Internet has ever faced!
"""
game = "MegaMan Battle Network 3"
option_definitions = MMBN3Options
options_dataclass = MMBN3Options
options: MMBN3Options
settings: typing.ClassVar[MMBN3Settings]
topology_present = False
@@ -71,10 +73,10 @@ class MMBN3World(World):
Already has access to player options and RNG.
"""
self.item_frequencies = item_frequencies.copy()
if self.multiworld.extra_ranks[self.player] > 0:
self.item_frequencies[ItemName.Progressive_Undernet_Rank] = 8 + self.multiworld.extra_ranks[self.player]
if self.options.extra_ranks > 0:
self.item_frequencies[ItemName.Progressive_Undernet_Rank] = 8 + self.options.extra_ranks
if not self.multiworld.include_jobs[self.player]:
if not self.options.include_jobs:
self.excluded_locations = always_excluded_locations + [job.name for job in jobs]
else:
self.excluded_locations = always_excluded_locations
@@ -160,7 +162,7 @@ class MMBN3World(World):
remaining = len(all_locations) - len(required_items)
for i in range(remaining):
filler_item_name = self.multiworld.random.choice(filler_items)
filler_item_name = self.random.choice(filler_items)
item = self.create_item(filler_item_name)
self.multiworld.itempool.append(item)
filler_items.remove(filler_item_name)
@@ -411,10 +413,10 @@ class MMBN3World(World):
long_item_text = ""
# No item hinting
if self.multiworld.trade_quest_hinting[self.player] == 0:
if self.options.trade_quest_hinting == 0:
item_name_text = "Check"
# Partial item hinting
elif self.multiworld.trade_quest_hinting[self.player] == 1:
elif self.options.trade_quest_hinting == 1:
if item.progression == ItemClassification.progression \
or item.progression == ItemClassification.progression_skip_balancing:
item_name_text = "Progress"
@@ -466,7 +468,7 @@ class MMBN3World(World):
return MMBN3Item(event, ItemClassification.progression, None, self.player)
def fill_slot_data(self):
return {name: getattr(self.multiworld, name)[self.player].value for name in self.option_definitions}
return self.options.as_dict("extra_ranks", "include_jobs", "trade_quest_hinting")
def explore_score(self, state):

View File

@@ -18,11 +18,12 @@ on Steam, you can obtain a copy of this ROM from the game's files, see instructi
Once Bizhawk has been installed, open Bizhawk and change the following settings:
- Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to
"Lua+LuaInterface". This is required for the Lua script to function correctly.
**NOTE: Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs**
**of newer versions of Bizhawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load**
**"NLua+KopiLua" until this step is done.**
- **If you are using a version of BizHawk older than 2.9**, you will need to modify the Lua Core.
Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to
"Lua+LuaInterface". This is required for the Lua script to function correctly.
**NOTE:** Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs
of newer versions of Bizhawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load
"NLua+KopiLua" until this step is done.
- Under Config > Customize > Advanced, make sure the box for AutoSaveRAM is checked, and click the 5s button.
This reduces the possibility of losing save data in emulator crashes.
- Under Config > Customize, check the "Run in background" and "Accept background input" boxes. This will allow you to
@@ -37,7 +38,7 @@ and select EmuHawk.exe.
## Extracting a ROM from the Legacy Collection
The Steam version of the Legacy Collection contains unmodified GBA ROMs in its files. You can extract these for use with Archipelago.
The Steam version of the Battle Network Legacy Collection contains unmodified GBA ROMs in its files. You can extract these for use with Archipelago.
1. Open the Legacy Collection Vol. 1's Game Files (Right click on the game in your Library, then open Properties -> Installed Files -> Browse)
2. Open the file `exe/data/exe3b.dat` in a zip-extracting program such as 7-Zip or WinRAR.
@@ -73,7 +74,9 @@ to the emulator as recommended).
Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools"
menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script.
Navigate to your Archipelago install folder and open `data/lua/connector_mmbn3.lua`.
Navigate to your Archipelago install folder and open `data/lua/connector_mmbn3.lua`.
**NOTE:** The MMBN3 Lua file depends on other shared Lua files inside of the `data` directory in the Archipelago
installation. Do not move this Lua file from its default location or you may run into issues connecting.
To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the
server uses password, type in the bottom textfield `/connect <address>:<port> [password]`)