Skip to content

Commit 39bba5e

Browse files
Add ModEquivalencies dump script for Foulborn pairing investigation
Export script that dumps ModEquivalencies.dat rows to check if MutatedUnique mod pairings are stored there. If they are, we can automate Foulborn original↔mutation mod pairing instead of maintaining a manual table.
1 parent e8ff082 commit 39bba5e

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
-- Dump ModEquivalencies rows to check if Foulborn (MutatedUnique) pairings exist
2+
-- Run from the Export tool: loads dat files, prints matching rows
3+
4+
local found = 0
5+
local total = 0
6+
7+
print("=== ModEquivalencies Dump ===")
8+
print("")
9+
10+
-- First pass: dump ALL rows that involve MutatedUnique mods
11+
print("--- Rows containing MutatedUnique mods ---")
12+
for row in dat("ModEquivalencies"):Rows() do
13+
total = total + 1
14+
local id = row.Id or ""
15+
local m0 = row.ModsKey0 and row.ModsKey0.Id or "(nil)"
16+
local m1 = row.ModsKey1 and row.ModsKey1.Id or "(nil)"
17+
local m2 = row.ModsKey2 and row.ModsKey2.Id or "(nil)"
18+
19+
if m0:match("MutatedUnique") or m1:match("MutatedUnique") or m2:match("MutatedUnique")
20+
or id:match("MutatedUnique") or id:match("Foulborn") or id:match("Mutated") then
21+
found = found + 1
22+
print(string.format("Row: Id=%s", id))
23+
print(string.format(" ModsKey0: %s", m0))
24+
print(string.format(" ModsKey1: %s", m1))
25+
print(string.format(" ModsKey2: %s", m2))
26+
print("")
27+
end
28+
end
29+
30+
print(string.format("--- Found %d matching rows out of %d total ---", found, total))
31+
print("")
32+
33+
-- Second pass: dump a sample of ALL rows (first 20) so we can see the general structure
34+
print("--- Sample of first 20 rows (any type) ---")
35+
local count = 0
36+
for row in dat("ModEquivalencies"):Rows() do
37+
count = count + 1
38+
if count > 20 then break end
39+
local id = row.Id or ""
40+
local m0 = row.ModsKey0 and row.ModsKey0.Id or "(nil)"
41+
local m1 = row.ModsKey1 and row.ModsKey1.Id or "(nil)"
42+
local m2 = row.ModsKey2 and row.ModsKey2.Id or "(nil)"
43+
print(string.format(" [%d] Id=%s | M0=%s | M1=%s | M2=%s", count, id, m0, m1, m2))
44+
end
45+
print("")
46+
print("Done.")

0 commit comments

Comments
 (0)