Aground Wiki
Advertisement
ConsoleScreenshot

Command Console

This page contains a list of useful commands. Commands only work on Pc and not on other consoles.

Press Ctrl+Shift+D (Cmd+Shift+D on Mac) to access command window. Use any command at your own risk and make sure to back up everything before messing around.

Note: The default Y value of every island is -1, and higher Y values are lower down.

For IDs refer to the IDs page.


Commands[]

Command Effect Notes
setPVP(true) Allows the player to damage and be damaged by other players that also use this command. You can replace true with false to opt out of PVP, making you immune to other players' attacks and unable to damage other players.
player.getOverlappingStructure() Returns the general type of structure that the player is overlapping, for example, an HQ Library would return [Crafting] and a cave entrance would return [Door] Does not distinguish between different structures of the same type, such as a Storehouse and a Spirit Storehouse. Multiple overlapping structure will return both. For example, the Spirit Door on Mars overlaps the Exiled's TV, so going on the tv would return [Door, Structure]
player.renderer.stage.set_alpha(0.3) Sets the transparency of the game. The smaller the decimal, the more transparent the game. Values equal or less than zero set the screen black. Values equal to or above 1 make the game completely opaque.
player.renderer.stage.application.windows[0].close() Closes the game window without saving. May cause you to be unable to open the game if you play on Steam
player.renderer.stage.set_rotation(10) Sets the rotation of the game around the top left corner. Works with negative values too. Angle measures are in degrees. 90 will make you unable to see the screen at all, and negative values will make you unable to see the text typed into the developer console.
resetAll() Resets everything, including all saves, achievements, and saved options. Only use this command if you are sure you want to, and download any saves that you want to keep.
<action>homeworld = "science1"</action><run procedure="set.homeworld" /> Create the new colony on Sunset Haven science1 can be replaced with any other area ID to create the new colony there.
player.gui.coins.changeCurrency("spirit", "spirit") Changes the coin display in the corner to spirit. You can replace the "spirit" in both places with "coins" or "cp" to show coins or Colosseum Points, respectively.
<move object="area.getObject('dragon_bomber')" x="player.tile_x" y="player.tile_y" /> Moves a dragon bomber in the same area as you to you. Works with other enemies, objects, vehicles, and other X and Y values.
<object id="plant_boss" x="45" /> Creates a cultivator in the same area as you at y=0 and x=45. Works with other enemies, objects, vehicles, and other X and Y values.
<remove object="area.getNPC('alchemist_magic')" /> Removes all Magic Island Alchemist NPCs from the area you are in. The Alchemist on the magic island is technically a different NPC from the one on the starting island. Works with other NPCs
<music id="nightly" /> Changes the music to the starting island night music. Works with other music IDs
<radar tile="orbit.radar" animation="orbit.radar" padding="2" centerOn="player" scale="16" includeStructures="false" objectId="function(o){return o.isPlayer()?2:-1;}" tileId="function(area, x, y){return area.getTileId(x, y, BASE_LAYER) == -1?-1:(area.getTileId(x, y, ORE_LAYER) == -1?4:3);}" /> Changes the radar to detect ores in the ground. Lava tiles are also counted as ores.

To stop the radar, use the command below.

