Page 1 of 1

Cheater Widget

Posted: 15 Apr 2007, 14:25
by Umrug
http://spring.unknown-files.net/file/27 ... er_Widget/

Tired of endlessly typing those ".cheat", ".nocost", ".team" and ".spectator" commands? Well, no more!
A tiny widget that shows nice GUI buttons for those commands.
This is initial version, more commands are planned further (like .give with the unit selection menu etc)
Written with "0 FPS drop" in mind, does not slow the game.

New in version 2 (changes inspired by trepan):
- Its now possible to disable spectator mode, this takes you to your last team
- Widget will be auto-disabled in multiplayer mode
- Nice tooltips
- Smarter handling of GUI update on all FPS (still very efficient, does not eat CPU)

Version with "give unit" is already on its way...

Just put it in the LuaUIWidgets folder, and then enable in Widget Selector (press F11 to see it)

I didn't have time to tune up the buttons looks, so they are very plain. Colors/size/positions are easily customized in the file, so anyone willing to tune those can just do it himself :)

This is my first widget, any response will be really great!

Posted: 15 Apr 2007, 19:02
by TheFatController
Cool, that'll be handy for testing stuff but i hope it doesn't encourage more bad hosts to ruin games :?

Posted: 15 Apr 2007, 19:19
by trepan
You could limit it to single player games, as was done with:
http://spring.unknown-files.net/file/24 ... r_Testing/

It would reduce the temptation, and the chances of a mis-click.

P.S. "Removed" widgets are handled better in SVN, and are displayed in
yellow in the widget selector to show that they would be enabled, if they
hadn't removed themselves. You can also disable them properly. An example
of a current widget which removes itself is the CommanderEnds widget, which
is only active before a game starts.

Posted: 15 Apr 2007, 20:22
by trepan
Tried it out, very nice for a first widget. Had you done lua coding before this?

You may want to provide individual tooltips for the buttons
(ex: nocost: everything has to go, low low prices; can not be deactivated). You
can probably make the spectator button togglable as well (use the player's
current team).

Here's a diff file for a version that will work with SVN code, and with a couple
of small functional modifications (ex: it uses the new Spring.IsCheatingEnabled()):
http://trepan.homelinux.net/spring/gui_ ... g.svn.diff

Posted: 15 Apr 2007, 20:41
by Umrug
trepan, thanks, so nice to hear that :) no it was the first time I ever saw LUA, and of course it's a total rip-off of your code (selector.lua) :) thanks for the ideas!

Posted: 17 Apr 2007, 12:49
by Umrug
New in version 2 (changes inspired by trepan):
- Its now possible to disable spectator mode, this takes you to your last team
- Widget will be auto-disabled in multiplayer mode
- Nice tooltips
- Smarter handling of GUI update on all FPS (still very efficient, does not eat CPU)

Version with "give unit" is already on its way... hopefully...