Cheater Widget

Cheater Widget

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Cheater Widget

Post 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!
Last edited by Umrug on 17 Apr 2007, 12:47, edited 1 time in total.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Post by TheFatController »

Cool, that'll be handy for testing stuff but i hope it doesn't encourage more bad hosts to ruin games :?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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
Last edited by trepan on 15 Apr 2007, 20:51, edited 1 time in total.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Post 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!
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Post 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...
Post Reply

Return to “Lua Scripts”