<radar hide="true"/> Stops the radar/Spirit Detector To get the radar from the Spirit Detector back, remove the Spirit Detector from your inventory, and then add it back.
<objects id="yeti" startX="3" endX="125" minDist="15" maxDist="25" /> Creates yetis from X 3 to X 125. They are 15 to 25 tiles apart, and the number of yetis depends on how many will fit in that range with that distance. Works with any other object. Works with any other values. Can be used in conjunction with the command below to create multiple chests with items in them.
<object id="ice_chest" x="player.tile_x" y="player.tile_y">this.inventory.addItems(Item.get("steel_bar"), 10)</object> Creates an ice chest with 10 steel bars in it. Works with any other kind of chest. Works with any other kind of item and amount of items. Works with storehouses, if you replace object with structure in both places.
<quest id="kitchen"/> Start the "Build Kitchen" quest kitchen can be replaced with any other quest ID to start a different quest.
player.getStorageValue("spirit") Returns the amount of spirit you have. Works with power, health, stamina, and oxygen too.
setOre(10, 1, "iron") Makes an iron ore appear on the designated tile. Make sure the tile is filled, otherwise it will not be mineable or fillable. Works with other ores and positions. The first number is X, and the second is Y.
for (o in area.getAllObjects()) if (o.info.xml.nodeName() != 'player') Movement.circle(o,player,2,2); Creates a ring of random items and objects around you. Persists until exiting to main menu. Mostly useless, but the enemies drop loot, and the vehicles are rideable. However, do not ride the vehicles, as that will cause the game to mess up by making them circle themselves.
<weather type="storm" start="0" power="6" /> Same as below, but a storm instead of fog. The power variable only works for storms. It determines how much rain there is. Values of zero and below will make it not rain, but the sky will still be grey, and lightning will still flash. Variables can be substituted between this command and the one below.
<weather type="fog" alpha="0.8" color="ff0000" x="0" y="-10" width="80" height="12" dx="0" dy="1" /> Makes red fog weather that persists until area change or cutscene. (aesthetic only) Mostly useless, different x and y values change where it begins and ends, and so do different width and height. Color is hexadecimal. If you don't include any of the variables, it will still work, however, it will be infinite and grey. You must use all of the size variables if you use one of them. Possible weather types are snow, storm, and fog
isBombardment(player) Tells you whether the bombardment has been triggered.
<run procedure="bombardment.init"/> Re-starts the bombardment. Works only if the bombardment flag is false, and if you have the quest to build a dragonship.
<run procedure="minigame.shooter.title"/> Plays the Shooter minigame Replace shooter with platformer to play the Platformer minigame
<action>id = "player.ancient";</action><run procedure="changePlayerForm" /> Transforms the player from werewolf to human. Replace ancient with werewolf to transform from human to werewolf.
player.getRenderer().flash(808080) Shades the player grey while the developer console is open, and for a little while after. This command is mostly useless. It works with any other number-only hexadecimal color code.
getFlag ("cyborg2") Shows the status of the cyborg2 flag. You can set this flag to true with the below command.. It allows you to craft the better cyborg equipment at the operating table.
setFlag ("drones.attack",true) Sets the drones.attack flag to true There are other flags that can be set to true as well.
player.vehicle.setHidden ("true") Makes your vehicle invisible It will not look any different, but enemies will no longer attack it, until you attack something
<structure id = "power_plant" x = "player.tile_x" y = "player.tile_y"/> Builds a power plant where the player is standing; the building will be placed to the right of you You can replace "power_plant" with any other structure or object (including NPCs, mobs, items, ect.). In order to spawn items in, you must replace "structure" with "object" as well. Placing a pen creates a double pen like the first pen built by the farmer. Obstructing another structure when placing a structure down will destroy the initial building. The X-Coordinate can only be replaced with a positive integer. On the other hand, the Y-Coordinate can be replaced with a negative or positive integer. Please keep in mind that negative integers indicate that it is above ground (-1 is the ground level for all islands). and positive integers indicate that it is below ground.
<setTime value = "0"/> Sets the time to midnight Value can be replaced with any other number to set any other time.
watch player.tile_x Constantly shows variable player.tile_x and debug variables Works with any other variable, such as player.tile_y.
unwatch player.tile_x Stops showing variable player.tile_x Works with any currently shown variable (you can only unwatch a variable you are already watching)
player.addItem ("magic_box") or

<item id="magic_box"/>

Gives you a magic box Works with any other item. You must use an _ (underscore) for spaces within names.
player.addItem ("magic_box",3) or

<item id="magic_box" count="3"/>

