Gui Debug Tools 0.10.5 for 1.16.x & 1.17.x BfW

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Gui Debug Tools 0.10.5 for 1.16.x & 1.17.x BfW

Post by SigurdFireDragon »

This is my fifth add-on, Gui Debug Tools.
It is written completely in Lua.
Current version is 0.10.5 for the 1.16 & 1.17 series.
First released for BfW 1.13.5.

I have found the tools in this add-on useful in making bug reports and developing add-ons.

It is mostly based on code from the Wesnoth Lua Pack. It is an 'always on' add-on, whose features can be accessed whenever debug mode is active.

It allows changing many things about a unit or side through right-click commands. These are enhanced versions of the 'Quick Debug Menu' and 'Side Debug Menu' from the WLP. Mouse-over tooltips appear for most commands in the Unit & Side Debug menus.

It also provides right-click access to the Gamestate Inspector and Lua Console.

Note that this add-on expects you to know what you are doing when you enter input. Incorrect id's and other things usually throw a lua error, but the effects of those errors should be limited to the execution of the dialog.

It is available on the 1.13 add-ons server and at https://github.com/sigurdfdragon/Gui_Debug_Tools

Screenshots:
Spoiler:
Last edited by SigurdFireDragon on October 21st, 2023, 6:27 pm, edited 12 times in total.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
danielkwinsor
Posts: 5
Joined: August 20th, 2016, 9:39 pm

Re: Gui Debug Tools

Post by danielkwinsor »

Looks nice, what would it take to make it mainline rather than add-on?
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Gui Debug Tools

Post by mattsc »

I just wanted to say that I think this is fantastic. I do a lot of "unit manipulation" when testing AI code, and to a lesser extent when working on campaigns. I've often thought of setting something like this up myself, but my version would have been much simpler and less extensive. Thanks, SigurdFireDragon!
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools

Post by SigurdFireDragon »

danielkwinsor wrote:Looks nice, what would it take to make it mainline rather than add-on?
Not sure, but at minimum someone (likely me) to lead the effort to mainline it. It's not a priority for me at the moment.
Also, some aspects of the Unit Debug could use more consistency (ie, Abilities & Attack)
mattsc wrote:I just wanted to say that I think this is fantastic. I do a lot of "unit manipulation" when testing AI code, and to a lesser extent when working on campaigns. I've often thought of setting something like this up myself, but my version would have been much simpler and less extensive. Thanks, SigurdFireDragon!
You're welcome. :)
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Gui Debug Tools

Post by Celtic_Minstrel »

Suggestion: Add "invulnerable". It could go in the "Status" section, I guess, or maybe in "Misc".
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools

Post by SigurdFireDragon »

Celtic_Minstrel wrote:Suggestion: Add "invulnerable". It could go in the "Status" section, I guess, or maybe in "Misc".
I've added it in the Status section.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
LEO33
Posts: 9
Joined: January 16th, 2017, 5:14 am
Location: Albania
Contact:

Re: Gui Debug Tools

Post by LEO33 »

Am I doing something wrong? (Sorry, newbie here).
Attachments
screenshot.JPG
gfgtdf
Developer
Posts: 1431
Joined: February 10th, 2013, 2:25 pm

Re: Gui Debug Tools

Post by gfgtdf »

LEO33 wrote:Am I doing something wrong? (Sorry, newbie here).
You seen to be using this on wesnoth 1.12 while its written for wesnoth 1.13
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
LEO33
Posts: 9
Joined: January 16th, 2017, 5:14 am
Location: Albania
Contact:

Re: Gui Debug Tools

Post by LEO33 »

SigurdFireDragon wrote:Current version is 0.9.0 for BfW Master & the latest development release.
Sorry, I thought "Master" referred to the current stable version. :(

Anyway, I hope it is made for the stable version in the future too.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Gui Debug Tools

Post by Celtic_Minstrel »

It will be, for the next stable version sometime later this year. :P Given that 1.12 is almost at end-of-life, I doubt it would be worth the time to backport this.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools

Post by SigurdFireDragon »

Thanks for the inquiry and responses. I've update the OP to better clarify which versions of BfW that Gui Debug Tools will work with.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.9.6 for BfW 1.13.7

Post by SigurdFireDragon »

Version 0.9.5 is up.

Gui Debug Tools is now available on the 1.13 add-ons server.

Changes since August 6th, 2016:

Unit Debug:
Added fields for Overlays, Variables, Underlying_id, Heal unit, Invulnerable, Goto
Removed field: Put to recall (merged functionality into Location)
Move Slider max value is now a minimum of 100
2x sized unit image to match mainline convention
Improved trait handling
Some behavior changes due to code cleanup - most notable are
1. That hitpoints & moves now only change if the sliders are moved or the unit is healed.
2. Statuses are updated after trait handling, so things like poison will be cured if the unit gains a trait like undead.

Side Debug:
Added fields: Side Image (2x sized flag icon) , Side, Heal units, Kill units, Flag, Flag icon
Removed field: Name (Doesn't seem to really do anything in 1.13)

Appearance:
Icons for right-click menu
Mouse-over tooltips for just about everything in Unit & Side Debug
Add-on Version number displayed as tooltip for title of Unit & Side Debug

Lots of code cleanup.

EDIT: Version 0.9.6 uploaded (April 20th, 2017, 4:34 pm)
Use title case for options and a compatibility fix.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.9.7 for BfW 1.13.10

Post by SigurdFireDragon »

Version 0.9.7 is up for BfW 1.13.10

Changes:

Side Debug: Increase base income slider max
Side Debug: Add Super Heal Units checkbutton
Side Debug: Add Goto textbox
Side Debug: Add Location textbox
Unit Debug: Add upkeep textbox
Unit Debug: Copy Unit - Is now a slider
Heal Unit & Heal Units: Restore moves & attacks as well
Unit Debug: Ensure extra large unit sprites are scaled down to 2x
Fixed some log warnings
Some code cleanup
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
SigurdFireDragon
Developer
Posts: 545
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.9.8 for BfW 1.13.10

Post by SigurdFireDragon »

Version 0.9.8 is up for 1.13.12

Changes
Side Debug: Seed Recall - Is now a slider
Side Debug: Seed Recall - Use random gender when creating units
Unit Debug: Location - Allow empty string to place unit on the recall list
Side Debug: Seed Recall - Fix error when calling on side without recruits
Minor cleanup & deprecation fixes
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Gui Debug Tools 0.9.8 for BfW 1.13/1.14

Post by octalot »

Thanks for this tool, it helped a lot with debugging SXC / reproducing bugs in 1.13.11.
Post Reply