Fix a bunch of unique export source files - #2499
Open
vaisest wants to merge 12 commits into
Open
Conversation
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) |
LocalIdentity
requested changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Link to a build that showcases this PR:
Before screenshot:
After screenshot: