dont quit building when you click on wrong place

dont quit building when you click on wrong place

Requests for features in the spring code.

Moderator: Moderators

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

dont quit building when you click on wrong place

Post by TradeMark »

this is highly annoying when i click in wrong place because of lag, it will make me to select the building again from the buildlist and then again i have chance to do it correctly next time.

so it should not quit the building, it should just make some sound notification like in TA, C&C, RA2 and other games... or even message in the chat "CANNOT BUILD HERE CHOOSE ANOTHER LOCATION"...

though, when you build a queue, then this notification should not happen, only when you build single building.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

Easy Widget.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: dont quit building when you click on wrong place

Post by TradeMark »

no make it in engine, default engine feature...
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: dont quit building when you click on wrong place

Post by Neddie »

Why not? Write a patch.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

The engine should *not* be doing something like that. That is a purely UI behavior, and different end-users may want different things to happen.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: dont quit building when you click on wrong place

Post by Neddie »

Well, arguably it is a core usability point. When would you like to deselect rather than be told to re-place? Never.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

Depends on the game design, tbh. There could be various uses for the behavior, and it all depends on context.

But my point is that it's very easy to write a Widget to solve this problem. I.E., this is a great, "my first Widget" project for somebody.

There is a callin for catching commands to build Units and Features (see here, the "Allow" callins), and the rest of the tests to determine an error state are very straightforward and well-documented in the Wiki.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: dont quit building when you click on wrong place

Post by TradeMark »

widget or not, can you make it so it will be default on for all mods in the future?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: dont quit building when you click on wrong place

Post by Neddie »

Not unless the mods and games choose to include it as such, no.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

Included in the distro, sure. As Neddie pointed out, most of the time this would be a desirable behavior, and it'd be good for end-users just getting started. And games that don't want it wouldn't be stuck with it.

Seriously, though, this really is a "my first project" thingie. If you don't want to write it, then request it in the Lua forum, this is pretty trivial.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: dont quit building when you click on wrong place

Post by Satirik »

TradeMark wrote:no make it in engine, default engine feature...
write a patch !! should be a two line change
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: dont quit building when you click on wrong place

Post by TradeMark »

Argh wrote:And games that don't want it wouldn't be stuck with it.
why wouldnt you want this behaviour? i cant make up any cases when it would not be desirable.
Satirik wrote:write a patch !! should be a two line change
erm, i dont even know which file to edit, i dont know anything about spring, its not "just 2 line change" for me. takes weeks to learn everything about spring before coding those 2 lines to be sure its done correctly...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

For example, you want to trigger something different to occur when that happens. Maybe you want to have the model geometry flash, and have a console message hit the queue instead. Maybe you want to move the camera to that location and show an error message (say, you have a game where some of your builders are semi-automated). Maybe you want to use an alternative Unit instead (roads, for example, might be a use-case).

The point is... "standard behaviors" are to be avoided if possible. Every time we put one of them into the engine, we're both cutting performance a little bit, and also forcing people who want different behaviors to waste time on workarounds.

We can't totally avoid that stuff, to be sure... but this really is a very simple Widget project, so maybe follow that link and start working on it?
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: dont quit building when you click on wrong place

Post by Tribulex »

Argh wrote:Easy Widget.
Do it please. I dont know how you would do this.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

I am sure you can figure it out, it's an easy one. Just use AllowCommand(), and go from there. Easy, really.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: dont quit building when you click on wrong place

Post by JohannesH »

How is deselecting the building somehow more obvious choice to have as the default than not deselecting? You dont even need a message necessarily, just keep the damn building selected.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: dont quit building when you click on wrong place

Post by smoth »

-1 do not want.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: dont quit building when you click on wrong place

Post by Regret »

neddiedrow wrote:Well, arguably it is a core usability point. When would you like to deselect rather than be told to re-place? Never.
This is the correct answer. All you other idiots have no idea what you're talking about.

Go -1 and argue all you want.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: dont quit building when you click on wrong place

Post by Argh »

Use AllowCommand(), get the command ID, and check if command ID cooresponds to a UnitDef (factories it's -unitDefID, IIRC it's positive with Units that aren't factories, but whatever).

Params should give XYZ. Check validity of that command with Spring.TestBuildOrder().

If it fails, then play an alert sound locally to the end-user, and have the command return false.

IOW, go read the Wiki, so that that all makes sense... and you're done.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: dont quit building when you click on wrong place

Post by TradeMark »

Argh wrote:The point is... "standard behaviors" are to be avoided if possible. Every time we put one of them into the engine, we're both cutting performance a little bit, and also forcing people who want different behaviors to waste time on workarounds.

We can't totally avoid that stuff, to be sure... but this really is a very simple Widget project, so maybe follow that link and start working on it?
but every mod has to include these widgets... my point is we should be able to make standard mod without knowing how to program the whole game yourself...

and im pretty sure widgets cuts the performance more than built in functions...

also, this is a feature we have in TA, but not in Spring, and we obviously should have it in Spring too... we have lots of other stuff from TA too... like Metal and Energy. omg what if my mod doesnt want to use metal?! i want to use crystals! and ore! -_-

This feature is just a matter of logic... if youre building something, you dont want to change the building because your building didnt "fit" on its place. it does not make sense.

and its even worser that it deselects the builder as well, so you need to select it again, and then select new building (if this feature was made so you can select the smaller building for that place)

either way, it just sucks and must be changed, no matter what the purpose is behind it.
Post Reply

Return to “Feature Requests”