Tutorials/Built In Debug Cheats

From SC2Mapster Wiki
Jump to: navigation, search

Built In Debug Cheats

Description

Since Patch 1.3.0 Blizzard made several internal debugging cheats available. Run the map offline in the editor to try them. You can also make your own cheats, as is described further down.

Hints

Usage Examples

  • FastBuild: Write "FastBuild 1" to enable fast building for player 1.

List of Cheats

  • Ally - Changes all alliance states between the selected players. By default, if you just type Ally, then all players share all alliance states with you.
  • AllianceDefeat - Changes the Defeat alliance state between the selected players. By default, if you just type AllianceDefeat, all players will share defeat with you.
  • AllianceControl - Changes the Control alliance state between the selected players. By default, if you just type AllianceControl, then all players share control with you.
  • AllianceGiveHelp - Changes the GiveHelp alliance state between the selected players. By default, if you just type AllianceGiveHelp, all players will respond to calls for help from your units.
  • AlliancePassive - Changes the Passive alliance state between the selected players. Players that you are not passive with will be considered hostile for attacking purposes.
  • AlliancePushable - Changes the Pushable alliance state between the selected players. This controls whether a player’s units will move through another player’s units, pushing them out of the way.
  • AllianceSeekHelp - Changes the SeekHelp alliance state between the selected players. Controls whether a player’s units call for help to the specified target player. The target player can choose to respond or not, depending on its GiveHelp alliance setting.
  • AllianceSpend - Changes the Spend alliance state between the selected players. Players that you are sharing resources with are allowed to spend your money to purchase things.
  • AllianceTrade - Changes the Trade alliance state between the selected players. Players that you are trading with can be sent resources.
  • AllianceVision - Changes the Vision alliance state between the selected players
  • BehaviorAdd - Adds the requested behavior to the selected units.*•BehaviorDuration - Sets the duration of the requested behavior*•BehaviorRemove - Removes the requested behavior from the selected units*•Charges - Toggles spell charge validation.
  • Cooldown - Toggles spell cooldown validation
  • Creep - Adds creep at the cursor position given the requested radius.
  • DamageDealt - Multiplies the amount of damage dealt by a player's units by the specified value. By default, this will multiply the damage dealt by 10 for the cheating player.
  • DamageTaken - Multiplies the amount of damage taken by a player's units by the specified value. By default, this will reduce all damage taken to 0 for the cheating player*•DeathAll – Kills all units on the map.
  • DeathExcept - Kills all units on the map except the selected units.
  • DeathSide - Kills all units owned by the selected player.
  • DeathUnit - Kills the selected units. The type of death can be specified as a parameter.
  • Defeat - Ends the game in defeat for the selected player
  • DestroyPersistent - Destroys all persistent effects within the specified radius of the cursor
  • Effect - Executes the requested effect from the selected units.
  • FastBuild - Toggles fast building, research, and training times.
  • FastHeal - Toggles fast healing times.
  • Fidget - Forces selected units to perform the specified fidget type.
  • Food - Toggles food usage validation.
  • Free - Toggles resource cost validation and expenditure.
  • God - Turns on god mode for the selected player. Units owned by players that are in god mode will deal amplified damage, and take no damage.
  • Loot - Drops a type of loot for the specified player.
  • MakeUnit - Creates N units for the specified player. Units will be created around the cursor position, or in the center of the map if the cursor position is invalid.
  • Minerals - Adds the specified amount of minerals to the selected player.
  • Move - Moves the selected units to the cursor position.
  • NoDefeat - Disables defeat conditions.
  • NoVictory - Disables victory conditions.
  • Order - Orders the selected units to use an ability.
  • Owner - Changes ownership for the selected units to the selected player.
  • ResourceCustom - Adds the specified amount of a custom resource to the selected player.
  • SetAll - Sets the life, shields, and energy of the selected units to the specified value. By default, this will set these values to the maximum amount.
  • SetLife – Sets the life of the selected units to the specified value.
  • SetEnergy - Sets the energy of the selected units to the specified value.
  • SetLife - Sets the life of the selected units to the specified value.
  • SetShields - Sets the shields of the selected units to the specified value.
  • SetResource - Sets the harvestable resources contained by the selected units to the specified value.*•ShowMap - Toggles fog of war display and validation.
  • TechTree - Toggles tech tree dependency validation.
  • Terrazine - Adds the specified amount of terrazine to the specified player.
  • Tie - Marks all undecided players with the tie result.
  • TimeOfDay - Sets the time of day to the specified time.
  • TimeOfDayRate – Sets the rate that the time of day changes to the specified value.
  • TrigDebug - Opens the trigger debug window*•TrigRun - Runs the specified trigger.
  • Uncreep - Removes creep at the cursor position given the requested radius.
  • Undecided - Marks the selected player's result as undecided.
  • Upgrade - Applies the selected upgrade to the selected player.
  • Vespene - Adds the specified amount of vespene gas to the specified player.
  • Victory - Ends the game in defeat for all players that don't share the defeat alliance state with the selected player.
  • XP - Adds a relative amount of XP to the selected units. This can be used to change veterancy levels.

Make your own cheats

This is done in the Trigger Module. This example cheat will spawn some units at the coordinate (x,y)=(100,100) of the map.

  • Create a new trigger.
  • Add a event "TriggerAddEventChatMessage".
    • The "string" should be something like "SpawnMarine".
    • The "exact" parameter should be set to "Partial". This will enable you to add parameters to your debugging tool.
  • Add local string variables "player_str", "count_str" and "unitType_str".
  • Add local integer variables "player", "count".
  • Add local unitType variable "unitType".
  • The syntax of the cheat will be "SpawnMarine 1 5 Marine" which will result in 5 Marines owned by player 1 being created at location (x,y)=(100,100).
  • Add SetVariable(player_str,(StringWord(EventChatMessage(false,2))) - this will fetch word number 2 from the string and save it to the player_str variable. The StringWord starts counting words with 1, which means that word 0 is always null, and word 1 is always the first word in the sentance. In this case that would be SpawnMarine.
  • Add SetVariable(count_str,(StringWord(EventChatMessage(false,3)))
  • Add SetVariable(count_str,(StringWord(EventChatMessage(false,4)))
  • Convert the string variables into useful integers and unitType.
  • Add SetVariable(player, (StringToInt(player_str))) - this will convert the string value into a integer value which can be used to actually spawn the unit.
  • Add SetVariable(count, (StringToInt(count_str))).
  • Add SetVariable(unitType, (ConvertStringToGameLink(unitType_str))) - this will convert the string in the chat message into a unit type.
  • Add UnitCreate(count, unitType, player, (Point(100,100)), 270.0, no Options).