Temple+ New Feats

Discussion in 'General Modification' started by WinstonShnozwick, Sep 18, 2016.

Remove all ads!
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Haven't done that yet, but I guess I'll apply a similar treatment.
     
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Alright, added this too now.
    Similar to particles, place a *.tab file (or multiple files in principle) in
    Code:
    rules\protos\
    Naturally you can't add protos without adding descriptions too, so the same principle applies:
    Code:
    mes\description\*.mes  // for description.mes extensions
    mes\long_descr\*.mes // for long_description.mes extensions
     
  3. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    So I can just have the one line for the new thing I want like below?

    {20000}{Burne}
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Yes, exactly.
    You can also use it to override existing entries BTW since it'll always look in the extension files first.
     
  5. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    I looked through the wiki but I couldn't figure out what to do to display a roll in the rolls window. For the psionic focus concentration check, I have the following
    Code:
    def OnPsionicFocusCheck(attachee, args, evt_obj):
        if IsFocused(args): # if already focused
            evt_obj.return_val = AEC_INVALID_ACTION
        roll = game.random_range(1,20) + attachee.skill_level_get(skill_concentration)
        if roll < 20:
            evt_obj.return_val = AEC_INVALID_ACTION
    return 0
    I want to show in the rolls window that it rolled this for the concentration check, with the dice and skill level separately added. Also, would invalid action be the standard return to display when you fail a check to activate an ability?

    After that, I think I just have one final thing before psionic focus is finished, concentration check expending focus and becoming a free 15 roll on the next concentration check made while checked. Is there an action for when the attachee makes a skill check that I can hook to to give it the return value of 15 to override whatever the roll was?
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    The Skill roll shouldn't be made in the Action Check phase, but rather the Action Perform phase.

    The purpose of the Action Check is to establish whether you can attempt to perform the action at all. So checking if you're already focused is appropriate, but the Skill Roll should be done in the Perform phase, whereupon the action can also fail.

    Regarding Skill rolls, you're right, it wasn't exposed yet.
    I've now added an obj method
    Code:
    obj.skill_roll( skill_id, dc, flags)
    Where
    skill_id is the skill enum (e.g. skill_appraise)
    dc is the DC
    flags is an optional input; haven't figured all of them, but 0x2000 is for take 20, and the flags between 0x10 and 0x1000 stand for spell schools​

    As for concentration checks, is that Psi specific? If so you'll just implement it yourself via queries and such.
    If it applies to all Concentration checks, including stuff like spell concentration after taking hits, that's currently hardcoded in the 'sp-Concentrating' Modifier.
     
  7. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23


    So like this?

    Code:
    def OnPsionicFocusPerform(attachee, args, evt_obj):
        if IsFocused(args): # if already focused
            return 0   
        roll = game.random_range(1,20) + attachee.skill_level_get(skill_concentration)
        evt_obj.skill_roll(skill_concentration, 20, -1)
        if roll < 20:
            evt_obj.return_val = AEC_INVALID_ACTION
            return 0
        args.set_arg(0, 1) # set to focused
        args.set_arg(1, 0) # set to unchecked
        return 0
    I'm not sure I did it correctly. ​

    All concentration checks, it's completely generic.

    I just noticed the effecttooltip functions in this and psychic strike for the new flags to be shown are not hooked to anything. What do I hook those to?
     
  8. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23


    So like this?

    Code:
    def OnPsionicFocusPerform(attachee, args, evt_obj):
        if IsFocused(args): # if already focused
            return 0   
        roll = game.random_range(1,20) + attachee.skill_level_get(skill_concentration)
        evt_obj.skill_roll(skill_concentration, 20, -1)
        if roll < 20:
            evt_obj.return_val = AEC_INVALID_ACTION
            return 0
        args.set_arg(0, 1) # set to focused
        args.set_arg(1, 0) # set to unchecked
        return 0
    I'm not sure I did it correctly. ​

    All concentration checks, it's completely generic.

    I just noticed the effecttooltip functions in this and psychic strike for the new flags to be shown are not hooked to anything. What do I hook those to?
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    What's the -1 supposed to be for? Drop it. Also skill_roll is a PyObjHandle method, it doesn't belong to the evt_obj.
    Lastly the result returned by skill_roll is success/fail.
    So that would be
    Code:
    if not attachee.skill_roll(skill_concentration, 20):
            evt_obj.return_val = AEC_INVALID_ACTION
            return 0
    Also you can ditch the previous game.random_range and skill_level_get, they are done internally in skill_roll.

    In that case I'll have to expose the sp-Concentrating callback to this first. I'll insert calls to the PsiFocus signals/queries there.

    ET_OnGetEffectTooltip
     
  10. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Ah, I had guessed that it was internally done, just didn't know for sure. Thanks.
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Oh, one other thing, you may want to generate a float line if the skill roll fails.

    You can use the free-form .float_text_line method.
     
  12. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    What does that do, does it make text appear above the character? Like this?
    attachee.float_text_line("Concentration check failed!")

    Also, when I get the attack_packet.target in the ondealingdamage hook, would this be the appropriate place to add a particle effect? I wish to make it so one of my new particle effects plays with the target as the one the effect is centered on when the player attacks with a psychic effect such as psychic strike.
     
    Last edited: Nov 6, 2016
  13. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Yes to both.
     
  14. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Question on mind blade. How do I make it so the mind blade proto object will always be deleted from the game whenever it is unequipped or thrown from a pc?
     
  15. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    You can give the proto the script san_remove_item, wherein you flag it OF_OFF.

    By the way, I'm messing a bit with Weapon Types now, and I'm wondering whether it's worth generalizing the system or just to add special casing for mindblade. Are there any worthy weapon types missing from ToEE?
     
Our Host!