Temple+ Modding Question

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

Remove all ads!
  1. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    That sounds like a good feat to add. I think you want to use evt_obj.spell_class but you may not be able to compare that to stat_level_paladin directly. I may need to add something to the interface to make that work.

     
  2. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    674
    Likes Received:
    71
    Thank you for your help. I have obviously bitten off more than I can chew! I have compared battle_blessing.py, without the section relating to spellcasting class, with sudden_quicken.py (which doesn't throw up a Python: 'tpdp.EvtObjMetaMagic' object has no attribute 'spell_packet' error) and cannot see any part of sudden_quicken.py which is related to spell_packet

    Correction adding a blank line was ALL THAT WAS REQUIRED TO ELIMININATE this particular error! Grrrr.
     
    Last edited: Oct 24, 2021
  3. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    674
    Likes Received:
    71
    Thank you. It looks although your hunch might be right. I have changed evt_obj.spell_packet.get_spell_casting_class() to evt_obj.spell_class in file attached.

    The spell BUT NOT THE FEAT work without producing any errors in the logfile but with no evidence of any comparison either.
     

    Attached Files:

  4. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    Will take a look tomorrow night and see what I think.
     
  5. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Sorry for the late reply Sitra. I am making a good progress with the Heritage Feats and a bit more generalizing this Heritage thing.

    To specify my question about skills. A few draconic feats grant specific feats as class skills. Is there a way to actually do this atm, adding skills to the class skill list outside the classxxx_class_name_py? My first idea was the above mentioned
    AddHook(ET_OnLevelupSystemEvent, EK_LVL_Skills_Activate, addClassSkill, ()).

    And to add a second question. Is there a good way to substract spells from the availible spells from spontanious casters like sorcs? Example:
    SorcCaster has 4 Level 1 spells left to cast and I want to substract 1 of her spells for a feat effect, leaving her with 3 remaining spells. It wouldn't matter what spell, as the feats only care for the spell level. Or do I have to use debit_spell() and always use specific spells?
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Just to note that despite how it may seem sometimes, python code is still not voodoo, and adding blank lines does not affect anything. Odds are it's some other error (or configuration) that you didn't notice you fixed, or that some other bug fired/did not fire when you tested again. I'm saying this because, as you've probably noticed, modding can easily drive you insane, so I don't want you or anyone else picking up on this and randomly adding blank lines whenever something doesn't work ;)
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    debit_spell will work. In principle you can also add an entry to obj_f_critter_spells_cast_idx with the correct spell level and class, because for spontaneous casters that's all it really does. I'd stick to debit_spell().

    As for skills, I vaguely remember someone tried to add a "Talent" feat which does that...
    I have it lying around in my overrides, attached:
     

    Attached Files:

  8. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    I just put up a pull request for a new function that should allow you to do what you want with the battle blessing feat.

     
    Pygmy likes this.
  9. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    674
    Likes Received:
    71
    Sorry for the delay in replying to your post @Doug - it arrived just before midnight my time.

    I love the new function @Doug. Thanks to your and @Sitra Achara's efforts Battle Blessing appears to function perfectly. Even more reason to have a paladin handy when you are fighting Balors?
     

    Attached Files:

  10. August

    August Established Member

    Joined:
    Jun 28, 2006
    Messages:
    119
    Likes Received:
    83
    This is very interesting to read and watch as I'm trying to teach myself to write feats.
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Cool stuff! I assume you're good with it being included in Temple+?
     
  12. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    674
    Likes Received:
    71
    Yes of course provided someone will put it up for me
     
  13. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    I can add it for you.
     
    Pygmy likes this.
  14. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    674
    Likes Received:
    71
    Thank you
     
  15. hammyh

    hammyh Established Member

    Joined:
    Apr 24, 2013
    Messages:
    328
    Likes Received:
    64
    An very nice feat addition to make paladins better past lvl 2.

    Were you able to make this feat only apply to the paladin spells available? ie, it shouldn't help sorc spells on a sorcadin or cleric on a FS hybrid. Otherwise it would be a bit too good, overall.
     
Our Host!