Debug mode warning for newcomers

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Debug mode warning for newcomers

Post by WhiteWolf »

Hello,

I've recently had an issue with the feedback of one of my campaigns, and this is way not the first time that this happens - that someone wants to recklessly jump through all the maps, I guess just for the story, and then they manage to get half the variables, heroes, and stuff missing, and then they give reports of normally non-existent, mysterious bugs. :annoyed:
I checked what's written on using debug-commands in the help, and there is not a single warning for new players to be cautious when trying to cheat, jump through maps for story.
I wonder if it would be possible, for the game, that when debug mode is turned on, not only "*debug* Debug mode activated!" to be shown, but some kind of warning not to abuse it.
Or include it in the help, that debug commands are for testing, and not for gaming, and if you use it, please do know what you are doing. In case of bugs, replay without using debug, and only contact the authors/maintainers if the bug is still present when playing normally.
Anyone else to agree? :)

WhiteWolf
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Debug mode warning for newcomers

Post by Iris »

I don’t know about your audience in particular, but people who do that kind of stuff knowingly should expect the game to break in one form or another unless they are literally children playing a computer game for the first time.

Still, if the dev team wants to consider this they could take inspiration from Firefox’s about:config text, for example:
aboutconfig.png
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Debug mode warning for newcomers

Post by Pentarctagon »

It would also be useful to put some sort of flag into the save file to indicate that debug mode was activated(if that isn't done already). I know Dugi has mentioned a similar thing as happening, and it would probably be helpful to be able to tell if someone reporting some strange, otherwise unreproducible bug had used debug mode to mess with things.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Debug mode warning for newcomers

Post by Iris »

I believe wesnoth.game_config.debug (and, during the WML preprocessor stage, the DEBUG_MODE symbol) could be used to accomplish something like that if you really wanted, like, for example, display an obnoxious warning at the start of every turn. Naturally, people would still be able to remove that by editing the add-on’s source code, but at that point they can’t appeal to ignorance anymore.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Debug mode warning for newcomers

Post by WhiteWolf »

shadowm wrote: people who do that kind of stuff knowingly should expect the game to break in one form or another
I'm not so sure about that, the game could, and by 'could' I mean they probably think 'why wouldn't it?' work in a way, that when a map is jumped with :n, the important events still fire anyway. Why not?
Another example, spawning a Yeti next to my objective and winning the map with one move seems to be harmless, yet it can be. :hmm:


So another useful thing in order to avoid corruption like these, would be to have the ability to mark events as debug_necessary. For example:

Code: Select all

[event]
     name=last breath
     debug_necessary=yes
     
     [...] important stuff
[/event]
In this case, even if :n command is typed, this event will fire before the map. Or if someone omitted the death of this character by spawning units behind him to a moveto-objective and wins the map, this will still fire. Basically, these events should fire as some kind of embedded events before [endlevel] is passed.

This is just an idea, I haven't deeply thought through all the consequences, whether it's worth it to implement, whether it solves every debug-induced case, what the fire-order should be in case of many of these, etc.
It's just another idea :)

In my opinion, a well-drafted warning when turning debug on would be sufficient.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Tad_Carlucci
Inactive Developer
Posts: 503
Joined: April 24th, 2016, 4:18 pm

Re: Debug mode warning for newcomers

Post by Tad_Carlucci »

I support the idea of a disclaimer appearing the first time Debug mode is enabled during a session.

I also support the idea of a flag in the save file indicating Debug mode was enabled at any time in the session.

I do not, however, support the idea of WML changes. The proposed change (the example was triggering a last-breath on the Next command) implements the correction at the wrong point. The error is NOT that the session ended, leaving the campaign in the expected state, but that the next campaign failed to check/enforce that the expected state was present when starting up. This is a programming error and should be corrected properly; which requires no changes at all to WML itself.
I forked real life and now I'm getting merge conflicts.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Debug mode warning for newcomers

Post by zookeeper »

WhiteWolf wrote:I wonder if it would be possible, for the game, that when debug mode is turned on, not only "*debug* Debug mode activated!" to be shown, but some kind of warning not to abuse it.
I don't see why not.

*debug* Debug mode activated! Note: use of debug commands may cause unexpected problems and leave you unable to resume normal gameplay.

Or something along those lines.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Debug mode warning for newcomers

Post by WhiteWolf »

Sounds perfect to me :) I guess it wouldn't be difficult to implement.
Tad_Carlucci wrote:I do not, however, support the idea of WML changes. The proposed change (the example was triggering a last-breath on the Next command) implements the correction at the wrong point.
Yeah, I agree, it wasn't that great idea indeed. :)
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Post Reply