PDA

View Full Version : TOEE console is a Python interpreter - or, how to cheat really easily


duggelz
July 26th, 2004, 12:57 PM
I'm not sure if this is widely known or not. The console, accessed by pressing [shift]-[~], is actually the Python interpreter. You can execute arbitrary Python code, like:

game.party[0].stat_base_set(stat_strength, 30)

In this example, setting the first character's strength value to 30.

The following stat_* variables are:

stat_ac
stat_age
stat_alignment
stat_alignment_choice
stat_attack_bonus
stat_carried_weight
stat_caster_level
stat_caster_level_barbarian
stat_caster_level_bard
stat_caster_level_cleric
stat_caster_level_druid
stat_caster_level_fighter
stat_caster_level_monk
stat_caster_level_paladin
stat_caster_level_ranger
stat_caster_level_rogue
stat_caster_level_sorcerer
stat_caster_level_wizard
stat_category
stat_cha_mod
stat_charisma
stat_con_mod
stat_constitution
stat_damage_bonus
stat_deity
stat_dex_mod
stat_dexterity
stat_domain_1
stat_domain_2
stat_experience
stat_favored_enemies
stat_gender
stat_height
stat_hp_current
stat_hp_max
stat_initiative_bonus
stat_int_mod
stat_intelligence
stat_known_spells
stat_level
stat_level_barbarian
stat_level_bard
stat_level_cleric
stat_level_druid
stat_level_fighter
stat_level_monk
stat_level_paladin
stat_level_prestige_start
stat_level_ranger
stat_level_rogue
stat_level_sorcerer
stat_level_wizard
stat_load
stat_melee_attack_bonus
stat_memorized_spells
stat_money
stat_money_cp
stat_money_ep
stat_money_gp
stat_money_pp
stat_money_sp
stat_movement_speed
stat_race
stat_ranged_attack_bonus
stat_run_speed
stat_save_fortitude
stat_save_reflexes
stat_save_willpower
stat_school_prohibited
stat_school_specialization
stat_size
stat_spells_per_day
stat_str_mod
stat_strength
stat_subdual_damage
stat_subrace
stat_weight
stat_wis_mod
stat_wisdom

ordinaryjones
August 2nd, 2004, 02:19 PM
Wow,very cool.Thanks.

Orrin Oakenshield
September 26th, 2004, 09:59 PM
Please explain at what point & where you can gain access to the console? So far, nothing happens when I press (shift) + (~).
Sometimes, you big paladine types gotta yank this ol' dwarf by the beard to get him to see what you see at your level!

Darksabre
September 27th, 2004, 12:24 PM
Is there a way to change feats using the console? I don't want to get more, just to undo some poor decisions.

Nomad_Wanderer
September 27th, 2004, 12:57 PM
You may be able to decrease your level, and then increase your level..

I.e. if you set your experience back to prior the level up, and then increase it to where it is now, I think you would be able to re-level up, and choose your feats again.

Nomad_Wanderer
September 27th, 2004, 12:58 PM
Originally posted by duggelz
I'm not sure if this is widely known or not. The console, accessed by pressing [shift]-[~], is actually the Python interpreter. You can execute arbitrary Python code, like:

game.party[0].stat_base_set(stat_strength, 30)

In this example, setting the first character's strength value to 30.

The following stat_* variables are:

stat_ac
stat_age
.....



Is this documented anywhere more thoroughly? What other functions are on the Party[0] object? How can I find out?

Darksabre
September 27th, 2004, 05:00 PM
You may be able to decrease your level, and then increase your level

Oooh! Clever. I hadn't thought of that. Thanks!

JoBu
October 6th, 2004, 10:56 AM
i am in the same boat as Orrin, for some strange reason i can not get the console to come up with [shift]+[~]. any ideas as to what i may be doing wrong?

Morpheus
October 7th, 2004, 04:53 AM
Did you install the official patches? I think you need to have Patch 2.0 installed, otherwise the console won't show up.