Gives you three magic boxes Works with any other number and/or item. You must use an _ (underscore) for spaces within names.
player.addMultipleItems("magic_box", 3, "magic_sword", 1) Gives you three magic boxes and one magic sword. Works with any other number and/or item. You must use an _ (underscore) for spaces within names. You need to add the number "1" to items you only want one of, unlike "player.addItem".
player.info.stamina = 300 Sets your base stamina to 300 If you have your stamina skill maxed out, there will be an increase of 1,200 to your base stamina. For example, with your stamina skill maxed out and your base stamina at 300, you will have 1,500 stamina.
player.info.speed = 8 Sets your speed to 8 Higher numbers have lower speeds, and using negative numbers will make you go backwards. Setting your speed to 0 will kill you instantly.
player.stats.get('speed').add(3) Adds 3 to your current walking speed If you would like to, you can also decrease your speed. Simply replace "3" with a negative integer, and you will walk slower. I don't recommend decreasing it to below zero, though. I haven't tested it.
player.fullRestore() Fully restores health and stamina
player.restoreHealth() Fully restores health Works with Stamina, Oxygen and Power.
player.vehicle.info.speedY = 10 Sets the Y speed for the vehicle type you are in (i.e. the speed you set for the Adult Dragon will carry over to other Adult Dragons, but not to Elder Dragons.) You cannot set the Y speed of a vehicle that cannot move up or down.
player.vehicle.info.speedX = 10 Sets the X speed for the vehicle type you are in (i.e. the speed you set for the basic boat will carry over to other basic boats, but not to patrol boats.)
player.vehicle.info.health = 10000 Sets the maximum health for the vehicle type you are in (i.e. the max health you set for the basic boat will carry over to the patrol boat) Works with fuel, too.
player.vehicle.health = 1000 Sets the vehicle's current health to 1000 This will only set the current health, not max. You can set it to go beyond the max, but you will not be able to repair the vehicle until its health is less than max. Repairing the vehicle will not cause it to go past the max again. Works with fuel, too.
player.vehicle.dismount() Dismounts you from your current vehicle. Works inside minigames, allowing you to use the normal player and equipment instead of the minigame one. However, you will not be able to leave until you mount it again manually.
player.equipment.get("pickaxe").value.info.stamina = 0 Mining no longer makes you lose stamina You can replace "pickaxe" with "sword" in order to prevent stamina loss when swinging a sword.
player.getStorage("power").loseValue = function(){return false;} You will no longer lose power This command must be re-evaluated. It currently does not work. If you can, please check through the game files to see what variables, artifacts, functions, ect. have changed in order to replace the command.
player.inventory.weight = 0 Sets your current inventory weight to zero. Works with any other number too. If you put away items, the item's weight will be subtracted from your total.
player.addExp (99999) Gives you 99999 XP; works with any other number
player.setVar('cp', 3000) Sets your balance in Colosseum Points (Spirit Points) to 3000; works with any other number
for (k in player.getInfo().getSkills()) player.skills.set (k,99) Maxes out all skills Remember to drink potions. They increase stats, not skills.
for (k in player.getInfo().getSkills()) player.skills.set (k,0) Resets skills
for (e in player.equipment.slots) e.value.value = 0 Repair/feed any item/familiar currently equipped
player.increaseValue = function(amt){} Makes tools and weapons invincible; they will not be repaired This command must be re-evaluated. It currently does not work. If you can, please check through the game files to see what variables, artifacts, functions, ect. have changed in order to replace the command. (Works in demo)
player.equipment.get("head").value = null

player.equipment.get("weapon").value = null

