Toribash
Original Post
Toribash Lua Library System
I have found myself needing to reuse the same code snippets over and over, so instead of re-including them in all the different scripts, I decided to write a easy-to-use library system.

Library files are pre-compiled binary files that can be loaded at the top of a program, and can include functions and constants and things of that sort to help you get things done faster. I am hoping that also the scripters of toribash can come together and build a fairly comprehensive "third-party" sdk for useful things like lua-driven window management, interface objects,
3d math tools, toribash-specific math, and other things of that sort.

This zip file contains the basic tools needed to load and export libraries, and also a few libraries to get you started.

To install:

Extract the contents of the zip file AS IS into your scripts folder. Read lib_help.txt for more info.

The 2 libraries included are:
inputbox.lib - A basic input box that passes the input to a specified function.
debug.lib - A helper library to set watches on variables and display them anywhere on the screen. Also, you can press F12 to input script commands and have them executed right away (useful for echoing variables or to change the value of a variable on the fly.)

To write new libraries, read the library_info.txt file in the lib folder. There is also a template provided for library txt files named template.txt.

For any other help, post here and I will answer as soon as I can get back to an internet connection.

-UPDATE-
Oops, forgot to include the library dumper <.< Thanks Dafe
Attached Files
library.zip (7.0 KB, 59 views)
lib_dump.lua (285 Bytes, 33 views)
Last edited by NewbLuck; Dec 19, 2007 at 02:56 AM.
 ____  _____  __  __  _  _  ___  _  _ 
(  _ \(  _  )(  )(  )( \( )/ __)( \/ )
 ) _ < )(_)(  )(__)(  )  (( (__  \  / 
(____/(_____)(______)(_)\_)\___) (__)