Jump to content

unmapped bg2 stats


Recommended Posts

As you see in stats.ids there is a large interval between 166 and 199 which isn't named.

These stats exist!

I've been started mapping of these unknown stats.


Here is a snippet from my newest IEEP effect list:


291,1,"Graphics: Disable Visual Effect [291]","Irrelevant","Constant Value","Disables the glowing disk from some effect on the targetted creature(s). Does not affect those visual effects which use BAM files - eg. Fire Shield (red).

The Constant Value parameter should be set to 1.

The effect modifies stat 174 to param2."

292,1,"Protection: Backstab [292]","Irrelevant","Constant Value","Makes the targetted creature(s) immune to backstabbing.

The Constant Value parameter should be set to 1.

The effect modifies stat 175 to param2."

293,1,"Script: Enable Offscreen AI [293]","Irrelevant","Constant Value","The targetted creature(s) will still run scripts when off-screen and out of combat.

The Constant Value parameter should be set to 1.

The effect modifies stat 183 to param2."

294,1,"Sound: Sound MN [294]","Constant Value","Undefined","The use of this effect is unknown, and effect of its parameters are undefined. The effect modifies stat 184 to param1."


As you can see, at least one stat: 175 - immunetobackstab might have some scripting implications.

Some other effects could be used for detectable spells, and whatnot.

Link to comment

So far i found these stat/opcode associations


#define IE_MELEETHAC0 166 //opcode 284

#define IE_MELEEDAMAGE 167 //opcode 285

#define IE_MISSILEDAMAGE 168 //opcode 286

#define IE_NOCIRCLE 169 //opcode 287

#define IE_FISTTHAC0 170 //288

#define IE_FISTDAMAGE 171 //289

#define IE_TITLE1 172 //290

#define IE_TITLE2 173 //also 290

#define IE_DISABLEOVERLAY 174 //291

#define IE_DISABLEBACKSTAB 175 //292


#define IE_ENABLEOFFSCREENAI 183 //293

#define IE_SOUNDMN 184 //294

#define IE_CANUSEANYITEM 191 //302

#define IE_ALWAYSBACKSTAB 192 //303

#define IE_EFFECT308 195 //308

#define IE_DISABLETIMESTOP 197 //310



Effect #317 modifies STAT #155 (improvedhaste)

Effect #315 modifies STAT #201 (avatar removal)

Effect #300 modifies STAT #190 (deactivate dead creature?)

Effect #299 modifies STAT #189 (chaos shield)

Effect #297 modifies STAT #187 (creature non interruptable?)

Effect #295 modifies STAT #186 (disable chunky death?) - only if timing mode was set to 9



An usage for DISABLEOVERLAY 174 //opcode #291

is to detect SPIN920 (beholder spell turning) and SPIN710 (spell deflection no visual). (these are special spell turning effects)

Link to comment

It is nothing, really.

You can write anything in stats.ids

To keep the previous format, you could cut the IE_ prefix though, it is just how i name the stats in gemrb


And these stats are used by already known opcodes, i just found the stat they control.


My solid guess is fistdamage is added to all fist damage, melee damage is added to all melee weapon damage and missile damage is added to all missile damage caused by the affected creature ;)

Link to comment

Bad news; it was as I feared, from tests I ran two years ago--repeated a few minutes ago.


I set up a mock stat 205, and attached both ScriptingStateModifier and Proficiency effects to the Stoneskin (at different times). I could not get it to display a string head in-game.


I will try again with a different spell, but I am not hopeful. The original BPDetectStat package (alpha pre-release) had many of these higher-value stats, which I ended up removing because they did not work in-game.


I suppose the only hope I really hold is that some currently Unknown effect will make this possible--but I will try the test for posterity's sake nonetheless.


EDIT: I repeated the above test with a custom spell, which had no other effects besides Proficiency or ScriptingStateModifier. Still no luck. :)

Link to comment

Well, it doesn't surprise me.

The 'unknown' stats all do something, except the reserved proficiency/scripting state parts.

I expect only 1-2 stats that are ignored by the engine.

As you can see, i discovered #194/#196 just today.

And you can safely expect i'll find some more, hehe.

I've made a breakthrough in machine code reading, and now can understand about 50% of the opcode code.

Sometimes the stuff is really, really obvious. At least when it comes to possible parameters.


You can safely use the proficiency fields.

And you can try to see if any spell you made could be detected by some other means.

I still wonder how to detect mirror image, there is no stat for it!

Link to comment

Yes, the state works correctly, but the actual number of images isn't in any stat.

The engine stores it in a hidden structure tagged on the actor while it is in memory.


So, you can detect it, but for my purposes it isn't enough (at least, i should do it differently than i thought before).

Link to comment

Dump from my notes (ignore the offsets):

0x0CF0  0x1E6   avatar removal [p2 == 1]	(stat 188)

0x0D56  0x24C   open locks [cumulat./perm.] (stat 176)
0x0D5A  0x250   move silently [c./perm.]	(stat 177)
0x0D5E  0x254   find traps [cumulat./perm.] (stat 178)
0x0D62  0x258   pick pockets [cum./perm.]   (stat 179)
0x0D66  0x25C   hide in shadows [c./perm.]  (stat 180)
0x0D6A  0x260   detect illusions [c./perm.] (stat 181)
0x0D6E  0x264   set traps [cumulativ/perm.] (stat 182)
0x0D72  0x268   offscreen ai				(stat 183)
0x0D76  0x26C   existance sounds chance	 (stat 184)
0x0D7A  0x270   speed haste [p2 == 2]	   (stat 185)
0x0D7E  0x274   disable permanent death	 (stat 186)
0x0D82  0x278   immunity turn undead		(stat 187)
0x0D86  0x27C   chaos shield				(stat 189)
0x0D8A  0x280   npc bump					(stat 190)
0x0D8E  0x284   use any item				(stat 191)
0x0D92  0x288   backstab every hit		  (stat 192)
0x0D96  0x28C   reverse gender			  (stat 193)
0x0D9A  0x290   spell failure innate		(stat 194)
0x0D9E  0x294   protection from tracking	(stat 195)
0x0DA2  0x298   dead magic (for miscast)	(stat 196)
0x0DA6  0x29C   protection from timestop	(stat 197)
0x0DAA  0x2A0   (freedom effect related)	(stat 198)
0x0DAE  0x2A4   stoneskin amount golem	  (stat 199)
0x0DB2  0x2A8   level drain				 (stat 200)
0x0DB6  0x2AC   animation removal		   (stat 201)

201 is the last stat.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...