So on the topic of level draining. l_target.condition_add_with_args("Temp Negative Level", 0, 0, 1) It looks like there is a functioning vanilla condition for this. However, it seems to auto kill many monsters I fight, as if they were only being considered level 1. I think it's fair to say it's a bug that a single level drain on a noble salamander kills it. (Or balor..) What could be done to fix this? I'm not sure how to approach this one. I could try extending the modifier, but I have no idea how the vanilla code manages the level draining so I wouldn't know where/how it is calculating death and levels lost. I want to be able to properly level drain enemies without giving game breaking instakills. Not even sure what the "level" would be for monsters, as the SRD doesn't give a level for Noble Salamander. CR perhaps?
Hit Dice are the default "level" for monsters, though ToEE doesn't see it that way. Pathfinder handles level drain differently to 3.5, each level drained lowers your max HP by 5, and you gain a cumulative -1 on every d20 roll you make per level drained, and your caster level is lowered by 1 per level drained. If your total levels drained exceed your level (or Hit Dice for monsters) you die.
Sounds like I'll have to define my own custom "level drain" modifier then. Not difficult to do to emulate those debuffs, but I would have preferred using the vanilla one. I checked the SRD and I see where you got the HD = level for monsters from, so that will work. Edit: I'll just make a new modifier for "Temporary Monster Negative Level" to apply all the debuffs for negative levels (including death) based on the monster HD + class levels?
So monster HD already counts the class levels, I just checked in game with a hit_dice_num and the number I got was the combination of hit dice and character levels, so the effective character level is the combination of HD and class levels, and ECL is what negative levels are counted against.
Soulbreaker is implemented with that, now I can deal negative level damage to enemies! I decided not to kill the enemy when the negative levels go over or equal to their ECL, because 1) right now you wouldn't gain experience if I did that, and 2) it probably won't be noticed as only critical hits drop a level with soulbreaker and you should almost always kill a monster before that many crits to lose all levels.
Is a way to check when the round has ended similar to how ET_OnBeginRound works? Also is there is a unique identifier for a creature that could be placed in a condition variable? Thanks!
1. Not sure, check out the stuff in combat system that handles ending turn. If not you can add. 2. Yes, check out the bard stuff for example.
Thanks for the quick reply. A couple more questions: Is there a way to tell which spells are touch attack spells in code? Shocking Grasp is labeled as personal just like shield for example. Also is there a way to tell which conditions are associated with a spell in code?
No to both I think. You can extend the spell rules reader to get this info. I think I;ve already done this for summon spells.
Does anyone have any idea how the disabled condition works internally? I want to be able to prevent the -1 HP when performing an action while disabled sometimes. Thinking this will involve extending the modifier, unless there are other hooks that would work in this situation? Ideas? Also, does anyone know what all of the sources of blood loss damage there are in the game? I know disabled exertion and dying are both blood loss damage.
If you are disabled, you can only take a single move action, anything more will result in exertion, as will any standard action. Stirges Blood Drain ability calls the Blood Loss float line, I can't think of any other examples in game.
Good to know about the stirges. Through the action type and action flags I think I figured out how to filter out exactly when the exertion damage occurs, and with that Autohypnosis implemented. Autohypnosis feels a bit overpowered from all the saves it gives you.
I have been examining the Temple+ files bard.py and class008_bard.py for the operation of bardic music but can see no function that relates bardic music proficiency to character level, is this buried deep in ToEE? I was hoping to find something portable like the "SneakAttackDice" extender function that I can drop into Mystic Theurge as a first step towards producing a prestige class that resembles the Fochlucan Lyrist.