Open burner1024 opened 6 months ago
I think something in your command line or game setup is preventing WeiDU from loading IDS files and the like. --parse-check works for me when I do a simple weidu --parse-check baf test/test.baf
with CWD being a game directory.
I tried it just now, seems to work. It's likely my test was borked, yes. I'll add more info if I manage to reproduce it.
OK, it seems that weidu expects the file to actually have .baf
extension, and fails otherwise.
$ weidu --game ~/bg2-test --no-exit-pause --noautoupdate --debug-assign --parse-check baf tmp.baf
[weidu] WeiDU version 24900
[/home/userbg2-test/chitin.key] 184 BIFFs, 42148 resources
SET %SAVE_DIRECTORY% = ~./save~
SET %MPSAVE_DIRECTORY% = ~./mpsave~
SET %USER_DIRECTORY% = ~.~
[/home/user/bg2-test/dialog.tlk] 74265 string entries
File [tmp.baf] was successfully parsed as type [baf]
$ weidu --game ~/bg2-test --no-exit-pause --noautoupdate --debug-assign --parse-check baf tmp.txt
[weidu] WeiDU version 24900
[/home/user/bg2-test/chitin.key] 184 BIFFs, 42148 resources
SET %SAVE_DIRECTORY% = ~./save~
SET %MPSAVE_DIRECTORY% = ~./mpsave~
SET %USER_DIRECTORY% = ~.~
[/home/user/bg2-test/dialog.tlk] 74265 string entries
[tmp.txt] LEXER ERROR at line 1 column 0-1
Near Text: IF
invalid keyword [IF]
[tmp.txt] ERROR at line 1 column 0-1
Near Text: IF
Parsing.Parse_error
ERROR: parsing [tmp.txt]: Parsing.Parse_error
ERROR: File [tmp.txt] was NOT successfully parsed as type [baf]
FATAL ERROR: Parsing.Parse_error
$ md5sum tmp.*
8ef7bf661b2311e0c893706d962c9221 tmp.baf
8ef7bf661b2311e0c893706d962c9221 tmp.txt
It does pass, however, if tmp.txt is empty. So, not a big problem, but not sure if this is intended behaviour.
Doesn't appear to work anymore