Skip to content

Console Commands

modawan edited this page Apr 25, 2026 · 3 revisions

Console Commands

This page lists all supported console commands in alphabetical order, their descriptions and examples of use. Note that console commands are meant to be used only for debugging. Names and parameters may change in the future, new commands may supersede old ones, etc.

addfeat

Parameters: feat

Add a feat to the selected creature or the party leader. This command does not respect feat requirements on stat, level, or other feats and always adds the given feat. Feat is a number matching enum class FeatType from types.h: PowerAttack is 28, PowerBlast is 29, etc.

Example: addfeat 29

See also removefeat command.

additem

Parameters: item_tpl [size]

Load an item from item_tpl resource and adds it the inventory of the selected object, or the party leader. If size is provided, the command adds a stack of size items.

Example: additem g_i_progspike01 100 - add 100 Computer Spikes.

addspell

Parameters: spell

Add a spell (force power) to the selected creature or the party leader. Spell is a number and it should match enum class SpellType from types.h: DrainLife is 15, Fear is 16, etc.

Example: addspell 15

See also removespell command.

autoskipenable

Parameters: 1|0

Enable or disable AutoSkip feature for conversations (dialogs and computers). AutoSkip must also be configured with autoskipentries and autoskipreplies.

Example: autoskipenable 1 - turn on AutoSkip feature.

autoskipentries

Parameters: [1|0 ...]

Set a list of entries to skip or play normally: 1 to skip the entry, 0 for the entry to play it normally. Up to 1024 entries can be specified. If no parameters are given, all previously set entries are cleared.

Example: autoskipentries 1 1 0 1 1 1 0 - skip the next two entries, then play one normally, then skip the next three entries, and play the last one normally.

The trailing zero may be omitted, because once the list is exhausted, all subsequent entries are played normally.

autoskipreplies

Parameters: [number|0 ...]

Set a list of replies to automatically pick. The list can contain positive numbers (replies to pick), or zeros (replies to leave the player to pick). Up to 1024 entries can be specified. If no parameters are given, all previously set replies are cleared.

Example: autoskipreplies 1 0 2 - select reply number 1 as the next reply, then leave the next for the player to pick, then select reply number 2.

closedoor

Parameters: [triggerer_id]

Close a selected door. There is no in-game way to select an opened door, so use selectobjectbyid or selectobjectbytag commands to select a door first. There is no support for onClose scripts yet, so triggerer_id does nothing and can be omitted.

See also opendoor command.

givexp

Parameters: amount

Give amount of experience points (XP) to the selected creature or the party leader. The value may be negative to subtract XP. Note that this command does not change character level, but it can give enough XP to level-up.

Example: givexp 10000 - give 10000 XP points.

info

Print the following properties about the selected object or the party leader to console:

  • id is a unique number assigned to all creatures in the loaded module. Note that although this number should generally be repeatable, but this behavior is not guaranteed.

  • tag is a string identifier for an object. Tags should generally be unique in the module, but there may be outliers like spawned objects, for example.

  • tpl is a name of a resource the object was loaded from.

  • pos are X Y Z world coordinates of the object.

If the object is a Creature:

  • app is the creature's appearance type.

  • fac is the creature's faction.

If the object is a Placeable:

  • app is the placeable's appearance type.

kill

Kill the selected object or the party leader. Note that this command just applies the maximum damage, so it does not override isMinOneHP setting of an object.

killroom

Kill all hostile creatures in the same room as the selected object (or the party leader). If a creature other than the party leader is selected, all creatures of the same faction are killed. Otherwise all enemies of the party leader are killed.

listanim

Parameters: [substr]

List animations of selected object or the party leader. This list includes animations from the model, as well as all super-models recursively.

If substr is given, the command only lists animation names contain substr.

Example: listanim - list all animations.

Example: listanim f3 - list all animations with names containing f3 (combat animations for double-bladed wield type).

listglobals

List script global variables and their values. Values are printed according to their type: strings, booleans, numbers, locations.

listlocals

List script local variables and their values for the selected object or the party leader. Values are printed according to their type: booleans, numbers.

opendoor

Parameters: [triggerer_id]

Bypass any prerequisites and open a selected door. Optional triggerer_id parameter allows to specify an argument for the corresponding onOpen script. If triggerer_id is invalid (for example, 0 or 1) onOpen script is not invoked. If triggerer_id is not specified, onOpen script is called for the party leader.

