[1.1.5] Marson's Developer Tools

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

[1.1.5] Marson's Developer Tools

#1 Post by Marson »

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:
Marsons_Dev_Tools.png
Marsons_Dev_Tools.png (17.02 KiB) Viewed 4705 times
Last edited by Marson on Mon Jun 16, 2014 12:03 am, edited 6 times in total.

Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Re: [1.1.5] Marson's Developer Tools

#2 Post by Castler »

This is a really good idea. I'm borrowing some of it for my own module. (Hope you don't mind.)
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: [1.1.5] Marson's Developer Tools

#3 Post by Marson »

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

Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Re: [1.1.5] Marson's Developer Tools

#4 Post by Castler »

Credit will be provided. :) Thanks.
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: [1.1.5] Marson's Developer Tools

#5 Post by Marson »

+ 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.

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: [1.1.5] Marson's Developer Tools

#6 Post by Marson »

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

Zireael
Archmage
Posts: 449
Joined: Tue Jun 18, 2013 7:24 pm

Re: [1.1.5] Marson's Developer Tools

#7 Post by Zireael »

I think I'll follow Castler's example and nick some of this (lua console!!!) for my module.

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: [1.1.5] Marson's Developer Tools

#8 Post by Marson »

+ 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.

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: [1.1.5] Marson's Developer Tools

#9 Post by Marson »

+ 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.
varlist.png
varlist.png (52.99 KiB) Viewed 4076 times

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: [1.1.5] Marson's Developer Tools

#10 Post by Nagyhal »

Marson, you delicious beast.

Coding for ToME feels like skipping on clouds again.

Thanks for everything you've done!

Post Reply