Avenger Posted August 16, 2009 Share Posted August 16, 2009 level drain (bg2) affects: hp (?), max hp(?), level, saving throws, lore, thieving skills (based on what the class offers) energy drain (iwd2) affects: hp (-5x), max hp(-5x), saving throws Both store the level count in parameter1. Parameter2 seems to be completely ignored. BG2 level drain uses parameter3 to decrease the MaxHp, and parameter4 to decrease level. I don't know what sets those parameters (they are not stored in an effv1 structure). BG2 has some invulnerability mechanism against level drain (the same as against damage). - 0x6424 And another which is unique to level drain. -0x664c The first mechanism is most likely coming from avatar types (children, volo, etc cannot be harmed by avatar type). I don't know anything about 0x664c. Link to comment
Taimon Posted August 18, 2009 Share Posted August 18, 2009 BG2 level drain uses parameter3 to decrease the MaxHp, and parameter4 to decrease level. I don't know what sets those parameters (they are not stored in an effv1 structure). They get set in the "apply hook" of the effect (offset 0x0C 0x10 in the effect vtable, the one for level drain is at 0x53413a). This actually led me to the point where the game rolls the hp and this was really weird, like: roll two random values (1dX) and if 1 is lower than 2 roll again and if not roll again, too. Link to comment
Avenger Posted August 18, 2009 Author Share Posted August 18, 2009 Thanks, i knew that effects got some initial setup part, but usually forget to look I don't read the code as fluently as you Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.