Skip to content

PST:EE console, commands and codes how-to

JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,713
Cutters,

We've decided to share a console how-to for PST:EE with you.

1. Enable the console in PST:EE.

For this, please, follow the instuctions provided for BGEE/SoD/BG2EE in version 2.0 and later by @elminster having the following in mind (PST:EE-specific):

You should go to your %user%\documents\Planescape Torment - Enhanced Edition\ folder.

2. Press - to access the console in game.

3. Use these handy Control Keys:

CTRL-SPACE will allow you to access the debug console which has convenient buttons for jumping to areas, spawning a cheat weapon (the "God Axe"), etc.
CTRL-Y will kill any creature currently under the mouse.
CTRL-J will cause the party to jump to the current cursor location.
CTRL-Z with mouse over TNO will summon a full party (may create duplicates)
CTRL-SHIFT-Z with mouse over a character will give that character all spells

4. Use these handy Commands:

4.1. C:AddGold(< int >)
Adds the amount of gold specified by the int parameter to the party.

4.2. C:CreateItem("< string >")
Creates the item specified by < string >.

4.3. C:CreateCreature("< string >")
Creates the creature specified by < string >.

4.4. C:ExploreArea()
Removes the fog of war from the current area.

4.5. C:SetCurrentXP("< int >")
Sets the XP of the selected character to < int >.

4.6. Alignment-related Commands

TNO Only (Cannot change Alignment of NPC Party Members)
The Variables are "LAW" and "GOOD"
The break point numbers are 15 (> 14) and -21 (< -20).
Numbers can go above or below those break point numbers (you can have -100 Good or +80 Law).
Alignment change is instant. Setting Alignment Variable to 15 immediately changes the alignment of TNO.
C:SetGlobal apparently does NOT update all appropriate code to recognize the variable change till AFTER a Save/Reload.
To pick up C:SetGlobal changes to Alignment properly in ALL code you MUST run C:Eval("ChangeAlignment(Protagonist,LAWFUL_GOOD)") where "LAWFUL_GOOD" is the Alignment to switch to.

4.6.1. C:SetGlobal("LAW","GLOBAL",15) - Set Alignment to Lawful
4.6.2. C:SetGlobal("LAW","GLOBAL",-21) - Set Alignment to Chaotic
4.6.3. C:SetGlobal("GOOD","GLOBAL",15) - Set Alignment to Good
4.6.4. C:SetGlobal("GOOD","GLOBAL",-21) - Set Alignment to Evil

After any of the above commands you must run:
C:Eval("ChangeAlignment(Protagonist,ALIGNMENT)") where ALIGNMENT is the current alignment (Such as CHAOTIC_NEUTRAL or LAWFUL_EVIL) of TNO.

4.6.5. Using C:GetGlobal will show the current value, such as C:GetGlobal("LAW","GLOBAL")

Examples:

To Set TNO's Alignment to Lawful Good
C:SetGlobal("LAW","GLOBAL",15)
C:SetGlobal("GOOD","GLOBAL",15)
C:Eval("ChangeAlignment(Protagonist,LAWFUL_GOOD)")

To Set TNO's Alignment to Lawful Evil
C:SetGlobal("LAW","GLOBAL",15)
C:SetGlobal("GOOD","GLOBAL",-21)
C:Eval("ChangeAlignment(Protagonist,LAWFUL_EVIL)")

To Set TNO's Alignment to Chaotic Good
C:SetGlobal("LAW","GLOBAL",-21)
C:SetGlobal("GOOD","GLOBAL",15)
C:Eval("ChangeAlignment(Protagonist,CHAOTIC_GOOD)")

To Set TNO's Alignment to Chaotic Evil
C:SetGlobal("LAW","GLOBAL",-21)
C:SetGlobal("GOOD","GLOBAL",-21)
C:Eval("ChangeAlignment(Protagonist,CHAOTIC_EVIL)")

4.7. Faction-related Commands

For the Nameless One

TNO's faction is controlled by global variables, since TNO can be a member of more than one faction at the same time:

C:SetGlobal("Join_","GLOBAL",) ← Sets the global variable that means "TNO is currently a member of this faction".

List of joinable factions and their variables:
C:SetGlobal("Join_Anarchists","GLOBAL",1)
C:SetGlobal("Join_Dustmen","GLOBAL",1)
C:SetGlobal("Join_Godsmen","GLOBAL",6)
C:SetGlobal("Join_Sensates","GLOBAL",1)
C:SetGlobal("Join_Chaosmen","GLOBAL",1)


For party members

The faction of all other party members is controlled by the faction field in their creature files:

