Adds a few tools for addon developers.
• "Reload Addons" action is keybound (CTRL-R by default) and also added to the top of the Debug menu. CTRL-ALT-SHIFT-R was already in the engine and will reboot without saving. (I didn't know about this until I stumbled across it in the code, but now there's a choice between save and no-save reboots.)
• LUA console font scales based on game settings, including the larger fonts in Marson's UI Modifications. If installed, the style is based on the tooltip option, and size is based on dialog font size.
• Added Enrique Garcia's "inspect.lua" function to the LUA console for expanded table inspection (default depth of 2). Example: ==game.player.combat
https://github.com/kikito/inspect.lua (MIT license)
• Keypad Enter key has same functionality as the Return key.
• The LUA console can be called even when a dialog is already on-screen. (Except the Inventory screen. Install my UI Mod as well in order to enable it there.
• The PrtScn button will take screenshots of the console screen.
• Debug info outputs to on-screen log while registering and uploading addons.
• CTRL-F will flush waiting output to the logfile.
• Added "Lua inspect grid" option to the right-click menu (Map.TERRAIN).
• Compatible w/ 1.1.5 - 1.2.x
+ Added a Minimalist UI element for tracking variables. Edit the list via CTRL-V.
Example
==game.player.combat
To limit the depth of the tables to 3 deep:
==game.player.combat, {depth=3}
To filter (in this case, using a function)
==game.player.combat, {filter=isEvenNumber}
http://te4.org/games/addons/tome/marson-dev
Sample output:
[1.1.5] Marson's Developer Tools
Moderator: Moderator
[1.1.5] Marson's Developer Tools
Last edited by Marson on Mon Jun 16, 2014 12:03 am, edited 6 times in total.
Re: [1.1.5] Marson's Developer Tools
This is a really good idea. I'm borrowing some of it for my own module. (Hope you don't mind.)
Re: [1.1.5] Marson's Developer Tools
Feel free. If it's a public release, a little credit would be nice. 

Re: [1.1.5] Marson's Developer Tools
+ Keypad Enter key has same functionality as the Return key.
+ The LUA console can be called even when a dialog is already on-screen. (Except the Inventory screen. Install my UI Mod to enable it there.)
+ The PrtScn button will take screenshots of the console screen.
I'm unable to upload to Steam, so anyone wanting the latest will have to update manually.
+ The LUA console can be called even when a dialog is already on-screen. (Except the Inventory screen. Install my UI Mod to enable it there.)
+ The PrtScn button will take screenshots of the console screen.
I'm unable to upload to Steam, so anyone wanting the latest will have to update manually.
Re: [1.1.5] Marson's Developer Tools
+ Reload Addons function is now also keybound (CTRL-R by default).
Re: [1.1.5] Marson's Developer Tools
I think I'll follow Castler's example and nick some of this (lua console!!!) for my module.
Re: [1.1.5] Marson's Developer Tools
+ CTRL-F will flush waiting output to the logfile.
+ Added "Lua inspect grid" option to the right-click menu (Map.TERRAIN).
+ Added default 'inspect.lua' table depth of "2" to prevent crashes of near infinite table displays.
+ Added "Lua inspect grid" option to the right-click menu (Map.TERRAIN).
+ Added default 'inspect.lua' table depth of "2" to prevent crashes of near infinite table displays.
Re: [1.1.5] Marson's Developer Tools
+ Added a Minimalist UI element for tracking variables. Edit the list via CTRL-V.
It's mobile and resizable. You can enter full functions in as well, as long as they return a single value. My next step is to expand the text input to make that easier.
It's mobile and resizable. You can enter full functions in as well, as long as they return a single value. My next step is to expand the text input to make that easier.
Re: [1.1.5] Marson's Developer Tools
Marson, you delicious beast.
Coding for ToME feels like skipping on clouds again.
Thanks for everything you've done!
Coding for ToME feels like skipping on clouds again.
Thanks for everything you've done!