Saturday, 2 December 2017

Debugging your TTS mods with console++ : Odds & Ends

Let's wrap up this series (which started here) with some miscellaneous features of console++.

The console module, which console++ is built on top of, includes a handy command: the '=' command gives you access to Lua's dynamic.eval function; in other words it works as a simple expression calculator.  Type '= ' then any mathematical expression and it will display the resulting value.  You can refer to any of the variables in your program when you are a table admin, but all players can use the '=' command for simple maths functions.  Handy if your game is anything like Power Grid!

There are also a couple of commands for interacting with the chat window output:

'echo' will print its parameter into the chat output (just for you); useful to include some output in a script you wish to 'exec' with the -q or -s parameters.

'cls' will clear the chat window.

Finally, console++ gives all players a 'shout' command: this will broadcast its parameter as a message to all players, popping up at the top of their screen as well as in the chat log.  It will appear in your player colour.

I hope if you are using console++ that this series of posts has been helpful, or if you're not that it might have tempted you into trying it.  Any feedback is greatly appreciated, especially bug reports.

No comments:

Post a Comment