From 8c7b757757d1370f154bf975b9712cd1cf7cea7c Mon Sep 17 00:00:00 2001 From: ivy <119665497+lvlvllvlvllvlvl@users.noreply.github.com> Date: Sun, 31 Mar 2024 08:10:39 +0700 Subject: [PATCH 1/2] 3.24 update --- PyPoE/cli/exporter/wiki/parsers/item.py | 12 +- PyPoE/poe/constants.py | 7 +- PyPoE/poe/file/shared/cache.py | 6 +- .../poe/file/specification/data/generated.py | 561 +++++++++++++++--- .../generation/custom_attributes.py | 5 - 5 files changed, 487 insertions(+), 104 deletions(-) diff --git a/PyPoE/cli/exporter/wiki/parsers/item.py b/PyPoE/cli/exporter/wiki/parsers/item.py index ee84f694..d033d0ba 100644 --- a/PyPoE/cli/exporter/wiki/parsers/item.py +++ b/PyPoE/cli/exporter/wiki/parsers/item.py @@ -480,6 +480,7 @@ class ItemsParser(SkillParserShared): "Crucible": "3.21.0", "Ancestral": "3.22.0", # AKA Trial of the Ancestors "Azmeri": "3.23.0", # AKA Affliction + "Necropolis": "3.24.0", } _IGNORE_DROP_LEVEL_CLASSES = ( @@ -2927,16 +2928,11 @@ def add_line(text, mod): data_file="Essences.dat64", data_mapping=( ( - "DropLevelMinimum", + "DropLevel", { "template": "drop_level", - }, - ), - ( - "DropLevelMaximum", - { - "template": "drop_level_maximum", - "condition": lambda v: v > 0, + "condition": lambda v: v, + "format": lambda v: v[0], }, ), ( diff --git a/PyPoE/poe/constants.py b/PyPoE/poe/constants.py index 92a1deb2..1ca39033 100644 --- a/PyPoE/poe/constants.py +++ b/PyPoE/poe/constants.py @@ -604,6 +604,9 @@ def __new__(cls, id: int, lower: str, colour: str): class MAP_FRAGMENT_FAMILIES(IntEnumOverride): """ Representation of map fragment families (MapFragmentFamilies.dat) + + As of the 3.24 scarab reword, it appears that each scarab has its own family, + so this enum is probably not worth maintaining. """ BESTIARY_AND_SULPHITE = 0 # Maybe just master-related? @@ -626,7 +629,7 @@ class MAP_FRAGMENT_FAMILIES(IntEnumOverride): ETERNAL = 17 TEMPLAR = 18 VAAL = 19 - REGULAR = 20 + REGULAR = 126 DEFAULT = REGULAR STANDARD = REGULAR @@ -818,6 +821,8 @@ class MOD_GENERATION_TYPE(IntEnumOverride): CRUCIBLE_TREE = 31 CRUCIBLE_UNIQUE_TREE = 32 AZMERI_EMPOWERED_MONSTER = 33 + NECROPOLIS_MONSTER = 34 + NECROPOLIS_DEVOTED_MONSTER = 35 class WORDLISTS(IntEnumOverride): diff --git a/PyPoE/poe/file/shared/cache.py b/PyPoE/poe/file/shared/cache.py index d320d5cf..f44eb470 100644 --- a/PyPoE/poe/file/shared/cache.py +++ b/PyPoE/poe/file/shared/cache.py @@ -127,7 +127,11 @@ def __init__( if files is not None: for file in files: - read_func(file) + try: + read_func(file) + except Exception: + print("Error reading", file) + raise def __getitem__(self, item: str) -> Any: """ diff --git a/PyPoE/poe/file/specification/data/generated.py b/PyPoE/poe/file/specification/data/generated.py index 2c6f8f9c..e24c0e3e 100644 --- a/PyPoE/poe/file/specification/data/generated.py +++ b/PyPoE/poe/file/specification/data/generated.py @@ -3008,6 +3008,30 @@ ), ), ), + "AtlasTrees.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Name", + type="ref|string", + ), + Field( + name="Unknown0", + type="int", + ), + Field( + name="Unknown1", + type="int", + ), + Field( + name="UnlockObjective", + type="ref|string", + ), + ), + ), "AtlasUpgradesInventoryLayout.dat": File( fields=( Field( @@ -9644,16 +9668,12 @@ key="Mods.dat", ), Field( - name="Unknown0", - type="int", - ), - Field( - name="DropLevelMinimum", + name="HASH32", type="int", ), Field( - name="DropLevelMaximum", - type="int", + name="DropLevel", + type="ref|list|int", ), Field( name="Monster_ModsKeys", @@ -9670,8 +9690,8 @@ type="int", ), Field( - name="Unknown1", - type="int", + name="Data0", + type="ref|list|int", ), Field( name="Display_Weapon_ModsKey", @@ -9837,20 +9857,17 @@ type="bool", ), Field( - name="Keys0", + name="MemoryLines", type="ref|list|ref|out", + key="Mods.dat", ), Field( - name="Unknown2", - type="int", - ), - Field( - name="Unknown3", - type="int", + name="Data1", + type="ref|list|int", ), Field( - name="Unknown4", - type="int", + name="Level2", + type="ref|list|int", ), ), ), @@ -16482,6 +16499,24 @@ ), ), ), + "ItemisedNecropolisPacks.dat": File( + fields=( + Field( + name="Item", + type="ref|out", + key="BaseItemTypes.dat", + ), + Field( + name="Pack", + type="ref|out", + key="NecropolisPacks.dat", + ), + Field( + name="Description", + type="ref|string", + ), + ), + ), "ItemisedVisualEffect.dat": File( fields=( Field( @@ -18268,7 +18303,6 @@ Field( name="MapFragmentFamilies", type="int", - enum="MAP_FRAGMENT_FAMILIES", ), Field( name="Flag0", @@ -18573,6 +18607,10 @@ name="AzmeriTier", type="int", ), + Field( + name="NecropolisTier", + type="int", + ), ), virtual_fields=( VirtualField( @@ -21637,17 +21675,21 @@ type="ref|string", unique=True, ), + Field( + name="Unknown0", + type="int", + ), Field( name="WorldAreasKeys", type="ref|list|ref|out", key="WorldAreas.dat", ), Field( - name="Unknown0", + name="Unknown1", type="int", ), Field( - name="Unknown1", + name="Unknown2", type="int", ), Field( @@ -21668,11 +21710,11 @@ type="bool", ), Field( - name="Unknown2", - type="int", + name="Data0", + type="ref|list|int", ), Field( - name="Data0", + name="Data1", type="ref|list|ref|string", ), Field( @@ -21711,7 +21753,7 @@ type="bool", ), Field( - name="Data1", + name="Data2", type="ref|list|byte", ), Field( @@ -21731,7 +21773,7 @@ type="bool", ), Field( - name="Data2", + name="Data3", type="ref|list|ref|string", ), ), @@ -23600,6 +23642,285 @@ ), ), ), + "NecropolisCraftItemTypes.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="ExorciseIcon", + type="ref|string", + ), + Field( + name="Name", + type="ref|string", + ), + Field( + name="Unknown0", + type="int", + ), + Field( + name="Keys0", + type="ref|list|ref|out", + ), + Field( + name="IllustratuionIcon", + type="ref|string", + ), + Field( + name="UniqueCraft", + type="ref|out", + key="NecropolisUniqueCrafts.dat", + ), + Field( + name="BaseItem", + type="ref|out", + key="BaseItemTypes.dat", + ), + Field( + name="TextAudioLong", + type="ref|out", + key="NPCTextAudio.dat", + ), + Field( + name="Flag0", + type="bool", + ), + Field( + name="Flag1", + type="bool", + ), + Field( + name="Achievements", + type="ref|out", + key="AchievementItems.dat", + ), + Field( + name="TextAudioShort", + type="ref|out", + key="NPCTextAudio.dat", + ), + ), + ), + "NecropolisCraftingMods.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Unknown0", + type="int", + ), + Field( + name="Stats", + type="ref|list|ref|out", + key="Stats.dat", + ), + Field( + name="StatsValues", + type="ref|list|int", + ), + Field( + name="CraftingItemType", + type="ref|out", + key="NecropolisCraftItemTypes.dat", + ), + Field( + name="Unknown1", + type="int", + ), + Field( + name="CorpsesNotConsumed", + type="bool", + ), + Field( + name="CraftingItemTypes", + type="ref|list|ref|out", + key="NecropolisCraftItemTypes.dat", + ), + Field( + name="Achievements", + type="ref|list|ref|out", + key="AchievementItems.dat", + ), + Field( + name="MatchingMonsters", + type="int", + ), + ), + ), + "NecropolisCraftingModsFromStats.dat": File( + fields=( + Field( + name="Stat", + type="ref|out", + key="Stats.dat", + ), + Field( + name="CraftingMod", + type="ref|out", + key="NecropolisCraftingMods.dat", + ), + ), + ), + "NecropolisPackAdditionalPacks.dat": File( + fields=( + Field( + name="Key0", + type="ref|out", + ), + Field( + name="Key1", + type="ref|out", + ), + ), + ), + "NecropolisPackImplicitClass.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="MoreImplicit", + type="ref|out", + key="NecropolisPackImplicits.dat", + ), + Field( + name="LessImplicit", + type="ref|out", + key="NecropolisPackImplicits.dat", + ), + ), + ), + "NecropolisPackImplicits.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Text", + type="ref|string", + ), + Field( + name="Icon", + type="ref|string", + ), + ), + ), + "NecropolisPackModTiers.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Icon", + type="ref|string", + ), + Field( + name="Name", + type="ref|string", + ), + Field( + name="TextColours", + type="ref|list|ref|string", + ), + Field( + name="SpecialTier", + type="bool", + ), + ), + ), + "NecropolisPackMods.dat": File( + fields=( + Field( + name="Mod", + type="ref|out", + key="Mods.dat", + ), + Field( + name="Tier", + type="ref|out", + key="NecropolisPackModTiers.dat", + ), + Field( + name="NextTier", + type="ref|generic", + key="NecropolisPackMods.dat", + ), + Field( + name="PrevTier", + type="ref|generic", + key="NecropolisPackMods.dat", + ), + ), + ), + "NecropolisPacks.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Name", + type="ref|string", + ), + Field( + name="Icon", + type="ref|string", + ), + Field( + name="Description", + type="ref|string", + ), + Field( + name="PackLeader1", + type="ref|string", + ), + Field( + name="PackLeader2", + type="ref|string", + ), + Field( + name="Mod", + type="ref|out", + key="Mods.dat", + ), + ), + ), + "NecropolisPacksPerArea.dat": File( + fields=( + Field( + name="Key0", + type="ref|out", + ), + Field( + name="Keys0", + type="ref|list|ref|out", + ), + Field( + name="Data0", + type="ref|list|int", + ), + ), + ), + "NecropolisUniqueCrafts.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Stats", + type="ref|list|ref|out", + key="Stats.dat", + ), + ), + ), "NetTiers.dat": File( fields=( Field( @@ -23716,6 +24037,23 @@ ), ), ), + "PackFrequencyNames.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Frequency", + type="float", + ), + Field( + name="Text", + type="ref|out", + key="ClientStrings.dat", + ), + ), + ), "PantheonPanelLayout.dat": File( fields=( Field( @@ -23800,21 +24138,6 @@ type="ref|out", key="QuestStates.dat", ), - Field( - name="QuestState2", - type="ref|out", - key="QuestStates.dat", - ), - Field( - name="QuestState3", - type="ref|out", - key="QuestStates.dat", - ), - Field( - name="QuestState4", - type="ref|out", - key="QuestStates.dat", - ), Field( name="IsDisabled", type="bool", @@ -23912,6 +24235,36 @@ ), ), ), + "PassiveJewelNodeModifyingStats.dat": File( + fields=( + Field( + name="JwelStat", + type="ref|out", + key="Stats.dat", + ), + Field( + name="Stat", + type="ref|out", + key="Stats.dat", + ), + Field( + name="Flag0", + type="bool", + ), + Field( + name="Flag1", + type="bool", + ), + Field( + name="Flag2", + type="bool", + ), + Field( + name="Flag3", + type="bool", + ), + ), + ), "PassiveJewelRadii.dat": File( fields=( Field( @@ -26754,20 +27107,44 @@ ), ), ), - "Scarabs.dat": File( + "ScarabTypes.dat": File( fields=( Field( - name="ScarabType", - type="int", - enum="SCARAB_TYPES", + name="Id", + type="ref|string", ), Field( - name="Tier", - type="int", + name="Tag", + type="ref|out", + key="Tags.dat", ), Field( - name="BaseItemTypesKey", + name="DisableDrops", + type="ref|out", + key="Stats.dat", + ), + Field( + name="MoreLikely", + type="ref|out", + key="Stats.dat", + ), + Field( + name="Count", + type="ref|out", + key="Stats.dat", + ), + ), + ), + "Scarabs.dat": File( + fields=( + Field( + name="Type", type="ref|out", + key="ScarabTypes.dat", + ), + Field( + name="Items", + type="ref|list|ref|out", key="BaseItemTypes.dat", ), ), @@ -29742,6 +30119,32 @@ ), ), ), + "TypeTags.dat": File( + fields=( + Field( + name="Id", + type="ref|string", + ), + Field( + name="Tag", + type="ref|out", + key="Tags.dat", + ), + Field( + name="Name", + type="ref|string", + ), + Field( + name="Icon", + type="ref|string", + ), + Field( + name="Key0", + type="ref|out", + key="Stats.dat", + ), + ), + ), "UITalkText.dat": File( fields=( Field( @@ -31075,10 +31478,6 @@ type="ref|list|ref|out", key="Tags.dat", ), - Field( - name="Unknown5", - type="int", - ), Field( name="IsHideout", type="bool", @@ -31088,11 +31487,11 @@ type="ref|string", ), Field( - name="Unknown6", + name="Unknown5", type="int", ), Field( - name="Unknown7", + name="Unknown6", type="int", ), Field( @@ -31162,7 +31561,7 @@ key_id="Id", ), Field( - name="Unknown8", + name="Unknown7", type="int", ), Field( @@ -31171,33 +31570,13 @@ key="Environments.dat", ), Field( - name="Unknown9", + name="Unknown8", type="int", ), Field( name="Key5", type="ref|out", ), - Field( - name="Unknown10", - type="int", - ), - Field( - name="Unknown11", - type="int", - ), - Field( - name="Unknown12", - type="int", - ), - Field( - name="Unknown13", - type="int", - ), - Field( - name="Unknown14", - type="int", - ), Field( name="Flag1", type="bool", @@ -31207,15 +31586,12 @@ type="bool", ), Field( - name="Unknown15", - type="int", - ), - Field( - name="Unknown16", - type="int", + name="Unknown9", + type="ref|generic", + key="WorldAreas.dat", ), Field( - name="Unknown17", + name="Unknown10", type="int", ), Field( @@ -31223,30 +31599,37 @@ type="ref|list|byte", ), Field( - name="Key6", + name="LeagueChance1", type="ref|out", + key="WorldAreaLeagueChances.dat", ), Field( - name="Unknown18", + name="Unknown11", type="int", ), Field( - name="Key7", + name="LeagueChance2", type="ref|out", + key="WorldAreaLeagueChances.dat", ), Field( - name="Key8", + name="Key6", type="ref|out", ), Field( - name="Key9", + name="Ruleset", type="ref|out", key="Rulesets.dat", ), Field( - name="Unknown19", + name="Unknown12", type="int", ), + Field( + name="QuestFlag", + type="ref|out", + key="QuestFlags.dat", + ), ), virtual_fields=( VirtualField( diff --git a/PyPoE/poe/file/specification/generation/custom_attributes.py b/PyPoE/poe/file/specification/generation/custom_attributes.py index 244677e2..dca96106 100644 --- a/PyPoE/poe/file/specification/generation/custom_attributes.py +++ b/PyPoE/poe/file/specification/generation/custom_attributes.py @@ -34,11 +34,6 @@ def __init__(self, enum: str = None): enum="HARVEST_OBJECT_TYPES", ), }, - "MapFragmentMods.dat": { - "MapFragmentFamilies": CustomizedField( - enum="MAP_FRAGMENT_FAMILIES", - ), - }, "Mods.dat": { "Domain": CustomizedField( enum="MOD_DOMAIN", From d0f857b4ea75f8c6e46e8bb5a08c6b4d1c1faa58 Mon Sep 17 00:00:00 2001 From: ivy <119665497+lvlvllvlvllvlvl@users.noreply.github.com> Date: Sun, 31 Mar 2024 10:25:43 +0700 Subject: [PATCH 2/2] allflame ember descriptions --- PyPoE/cli/exporter/wiki/parsers/item.py | 24 +++++++++++++++---- .../poe/file/specification/data/generated.py | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/PyPoE/cli/exporter/wiki/parsers/item.py b/PyPoE/cli/exporter/wiki/parsers/item.py index d033d0ba..4aaff013 100644 --- a/PyPoE/cli/exporter/wiki/parsers/item.py +++ b/PyPoE/cli/exporter/wiki/parsers/item.py @@ -85,7 +85,7 @@ def gemshade_constants_from_hex(hex_text: str): return GemShadeConstants(*struct.unpack("".join(str(v).splitlines()), + }, + ), + ), + row_index=True, + ) + _cls_map = dict() """ This defines the expected data elements for an item class. @@ -3383,6 +3398,7 @@ def _harvest_plant_booster_extra(self, infobox, base_item_type, harvest_object): "HeistObjective": (), "Breachstone": (_type_currency,), "ItemisedCorpse": (_type_corpse,), + "NecropolisPack": (_type_allflame_ember,), } _conflict_active_skill_gems_map = { diff --git a/PyPoE/poe/file/specification/data/generated.py b/PyPoE/poe/file/specification/data/generated.py index e24c0e3e..dc17e061 100644 --- a/PyPoE/poe/file/specification/data/generated.py +++ b/PyPoE/poe/file/specification/data/generated.py @@ -16504,6 +16504,7 @@ Field( name="Item", type="ref|out", + unique=True, key="BaseItemTypes.dat", ), Field(