ToME: the Tales of Maj'Eyal
http://forums.te4.org/

[1.1.5] Marson's Developer Tools
http://forums.te4.org/viewtopic.php?f=50&t=40525
Page 1 of 1

Author:  Marson [ Sun Feb 09, 2014 11:55 pm ]
Post subject:  [1.1.5] Marson's Developer Tools

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:
Attachment:
Marsons_Dev_Tools.png
Marsons_Dev_Tools.png [ 17.02 KiB | Viewed 4027 times ]

Author:  Castler [ Sat Feb 15, 2014 8:34 pm ]
Post subject:  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.)

Author:  Marson [ Sat Feb 15, 2014 8:51 pm ]
Post subject:  Re: [1.1.5] Marson's Developer Tools

Feel free. If it's a public release, a little credit would be nice. ;)

Author:  Castler [ Sun Feb 16, 2014 4:29 am ]
Post subject:  Re: [1.1.5] Marson's Developer Tools

Credit will be provided. :) Thanks.

Author:  Marson [ Wed Mar 12, 2014 5:40 pm ]
Post subject:  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.

Author:  Marson [ Fri Apr 04, 2014 9:07 pm ]
Post subject:  Re: [1.1.5] Marson's Developer Tools

+ Reload Addons function is now also keybound (CTRL-R by default).

Author:  Zireael [ Tue Apr 22, 2014 12:30 pm ]
Post subject:  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.

Author:  Marson [ Tue May 06, 2014 11:37 pm ]
Post subject:  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.

Author:  Marson [ Mon Jun 16, 2014 12:06 am ]
Post subject:  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.

Attachment:
varlist.png
varlist.png [ 52.99 KiB | Viewed 3398 times ]

Author:  Nagyhal [ Wed Sep 17, 2014 12:19 am ]
Post subject:  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!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/