Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wofsauge/External-Item-Descriptions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: V4.86
Choose a base ref
...
head repository: wofsauge/External-Item-Descriptions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 11,372 additions and 3,943 deletions.
  1. +77 −35 .github/scripts/localizationChecker.py
  2. +128 −10 { → .github}/scripts/lookuptable_generator.py
  3. +1 −0 CREDITS.md
  4. +445 −34 descriptions/ab+/cs_cz.lua
  5. +1 −1 descriptions/ab+/de.lua
  6. +3 −3 descriptions/ab+/en_us.lua
  7. +12 −12 descriptions/ab+/it.lua
  8. +238 −238 descriptions/ab+/ko_kr.lua
  9. +2 −2 descriptions/ab+/pt_br.lua
  10. +1,339 −0 descriptions/ab+/ro_ro.lua
  11. +1,336 −1,338 descriptions/ab+/zh_cn.lua
  12. +80 −0 descriptions/rep+/cs_cz.lua
  13. +89 −0 descriptions/rep+/de.lua
  14. +23 −0 descriptions/rep+/en_us.lua
  15. +41 −24 descriptions/rep+/fr.lua
  16. +252 −1 descriptions/rep+/it.lua
  17. +3 −0 descriptions/rep+/ja_jp.lua
  18. +33 −15 descriptions/rep+/ko_kr.lua
  19. +314 −0 descriptions/rep+/ro_ro.lua
  20. +3 −0 descriptions/rep+/ru.lua
  21. +252 −1 descriptions/rep+/spa.lua
  22. +47 −0 descriptions/rep+/uk_ua.lua
  23. +256 −5 descriptions/rep+/zh_cn.lua
  24. +404 −46 descriptions/rep/cs_cz.lua
  25. +197 −37 descriptions/rep/de.lua
  26. +138 −20 descriptions/rep/en_us.lua
  27. +136 −20 descriptions/rep/fr.lua
  28. +13 −13 descriptions/rep/it.lua
  29. +528 −414 descriptions/rep/ko_kr.lua
  30. +1,492 −0 descriptions/rep/ro_ro.lua
  31. +1 −1 descriptions/rep/ru.lua
  32. +2 −2 descriptions/rep/uk_ua.lua
  33. +1,492 −1,197 descriptions/rep/zh_cn.lua
  34. +908 −281 features/eid_api.lua
  35. +0 −1 features/eid_conditionals.lua
  36. +13 −18 features/eid_conditionals_funcs.lua
  37. +13 −0 features/eid_data.lua
  38. +18 −8 features/eid_debugging.lua
  39. +120 −11 features/eid_modifiers.lua
  40. +19 −13 features/eid_xmldata.lua
  41. +13 −1 features/eid_xmldata_rep+.lua
  42. +4 −0 features/pathfinder/CREDITS.md
  43. +52 −0 features/pathfinder/find_vector.lua
  44. +77 −0 features/pathfinder/heap.lua
  45. +146 −0 features/pathfinder/luafinding.lua
  46. +109 −86 main.lua
  47. +8 −3 metadata.xml
  48. +451 −21 resources/font/PixelMplus10-Regular.sfd
  49. BIN resources/font/PixelMplus10-Regular.ttf
  50. BIN resources/font/eid_borderless.fnt
  51. BIN resources/font/eid_borderless_0.png
  52. BIN resources/font/eid_cn_alt.fnt
  53. BIN resources/font/eid_cn_alt_0.png
  54. BIN resources/font/eid_cn_alt_1.png
  55. BIN resources/font/eid_cn_alt_2.png
  56. BIN resources/font/eid_cn_default.fnt
  57. BIN resources/font/eid_cn_fix_0.png
  58. BIN resources/font/eid_default.fnt
  59. BIN resources/font/eid_default_0.png
  60. BIN resources/font/eid_default_1.png
  61. BIN resources/font/eid_inverted.fnt
  62. BIN resources/font/eid_inverted_0.png
  63. BIN resources/font/eid_inverted_1.png
  64. +4 −1 resources/gfx/eid_inline_icons.anm2
  65. BIN resources/gfx/eid_inline_icons.png
  66. BIN scripts/Isaac Savegame Reader.zip
  67. +0 −24 scripts/LEEME.txt
  68. +39 −6 scripts/README.txt
  69. BIN scripts/savegame_reader.zip
112 changes: 77 additions & 35 deletions .github/scripts/localizationChecker.py
Original file line number Diff line number Diff line change
@@ -50,6 +50,26 @@ def getMaxCheckLimit(parentName):
return maxChecklimit[entry]
return float('inf')

