PSTEE Engine Quirks
![Aquadrizzt](https://forums.beamdog.com/uploads/userpics/276/nVR5XE74IJDXY.jpg)
As I work on my various Planescape mods, I come across pieces of information about the functionality of the engine. Here are some interesting things I have discovered
I'm curious to see what interesting engine behavior other people have found.
- Unused Opcodes That Work: Timestop, Use Any Item
- Unused Opcodes That Don't Work: Find Traps, Improved Alacrity, Haste, Create Magical Weapon, Fist Thac0 Bonus, Fist Damage Bonus, Modify Visual Range
- The engine does support the addition of new Mage and Priest spells as long as you remember to ADD_SPELL_EX them and update spells.2da.
- The trigger condition for items in store files (offset 0x001c in the Items for Sale extended header) cannot contain an Or() statement.
- The store interface will place conditionally available items above unconditionally available items. The order of these within the .sto file is respected within these two groups.
I'm curious to see what interesting engine behavior other people have found.
Post edited by Aquadrizzt on
0
Comments
The SpellCast*() triggers don't seem to work in PST:EE, which includes
You can avoid this by having the damage effect applied via a sub resource and having the save be placed on the 177/326 effect that applies the sub resource.
All invisibility is removed upon attack.
Many of the existing projectiles are hardcoded, although there are a few ones that can be modified. (Thanks to Bubb for getting the list of hardcoded projectiles indices.)
An updated version of PROJECTL.ids is copied here.
EDIT: The CLAB files of interest are CLABFI01.2da (Fighter), CLABTH01.2da (Thief), CLABMA01.2da (Mage), and CLABPR01.2da (Priest).
Note that Planescape's default special abilities menu does NOT allow for special abilities to be added to creatures it doesn't expect (e.g. you couldn't give Morte's Litany of Curses to TNO, or Sensory Touch to anyone but TNO or Grace). This can be fixed with the following code.
Be aware that this will disable access to Thief abilities (Stealth, Thieving, Find Traps) without further hacking, such as the following, which has the dialog button on the default interface open up a Thief action bar.
Yes, what you're observing stems from the same engine behavior. Most resources are only defined for the default classes of TNO and the companions. Thus, Thieves (TNO) and Fighter/Thieves (Annah) have the correct access to thieving abilities in their Special bar, but a modded Mage/Thief or Fighter/Mage/Thief would not. You could use my ability menu workaround to fix this, but it isn't the cleanest implementation - I'm not good at UI modding.
I believe you can (with the above hack to get access to Thief abilities), make Fighter/Mage/Thief work almost exactly as expected on an engine side with some fixes to clastext.2da, thiefscl.2da, and thiefskl.2da. The Mage spellbook appears to work fine, as does thief skill allocation upon level up.
Most things you want to apply to TNO on game launch can be done by modifying CHARBASE.cre, but specifying the class occurs around line 13278 of the ui.menu (see below). The value in OnClassSelectButtonClick(#) defines the starting class based on the class id number from class.ids. 10 is the number for a F/M/T.
Note that if you want to get the right number of thief points to spend upon level up, you'll want to set your initial levels (in CHARBASE.cre) to 1/0/0. This would allow your character to instantly level up once loading in. Again, not the best implementation (there's probably a UI way to pick thief skills and then begin the game) but it will work.
Cleric/Mage and F/M/C also appear to work properly (other than a missing "spellbook flip" button like from BG2).
EDIT: One big thing that I'll make a note to investigate later is that item usability flags do not work for multiclasses. A F/M/T would be able to use an item that says "priests only", even though none of the constituent classes would be able to. NI doesn't list a usability flag that checks for F/M/T, but I'll play around.
EDIT2: Yep, the Indep unusability flag also prevents use by F/M/T.
It seems that using F/M/T normally is impossible.
I try to modify the ui.menu to add the thief abilities in the special abilities bar, but it didn't work.
The attachment is the three 2da files that I have modified.
EDIT: Okay so I have the base line functionality of TNO as a FMT working. He can scribe and cast spells, use thief skills, and equip any weapon. The game properly splits his XP amongst the three classes. The game currently does not award attribute points or proficiency points on any level up, which I am working to address.
There is still some minor jank here or there, but overall not bad for a few hours of effort. I am currently working on fixing the interactions with class specialization, the various NPC trainers, and the aforementioned ability score issue.
EDIT2: Okay well that took substantially more effort than I expected but I am pretty sure I have it in as good as a state as it's going to be. I'll package it up and type up a readme tomorrow.