Iain
October 16th, 2004, 06:36 PM
I think it's something to do with the country configuration of the keyboard. I use the UK layout, and in game the ~ key is actually the key above TAB. Also, you need to keep the keys pressed for a second - the game seems sluggish in recognising key presses.

Shiningted
October 23rd, 2004, 08:57 AM
Hey thanks for this, mighty useful! I have tried it, changed various stats to see it could be done (strength, XP etc) and had no problems with that but whenever i try to change my levels it just responds by telling me what level I am and not what i want to be. I have tried this with stat_level and stat_level_bard, moving them up as i want and moving them down to go back and try again, and changing my XP to match - nothing. I have also tried setting my XP back and going over the level mark again by earning XP (Jaroo's box is handy, init? ;) ) but nothing happens. I don't wanna cheat (I have a meat cleaver that does 8d12 for moments when the game needs to be taught who's boss :D) i just want to fix a stuff-up - I accidently leveled up my bard as a rogue :roll: Any help would be appreciated!!!

Martinius
October 28th, 2004, 06:06 AM
Nice work. I didn't know I could make use of this. Unfortunately, trying to use it for NPCs that have as stats "-" deeply disturbs me. That's one thing I dislike about TOEE.

When a character joins you what's the reason not to have him/her as a standard PC, with clearly displayed stats like in NWN?

I like the interface and graphics of TOEE much better than NWN, but there are some shortcomings for sure!

akbar
November 13th, 2004, 12:26 PM
Hello everybody, I hate to sound like an idiot but I tried to change my characters stregth to a deseant 18, but for some reason its not working. I type

game.party[0].stat_base_set(stat_stregth, 18)

than I hit enter and I get

traceback (most recent call last):
file "<string>", line 1, in ?

If anybody can help me out I sure would appreciate it.

Darksabre
November 14th, 2004, 10:34 AM
Umm... it's a spelling problem. "Strength".

akbar
November 16th, 2004, 07:33 AM
Actually, I made a mistake in spelling it here on the forums but in the game I did spell it correctly and still not working will try it again once I get off work but I'm sure I spelled it correctly.




Thank you.

akbar
November 19th, 2004, 09:52 PM
I checked and double checked the spelling, and I'm still getting the same results, the other functions, like level up and give, work fine just stat modifiers dont work, can anybody help me out.

Siglorel
November 21st, 2004, 08:59 AM
I think you first need to type the line:

from utilities import *

My guess is that if you play the game for a while something will trigger this and the patching will work fine. If you just start up and go straight into the console you will be missing some links until you type this. There are a couple of other similar include functions - we should try to document which modifications need which includes, but game.party[x].set_base_stat(xxx...) needs this one.

akbar
November 22nd, 2004, 09:00 PM
Well it just started working, I had been playing this game for a while and most of my party was already tenth level, I just wanted to increase the abilities, any way I had been tring to do it on and off and it just started working some abilities worked some didn't, right now I just wanted strength bumped up. I apreciate all the help.

Arc
December 4th, 2004, 03:14 PM
When i type

game.party[0].stat_base_set(stat_money_pp, 1000)

it just states how much money i currently have. it doesnt increase my plat to 1000

also tried

game.party[0].stat_base_set(stat_money, 1000)

it displays 330140 i dont have that much cash. its not showing my money all converted to cp cuz i tried to make it 350000, it still says 330140 with the stat_money, * command.

WHAT GIVES i want some plate armor and cures lol

ordinaryjones
December 6th, 2004, 10:08 AM
You could always type "give 7003" in the console to give yourself 50pp.

loanwrangler
December 20th, 2004, 10:51 PM
OK, I hit the 'shift ~' thing and get a big text box......

I want to level my characters up a couple levels cause I'm tired of getting killed so easily }:(

I've tried entering the following:
game.party(0).stat_base_set(stat_experience, 1000)

it then it shows in the text box:
Traceback (most recent call last): File "<string>", line 1, in ?

What sould I be doing? I've spent far too long playing NWN at 25+ levels and am having too much trouble at 1st level!!

Please help me

Lord Plothos
December 21st, 2004, 12:39 AM
Well, I don't know anything about python or how to input those crazy codes correctly, but the one time I tried opening the console I typed "levelup" for fun. You don't gain a whole level per guy, but each guy gets an exp boost (maybe around 500 or something). Anyway, just type it a bunch of times and your guys will go up a level eventually. That should work.

loanwrangler
December 21st, 2004, 01:30 AM
...interesting.....

Tazira
December 25th, 2004, 08:22 AM
Ok, the text box accepts the code, but, the stats don't change on the players. Do you have to reboot the game or something...or is it really not accepting the code like I think it is.

Tazira :eek:

ThunderSoul97
December 29th, 2004, 11:39 PM
Python statements end with dots.
Somebody needs to get the whole list and document it. The arguments to each method call really need to be documented, because the method names by themselves without arguments are useless, unless you like to guess; and you don't necessasrily know how many arguments each function has. So whoever got the list, could you please post it all documented and also more complete?

Thanks,
-TS...

WinterRose
January 13th, 2005, 05:10 PM
Hmm... having upgraded mine to 3.0.4, I can't make the shift-~ combination work. Then I hit quote key (the unshifted tilde key by itself), it selects the whole party. Hitting shift tilde selects my whole party as though I hadn't hit the shift key at all. And I'm certainly not getting any text window where I can enter in code. Is there something in the .ini file I need to change before this will work? Baby needs mo-bettah starting money.

samuel-wolfe
January 14th, 2005, 08:25 AM
The commands given solve the problem that I was looking to solve when I found this thread, but now I've gotten greedy... I was wondering if anyone knows what all the commands are that are accepted by the game. I play a lot of games with console commands like this, (NWN and morrowind to name just a few) and as much as I'd like to be one of those players who has more fun when he doesn't cheat, I just can't do it. I'd really like to see what other kickass commands the game will let me use. I've looked at a command list for the python code, and I'm guessing that the game itself doesn't use these commands, so I was just wondering where (if anywhere) a person might find a full list of commands for the game console?

Jesus
January 15th, 2005, 01:13 PM
i have tried to do this many times i'm pretty sure i am typing it in right
game.party[3].stat_base_set(stat_level_sorcerer,7)

but it just say
0

and there are no changes in ANY of my characters

zhuge
January 16th, 2005, 07:59 PM
If you want to levelup the sorc, select the sorc, then type "levelup" in the console window and press Enter. Should work I believe...

plumrod
January 21st, 2005, 11:08 PM
OK, I hit the 'shift ~' thing and get a big text box......

I've tried entering the following:
game.party(0).stat_base_set(stat_experience, 1000)

it then it shows in the text box:
Traceback (most recent call last): File "<string>", line 1, in ?

What sould I be doing? I've spent far too long playing NWN at 25+ levels and am having too much trouble at 1st level!!

Please help me

It could be that you have the 0 in parenthesis. Should be in brackets [0]

plumrod
January 21st, 2005, 11:11 PM
i have tried to do this many times i'm pretty sure i am typing it in right
game.party[3].stat_base_set(stat_level_sorcerer,7)

but it just say
0

and there are no changes in ANY of my characters

It works if you use (stat_experience, 21000) to make it a 7th level character. You might want more xp though for creating magic items though if you take those feats.

mach_blake
February 3rd, 2005, 04:11 AM
You could always type "give 7003" in the console to give yourself 50pp.

I tried that and it worked but then maybe a minute or so after the game crashed
and the stat_money_pp doesn't seem to work either

Lord Plothos
February 3rd, 2005, 10:12 AM
Hello everybody, I hate to sound like an idiot but I tried to change my characters stregth to a deseant 18, but for some reason its not working. I type

game.party[0].stat_base_set(stat_stregth, 18)

than I hit enter and I get

traceback (most recent call last):
file "<string>", line 1, in ?

If anybody can help me out I sure would appreciate it.
I was getting this message whenever I used capital letters for HP to up my HP max. Got it to work using lower-case, though. (I had also typed in the "from utilities import *" thing, but I don't know if that helped or not. The only times it worked for me, I had no space after the comma as well. I don't know if that's the problem, but you could try it. Certainly don't use caps anywhere.