From 482794473972a1265308fcb89069066483bbdda0 Mon Sep 17 00:00:00 2001 From: Starfall Date: Wed, 7 Feb 2024 17:54:47 -0600 Subject: dropcalc: Median XL .txt parser Was intended to eventually become a drop calculator. Might work for other Diablo II mods without changes, I don't think there are any MXL-specific fields involved in this. Abandoned due to lack of organizational structure on the project and ... creative differences with one of the lead devs. --- dropcalc/mxl_types/set.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dropcalc/mxl_types/set.py (limited to 'dropcalc/mxl_types/set.py') diff --git a/dropcalc/mxl_types/set.py b/dropcalc/mxl_types/set.py new file mode 100644 index 0000000..498cdcf --- /dev/null +++ b/dropcalc/mxl_types/set.py @@ -0,0 +1,15 @@ +from sqlalchemy import ForeignKey +from sqlalchemy.orm import Mapped, mapped_column + +from . import BaseDAO + + +class SetItem(BaseDAO): + filename = "SetItems.txt" + __tablename__ = "set_item" + + id: Mapped[int] = mapped_column(primary_key=True) + index: Mapped[str] # string reference, often also human-readable + item = mapped_column(ForeignKey("base.code")) # note inconsistency with everything else... + rarity: Mapped[int] # drop frequency, relative to other sets on this base + lvl: Mapped[int] # minimum drop level -- cgit