Skip to content

Fix a bunch of unique export source files - #2499

Open
vaisest wants to merge 12 commits into
PathOfBuildingCommunity:devfrom
vaisest:atz-iri
Open

Fix a bunch of unique export source files#2499
vaisest wants to merge 12 commits into
PathOfBuildingCommunity:devfrom
vaisest:atz-iri

Conversation

@vaisest

@vaisest vaisest commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Adds the other armour type inc lines to the item db unique. The second commit also fixes a bunch of mod ids by cross-referencing with Rasmus' json. This does update values for some items, too.

There are a lot more incorrect ones (200+) which have the same values, but I didn't want to go through them here

Steps taken to verify a working solution:

  • Item manually tested

Link to a build that showcases this PR:

Before screenshot:

After screenshot:

image

@vaisest vaisest changed the title Add more Atziri's Splendour variants Add more Atziri's Splendour variants and fix mod ids Sep 2, 2026
@vaisest vaisest changed the title Add more Atziri's Splendour variants and fix mod ids Add more Atziri's Splendour variants Sep 2, 2026
@vaisest vaisest changed the title Add more Atziri's Splendour variants Add Atziri's Splendour variants and fix unique export IDs Sep 2, 2026
@vaisest

vaisest commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

e9642b6 includes a correction for mod IDs which differed from the Ninja json, but had the same mod text. This was done by a clanker, but I did a pass after it, ensuring that the only IDs not found in the json are legacy mods. The first pass did NOT change any mod text, but in the latter I found some issues, some of which did change the generated mod text.

40d7049 fixes some mods which were incorrect in PoB. Some of these seemed to be missing from the wiki, too.

The used script:

import pathlib
import lupa
import json
import re

lua = lupa.LuaRuntime(unpack_returned_tuples=True)
exportFolder = pathlib.Path("../src/Export/Uniques/")

uqJson = json.loads(pathlib.Path("../uniques.json").read_text())

# dunno why these are missing
ignored = ["Split Personality", "Tabula Rasa", "Guiding Palm", "Palm of the Dreamer"]


def getEntry(name):
    return next(entry for entry in uqJson["uniques"] if entry["name"] == name)


for file in exportFolder.iterdir():
    contents = file.read_text()
    table = lua.eval(f"(function()\n{contents}\nend)()")
    for item in table.values():
        title = item.split("\n")[0]
        if title in ignored or "Source: No longer obtainable" in item:
            continue
        entry = getEntry(title)
        entryIds = [mod["modId"] for mod in entry["mods"]]
        for line in item.split("\n")[2:]:
            line = re.sub(r"\{.+\}", "", line)
            if (
                line != ""
                and ":" not in line
                and "[" not in line
                and line not in entryIds
            ):
                print(title, line)

@vaisest vaisest changed the title Add Atziri's Splendour variants and fix unique export IDs Fix a bunch of unique export source files Sep 3, 2026
Comment thread src/Data/Uniques/shield.lua Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants