weapon charges?

Discussion in 'General Modification' started by seraglio, Sep 7, 2005.

Remove all ads!
  1. seraglio

    seraglio Member

    Joined:
    Oct 1, 2003
    Messages:
    45
    Likes Received:
    0
    No responses on my first post, I'll try again with a new question.

    I've read through phalzyr's protos fields post. I don't understand the usage of field 059, charges.

    I want to make items either varying charges or uses per day instead of charges. Can that be done?

    What does it mean when there is a -1 in the field?

    thanks for any advice
     
  2. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    Patience, my friend. Things get answered most of the time, but not THAT fast.

    Number of charges (#59 per phalzyr's, #60 per ToEEWB) is the field that controls how many times the object can be used (e.g. for wands). Technically speaking, this field is mapped to "obj_f_item_spell_charges", which means that it defines the number of charges available for a spell assigned to the item usage.

    I think there's an object property saying "Useable item X times per day", which allows you to define the uses per day.

    In case you need something more flexible (like, combining the times per day behavior with the total number of charges, or something like that), this can also be done through scripting. In order to set up "uses per day", create a script with "san_use" standard action, make a global variable that would store how many uses per day are remaining, and decrease it every time "san_use" is fired. Then, attach a time event (game.timeevent_add) that would fire every 24 hours and reset the number of uses per day to its original value (assigning a time event can be tricky, I'd say set up a heartbeat for your item that assigns the time event once, then do the re-assignment in the function that is attached to the time event itself).

    Not sure about it, sorry. Could be something meaningful, as well as could be trash (by the way, protos.tab has many unused or wrongly defined entries).

    P.S. You can take a look at ToEEWB's updated list of protos.tab field entries if you decide to install .NET. ToEEWB has almost every entry that is listed in Phalzyr's as "Unknown" mapped to a description (there are only about 10 unknown entries left, and most of them seem to be unused anyway).

    - Agetian
     
    Last edited: Sep 7, 2005
  3. Shadowrunner

    Shadowrunner Undead Chosen One

    Joined:
    Aug 21, 2005
    Messages:
    44
    Likes Received:
    0
    I'm not a specialist, but i think there has to be -1 value in this field if you want to Bonus Type: >>Useable Item X Times Per Day<< works in the proper way. I know (because I use it many times for variable item/armor/weapon effects and it look all for right, for now on) that Bonus Type: >>Keoghtom's ointment<< with -1 charges value has infinitive usage - it can be cast (3 variable kinds of spells) again and again - without charges restriction.
     
    Last edited: Sep 7, 2005
  4. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    Good guess! Could be exactly to the point!
    - Agetian
     
  5. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    @ agetian, trust you to overcomplicate things!

    @ shadowrunner, well done dude. as the resident (self proclaimed) item expert here I can tell you, you got it spot on.
     
  6. seraglio

    seraglio Member

    Joined:
    Oct 1, 2003
    Messages:
    45
    Likes Received:
    0
    Sweet thanks again guys that makes sense!

    Agetian my comment about 'first post' refers to unspellchecked post 'altering radial mebus for spontaneous casting'. I meant menus.....

    I saw a really cool mes file that seems to define radial menus for spells with options. I was just wondering if the same thing was true for spontaneous casting, so you could make a sorcerer with spontaneous inflict or heal for instance. Check the post out if you get a chance, if not no biggie. Thanks for all the help.
     
  7. Cujo

    Cujo Mad Hatter Veteran

    Joined:
    Apr 4, 2005
    Messages:
    3,636
    Likes Received:
    1
    I just skim read this thread so it might be repeated above but, usableitem instead of Useable Item X Times Per Day means you can use the item as many times as you want per day. there is a tutoral here
     
Our Host!