[engine] F5 reload scenario after clearing cache

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:
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

[engine] F5 reload scenario after clearing cache

Post by bvanevery »

I would like the F5 hotkey to immediately quit the scenario without asking for confirmation, clear the cache, and then reload the scenario I was playing without asking which one I want. During WML development I find myself performing this operation manually literally hundreds of times a day. The time wasted on UI fumbling adds up, and it's definitely wearying on the morale. I realize I won't get back to where the game was before.
Last edited by bvanevery on March 9th, 2011, 2:21 pm, edited 7 times in total.
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: a reload hotkey

Post by Max »

the UMC Development IDE can do that (1.9.x only).
.cfg files context menu - right click on any .cfg file
Open scenario in game - opens the selected file's scenario (if it contains one) in wesnoth.
haven't tried it - i guess it opens a new instance of wesnoth, so you'd have to close the old one before.
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

Re: [engine] F5 reload scenario after clearing cache

Post by bvanevery »

I tried the IDE, and it's good to know such a thing exists. At first it didn't seem to work, as no project folders were displayed. Right-clicking made everything magically appear. So, I will try out the IDE, but it has some bugs and will probably continue to have them for awhile, as it's a complex piece of software.

Changing the behavior of F5 is much simpler. Does anyone see a reason why F5 shouldn't behave the way I've outlined?
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: [engine] F5 reload scenario after clearing cache

Post by Gambit »

Yes. Refreshing the cache can change which scenarios are available. It can change which graphics/descriptions are displayed in the campaign menu. I think it can also change the help and parts of the GUI as well. People may be using it for any one of those.

I like the idea, but IMO if we're going to make the function more specific to a certain task, I think it should get a new hotkey.

Also there is a section of the bug tracker for the IDE called "eclipse plugin" if you find anymore bugs and wanted to report them.
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

Re: [engine] F5 reload scenario after clearing cache

Post by bvanevery »

Gambit wrote:Yes. Refreshing the cache can change which scenarios are available. It can change which graphics/descriptions are displayed in the campaign menu. I think it can also change the help and parts of the GUI as well. People may be using it for any one of those.
During development, that's the point. During non-developer gameplay, accidentally hitting F5 would just bring the player back to the scenario start. I don't see that as a great loss. If they have autosave activated, then they can just reload their game. It's not like the player changed anything.
I like the idea, but IMO if we're going to make the function more specific to a certain task, I think it should get a new hotkey.
I am thinking the only practical purpose of F5 is to aid developers, who will always want to reload after they clear the cache. What am I missing? Why do mere players try to clear the cache?
Also there is a section of the bug tracker for the IDE called "eclipse plugin" if you find anymore bugs and wanted to report them.
It's filed.
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: [engine] F5 reload scenario after clearing cache

Post by Gambit »

bvanevery wrote: I am thinking the only practical purpose of F5 is to aid developers, who will always want to reload after they clear the cache. What am I missing? Why do mere players try to clear the cache?
Developers don't only edit the contents of scenarios. There's a whole host of soft-coded, pre-gameplay content. I just mentioned the GUI, the help, and the descriptions of things.

Also having players accidentally restart a scenario from a one-key key-stroke is an issue I hadn't even considered. :hmm: That makes me wonder if this shouldn't be a debug command, or maybe shift+f5 or something harder to do unintentionally.
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

Re: [engine] F5 reload scenario after clearing cache

Post by bvanevery »

I have also just realized that F5 does nothing when hit inside a scenario. Thus, it can be modal. It doesn't need to have the same behavior as when outside the scenario. F5 inside the scenario would mean "clear the cache and reload the start of the scenario."
Gambit wrote:Also having players accidentally restart a scenario from a one-key key-stroke is an issue I hadn't even considered. :hmm: That makes me wonder if this shouldn't be a debug command,
Having F5 available once debug mode is activated would be acceptable, although I'd prefer not to have to bother. New developers have to stumble over a lot of things, like "there's a debug mode?" That took me a few months to find out about. The player doesn't have a lot of reason to reach for the F1..F10 function keys, nor the number keys 1..9. I'm not seeing why a F5 key slip would be a common occurrence. Autosaves exist for a reason; I'm far more likely to have my cat jump on my laptop and power the whole thing off with her paw.
or maybe shift+f5 or something harder to do unintentionally.
No. I do this hundreds of times a day. I want it fast.
Last edited by bvanevery on March 9th, 2011, 3:53 pm, edited 1 time in total.
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: [engine] F5 reload scenario after clearing cache

Post by Gambit »

Weird. I learned about the debug mode when reading the manual.

Also apologies. I had no idea that your need of this was so dire, so essential, so unyielding that you could not afford to spend the extra four milliseconds of time needed to hit the shift key. And yes. How could I be so foolish as to not see that because it is already so easy for cats to ruin everything, that we should not be concerned about giving them yet another opportunity to do so.

Why are you always so unwilling to accept input other than your own? This is a fantastic idea. I'm just making suggestions on how can be made friendlier. You just add another key to the combination and we prevent a lot of potential headache for players. See generally there is a communal discussion of rough ideas here to make them as perfect as they can be.

But since you absolutely require it to be exactly 100% as originally suggested, I will stop. I am sorry that I butted in to your idea proposal. I should have learned my lesson the last time this happened. I hope you can forgive me for wasting your time. I will find some way to repay you for the 57 presses of the shift key that we have forced you to make.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: [engine] F5 reload scenario after clearing cache

