Cheat codesEdit

UFO: Afterlight comes with an in-built game console, which can be activated by adding a new command line option to the game shortcut.

Once the option is added, press the [`] button (to the left of the [1] button) in the game to dispaly the console.

Different screens has different commands. These are the most useful ones:

Code Effect Locations
? List all commands All
hit # # # Deals # # # damage to selected unit (stun/temp/perm). Negative values = healing. Mission (tactical)
untouch Invulnerable mode. Mission (tactical)
kill_enemies Kills all enemies. Does not remove mines and would kill capture target. Mission (tactical)
matrix (Easter egg) A special vision. Use normal to return. Mission (tactical)
research_all Finishes all researches. Geoscape & People screen
resource_all Gives max resources. Geoscape & People screen
full_store Gives 25 pieces of each type of item. Geoscape & People screen
flood # Set terraform progress. # should be between 0 and 3.5. Geoscape & People screen
add_experience # Adds # experience to all soldiers. People screen
train # Grants # training to selected soldier. # is the training's text id. People screen
add_item # Gives a piece of #. # is the item's text id.
This can be used to fix relevant research requirements.
(Some tech is checked after a mission, e.g. Martian Archives)
Squad screen
add_unit/add_robot # Enrols # to the team. # is the character's text id. Squad screen

Many other code exists, such as win, which gives you an instant win but may also permanently break your research tree, or naked, which is an easter egg that cannot be undo.

Game Engine ExploitsEdit

While not actually cheating per se, the methods below describe how to abuse the game's internal logic in order to gain an advantage.

Avoiding enemy attacks on player owned territoryEdit

Attacks on player territories may be triggered by several reasons. They can generally be avoided by saving regularly.

  • Timed events cannot be prevented outright but the target territory is randomly chosen. In addition, the attackers may be destroyed by a rocket base, in which case the target of the attacks is recalculated again.
  • Attacks on construction sites occur as soon as the scientific buggy or technical truck begin to construct a new planetary installation. The probability is recalculated if you reload a save before construction begins.

Avoiding the production switch penaltyEdit

When manufacturing items in a workshop, time needs to be spent to built the assembly line. This time cost, usually a few hours, is paid every time a new item is produced, even if you have produced the item in the past. There is no way to avoid this the first time, but by queueing a very high production target (e.g. 1,000 units) the order will not be completed for a very long time and you can reorder the queue around it when need be.. This is best used for items which you know you will need to manufacture again (e.g. projectile ammo).