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:
    255
    @Sitra Achara is there a way to restrict small armor to small characters only? And likewise medium armor to medium characters?
    I know most of the armor in the game only comes in one size, but copying the proto's and descriptions of the regular ones and making small versions is easy enough. Maybe this will require new small armor feats and tying the armor feat selections available to specific character races? and checking the column: Object Size entry from the proto ID (in world builder). IIRC small characters already can't wield medium or large shields.
     
    Last edited: Nov 7, 2016
  2. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    I'm not seeing much in http://www.d20srd.org/indexes/equipment.htm that isn't already in the game. Shields being able to do damage could be a neat addition.

    Otherwise, I just need some way to make it so I can make mind blade considered a separate weapon somehow for the purposes of the feats and abilities it has, while additionally making it not gain benefits from weapon focus shortsword.
     
  3. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Ok, so I'll just add hardcoded support for wt_mindblade + weapon feats.
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    I guess, but as far as I can tell it's a lot of work for very little benefit (pun not intended ;))
     
  5. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    There is an indication in the game files that Giants were at least intended to throw rocks as missile weapons, any chance of taking a look into that?
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    IIRC Livonya did something like that. I think the tricky part is getting them to equip the rocks. In vanilla ToEE the AI would have to consider that the best option in terms of expected damage. The code just considers the (To Hit Bonus - Target AC) * average damage dice roll, so I guess the normal weapon wins out most of the time. The annoying part is that the AI code in this game is a huge mess...
     
  7. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    With
    Code:
    game.sound( [sound index number], [no of times to play] )
    How do I know what the sound index number of a sound is? For example, I want to play "sp_detect_chaos_end.wav".
    Also, how do I place a game time delay between actions? For example, I want to play one sound, wait about a second into its audio, and start playing a second sound. Additionally, I want to play a particle effect, wait roughly until the effect is finished, and then create the equipped item.
     
  8. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    You could use an audio editing tool to make one sound file that plays both sounds with a gap between them to suit your specifications? Audacity is pretty good.

    Alternatively, if you want one sound for throwing a weapon for example, and another for hitting the target, probably better to link playing the sounds to those specific actions.
     
  9. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Is that free and allows me to layer the sounds together at my selected times? There isn't going to be a gap between them, one will start, and a second will start and end while the first one is still playing.
     
  10. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    Yes it's free software, google for it... I'm uncertain if you need to download the codecs for mp3's separately these days, but they will have a link to the files you need.
     
  11. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    I'm not sure if you can layer sounds together, it's possible, I never tried it myself. @Gaear may be able to recommend better software if Audacity fails to impress or do what you want it to.
     
  12. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    I think audacity has a mixer so you should be able to do that. Or its waveform editor might have a mix-paste function.

    I wouldn't do that though, just because ToEE is notoriously quirky about timing. So you'd probably have sounds playing at the wrong time half the time. Every sound should be triggered by a script tied to an action, pretty much.
     
  13. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Look inside data\sound.

    Look into the game.timevent_add command.
    https://github.com/GrognardsFromHell/DllDocumentation/wiki/Scripting-API
    +existing game scripts
     
  14. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    I'm trying to write a script to create a random item in an NPC's inventory on their first heartbeat and can't get it working, I have this so far, but doesn't seem to work...

    Code:
    from toee import *
    from utilities import *
    from scripts import *
    
    def san_first_heartbeat( attachee, triggerer ):
        if (attachee.map == 5003):
            randy = game.random_range(1,100)
            if randy <= 15:
                create_item_in_inventory(4997, attachee)
            if randy >= 16 and <= 30:
                create_item_in_inventory(4181, attachee)
            if randy >= 31:
                create_item_in_inventory(4132, attachee)
        return RUN_DEFAULT
    
     
  15. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Shit, I forgot what I nightmare it was to debug scripts in normal ToEE :p
    I don't see anything wrong with that, so my guess would be that perhaps you broke utilities or scripts.py? Also I assume the .pyc files get cleared.

    What I'd do in the old days to debug scripts is to create printouts to file that give a picture of how far it got into the script (or rather, where it might have failed). E.g.

    Code:
    def san_first_heartbeat( attachee, triggerer ):
        ff = open('feedback.txt', 'w')
        ff.write("san_first_heartbeat executed")
        if (attachee.map == 5003):
            ff.write("map is correct")
            randy = game.random_range(1,100)
            ff.write("random number was " + str(randy))
            if randy <= 15:
                create_item_in_inventory(4997, attachee)
            if randy >= 16 and <= 30:
                create_item_in_inventory(4181, attachee)
            if randy >= 31:
                create_item_in_inventory(4132, attachee)
        ff.close()
        return RUN_DEFAULT
    And so on. I use a similar technique for Temple+ py scripts actually, except that there it also prints to the ingame console if I use the print command so I don't have to mess with files.

    Another technique I used is to execute command from a file when drafting a new script. That way you could edit the file contents without having to restart the whole game.

    Code:
    # can read commands from a file, as though it were a normal py file
    # useful for debugging / testing new scripts without relaunching the game
    ff = open('command_file.py', 'r')
    try:
       exec(ff)
    except:
        print 'error'
    ff.close()
     
Our Host!