Post by Anonymissimus »

Your view is a bit too much that of a UMC campaign author I'd say...
How would this work for mp scenarios ? There's always the players selection screen.
If F5 is actually only bound in the titlescreen to reload the cache we could use that key for such functionality.

@Gambit: Does the fact you're editing something else than a scenario make you want to not return to it (where the gui macros and main terrain and help and else are used too I guess) when pressing F5 in it ?

Most of the mainline devs use the test scenario data/scenario-test.cfg which is reachable directly by starting wesnoth with --test so they at most do click quit from the menu, hit up arrow in their shell to get last command (wesnoth --test) and enter to reload it into the cache.

The original reason for me starting with lua was exactly this, since going to mainscreen+F5+restart is not needed there. I have a rightclick option which is all I need to click to ingame execute (and test) lua code on-the-fly. And loading the start-of-scenario save (from the scenario gui) is definitely sufficient for a complete lua scenario. (to catch lua code in prestart events, back to turn x may be enough for other).

Well, the thing with ideas is always: "Who is going to do this whole ton of work introducing lots of bugs ?"
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

Re: [engine] F5 reload scenario after clearing cache

Post by bvanevery »

Gambit wrote:Why are you always so unwilling to accept input other than your own?
Why do you have to turn it into a snark battle?
This is a fantastic idea.
Right, so, drop the sarcasm and the personal attacks.
I'm just making suggestions on how can be made friendlier.
SHIFT-F5 is not friendlier. I have very long fingers, but I certainly can't stretch that on my left hand alone. You are saying I must use 2 hands to make the key combo. You are saying I have to take one of my hands off the mousepad. All to protect a player who is very unlikely to hit F5 anyways.
But since you absolutely require it to be exactly 100% as originally suggested, I will stop. I am sorry that I butted in to your idea proposal. I should have learned my lesson the last time this happened.
You haven't learned anything from last time. Why don't you be a moderate moderator, instead of picking fights? I'm expecting you to issue me a warning now, when it is you who are being rude.
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: [engine] F5 reload scenario after clearing cache

Post by Ceres »

bvanevery wrote:SHIFT-F5 is not friendlier. I have very long fingers, but I certainly can't stretch that on my left hand alone.
At least at my keyboard the distance between the Shift and the F5 key is around 15 cm, and I can use it without problems with my left hand.
User avatar
bvanevery
Posts: 338
Joined: August 27th, 2009, 12:47 am
Location: Winston-Salem, NC

Re: [engine] F5 reload scenario after clearing cache

Post by bvanevery »

Ceres wrote:
bvanevery wrote:SHIFT-F5 is not friendlier. I have very long fingers, but I certainly can't stretch that on my left hand alone.
At least at my keyboard the distance between the Shift and the F5 key is around 15 cm, and I can use it without problems with my left hand.
I have a full sized keyboard on a "desktop replacement laptop." Keeping my right thumb on or near the mousepad is part of the workflow. The distance between LEFT SHIFT and F5, measured from the center of the keys, is 11 cm. If you are doing that with the index and pinkie fingers of your left hand, I don't know how. It's a big reach, spreading the fingers awkardly apart. Are you especially flexible this way? When I do this my left thumb also protrudes all the way to the "M" key, interfering with my right hand.

Maybe this is the answer: you have smaller hands than I do.
Last edited by bvanevery on March 9th, 2011, 5:39 pm, edited 1 time in total.
To Lands Unknown, an Arabesque adventure of stunning background art, mobile summoning, and strong storytelling.
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: [engine] F5 reload scenario after clearing cache

Post by thespaceinvader »

Speaking as an impartial observer in many of your discussions, you come across as staggeringly demanding, with a monstrous sense of personal entitlement. We're not making this game just for you, and the way you're phrasing your suggestions seems to imply that you think we should be. It seems really, really trollish.

Why are YOUR needs the key here? What about the user who, all unknowing, accidentally hits F5 in the middle of a scenario they're playing, and it kills their game irretrievably? Why should they suffer the accidental loss of their game so you can avoid lifting a frigging finger? And incidentally, shift-F5 is pretty easy, and I have short, stubby fingers.

Users who play are FAR more common than users who develop. The basics of the game should support them, even to the detriment of developing content. Debug mode is there to assist developing.

--------

That being said, this command is a sensible suggestion (I, for one, would use it, as I'm most often testing animations for which I do want to drop the scenario, reload the cache, then re-enter the scenario) but safeguards against unintended harmful use should be implemented. Making it available only in debug mode (which persists once entered even if you close the current scenario) or making it a multiple-key command would achieve this. Unless somebody else does it, I'll probably stick a feature request up for it.

I wonder whether Wesnoth('s debug mode) would benefit from some form of keystroke/mouse-macro-recording function like OpenOffice has...
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
User avatar
StDrake
Posts: 996
Joined: July 21st, 2009, 6:50 am

Re: [engine] F5 reload scenario after clearing cache

Post by StDrake »

11cm between left shift and F5? whoa! I could count maybe 5cm on my laptop
regardless of that the idea is nice, but knowing my own example is has to be made sure to be..keyboard cat resistant. Probably a double key combination + asking confirmation in case someone pressed those with different intention not knowing what use wesnoth assigned to them.
However just correcting how cache is loaded might just help enough too, making this specific solution not so important. And that's from a developing players point of view.
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: [engine] F5 reload scenario after clearing cache

Post by Max »

anyone noticed that you can reassign hotkeys?
Post Reply