C:Eval('ChangeFaction(,)') ← Changes the target's faction stored in their creature file to the faction specified by the faction number if the target is in the current area. Numbers can be looked up in FACTION.ids, but seem to be hardcoded.

Examples:
C:Eval('ChangeFaction("Dakkon",2)') - Changes Dak'kon to Dustmen
C:Eval('ChangeFaction("Annah",0)') - Removes Annah's Indep faction, making her have no faction

4.8. If you're looking for the item code, use NearInfinity, or check this thread by @Fred57.
elminstertaclanePeccaStefanOkaguanaRavenslightAndreaColomboAbelJarrakulValamirCleaverlolienFaydarkmlneveseProontanastiel
«1

Comments

  • PantaloonsPantaloons Member Posts: 25
    edited April 2017
    Are there commands for changing the attributes (on TNO)?
  • Fred57Fred57 Member Posts: 8
    if console enabled if you press CTRL + R you can resurrect or heal a Character
    if you press CTRL + T you can advance the Time by one hour
    ValamirCleaverJuliusBorisovFaydark
  • Fred57Fred57 Member Posts: 8
    the only way of my knowledge to change the attributes ( maximize ) is to cheat experience
  • JidokwonJidokwon Member Posts: 395
    CTRL+Y assigns the kill to the Protagonist, so expect to become chaotic evil in short order if using it at all. I've also had unrelated NPCs agro when using it. It didn't work like this in the Baldur's Gate series and I'm unsure how it worked in Icewind Dale. Like the Baldur's Gate series, however, using it doesn't give experience.
    JuliusBorisovFaydarkProont
  • argent77argent77 Member Posts: 3,428

    Are there commands for changing the attributes (on TNO)?

    You can change stats directly in the game with the debug console.

    For example, to increase STR by one point, place mouse cursor over the character who should receive the stat increase and enter:
    C:Eval('ChangeStat(Myself,STR,1,ADD)')
    The following stats are supported: STR, STREXTRA, INT, WIS, DEX, CON and CHR. Change "ADD" to "SET" if you want to set the target stat of the character instead.
    JuliusBorisovFaydarkProont
  • JidokwonJidokwon Member Posts: 395
    edited May 2017
    Is there a command to add specific spells and abilities? Also, is it possible to change thief skills?
    gamebounty
  • rokujoladyrokujolady Member Posts: 7
    Is there a cheat command to reset the Lady of Pain's disfavor?
  • who_is_danielwho_is_daniel Member, Mobile Tester Posts: 98
    Anyone have the creature names
    To use with C:CreateCreature ?


    Specifically for the Black Abisai?
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862

    1. the AddSpell cheat command works
    2. C:SetGlobal("LADY","GLOBAL",0)
    3. one of the black abishai: ABISAB
    JuliusBorisovFaydarkProont
  • ZanianZanian Member Posts: 332
    I'll more or less copy the above petitioner's question and ask if anyone knows the code for the Greater Glabrezu?
  • JidokwonJidokwon Member Posts: 395
    @Zanian : GLABREZX
    ZanianJuliusBorisovProont
  • 2CrowsTalking2CrowsTalking Member Posts: 2
    I seem to have a problem with the syntax for the console. I dropped the intestines that Marta pulled from TNO somewhere. When I enter the command c:CreateItem("INTEST",1) I get the response [string " c:CreateItem("INTEST",1)"]:1: attempt to index global 'c' (a nil value). I get a similar response with the AddGold command. What am I doing wrong?
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,713
    @2CrowsTalking Try C instead of c

    C:CreateItem("INTEST",1)
  • 2CrowsTalking2CrowsTalking Member Posts: 2
    Julius, thank you. I had not seen any notes about case sensitivity, but this worked.
    JuliusBorisov
  • Styx1280Styx1280 Member Posts: 1
    How would I go about generating Firkaag's prison key using the console command system?
  • DoubledimasDoubledimas Member, Mobile Tester Posts: 1,286
    @Styx1280 You've posted it in the PST:EE section, but you'll need to enter C:CreateItem("KEY09") if I'm not mistaken.
    JuliusBorisov
  • EmanonEmanon Member Posts: 5
    Please help me out... I've tried typing the debug thing several times and it is absolutely not working. I type it in, save it and run the game, Ctrl space only pauses the game. No console showing up.
  • GusindaGusinda Member Posts: 1,915
    edited August 2017
    @Emanon, welcome to the forum... I am assuming that you are talking about the enhanced edition of PS:T here...

    All you should need to do is copy and paste the line below into you baldur.lau (located in your ..\Documents\Planescape Torment - Enhanced Edition folder), Make sure you don't have the game running while you do this.

    SetPrivateProfileString('Program Options','Debug Mode','1')

    CTRL-Space are the correct keys.

    Good luck
    Gus


    JuliusBorisov
  • EmanonEmanon Member Posts: 5
    @Gusinda I've tried every way I can think of and I still have the same result
  • GusindaGusinda Member Posts: 1,915
    @Emanon - What version of PSTEE are you running and on what platform? Also, where did you purchase?
    Do you have any mods running?

    Whilst that info is coming, you could try the following:
    1. Rename your baldur.lua to baldur.lua.bak
    2. Start the game. This will rewrite baldur.lua.
    3. Close the game down.
    4. Edit baldur.lau and add the line:

    SetPrivateProfileString('Program Options','Debug Mode','1')

    6. Save and exit your text editor.
    7. Restart the game and try CTRL-Space (together). Just pressing Space will pause the game so it may be a finger fault...

    If this doesn't work, could you start a new game and try again to remove doubt that it isn't a corrupt saved game?


    Gus
  • EmanonEmanon Member Posts: 5
    I purchased from beamdog online and I'm running it on PC, windows 10.
    Version is 3.1.3.0
    I'll give the rename a try and let you know. I appreciate the assistance
  • EmanonEmanon Member Posts: 5
    Still the same result...just pausing with no console opening
  • GusindaGusinda Member Posts: 1,915
    edited August 2017
    @Emanon - could you upload your baldur.lua (use the icon in the edit toolbar that looks like a page with a bent corner). You just need to rename the file from .lua to .txt...

    I have uploaded a copy of mine if you want to have a try. Copy it into your ..\Documents\Planescape Torment - Enhanced Edition folder, rename your current baldur.lua then rename baldur.txt to baldur.lua.

    It should work as I have my graphics backend set to DirectX.

    Gus

    Edit: I am sure that you have the concept correct but just in case... when pressing the keys to bring up the console, try pressing CTRL first, hold it pressed down, then press space.
    Post edited by Gusinda on
    JuliusBorisovConjurerDragon
  • ConjurerDragonConjurerDragon Member Posts: 110
    I tried to raise the "lawful" value of TNO because I’m at the point where I met Vhailor and his raise of STR depends on that number and I got only a +2 for not being lawful enough for the maximum bonus.

    I used the console command
    C:GetGlobal("LAW","GLOBAL")
    to see how lawful my TNO was and it returned 34

    Then I tried to raise that value with
    C:SetGlobal("LAW","GLOBAL",40)
    to 40 - but the query still returned that the value remained 34 (and when speaking to Vhailor the bonus was still +2).

    So I reloaded and tried it again and after the command used
    C:Eval("ChangeAlignment(Protagonist,LAWFUL_GOOD)")
    as described in the first post of this thread.

    But my TNO still has only a lawfulness of 34 and the bonus remains +2 when trying again.

    The console is working as I could successfully raise the XP of TNO’s companions to be closer to his own.

    So what am I doing wrong?

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,713
    Maybe this can help you:

    "C:SetGlobal apparently does NOT update all appropriate code to recognize the variable change till AFTER a Save/Reload."
    ConjurerDragonProont
  • ConjurerDragonConjurerDragon Member Posts: 110

    Maybe this can help you:

    "C:SetGlobal apparently does NOT update all appropriate code to recognize the variable change till AFTER a Save/Reload."

    That worked. After saving and reloading the change was recognized and Vhailor granted the +3 boon. Thankyou.
    JuliusBorisov
  • jaklumenjaklumen Member Posts: 16
    Is there a way to use the console to have TNO *leave* a faction?

    I'm running the UB mod and I ran into problems joining AND leaving the Anarchists. It was something about Bedai-Lihn not being able to leave the Lower Ward properly, and then Scofflaw Penn refused to acknowledge "the city must burn" to join. So I forced joining the Anarchists via the console, but missed the "Kill Vorten" quest from Leena, failing to accept the quest even though I'd forced a join.
    Basically, I'm wanting to get Ebb Creakknees' additional script in Curst Gone later, but without getting the quest and telling Corvus about the cell, that's not going to happen.

    I understand if I'm just going to have to replay things later to get those options properly, but I was wondering. Thanks.
  • RaduzielRaduziel Member Posts: 4,714
    Emanon said:

    Still the same result...just pausing with no console opening

    You can't edit the LUA file while the game is open, that will prevent the changes you made to be properly saved.

    IDK if that's the case, but I've struggled a little with it with IWD.
Sign In or Register to comment.