Temple+ Modding Question

Discussion in 'General Modification' started by _doug_, Feb 21, 2018.

Remove all ads!
  1. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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?
     
  2. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    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.
     
  3. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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?
     
    Last edited: Sep 2, 2019
  4. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Yep, any class levels will count towards the monster Hit Dice.
     
  5. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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.
     
  6. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Cool, well that makes it a little simpler.
     
  7. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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.
     
    Allyx likes this.
  8. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    316
    Likes Received:
    143
    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!
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    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.
     
  10. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    316
    Likes Received:
    143
    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?
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    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.
     
  12. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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.
     
    Last edited: Sep 8, 2019
  13. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    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.
     
  14. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    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.
     
  15. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    751
    Likes Received:
    81
    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.
     
Our Host!