Debug mode warning for newcomers

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

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:

Debug mode warning for newcomers

Postby WhiteWolf » August 27th, 2017, 8:46 pm

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
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!
User avatar
WhiteWolf
Forum Regular
 
Posts: 330
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Debug mode warning for newcomers

Postby shadowm » August 27th, 2017, 8:53 pm

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.
I also made Wesnoth RCX, a team-color preview tool for artists and content creators.
Elsewhere: shadowmBlogFollow me on Twitter
User avatar
shadowm
Wesnoth.org Administrator
 
Posts: 6182
Joined: November 14th, 2006, 5:54 pm
Location: Chile

Re: Debug mode warning for newcomers

Postby Pentarctagon » August 27th, 2017, 11:01 pm

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
Pentarctagon
Forum Administrator
 
Posts: 2949
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Debug mode warning for newcomers

Postby shadowm » August 28th, 2017, 2:47 am

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.
I also made Wesnoth RCX, a team-color preview tool for artists and content creators.
Elsewhere: shadowmBlogFollow me on Twitter
User avatar
shadowm
Wesnoth.org Administrator
 
Posts: 6182
Joined: November 14th, 2006, 5:54 pm
Location: Chile

Re: Debug mode warning for newcomers

Postby WhiteWolf » August 28th, 2017, 9:12 am

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.
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!
User avatar
WhiteWolf
Forum Regular
 
Posts: 330
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Debug mode warning for newcomers

Postby Tad_Carlucci » August 28th, 2017, 12:10 pm

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.
Tad_Carlucci
Developer
 
Posts: 204
Joined: April 24th, 2016, 4:18 pm

Re: Debug mode warning for newcomers

Postby zookeeper » August 28th, 2017, 12:26 pm

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
zookeeper
WML Wizard
 
Posts: 9612
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Debug mode warning for newcomers

Postby WhiteWolf » August 28th, 2017, 8:15 pm

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. :)
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!
User avatar
WhiteWolf
Forum Regular
 
Posts: 330
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary


Return to Ideas

Who is online

Users browsing this forum: No registered users and 2 guests