Announcement

Collapse
No announcement yet.

Creating a multi-use item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating a multi-use item

    Hi. I've found a script called consume item 2, which the game tells me is a multi-use item function, but the only thing it seems to do is pick a random number between 1 and 100, and if that number is 25 or less, it simply uses the item but tells you that it can be used again.

    Is there an already existing variable that contains the number of times an item can be used? If not, are there any ideas on how I could create them? I really hate the inventory system in this game and would like to avoid my players having to go into their bag all the time to transfer items to their characters.

    Thanks!

    #2
    Re: Creating a multi-use item

    Okay, so... after a brief spat of thinking on the subject after I just posted, I realized that it is not hard to create a simple condition before 'Data: Item (Use) which checks a variable which houses the number of uses an item has.

    My question now is, how would I go about storing the number of uses that any given item has?

    Let us say, for example, that you buy a Potion x 5... this item only takes up one slot in your inventory but can be used five times. A variable stores the info and each time you use that item, one of them is subtracted until you reach 0 at which time the consume item 1 branch script branch would not be true and the item would be used.

    Is this possible? How can I store and retrieve the information granting that I want MULTIPLE items to be like this.... how would this work if the player had TWO or MORE of these multi-use items? How could I keep track of the remaining uses for each instance of the item?

    Thanks for any input!

    Comment


      #3
      Re: Creating a multi-use item

      I'm sorry that this may have no help for you, but if somehow, there was a variable UNIQUE to each instance of that item, you could item data load, decrease, item data save.

      I'll try getting back to you on that one...
      I love lamp.

      Comment


        #4
        Re: Creating a multi-use item

        As far as I know, the info for each individual item is a direct line from item through its associated direct effect to the various events and scripts... I don't think that, within the structure of the system now, there is a numeric variable associated with that item (save, of course for the Direct: Rate).

        However... could it be created?

        Comment


          #5
          Re: Creating a multi-use item

          Seems like it's a no.

          Next best thing, I'm afraid, is to use a random variable, randomize between #'s, and if it = 'n', remove/use item.

          Sorry.
          I love lamp.

          Comment


            #6
            Re: Creating a multi-use item

            Yeah... that's an idea. It's not perfect, but it's a start. I JUST THOUGHT OF SOMETHING! Okay... within the script linked to the direct effect, have a variable that counts up... and when you get back into 'town' you have to 'pay' for the number of times that you used the itme... a single item that never gets used up but has a 'cost' for each cast... is the same thing as a multicast item! Problems, naturally, with things like they don't ahve the money to pay for it... but I'm only going to do it with stuff you use regularily, like potions... so they are not too expensive in my game.

            Whoot!

            PS. Even better: You say that the items are magically linked to a merchant who extracts money each time the item is used... put the cost of the item in the description and if the player wants to use the item, they have to pay for that use RIGHT THEN! A simple script branch could see if they have the cash... this is also a cool way to eliminate excess item hoarding (a trait I'm very familiar with in all RPGs I play... who needs 50 antidotes by game end?)... Anyways... I would give the player all the items in their bag at game start and they get to choose how to purchase their usage.
            Last edited by Ceciroth; 12-14-2006, 12:14 AM.

            Comment


              #7
              Re: Creating a multi-use item

              It'd work, but if the party has more than 1 of that item, the variable count would mess up. All instances of that item would share the same variable.

              Then again, isn't a multi use item just defeating the purpose of having multiple instances of the item, period?

              Then again, having ONE item with multiple uses versus MULTIPLE items with only one use could be handy; in that it only takes up 1 space if held by a member directly.

              Your choice, there.
              I love lamp.

              Comment

              Working...
              X