De-equips the Cyborg Eye; "head" can be replaced to: "body" to unequip the Cyborg body; "back" to unequip the Cyborg Back; "shield" to unequip the Machine Gun Arm. It can also be replaced with "weapon" to remove any glitched boomerangs from your main hand. You will lose the de-equipped part, and will have to reoperate it back at an operating table. An operating table can be found within the submarine cave after the bombardment, which will destroy the Mirrows' inital retreat.
player.equipment.forceEquip("weapon", player, getItem("magic_sword").asItem()) Equips Magic Sword in your Dominant Hand slot. Works with any other item and any other slot.
player.loseHealth = function(){return 0;} Prevents health depletion; you can still be harmed through suffocation
player.loseStamina = function(){} Prevents stamina loss This command must be re-evaluated. It currently does not work. If you can, please check through the game files to see what variables, artifacts, functions, ect. have changed in order to replace the command. (Works in demo)
player.info.maxLevel = 42 Sets the max level for player to 42; works with any other number lower than it. The default max level is 31. Setting the max level to anything higher than 42 will reset your level and make you unable to gain any more Exp.
debug Shows debug stats
debug hide Hides debug stats
<teleport area = "start" x = "120" y = "-1" /> Teleport to starting island; destination can be altered to go to specific coordinates or locations

"start" can be replaced with any of the area IDs shown in the areas table below.

getItem ("wyrm_drill").mine = 20 Sets wyrm drill mine stat to 20; works with any other mining tool (no vehicles)
<save/> Saves the game
setGameScale(10) Sets the game zoom to 10 The default zoom is one normally, or two while in most spaceships. Higher numbers will zoom out more
setGameSpeed(10) Sets the game speed Game runs at 10 times normal speed. "10" can be replaced with a fraction or decimal. Higher is faster. Negative values might crash or freeze the game entirely.


Flags[]

[]

Flag Description Notes
cyborg2 When true, allows you to craft the second tier of cyborg gear. Set to true after completing the "Cyborg Carapace" quest
alien_hq.open When true, allows you to enter Alien HQ through its orbit instead of taking damage when attempting to land on the planet. Set to true after completing the "Launch Virus" quest
alien_hq When true, allows you to see Alien HQ on star map. Set to true automatically after completing the quest "Research Time!"
bombardment When true, the enemies in the bombardment will spawn, and all of the NPCs will hide in their bunkers, as well as the other effects of bombardment. Setting it to false will not do anything once it is true. Setting it to true again may cause duplicate NPCs in the bunker. Set to true automatically when having the quest build a Dragon Ship
activate_forge Setting it to true with a command will activate the forge, as if you had used a fire gem on it. Setting it to false won't deactivate the forge, just make you unable to complete the "Spirit Power" quest. Is automatically set to true by using a fire gem at the forge.
acitvate_synthesizer Setting it to true with a command will activate the synthesizer, as if you had used a water gem on it. Setting it to false won't deactivate the synthesizer, just make you unable to complete the "Spirit Power" quest. Is automatically set to true by using a water gem at the synthesizer.
oldone.hostile Setting it to true will make the old one's boss fight begin, however, if you have received the magical energy quest, it may not be a good idea to use. It is set to false after talking to the alchemist after the old one is defeated. The alchemist will not automatically teleport to the chamber when this flag is used.
oldone.beam Setting it to true will make the old one start its second phase of the fight (beam attacks). It is set to false after talking to the alchemist after the old one is defeated. Is automatically set to true after damaging the old one enough.
alchemist.shadow_cape While true, allows you to craft a Shadow Cape at the lab. Is automatically set to true by talking to the Alchemist with Shadow Fur in your inventory.
allow_hotkeys While true, you can set hotkeys, you can equip items in the pickaxe slot, and the view is set to show the player in the middle of the screen. Is automatically set to true by talking to the Miner for the first time.
pickaxe While false, allows you to talk to the miner to get a stone pickaxe, then it is set to true. Is automatically set to true by talking to the Miner for the first time.
miner_hut While false, allows you to see the first cutscene with the miner in the hut. While true, allows you to start the "Craft Smelter" quest from the miner. Is automatically set to true by resting in the hut after meeting the miner.
farmer_hut While false and after you talked to the Farmer, allows you to see the first cutscene with the farmer in the hut Is automatically set to true by resting in the hut after meeting the farmer.
hunter_hut While false and after you talked to the Hunter, allows you to see the first cutscene with the hunter in the hut Is automatically set to true by resting in the hut after not sending the hunter away.
summon_alchemist While true, you can summon the alchemist to the dragon lair on start island once. You can't summon him again, even if you set the flag to false then to true again. Is automatically set to true by talking to the Alchemist with a Baby Dragon in your inventory.
alchemist_first While false and "Wyrm Hive" quest is completed, allows you to see the first cutscene in the magic house, and you can't start the "Spirit Power" quest. Afterwards, it is set to true and you can start the "Spirit Power" quest. Is automatically set to true by resting in the magical house after completing the "Wyrm HIve" quest.
alchemist_second While false and "Spirit Power" quest is completed, allows you to see the second cutscene in the magic house, and you can't start the "Wyrm Research" quest. Afterwards, it is set to true and you can start the "Wyrm Research" quest. Is automatically set to true by resting in the magical house after completing the "Spirit Power" quest
sub_empty Whlie false, the Mirrows will call if your sub is out of power and explain about recharging it with a battery. Is automatically set to true by running out of power in the sub.
bigdrill Whlie false, the Mirrows will call if you craft a Boring Machine. Is automatically set to true by crafting a Boring Machine.
call_earth While false, the Mechanic will call you if you try to call Earth using the Com Station. Is automatically set to true by calling Earth using the Com Station.
house_intro While false, the House cutscene will play once you rest in the House on Starting Island. Is automatically set to true by rest ing in the House on Starting Island.
ore_merchant While false, talking to the Ore Merchant on Sunset Haven Hold will trigger a conversation about the merchant's suit. Is automatically set to true by talking to the Ore Merchant on Sunset Haven Hold
drones.attack While true, the drones will attack the player. Is automatically set to false by interacting with the computer that switches the drones to "patrol mode".
scavenger_hut While false, allows the player to see the cutscene with the Scavenger that occurs when sleeping in his Bunker. Is automatically set to true by sleeping in the Scavenger's Bunker and seeing the cutscene.


