Last active
June 20, 2021 07:44
-
-
Save woctezuma/f4faef1210e49ed06cf4725bac60998f to your computer and use it in GitHub Desktop.
Fix Roguebook
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
# References: | |
# - https://gist.github.com/woctezuma/f4faef1210e49ed06cf4725bac60998f | |
# - https://steamcommunity.com/app/1076200/discussions/0/3070873501572457641/ | |
from collections import Counter | |
from pathlib import Path | |
import glob | |
import os | |
game_path = "C:/Applis/Steam/steamapps/common/Roguebook/" | |
card_path = "Roguebook_Data/StreamingAssets/GameBoxResources/cards_scripts/" | |
file_path = game_path + card_path | |
print(file_path) | |
files = glob.glob(file_path + '*.xlb') | |
ids = [Path(fname).name.split('.')[0] for fname in files] | |
c = Counter(ids) | |
duplicates = [id for id in c if c[id]>1] | |
for id in duplicates: | |
files = glob.glob(file_path + id + '*.xlb') | |
files.sort(key=os.path.getmtime) | |
for fname in files[:-1]: | |
print(fname) | |
Path(fname).rename(fname + '.old') |
However, there is another error:
[email protected],07 COMPILATION ERROR [GameBox::EntityInfoLibraryServiceImpl::readEntityInfoLibrary@48] Error(s) while reading entity with id 94 from json:
[email protected],07 ERROR [logError@66] Received unhandled parse exception with code 0x00000000:
0x0000000c: Semantic Error - Could not find getter 'bearer' on type 'entity<creature>' - Candidates are:
cardId
tags
[...]
heroType
line 2:
if (castToDeckCard(event.target.killer).heroType == this.bearer.heroType) INDENT
^
Solution found at https://steamcommunity.com/sharedfiles/filedetails/?id=2521884163
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fixes errors such as: