Temple+ New Feats

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

Remove all ads!
  1. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Do the items being called for in a script have to be added to Onames.mes or something? I vaguely remember something like that.

    EDIT: I think I forgot to edit column 22 in item 4997's proto line.
     
    Last edited: Nov 9, 2016
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    I don't think oname is necessary, you can leave it blank (in which case the item will spawn with .name equal to its proto).

    Another thing you may want to do is run the game with the debug console. It provides info about bad protos, broken .mes lines and such. To do so run toee with the command line switch
    Code:
    toee.exe -window tigdebug=console
     
  3. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Yeah, I think the thing is that it isn't blank, item 4997 is a copy of a regular bastard sword with a few added effects, colomn 22 prolly still refers to the proto I copied it from... I'll change ot and test again in a couple hours when I get home from work.
     
    Last edited: Nov 9, 2016
  4. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    How exactly am I supposed to use this? I don't understand what all of the variables mean.

    Code:
    game.timevent_add( fade_back_in, ( target, spell.target_loc, spell ), 750, 1 )
    I just want to wait 3 seconds ingame and then create/equip an object to the pc.
    Secondly, I want to equip the item to the primary hand of the PC. How will I do that once I create the object and give it to them?

    Also, for the proto, is the image correct? I don't need to put anything in san_drop, san_throw, or san_wield_off?
    Capture.PNG
     
    Last edited: Nov 12, 2016
  5. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    I don't think setting OF_off there will work, the san_* lines in protos.tab are for script file extensions, If your new psionic weapon has a script file associated with it, you detail the script file number in those slots.

    EG if your script file name is "py000456MindBlade.py"
    you type:
    "456 0 0 0 0" in that script line in protos.tab
    In your py file you add the line:
    "[tab]san_wield_off:"
    Your OF_off command goes under this, though I suspect you will need to identify the item by proto or oname or something before setting flag OF _off
     
  6. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Why would I need to identify the item if the script being ran is only applied for that item? Shouldn't it implicitly know who it belongs to?
     
  7. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Maybe, scripting isn't exactly my forte, but on the other hand, this is ToEE, and anything is possible, I'd err on the side of caution and hope it works.
     
  8. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    I've added more explanation in the wiki on Time Events.

    Regarding the other san_'s- some of those don't actually work.
    See:
    http://www.co8.org/community/index.php?threads/a-list-of-useful-script-attachment-points.2407/

    I think san_remove is sufficient, but it's very important to experiment here to make sure it doesn't fire when you don't intend it to due to some internal engine operation. I've seen that go haywire in the Brother Smyth script.

    I don't think IDing the item is necessary if it's only applied to that item.

    As a general note - you should learn to make use of existing examples more. You can find just about anything with Notepad++ and ctrl+shift+f.
     
  9. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    So I don't need to create additional scripts as Allyx suggested?

    Once I create the mind blade item and give it to the user with
    Code:
    item_obj = game.obj_create( holy_water_proto_id, spell.target_loc )
        spell.caster.item_get( item_obj )
    Replacing the holy water with mind blade obviously, is there a way to equip it to the primary hand?
    Code:
    npc.item_wield_best_all()
    seems to me like it might not work if it just applies itself to any items the pc has in his inventory.
     
  10. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Amazing as it may sound vanilla ToEE doesn't support equipping specific items via script! Livonya had to resort to some insane workarounds back in the day.

    I've now added for v1.0.30 two new PyObjHandle commands:
    Code:
    obj.item_worn_unwield( equipslot )
    obj.item_wield(item, equipslot)
    Where equipslot is the equipped item index (starting with 0 for helmet), and item is the item object handle you wish to equip.

    P.S. it handles things like shields and improper equipslots internally. E.g. you can't equip a shield while wielding a bow or two weapons, so you don't have to fuss with that either.
     
    Last edited: Nov 12, 2016
  11. sigofmugmort

    sigofmugmort Established Member Supporter

    Joined:
    Aug 18, 2015
    Messages:
    330
    Likes Received:
    66
    Is either the Temple+ or Co8 mod going to add in some of the missing Clerical spells like Blade Barrier or fire Seeds so that Clerics can have Higher level Domain spells?
     
  12. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Currently working on wall spells so Blade Barrier is quite possible. Not familiar with fire seeds.
     
  13. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Can I use this to equip an item that is not in the inventory? IE I just create the object on the map and then equip it. In case my character has a full inventory but empty primary.

    Also, how/where do I add the mindblade modifier to the mind blade in protos.tab? The one that makes it do magic damage and changes the weapon glow.
     
    Last edited: Nov 13, 2016
  14. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    No, you have to do item_get first. I could expand item_get so it can fill up the invisible inventory slots (beyond 0-23).

    Properties
     
  15. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    It would be nice to expand just in case of that fringe case of full inventory while trying to manifest mind blade.

    Do I just type "Mind Blade" into property 1 type and give no params then?
     
Our Host!