Page 1 of 1

Using lua as a scripting language for Extraction Tool?

Posted: Thu Mar 06, 2008 10:46 am
by Rheini
Still wondering if lua would be a good scripting language for a game archive extraction tool.
The engine could provide functions like GetByte(),GetInt(),GetString(),... (-> just like MultiEx does it) to get data from the archive file and something along the lines of AddFile(), AddFolder(),... (which the engine would use to create an intern tree which will then be displayed to the user, if the archive format doesn't support directories, there is only one root folder "/")

The advantage is that you have a powerful programming language for your needs. This makes it possible to also support encryption and compression.

What do you think? :?

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Mar 06, 2008 12:05 pm
by SiENcE
Lua is slow when using binary operation. Lua 5.1.3 speeds up some things but it's better todo this in cpp. Don't understand me wrong, lua is fast, but not for binary operations using large files.

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Mar 06, 2008 12:14 pm
by Rheini
What do you exactly mean? Passing data to lua via those Get* functions? Reading files directly in lua? Operations like bit shift and the like?

Re: Using lua as a scripting language for Extraction Tool?

Posted: Sun Mar 16, 2008 7:50 pm
by Rahly
Na, doesn't sound like a good idea. There is actually another idea on the drawing board.

Re: Using lua as a scripting language for Extraction Tool?

Posted: Sun Mar 16, 2008 11:00 pm
by Rheini
Rahly wrote:Na, doesn't sound like a good idea. There is actually another idea on the drawing board.
btw this is no proposal for MultiEx, I wanna write my own little unpacking tool :wink:

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Apr 23, 2009 6:49 pm
by Crypton
Rheini wrote:Still wondering if lua would be a good scripting language for a game archive extraction tool.
The engine could provide functions like GetByte(),GetInt(),GetString(),... (-> just like MultiEx does it) to get data from the archive file and something along the lines of AddFile(), AddFolder(),... (which the engine would use to create an intern tree which will then be displayed to the user, if the archive format doesn't support directories, there is only one root folder "/")

The advantage is that you have a powerful programming language for your needs. This makes it possible to also support encryption and compression.

What do you think? :?
Hi :) I got same idea a few weeks ago, and now when I was listing code section I saw you thread :)

Did you managed to make any scripting language for extracting files ? or tool that uses lua ? I'm thinking about making this tool too, with record support (struct) and other stuff...

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Apr 23, 2009 7:36 pm
by Rheini
Don't have much time, thus I didn't come far.
I started out by adding binary operators (<<, >>, & etc) and integer division to lua 5.1.4 which should be completed.
Still need to work on the LuaLib for D (an OO wrapper for the D programming language).

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Apr 23, 2009 7:52 pm
by Crypton
I'm not too familiar with lua :) so I'm thinking about writing language from zero, and it will be written in Object Pascal or C++ (I dont have any experience with D language, sorry :)

Re: Using lua as a scripting language for Extraction Tool?

Posted: Thu Apr 23, 2009 11:08 pm
by Rheini
it's your choice :wink:
but writing a new and *stable* scripting language is hard.
btw, try D, it's worth it :wink:

Re: Using lua as a scripting language for Extraction Tool?

Posted: Wed May 06, 2009 1:30 pm
by Rheini
Probably a language similar to 010 Editor's one is most appropriate.

Code: Select all

struct Header
{
    char[4] magic;
    uint      version;
    ...
}