-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lua code for TLK reading (WeiDU COPY / APPEND_FILE size limit workaround)
- Loading branch information
Showing
3 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--Exports first 14 bytes of the TLK file (workaround for WeiDU COPY size limit) | ||
file = io.open('EET/bgee_dir.txt',"r") | ||
bgee_dir = file:read("*all") | ||
file:close() | ||
|
||
file = io.open(bgee_dir .. '/weidu.conf',"r") | ||
lang = file:read(16) | ||
lang = lang:gsub('lang_dir = ', '') | ||
file:close() | ||
|
||
file = io.open(bgee_dir .. '/lang/' .. lang .. '/dialog.tlk',"rb") | ||
str = file:read(14) | ||
file:close() | ||
|
||
file = io.open('EET/temp/tlk_cnt.txt',"w+") | ||
file:write(str) | ||
file:close() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--Merge multiple TRA files into 1 (workaround for WeiDU APPEND_FILE size limit) | ||
file = io.open('EET/temp/append.tra',"r") | ||
str = file:read("*all") | ||
file:close() | ||
|
||
file = io.open('EET/base/blank.tra',"r") | ||
str = str .. file:read("*all") | ||
file:close() | ||
|
||
file = io.open('EET/temp/bgee.tra',"r") | ||
str = str .. file:read("*all") | ||
file:close() | ||
|
||
file = io.open('EET/temp/string_set.tra',"w+") | ||
file:write(str) | ||
file:close() |