Closed burner1024 closed 1 month 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.
Oh, yeah, the parsing function called checks the file name and parses .BAF extensions as BAF files and everything else as BCS. I'll see what I can do.
Oh, it also can do BCS parsing? That's news. I assume the same for D/DLG?
Not really, I just used the wrong function, one that dispatches on file name to possibly get it onto a BCS track. Do you want parse-support for BCS and DLG?
Anyway, the filename stuff has been fixed in 68436676720063267d08c6f8c83cd4611ce7cd7a.
Do you want parse-support for BCS and DLG
No, can't think of a usage for it at the moment.
Anyway, the filename stuff has been fixed.
Thanks!
Doesn't appear to work anymore