Variables[]

These are variables that can be watched with the watch command. Putting a variable's name will return the variable's value. The getFlag command can also be used as a variable. Some variables can be set using the commands above, such as the player.inventory.weight=0 command

Variable Description Set with command? Notes
Area.getXML(area.id).get('height') How many blocks from the top of an area, where it transitions to space, and the bottom blackstone No
area.getWidth() How many blocks in one area horizontally (From one transition point to the other, or how many there are in a looping area) No
player.tile_x The player's X position No
player.tile_y The player's Y position No Higher values are lower down, and the default ground ground value of every island is -1
player.vehicle.tile_x The player's vehicle's X position No The player's X position does not change while in a vehicle, even when the vehicle moves, until they dismount.
player.vehicle.tile_y The player's vehicle's Y position No The player's Y position does not change while in a vehicle, even when the vehicle moves, until they dismount. See player.tile_y for other notes
player.health The player's current health Yes
player.stamina The player's current stamina Yes
player.info.health The player's base maximum health Yes
player.info.stamina The player's base maximum stamina Yes
player.vehicle.health The player's vehicle's current health Yes
player.vehicle.fuel The player's vehicle's current fuel Yes
player.vehicle.info.health The player's vehicle's maximum health Yes
player.vehicle.info.fuel The player's vehicle's maximum fuel Yes
platformer_points The current amount of points in the Platformer minigame, resets after leaving. Inside Platformer minigame Untested outside of Platformer minigame
shooter_points The current amount of points in the Shooter minigame, resets after leaving. Inside Shooter minigame Untested outside of Shooter minigame
platformer_hiscore The highscore in the Platformer minigame Yes
shooter
Advertisement