def addUpdatedTables(languageCode, dlc):
if dlc != "ab+":
# Add language table
lua.execute('EID.descriptions["'+languageCode+'"] = {}')
# Add all tables that are assumed to exist already in ab+
updatedTables = ["collectibles", "cards", "trinkets", "ConditionalDescs"]
if dlc == "rep":
updatedTables += ["pills", "carBattery", "BFFSSynergies", "CharacterInfo", "ConditionalDescs", "VoidNames", "custom"]
if dlc == "rep+":
updatedTables += ["abyssSynergies"]

# korean uses some additional addititve tables
if languageCode == "ko_kr":
if dlc == "rep":
updatedTables += ["dice", "MCM"]
else:
updatedTables += ["bookOfVirtuesWisps"]
for table in updatedTables:
lua.execute('EID.descriptions["'+languageCode+'"].'+table+' = {}')

# find entries in table2 that are missing or different than in table 1
def compare_tables(table1, table2, prev_key):
errorCount = 0
@@ -88,55 +108,77 @@ def compare_tables(table1, table2, prev_key):
return errorCount


lua.execute('REPENTOGON = true; EID = {}; EID.descriptions = {}; function EID:updateDescriptionsViaTable(changeTable, tableToUpdate) for k,v in pairs(changeTable) do if v == "" then tableToUpdate[k] = nil else tableToUpdate[k] = v end end end')
g = lua.globals()

# Read English language files first
englishFiles = []
languageProgress = {}
en_us_entries = {}
for dlc in dlcs:
englishFiles += glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/en_us.lua", recursive=True)
lua.execute('REPENTOGON = true; EID = {}; EID.descriptions = {}; function EID:updateDescriptionsViaTable(changeTable, tableToUpdate) for k,v in pairs(changeTable) do if v == "" then tableToUpdate[k] = nil else tableToUpdate[k] = v end end end')
g = lua.globals()
addUpdatedTables("en_us", dlc)

for englishFile in englishFiles:
# Read English language files first
englishFile = glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/en_us.lua", recursive=True)[0]
print("reading:", englishFile)
lua.execute(open(englishFile, "r", encoding="UTF-8").read())

en_us_entries = count_entries(g.EID['descriptions']['en_us'])
print("en_us entries:", en_us_entries)
en_us_entries[dlc] = count_entries(g.EID['descriptions']['en_us'])
print("en_us "+dlc+" entries:", en_us_entries[dlc])


