Firstly, the major difference. The text is purple, the best color of all the colors.
This console supports by default 500 lines of text 85 characters in length (Total of 42, 500 characters). It allows you to scroll up, down, left or right through the console buffer (using page up/down, home and end keys) It supports multiple colors (any allowed by powder-toy) including binding text to a color class rather than directly to a color. Binding written text to "error" allows the user to override the error text color with a color of their own choice.
Commands !help - displays help information !color <color> - set console foreground to color supported input. !color <class> <color> - set class to given color !r <file> - Shorthand for dofile("file"), file does not need to end in .lua
Color classes command - Currently typed command foreground - default text foreground background - default text background error - Error text foreground errorbg - Error text background backdrop - The color behind the console (the slightly black see through color) border - Color of the border around the console line - Line separating the console input and output hud_motd - All Lua Console's Message of the day color hud_debug - All Lua Console's HUD debug color hud_close - Close message color when old console is opened
For lua script writers You can either continue to use tpt.log or you can use console.writeln/console.write to display your output
console.write( text [, foreground [, background] ) - Write text to console (does not append text with a new line) console.writeln( text [, foreground [, background] ) - Write text to console
console.active - get active state of console 0 = Not Active 1 = Console Opened 2 = Old Console Opened
If you need to open the old consoleconsole.old.open()
Colors can be represented by the following nil- use default text color table- with 3 entries (RGB) eg. {255,0,0} table - with 4 entries (RGBA) eg. {255,255,255,178} color - eg. console.colors.red string - A string containing a valid color name or color class (eg. "red" or "error")
To make your own color class simply copy the following line. console.colors.name_of_your_class = {255,255,255,255}
A color class must be a table with 4 entries (RGBA) All colors and color classes are stored in console.colors
== Issues & Workarounds == Keymapping is done in script, as a result your keyboard maybe unsupported. The console does support multiple mappings. The following keyboards are supported: US
== Bugs that are likely impossible to fix with only lua == -- pressing ctrl while in the console still changes simulation save and browse buttons to local save and browse buttons -- when the mouse moves over menu elements they'll still react as per normal (clicking them does nothing) -- Entering old console and click the X button in the top-left corner will close old console however lua-console won't be able to detect this (press escape twice to fix it) -- The MOTD is not blacked out by the console background -- You can still change the shape of the cursor by holding shift
== Bugs that might be possible to fix == -- Any other script using draw commands will probably draw over the top of lua-console
== Change log == V8 added better keybinding support fixed issue with being able to select a cursor that doesn't exist
V7 write/writeln now prints non string input fixed bugs with using old buffer lines console command now scrolls to provide input larger than screen width
V6 Current command supports coloring Added cursor to current command (left/right keys)
V5 left/right buffer movement (home/end keys) multiple colors and color classeslines over buffer.width in length are automatically moved to a new line
If any key doesn't work or is incorrect. press D when the console is not opened to switch to debug mode, press the key, then jot down the number in the corner and tell me the character it should actually show instead.