Loading...
  OR  Zero-K Name:    Password:   

To all you cheaters: Here's some help

18 posts, 3572 views
Post comment
Filter:    Player:  
sort
Zero-K supports cheats in single player games, as well as multiplayer games if the host enables them. However, there isn't much documentation for these cheats on this site, so I wanted to document them here.

Cheat Description
!cheats Enables cheats in multiplayer
/cheat Enables cheats in single player
/atm Instantly gain 1000 energy and metal
/godmode Control all units
/give [quantity] [unit] [team] Gives a quantity of units to a team
/nocost Build things instantly for free
/globallos Give vision of the whole map
/team [#] Change team (acquire their vision and units)
/destroy Destroy all selected units

Blue = Works only in multiplayer
Yellow = To use in a multiplayer game, preface with "!hostsay"

For the /give command, the unit name is not the typical name in the game. Use the table below to determine what name to use for any unit.

[Spoiler]
+10 / -0
also useful:
/globallos
/destroy
the rest of Spring chat commands

Documentation is great. Wikify?

I suspect some of the ship names might have changed. Pretty sure Typhoon is now shipraider.
+1 / -0
Skasi
You forgot the most important one for SP testing!
/nocost

Cba to look up unit names in some list.
+1 / -0
I tried to use /nocost as well as /globallos, but they did not work for me in a multiplayer. Looks like they do work in single player though. I will add them.
+0 / -0


8 years ago
also:
/team [teamNumber]
/spectator
+1 / -0
quote:
I tried to use /nocost as well as /globallos, but they did not work for me in a multiplayer. Looks like they do work in single player though. I will add them.


!hostsay is needed. Try !hostsay /nocost
+1 / -0
quote:
Looks like they do work in single player though. I will add them.

Multiplayer (or, to be exact, Springie) version of these is !hostsay [command].

!hostsay /nocost
!hostsay /globallos

Note that /destroy works directly and doesn't require !hostsay.

This requires elevated privileges (in practice, being boss of your private room).

Hostsay also allows to have all kinds of fun by putting commands and words into Springie's mouth:

!hostsay /say lol i'm springie and i can talk
!hostsay /kick someone you don't like
+1 / -0
I'm wondering, if I'm playing with a friend against the CAI and I use /team to change to his team, will we both be able to control the same units?

EDIT: It looks like that is the case, which is amazing! In the game options, under Starting Conditions, there is a checkbox for Cooperation Mode, which is what I thought this was for, but I was sadly mistaken. It's nice to know how to to this.

BTW, what is Cooperation Mode?
+2 / -0
Another fix: /destroy only destroys selected units; any selected units. So, selecting an enemy unit and incanting /destroy will blow that up, instantly.

(you'll probably need /godmode to select them though)
+1 / -0
Skasi
8 years ago
Two people playing as the same "player team" has been possible for years, just not been supported by evil Springiees and/or ZKL. Iirc some people have been complaining about this lack of integration. It's kinda sad that some newer players don't know about this old feature.
+1 / -0
quote:
Cba to look up unit names in some list.

I know how you feel. That's why I am working on developing a widget that will turn input such as

/give 1 glaive 0


into

/give 1 armpw 0


Then, we won't have to remember the codenames. However, I'm unfamiliar with lua, as well as the Spring framework. I got something halfway working, but my current issue is that I don't know how to tell if the player sent a message. I tried using the callin TextInput, but that is no good. In any case, if anyone is interested, the code is in the link below.

http://pastebin.com/E22P80yt
+1 / -0


8 years ago
You can replace your whole dic definition with:
http://pastebin.com/2peRm49x
+1 / -0

8 years ago
@[TL]Beamer This will be much easier to accomplish with chonsole.
+1 / -0
8 years ago
typing so long lists by hand is NEVER the right way.

some 'cheats' and such:
https://springrts.com/wiki/TestingYourGame

host-commands:
SPADS has full docu at http://planetspads.free.fr/spads/doc/spadsDoc.html
Does springie too?
+1 / -0


8 years ago
Note that '/spectator' is not a cheat. You can type it ingame to resign and it is the technical implementation of the resign button.

Cooperation mode might be a broken implementation of putting all players on the same team. The engine can force players to control different teams now so perhaps we should reimplement this mode. It can be done now because we would not need to rely on Springie functioning correctly.
+3 / -0
quote:
I know how you feel. That's why I am working on developing a widget that will turn input such as



This will probably help you a lot. You could do:

[quote]
local units = {}
for id,data in pairs(UnitDefs) do
units[string.lower(data.humanname)] = data.name
end -- Reverse lookup

function widget:GotChatMsg(msg, player)
if string.find(string.lower(msg),"givee") ~= nil and player == Spring.GetMyPlayerID() then -- done on purpose so we don't trigger give.
local command = string.gmatch(msg, "%S+") -- Split string into pieces. "/givee 1 glaive 1" results in {"/givee","1","glaive","1"}
local unit = ""
for i=1,#command do
if string.find(command[i],"give") == nil and string.len(command[i]) > 3 then
unit = command[i]
break
end
end
if units[unit] == nil then
Spring.Echo("game_message:Invalid unit! Check spelling!")
end
local str
--reform command--
for i=1,#command do
if string.find(command[i],"givee") == nil then
str = str .. command[i]
else
str = str .. "give"
end
Spring.SendCommands(str)
str,command = nil
end
[/quote]


Other useful links:
Spring Callins ("events") and what they do
Spring LUA functions
+3 / -0
How to make a hologram landscape? It works exactly like the real landscape except it's a hologram and can't be damaged but can be selected as if it is land.
+3 / -1

6 years ago
unknownrankDrKran if you're rezzing a thread at least stay on topic.

OT: there is now a cheat menu that appears on the global command bar when you enable cheats (using !cheats or /cheat) that allows you to do everything else listed here. The commands still work but the internal unit names listed here do not.
+0 / -0