languages = {}
langFiles = []
for dlc in dlcs:
langFiles = []
if ONLY_DO_LANGUAGE != "":
langFiles += glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/"+ONLY_DO_LANGUAGE+".lua", recursive=True)
else:
langFiles += glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/*.lua", recursive=True)
# Read other language files
for file in langFiles:
if "en_us" not in file and "transformations" not in file:
print("reading:",file)
lua.execute(open(file, "r", encoding="UTF-8").read())
languages[os.path.basename(file).replace(".lua","")] = 0

# Evaluate all languages
for lang in languages:
print(f"Evaluating language '{lang}'..")
errorCount = compare_tables(g.EID['descriptions']['en_us'], g.EID['descriptions'][lang], lang)
percentage = (en_us_entries - errorCount) / en_us_entries*100
languages[lang] = [percentage, errorCount]
print(f"{Red}Errors found: {errorCount} / {en_us_entries}{Color_Off}\n\n")

# Read other language files
for file in langFiles:
if "en_us" not in file and "transformations" not in file:
languageCode = os.path.basename(file).replace(".lua","")
print("reading:",file)
addUpdatedTables(languageCode, dlc)
lua.execute(open(file, "r", encoding="UTF-8").read())
if languageCode not in languageProgress:
languageProgress[languageCode] = {}

# Evaluate language for completeness
print(f"Evaluating language '{languageCode}'..")
errorCount = compare_tables(g.EID['descriptions']['en_us'], g.EID['descriptions'][languageCode], languageCode+"("+dlc+")")
percentage = (en_us_entries[dlc] - errorCount) / en_us_entries[dlc] * 100
languageProgress[languageCode][dlc] = [percentage, errorCount]
print(f"{Red}Errors found: {errorCount} / {en_us_entries[dlc]}{Color_Off}\n\n")


# Calculate total english entries
total_en_us_entries = 0
for entries in en_us_entries.values():
total_en_us_entries += entries

# Write git Workflow summary
gitWorkflowSummary = "### Translation progress\n| Language | Completion | Missing entries |\n|---|---|---|\n"
gitWorkflowSummary = "### Translation progress\n| Language | Completion (AB+) |Completion (REP) |Completion (REP+) |Completion (Total) |\n|---|---|---|---|---|\n"
print(f"{Blue}Translation progress:{Color_Off}")
for lang in languages:
print(
f"\t{BWhite}{lang}{Color_Off}\t{Blue}{round(languages[lang][0],2)}%{Color_Off}\t{Red}{languages[lang][1]} missing{Color_Off}"
)
errorMessage = languages[lang][1] if languages[lang][1] >3 else "🎉"
gitWorkflowSummary += f"| {lang} | {round(languages[lang][0],2)}% | {errorMessage} |\n"

for lang in languageProgress.keys():
gitWorkflowSummary += f"| {lang} "
totalMissing = 0
for dlc in dlcs:
gitCompletionMessage = ""
if dlc in languageProgress[lang]:
percent = round(languageProgress[lang][dlc][0], 2)
missingEntries = languageProgress[lang][dlc][1]
totalMissing += missingEntries
print(f"\t{BWhite}{lang}({dlc}){Color_Off}\t{Blue}{percent}%{Color_Off}\t{Red}{missingEntries} missing{Color_Off}")
gitCompletionMessage = f"{percent}% ({missingEntries} left)" if missingEntries >3 else "100% 🎉"
else:
print(
f"\t{BWhite}{lang}({dlc}){Color_Off}\t\t{Red}DLC translation missing!{Color_Off}")
gitCompletionMessage = f"0% ({en_us_entries[dlc]} left)"
totalMissing += en_us_entries[dlc]

gitWorkflowSummary += f"| {gitCompletionMessage} "

totalPercent = round((total_en_us_entries - totalMissing) / total_en_us_entries * 100, 2)
gitWorkflowSummary += f"|{totalPercent}% ({totalMissing}) "
gitWorkflowSummary += "|\n"

print(gitWorkflowSummary)

if "GITHUB_STEP_SUMMARY" in os.environ:
print("\n\nwrite workflow summary to: ", os.environ["GITHUB_STEP_SUMMARY"])
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

import xml.etree.ElementTree as ET

GENERATE_REP_PLUS = True
GENERATE_REP_PLUS = False

filePath = "..\\..\\resources-dlc3\\"
writeToFile = "features/eid_xmldata.lua"
@@ -22,31 +22,33 @@ def sortByID(elem):
cardMetadatas = []
pillMetadatas = []
entityNames = []
locusts = []
locustColors = []

recipeIngredients = {}
#Poop, Penny
# Poop, Penny
recipeIngredients["_"] = 29
recipeIngredients["."] = 8
#Red, Soul, Black Heart
# Red, Soul, Black Heart
recipeIngredients["h"] = 1
recipeIngredients["s"] = 2
recipeIngredients["b"] = 3
#Key, Bomb, Card
# Key, Bomb, Card
recipeIngredients["/"] = 12
recipeIngredients["v"] = 15
recipeIngredients["["] = 21
#Gold Heart, Eternal Heart, Pill
# Gold Heart, Eternal Heart, Pill
recipeIngredients["g"] = 5
recipeIngredients["e"] = 4
recipeIngredients["("] = 22
#Rotten Heart, Gold Key, Giga Bomb
# Rotten Heart, Gold Key, Giga Bomb
recipeIngredients["r"] = 7
recipeIngredients["|"] = 13
recipeIngredients["V"] = 17
#Gold Bomb, Bone Heart
# Gold Bomb, Bone Heart
recipeIngredients["^"] = 16
recipeIngredients["B"] = 6
#Dice Shard, Cracked Key
# Dice Shard, Cracked Key
recipeIngredients["?"] = 24
recipeIngredients["~"] = 25

@@ -110,7 +112,78 @@ def sortByID(elem):
theName = theName[1:].replace('_',' ').title()
entityNames.append({ "id": theID, "name": theName })

#Write xml file
# Read locusts.xml
locustsXML = ET.parse(filePath+'locusts.xml').getroot()
for color in locustsXML.findall('color'):
name = color.get('name')
c_r = color.get('r') or 0
c_g = color.get('g') or 0
c_b = color.get('b') or 0
c_or = color.get('or') or 0
c_og = color.get('og') or 0
c_ob = color.get('ob') or 0
locustColors.append({"name": name, "r":c_r, "g":c_g, "b":c_b, "or":c_or, "og":c_og, "ob":c_ob})

for locust in locustsXML.findall('locust'):
id = locust.get('id')
# locust entries can have multiple colors defined
color = locust.get('color') or "default"
colors = []
for c in color.split("&"):
colors.append(c.split("-")[len(c.split("-"))-1])

scale = locust.get('scale') or 1
speed = locust.get('speed') or 1

locustFlags1 = locust.get('locustFlags') or locust.get('locustFlag') or -1
locustFlags2 = locust.get('locustFlags2') or -1
locustFlags3 = locust.get('locustFlags3') or -1

tearFlags1 = locust.get('tearFlags') or -1
tearFlags2 = locust.get('tearFlags2') or -1
tearFlags3 = locust.get('tearFlags3') or -1

procChance1 = locust.get('procChance') or 1
procChance2 = locust.get('procChance2') or 1
procChance3 = locust.get('procChance3') or 1
count = locust.get('count') or 1

mutexFlags2 = locust.get('mutexFlags2') or 0

damageMultiplier1 = locust.get('damageMultiplier') or 1
damageMultiplier2 = locust.get('damageMultiplier2') or 1

foundExistingLocust = False
for savedLocust in locusts:
if savedLocust["id"] == id:
savedLocust["count"] = savedLocust["count"] + 1
foundExistingLocust = True
break

if not foundExistingLocust:
locusts.append(
{
"id": id,
"color": colors,
"scale": scale,
"speed": speed,
"count": count,
"locustFlags1": list(map(int, str(locustFlags1).split(" "))),
"locustFlags2": list(map(int, str(locustFlags2).split(" "))),
"locustFlags3": list(map(int, str(locustFlags3).split(" "))),
"tearFlags1": list(map(int, str(tearFlags1).split(" "))),
"tearFlags2": list(map(int, str(tearFlags2).split(" "))),
"tearFlags3": list(map(int, str(tearFlags3).split(" "))),
"procChance1": procChance1,
"procChance2": procChance2,
"procChance3": procChance3,
"damageMultiplier1": damageMultiplier1,
"damageMultiplier2": damageMultiplier2,
"mutexFlags2": mutexFlags2,
}
)

# Write xml file

newfile = open(writeToFile, "w")
newfile.write("--This file was autogenerated using 'lookuptable_generator.py' found in the scripts folder\n")
@@ -155,6 +228,52 @@ def sortByID(elem):

newfile.write("}\n\n")

newfile.write("-- locust colors for Abyss\n")
newfile.write("EID.XMLLocustColors = {")
for color in locustColors:
tempString = ""
tempString += "[\""+str(color["name"])+"\"] = {"
tempString += str(color["r"])+", "
tempString += str(color["g"])+", "
tempString += str(color["b"])+", "
tempString += str(color["or"])+", "
tempString += str(color["og"])+", "
tempString += str(color["ob"])+"}, "
newfile.write(tempString)
newfile.write("}\n\n")


newfile.write("-- effect storage for each locust generated by Abyss\n")
newfile.write("EID.XMLLocusts = {")
counter = 0
for locust in locusts:
counter = counter+1
tempString = ""
tempString += "["+str(locust['id'])+"] = {"
tempString += ""+str(locust['color']).replace("[","{").replace("]","}")+", "
tempString += str(locust['count'])+", "
tempString += str(locust['scale'])+", "
tempString += str(locust['speed'])+", "
# locustFlags and tearFLags can have space seperated values in them
tempString += str(locust['locustFlags1']).replace("[","{").replace("]","}")+", "
tempString += str(locust['locustFlags2']).replace("[","{").replace("]","}")+", "
tempString += str(locust['locustFlags3']).replace("[","{").replace("]","}")+", "
tempString += str(locust['tearFlags1']).replace("[","{").replace("]","}")+", "
tempString += str(locust['tearFlags2']).replace("[","{").replace("]","}")+", "
tempString += str(locust['tearFlags3']).replace("[","{").replace("]","}")+", "
tempString += str(locust['procChance1'])+", "
tempString += str(locust['procChance2'])+", "
tempString += str(locust['procChance3'])+", "
tempString += str(locust['damageMultiplier1'])+", "
tempString += str(locust['damageMultiplier2'])+", "
tempString += str(locust['mutexFlags2'])
tempString += "}, "
if counter > 50:
newfile.write(tempString+"\n")
counter = 0
else:
newfile.write(tempString)
newfile.write("}\n\n")

newfile.write("--The name of each entity, for use in glitched item descriptions\n")
newfile.write("EID.XMLEntityNames = {")
@@ -172,4 +291,3 @@ def sortByID(elem):

newfile.close()
print("SUCCESS")

1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ If you enjoy this mod and want to help on it, check it out on GitHub: https://gi
- **Korean**: by Blackcreamtea, 리셰(kohashiwakaba)
- **Polish**: by Rickyy, Kennyluz, MERITT, DimonoKingoKongo
- **Portuguese**: by Marcelino Cruz
- **Romanian**: by ed._.096, MHI
- **Russian**: by hell2Pay, fly_6, Dezzelshipc and Sekaz
- **Spanish**: by Lidia Arroyo Purroy, MartinFierro, maintained by AutisticGoat (Kotry)
- **Brazilian - Portuguese**: by LuanRoger and NotZin02
Loading