Join also our Discord channel! Click here.

Using lua as a scripting language for Extraction Tool?

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Using lua as a scripting language for Extraction Tool?

Post by Rheini » Thu Mar 06, 2008 10:46 am

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? :?

SiENcE
beginner
Posts: 29
Joined: Wed Jun 13, 2007 8:41 am
Been thanked: 1 time

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

Post by SiENcE » Thu Mar 06, 2008 12:05 pm

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.
Last edited by SiENcE on Sat Mar 08, 2008 12:40 pm, edited 1 time in total.

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

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

Post by Rheini » Thu Mar 06, 2008 12:14 pm

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?

Rahly
VVIP member
VVIP member
Posts: 412
Joined: Thu Aug 05, 2004 10:17 am
Been thanked: 1 time

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

Post by Rahly » Sun Mar 16, 2008 7:50 pm

Na, doesn't sound like a good idea. There is actually another idea on the drawing board.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

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

Post by Rheini » Sun Mar 16, 2008 11:00 pm

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:

Crypton
advanced
Posts: 60
Joined: Sat Aug 09, 2008 11:19 am
Has thanked: 2 times
Been thanked: 21 times

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

Post by Crypton » Thu Apr 23, 2009 6:49 pm

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...

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

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

Post by Rheini » Thu Apr 23, 2009 7:36 pm

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).

Crypton
advanced
Posts: 60
Joined: Sat Aug 09, 2008 11:19 am
Has thanked: 2 times
Been thanked: 21 times

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

Post by Crypton » Thu Apr 23, 2009 7:52 pm

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 :)

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

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

Post by Rheini » Thu Apr 23, 2009 11:08 pm

it's your choice :wink:
but writing a new and *stable* scripting language is hard.
btw, try D, it's worth it :wink:

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

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

Post by Rheini » Wed May 06, 2009 1:30 pm

Probably a language similar to 010 Editor's one is most appropriate.

Code: Select all

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

Post Reply