Temple+ Modding Question

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

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Curse me with a death-bed request will you??? :mad:

    It's on the to-do list obviously, and I do make occasional efforts on it. And it will be a genuine 2.0.
     
    sigofmugmort and Sitra Achara like this.
  2. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Would it be possible to add a get_spell_object function to tpdp.SpellPacket? At the moment I only have a set and an add function. I would have several spells that would benefit from it.
     
  3. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    What's the use case?


    Usually spell obj is used for AoE spells, and IIRC the relevant AoE events provide the spell obj directly.
     
  4. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Sitra, quick question on this - the AoE Desecrate is meant to do all of the following (and, in theory, much much more):
    Does all this happen? Much of it could be scripted, but does any of it currently work?
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    What the effect does is:

    For undead - attack, save throw and damage bonus as specified. Temp HP granted for undead that are summoned (sp-Summoned condition check).

    For others- return true on query Q_Ceitter_Is_On_Desecrate_Ground (or sthg like that). Not sure where and if that's used elsewhere to determine anything.
     
  6. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Thanks for that. I'll probably test Animate Dead and if necessary it can be scripted in that case.

    I just love the idea of a Necromancer (or more likely a Mystic Theurge) - PC or a monster - standing in the middle of a Desecrated circle like a boss and making use of every bonus.
     
  7. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Sorry for my late reply, kids kept me busy :)
    Yup this is only for AoE spells. My problem is, that if a target enters the aoe it will get a new condition added by the EventObjObjectEvent (which would provides the spell_obj via aoe_obj indeed). Now if I want to access the said spell_obj from within the newly added condition, I can't because all I can do is access the spellPacket and the spellPacket only allows to set or add spell_obj .

    Anyways a more pressing problem I stumbled on today is a Warlock related one. I started to redo the Warlock the way you wanted me to do it by doing invocations as spells. I made a really good progress but I now have a major problem. If I set the spells in the rule files to School: None, I can't learn new spells during levelup as they are greyed out. When I switch the spell school to e.g. Evocation everything works fine.

    To solve this problem, I'd like to add a new spell school: Invocation. Reasons for this:
    1. Fixes above problem ;)
    2. Feats can simply interact with Invocations by doing spellEntry.spell_school_enum == Invocation
    3. If we handle invocations as spells (which I agree with you makes a ton of sense), it should be completly handled as spells including its own spell school.

    I do have a few feats like Fey Power that do care about Invocations and it also would solve the Spell Focus Issue:
    From the Warlock rules:
    By adding a spell school you could simply add SF/GSF: Invocation as well and add the abitlity to use SF for Eldritch Basts. I'd ignore the part, that in PnP it is only one feat to streamline and simplify things and in the more grand scheme to handle it exactly like a new spell school.

    If adding a new spell school is as simply as I do hope right now by adding it in spell_structs.h:
    Code:
    enum SpellSchools : uint32_t
    {
        School_None = 0,
        School_Abjuration = 1,
        School_Conjuration = 2,
        School_Divination = 3,
        School_Enchantment =4,
        School_Evocation = 5,
        School_Illusion = 6,
        School_Necromancy = 7,
        School_Transmutation = 8,
        School_Invocation = 9
    };
    and add it to constants.py:
    Code:
    # Spell Schools (matches D20 SRD)
    Abjuration = 1
    Conjuration = 2
    Divination = 3
    Enchantment = 4
    Evocation = 5
    Illusion = 6
    Necromancy = 7
    Transmutation = 8
    Invocation = 9
    then I personally would wish to do so.
     
  8. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    That's alright, it's the norm here :)


    >> Yup this is only for AoE spells. My problem is, that if a target enters the aoe it will get a new condition added by the EventObjObjectEvent (which would provides the spell_obj via aoe_obj indeed). Now if I want to access the said spell_obj from within the newly added condition, I can't because all I can do is access the spellPacket and the spellPacket only allows to set or add spell_obj .

    Ok that's certainly easy to add. I do wonder why you'd need to access the spell object after that though, since it's basically just a dummy to manage event objects by the engine. Or is the intended context Aura AoE stuff where the AoE emanator matters?


    ------
    Anyways a more pressing problem I stumbled on today is a Warlock related one. I started to redo the Warlock the way you wanted me to do it by doing invocations as spells. I made a really good progress but I now have a major problem. If I set the spells in the rule files to School: None, I can't learn new spells during levelup as they are greyed out. When I switch the spell school to e.g. Evocation everything works fine.

    To solve this problem, I'd like to add a new spell school: Invocation. Reasons for this:
    1. Fixes above problem ;)
    2. Feats can simply interact with Invocations by doing spellEntry.spell_school_enum == Invocation
    3. If we handle invocations as spells (which I agree with you makes a ton of sense), it should be completly handled as spells including its own spell school.

    I do have a few feats like Fey Power that do care about Invocations and it also would solve the Spell Focus Issue:
    From the Warlock rules:

    By adding a spell school you could simply add SF/GSF: Invocation as well and add the abitlity to use SF for Eldritch Basts. I'd ignore the part, that in PnP it is only one feat to streamline and simplify things and in the more grand scheme to handle it exactly like a new spell school.

    If adding a new spell school is as simply as I do hope right now by adding it in spell_structs.h:
    Code:
    enum SpellSchools : uint32_t
    {
        School_None = 0,
        School_Abjuration = 1,
        School_Conjuration = 2,
        School_Divination = 3,
        School_Enchantment =4,
        School_Evocation = 5,
        School_Illusion = 6,
        School_Necromancy = 7,
        School_Transmutation = 8,
        School_Invocation = 9
    };
    and add it to constants.py:
    Code:
    # Spell Schools (matches D20 SRD)
    Abjuration = 1
    Conjuration = 2
    Divination = 3
    Enchantment = 4
    Evocation = 5
    Illusion = 6
    Necromancy = 7
    Transmutation = 8
    Invocation = 9
    then I personally would wish to do so.[/QUOTE]

    Not a bad idea I think. The only niggle I can currently think of is the saving throw flags.
    So just for future proofing, please wrap it in some kind of utility function such as is_invocation(sp_enum), or is_invocation(sp_pkt) etc.
     
  9. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Ok, might be a dumb question, but is there a way to verify in ET_OnConditionAddPre that the newly added condition is a spell condition?

    Here is what I wanted to do:
    Code:
    spell_id  = evt_obj.arg1 # spell_id is always stored in the first arg
    spell_packet = tpdp.SpellPacket(spell_id)
    spEntry = tpdp.SpellEntry(spell_packet.spell_enum)
    # I added the D20SPELL_DESCRIPTOR_XXX to my local constants.py for testing
    if spEntry.descriptor & D20SPELL_DESCRIPTOR_DARKNESS:
        do someting
    
    but this obviously doesn't take in account that a non spell condition is added like "Stunned", which ofc has no spell_id , but has a arg1 which would lead to a wrong return if I can't filter the conditions.
     
  10. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Does 'stunned' have a seperate existance beyond Sonic Burst? I seem to recall they are tied together.
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Not sure there's an easy way. I think vanilla may have kept an actual list of spells, not sure.

    I'm on vacation now till the end of the month, so I won't be as available.
     
    August and Buffed Rabbit like this.
Our Host!