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

GraceWalker
Posts: 2
Joined: February 8th, 2022, 4:25 pm

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by GraceWalker »

Thank you so much for the help Sigurd. I’m not the most savvy when it comes to all this so the explanation was extremely appreciated. The response time as well was way better than I dared to hope.

Wish you the best, man.
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by 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.
Sierano
Posts: 6
Joined: December 30th, 2022, 8:58 am

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by Sierano »

Hello, I am a bit new to this but am quite curious as to how all this works. A few questions:

1. Exactly how do some of the fields in the unit debug menu work? More specifically how to input things into the Role box, Attack box, and Objects box.re

2. What exactly is an "attack index"? I have a hard time finding the exact answers and the wesnoth wiki is not very helpful at all for those who do not know their way around the debug console. Also, would their be a way to show the attack index for the selected unit in the debug menu?

3. Will an option to select alignment ever be added as well?
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by Toranks »

1- Role> Add the name of a role as the same way on "role=name" on [role]
Attack> This is to add an attack from a existent unit type. For example, if you want to add one attack of Elder Mage (staff,lightning), the first, staff is index 1 and the second, index 2. Write "Elder Mage,1" (without the quotation marks), and the unit will receive the staff attack from Elder Mage.
Object> To remove objects, but I'm not sure how exactly it works, because index must be a number, and objects are identified with ID, not index, wich is a string.
All these fields are input-only you will not see the role or the attack there, but directly on the unit

2- Attack index is it is simply the order of the weapon. All weapons that any unit has have the same number in the order in which they are displayed in the unit, starting at the top with the number 1. Just as a side note, the real number of the weapon's index, for use in formulas like $unit.attack[index] starts on 0 ([0],[1],[2]...), but in GUI debug tools you must use +1, starting on 1.
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by Celtic_Minstrel »

Toranks wrote: December 30th, 2022, 12:09 pm the real number of the weapon's index,
I don't think you can consider either of 0,1,2 or 1,2,3 more real than the other. One is used in WML/WFL and the other is used in Lua.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by SigurdFireDragon »

@Sierano

Toranks's answers for 1 & 2. cover most of it. Thanks, Toranks.
To add a little:
Sierano wrote: December 30th, 2022, 9:04 am Also, would their be a way to show the attack index for the selected unit in the debug menu?
In addition to order of weapons on unit sidebar another place to find attack index (and other info) would be the the following commands:
:debug
:inspect
Click on units, and find the unit in the list you want to know about. Here, attack index is the order of the [attack] tags. This listing is also the place to find object index. Like attacks, it's the order the [object] tags appear here.
Toranks wrote: December 30th, 2022, 12:09 pm Object> To remove objects, but I'm not sure how exactly it works, because index must be a number, and objects are identified with ID, not index, wich is a string.
Objects in contexts outside of GDT do make use of ID. Here in GDT, I think I did add/removal of objects by index because different objects could have the same id. The removal code works by finding an object at the specified index, and then removes all copies that match that object's code exactly.
Sierano wrote: December 30th, 2022, 9:04 am 3. Will an option to select alignment ever be added as well?
When I looked at adding it, it was via a text change to a key in the unit, which worked, but was cleared out if the unit was leveled or otherwise rebuilt. (like some actions in GDT do). Since it wasn't permanent, I didn't add it. Now, I could add code that would make it permanent similar to other code I now have in GDT. I'll consider this when I get back to working on GDT.
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.
Sierano
Posts: 6
Joined: December 30th, 2022, 8:58 am

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by Sierano »

Awesome, thanks for the replies. Oh, and one more thing, what about attack specials? Is there a way to add something like backstab, poison, marksman, firststrike to a particular units weapon?

Oh, and what about abilities like "regenerates"? Is the only way to add regenerates to a unit is by copying another unit type?
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.10.2 for 1.16.x BfW

Post by SigurdFireDragon »

Sierano wrote: December 30th, 2022, 10:07 pm Is there a way to add something like backstab, poison, marksman, firststrike to a particular units weapon?
Not currently. I'll consider adding this.

Sierano wrote: December 30th, 2022, 10:07 pm Oh, and what about abilities like "regenerates"? Is the only way to add regenerates to a unit is by copying another unit type?
Yes. For example, entering 'Troll' in the 'Abilities' field will give the unit the regenerates ability.
I did it this way because abilities can have the same id. (heals+4 & heals+8 for example)
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: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Gui Debug Tools 0.10.3 for 1.16.x BfW

Post by SigurdFireDragon »

Gui Debug Tools 0.10.3 is now available on the Wesnoth 1.16.x add-on server!

Changes:
Fixed issue https://github.com/sigurdfdragon/Gui_De ... s/issues/1
by the following:

Unit Debug
Level Slider now uses actual values for a given unit, instead of a catch-all range.
Examples:
Launching the dialog on a Lieutenant has the slider at 2, with range of 1-4. Setting it to 4 will turn it into a Grand Marshall, setting to 1 will make it a Sergeant. Launching it on a Gryphon has the slider at 2, and it is unmovable.

Experience Slider can no longer be used for leveling. If the unit somehow has xp higher than max xp on completion of the GDT dialog, it will be changed to max xp -1. (down-leveling a unit or adding the intelligent trait are cases where this could occur if xp is high enough to start.) Otherwise, the value set for experience will be be preserved through any other changes. If you want to level or add amlas, use the Level or Advancements sliders.

Advancements Slider now uses the term amla in mouse-over description. When decreasing the number of advancements a unit has, it is now done silently, in last in, first out order. Max slider value now set to 100, unless the unit has more amla's then that.
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: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Gui Debug Tools 0.10.4 for 1.16.x BfW

Post by SigurdFireDragon »

Gui Debug Tools 0.10.4 is now available on the Wesnoth 1.16.x add-on server!

Added Spanish Translation by Toranks
Fix GUI Debug tools creates an infinite loop with a self advancing unit issue.

Thanks Toranks!
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: 546
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 »

Gui Debug Tools 0.10.5 is now available on the Wesnoth 1.16.x & 1.17 add-on server!

Changes
Unit Debug Menu:
Add Alignment Radiobutton
'Default' value indicates alignment being set by the unit_type, a non-gdt object, or a manual change directly to the alignment field. selecting any other value changes alignment to the value specified and locks it in.

Move Role Textbox & Gender Radiobuttons locations to balance UI.
Minor 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: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Gui Debug Tools 0.10.5 for 1.16, 1.17, & 1.18 BfW

Post by SigurdFireDragon »

Gui Debug Tools 0.10.5 is now available for BfW 1.17.26 and the forthcoming BfW 1.18!

Same as previous 0.10.5 release for 1.16 & 1.17, but now available on 1.17/1.18 beta add-on server.
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.
Post Reply