Example: opendoor 42 - open a door and trigger opOpen for a creature with ID 42.

Note: you can select a door with selectobjectbytag command.

See also closedoor command.

playanim

Parameters: anim_name

Play the given animation in a loop for the selected object or the party leader. See also listanim command.

Example: playanim f3a1 - play an attack animation.

professionaltools

Add different kinds of weapons and consumables to the inventory of the selected object or the party leader: ranged and melee weapons, grenades, mines, medpacks, etc. The list is subject to change, and is omitted here for brevity. See Game::consoleProfessionalTools in game.cpp for more details.

removefeat

Parameters: feat

Remove a given feat from the selected creature or the party leader. Feat is a number matching enum class FeatType from types.h: PowerAttack is 28, PowerBlast is 29, etc.

Example: removefeat 29.

See also addfeat command.

removespell

Parameters: spell

Remove a given spell from the selected creature or the party leader. Spell is a number and it should match enum class SpellType from types.h: DrainLife is 15, Fear is 16, etc.

Example: removespell 15

See also addspell command.

runscript

Parameters: resref [kind:value ...]

Run a script resref with optional script arguments. Arguments set values for the corresponding script routines: Caller, ScriptVar, UserDefinedEventNumber, EnteringObject, etc. See Argument::fromString in variable.cpp for more a complete list of supported arguments and the value types they take.

Example: runscript k_hen_heartbt01 - run a script without any arguments.

Example: runscript k_hen_heartbt01 Caller:19 run a script with one argument (type Caller, value 19).

selectleader

Select the current party leader. This can be useful to effectively "cancel" selection of another object, so that follow-up commands can target the party leader instead.

selectobjectbyid

Parameters: id

Select an object with the provided id. All objects are supposed to have unique ids. Use info command to find an object id of the selected object.

Example: selectobjectbyid 19

selectobjectbytag

Parameters: tag

Select the first creature in the game with the given tag. Note that tags may not be unique in principle, but it is useful for all main NPCs. Use info command to find a tag of the selected object.

Example: selectobjectbytag bastila

setability

Parameters: ability value

Set ability score of the selected creature or the party leader. Ability is a number matching enum class Ability from types.h: Strength is 0, Dexterity is 1, etc.

Example: setability 1 14

setfaction

Parameters: number

Change faction of the selected creature or the party leader. See enum class Faction in types.h for a complete list, but the following are typical factions to set: 1 for Hostile, 2 for Friendly, and 5 for Neutral.

setposition

Parameters: x y z

Change position of the selected creature or the party leader to X, Y, Z world coordinates. The easiest way to find coordinates in game is to position a creature there and use info command.

Example: setposition 10 15.5 0

setskill

Parameters: skill value

set skill rank of the selected creature or the party leader. Skill is a number matching enum class SkillType from types.h: ComputerUse is 0, Demolitions is 1, etc.

Example: setskill 1 14

showaabb

Parameters: 1|0

Enable or disable rendering of Axis-Aligned Bounding Boxes for objects.

Example: showaabb 1 - turn on rendering of AABB.

showtriggers

Parameters: 1|0

Enable or disable rendering of trigger objects. Triggers are normally invisible and serve only for collision detection.

Example: showtriggers 1 - turn on rendering of triggers.

showwalkmesh

Parameters: 1|0

Enable or disable rendering of walkmeshes. Walkmeshes are normally invisible and serve only for collision detection and visibility checks.

Example: showwalkmesh 1 - turn on rendering of walkmeshes.

spawncompanion

Parameters: res npcindex [id]

Spawn a party member from a template res with the given npcindex (from 1 to 9) and an optional object id.

Example: spawncompanion p_juhani 3 1000

spawncreature

Parameters: res [id]

Spawn a creature from a template res and optionally assign it the given id. Having a fixed id is useful if we need to select this creature later using selectobjectbyid command. All creatures are spawned as Neutral at the position of the party leader.

Example: spawncreature c_drdmktwo - spawn a Assault Droid Mk II with the next available id.

Example: spawncreature c_drdmktwo 1000 - spawn an Assault Droid Mk II and set its id to 1000.

startconversation

Start a conversation with the currently selected object. This is equivalent to clicking on an object interactively. The command adds a StartConversation action to the party leader.

warp

Parameters: module

Load the given module and continue the game there.

Example: warp end_m01ab - load Endar Spire Starboard Section (second level).