Announcement

Collapse
No announcement yet.

Selling Items to a Custom Shop

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

    Selling Items to a Custom Shop

    I'm hoping this is possible, but I'm utterly stumped.

    I'm creating Custom Shop scripts for most or all of the shops in my RM3 game, and I can't for the life of me figure out any good way to allow the player to sell items he doesn't need.

    I plan to have over 200 (non-treasure) items in my game, and some of these are used as expendables in my Item Creation system or can be traded in events--thus, why I have to use Custom Shops rather than the normal Gold & Shop systems.

    If necessary (as I'm also using custom scripts for Drops from enemies), I can track whenever a player buys or earns an item. However, I cannot (to my knowledge) track when the player uses or discards items.

    What I'm hoping to do is create a Shop system where players can sell ANY item they are holding onto, to a Merchant, for Gold (or custom cash), and use that Gold/cash to buy any other item (assuming you have enough moolah).

    If you create a meal or potion using Item Creation, I want you to be able to sell it later. But if you consume it during battle or exploration, I certainly don't want you be able to turn around and sell what you don't have!

    Can you please help me think of something?
    Last edited by Wavelength; 02-16-2009, 08:49 PM.


    How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

    "I live and love in God's peculiar light." - Michelangelo

    #2
    Re: Selling Items to a Custom Shop

    I've run into this same problem in my game... I am having a lot of trouble coming up with anything that won't totally screw up my whole custom shop system. If I come up with anything that might work, I'll be sure to post it here.

    Comment


      #3
      Re: Selling Items to a Custom Shop

      I have an idea but it will not be in a shop.
      You can have a market made of the market decoration and have a person have a val-conditional branch and under each option have a decision branch.
      In the decision branch you can have the person ask if you want to sell an item and under yes you but lose item and you can have the person give you money then you put a increase variable.For no dont do a thing.Do that for the next option but increase the money the person gives.For the last one you can put decrease variable and put the starting number.OR the number can increase when you have a specific item.I think this will work but you will need a lot of val-conditional branchs OR alot of people when you dont want to wast the 100 people max.
      See my adoptables here!
      ---> View My Website <---

      Comment


        #4
        Re: Selling Items to a Custom Shop

        Thanks Pokejoey--I appreciate the effort in your response.

        Unfortunately, I have thought to do it that way before, and there's a very specific problem that I can't get around. I can't think of any way to track whether a player has already USED the item. Since there is no "possesses ordinary item" event condition, there is no way to check whether a player is holding an item (perhaps they never owned it, or perhaps they once owned it but consumed it in battle) and therefore I have no way to stop the player from choosing to sell an item that they don't have!

        I'm not sure my hopes for this are even possible in RM3, but in case someone has come up with something brilliant before (or can come up with something brilliant now), I wanted to ask.

        If the consensus is that it's impossible, I'll probably just make the most common non-consumable and non-discardable (i.e., variable-tracked) items sellable via event scripting, and the player simply won't be able to sell anything else (if they don't want it, they'll have to discard it).


        How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

        "I live and love in God's peculiar light." - Michelangelo

        Comment


          #5
          Re: Selling Items to a Custom Shop

          sorry man i have no experience in custom systems
          current project: untitled
          completetion: 0% (story in development)

          Comment


            #6
            Re: Selling Items to a Custom Shop

            The only way I can think of to get around that problem (unless there's a reason to have 200+ non-treasure items when a single character can only hold 10, and a party of 4 can hold 40, including weapons, armor, etc.....if you are trying to implement a "force the player to figure out what's important to hold onto and what can be dropped"-style inventory micromanagement system ala most current roguelikes, then I can understand doing this) I will explain in a sec.....but first, a few things to consider.


            If you have any event code that specifies giving a specific item to a specific character, and that character already is holding 10 items, the new item WILL NOT appear in their inventory. I found this out after Series 1 had already been released, as I had this "bug" in the game. If I remember correctly, if you give an item to the party, rather than an individual character, it SHOULD prompt to get rid of another item to accept the new one, but it's been so long, I'm not sure if that's accurate.


            Also, remember that if you put a gold value of zero on an item, it will not be able to be sold in a default shop (which, in your case, does not matter), NOR will it be able to be dropped. It can be used or consumed, however (obviously).


            NOW, here's what I think can be done if you want EVERY non-treasure item to be sellable, but it'll probably take WAY more programming than it's worth...let's say you want the character to receive a potion (as an example). Give them a treasure item called "potion," and somehow create a plausible explanation for needing to go to a shop of some kind in order to "activate" the potion. This would do two things....first, it'll allow you to make a val cond branch, based on the variable for the treasure item in order to reemove it from inventory as a treasure item, and of course allow you to manipulate the tracking variable, and add the item "potion" to the player's inventory. Second, make it known that once the potion is "activated," it no longer has value, meaning, use it or lose it (which actually seems like a more plausible scheme for an inventory micromanagement system...you have a potion that has two uses left, for example, but no inventory slots left....do you get rid of it, as you can no longer sell it, in order to accumulate a different, possibly more valuable item? Or are you gonna hold onto it, because maybe that particular potion is hard to come by, and could come in handy, whereas the other item might be more valuable or useful NOW, but it's a bit easier to come across? See, this way, the player CANNOT have the best of both worlds by being able to go to a shop and sell stuff to clear out inventory slots...they need to make a decision; again, use it or lose it).


            So far, this seems like your best bet. But depending on how many items will need to be "activated," this is gonna be a b**** to program, and WILL chew up a TON of memory. Only thing I can think of to make it more manageable is to have dedicated "activation centers," one for each "type" of item you plan on giving the player.


            I know this idea cannot necessarily be used wholesale, depending on what you are trying to accomplish, but hopefully, this'll spark some ideas of your own.
            Last edited by Perversion; 02-19-2009, 01:34 AM.

            Comment


              #7
              Re: Selling Items to a Custom Shop

              Wait... Is there a way to check how much gold a player has? (Not Custom Gold, normal gold) Because if you can... you could have the player sell items at a regular shop. Then you could place an auto event in that shop which checks to see if the player has 1 gold. If they do, it will take away 1 gold, and increase the gold variable by 1. Again, I'm not at home, and I can't remember if their is a "check gold" script, so I'm not sure if this is possible.

              Comment


                #8
                Re: Selling Items to a Custom Shop

                Originally posted by Perversion View Post
                If you have any event code that specifies giving a specific item to a specific character, and that character already is holding 10 items, the new item WILL NOT appear in their inventory. I found this out after Series 1 had already been released, as I had this "bug" in the game. If I remember correctly, if you give an item to the party, rather than an individual character, it SHOULD prompt to get rid of another item to accept the new one, but it's been so long, I'm not sure if that's accurate.
                Thanks! I didn't know about this. Thankfully, up to this point I have been using "Party" as the member to give it to, though I'll make sure to check to make sure that the option is indeed presented, because I expect the player to carry around a lot of items.

                NOW, here's what I think can be done if you want EVERY non-treasure item to be sellable, but it'll probably take WAY more programming than it's worth...let's say you want the character to receive a potion (as an example). Give them a treasure item called "potion," and somehow create a plausible explanation for needing to go to a shop of some kind in order to "activate" the potion. This would do two things....first, it'll allow you to make a val cond branch, based on the variable for the treasure item in order to reemove it from inventory as a treasure item, and of course allow you to manipulate the tracking variable, and add the item "potion" to the player's inventory. Second, make it known that once the potion is "activated," it no longer has value, meaning, use it or lose it (which actually seems like a more plausible scheme for an inventory micromanagement system...you have a potion that has two uses left, for example, but no inventory slots left....do you get rid of it, as you can no longer sell it, in order to accumulate a different, possibly more valuable item? Or are you gonna hold onto it, because maybe that particular potion is hard to come by, and could come in handy, whereas the other item might be more valuable or useful NOW, but it's a bit easier to come across? See, this way, the player CANNOT have the best of both worlds by being able to go to a shop and sell stuff to clear out inventory slots...they need to make a decision; again, use it or lose it).
                Whoa, thanks, that's a really good idea! I guess the problem is that it's kind of unwieldy. I could think about doing it this way, or I could consider giving the player a choice on the spot upon receiving the item: keep the item (thus increasing the item's variable or giving the player a consumable item), or immediately cashing it (giving the player Gold and adjusting the custom Cash variable instead of giving the item).

                However, unless I didn't understand something, this does upon up a more minor flaw. If you choose to "redeem" your treasure and take a weapon (in your system), or if you choose not to cash out a weapon you earned (in my system), you can't sell that weapon once you've outgrown it. You could still throw it out, and I feel it's still a lot better than anything I thought I'd be able to do last night, but it's still somewhat annoying.

                I know this idea cannot necessarily be used wholesale, depending on what you are trying to accomplish, but hopefully, this'll spark some ideas of your own.
                I'd say it did! Thanks again man

                Originally posted by GoalieGuy
                Wait... Is there a way to check how much gold a player has? (Not Custom Gold, normal gold) Because if you can... you could have the player sell items at a regular shop. Then you could place an auto event in that shop which checks to see if the player has 1 gold. If they do, it will take away 1 gold, and increase the gold variable by 1. Again, I'm not at home, and I can't remember if their is a "check gold" script, so I'm not sure if this is possible.
                Unfortunately, I know for a fact that there's no event command or condition to check for Gold. Which is a huge oversight in my opinion, because you can't force the player to pay to play a minigame or gain access to a place without using custom currency and (if you want shops at all) custom shops. I appreciate the response, though!
                Last edited by Wavelength; 02-19-2009, 08:31 PM.


                How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

                "I live and love in God's peculiar light." - Michelangelo

                Comment

                Working...
                X