HimeWorks' Shop Plugin - how to "reset/refresh" shops?

Discussion in 'RGSSx Script Support' started by Banjo, Aug 1, 2018.

  1. Banjo

    Banjo Veteran Veteran

    Messages:
    60
    Likes Received:
    11
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMVXA
    I've been using Hime's great Shop Plugin for VX Ace successfully for awhile, but I recently realised that when I post an update to my game, if I've added items to a shop, the new items won't appear if the player has already visited that shop. This is presumably because once the shop is visited/processed once, it does not run the "Shop Processing" item again, only adding single line code that adds/removes goods?

    Is there a way for me to have an event force a "Hime ID" shop with an existing id to "refresh" and re-process its Shop Processing list of initial items? I thought it would perhaps be "refresh_shop(shop_id)" but I can't get that to work without errors.

    If anyone at all can help with this, even if the answer is "no", I'd really appreciate it!

    I posted this question under the script's thread itself, but haven't had a reply so am hoping it is noticed here (where perhaps the question better belongs anyway).
     
    #1
  2. Mawichan

    Mawichan Veteran Veteran

    Messages:
    55
    Likes Received:
    6
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Do you mean you're using Hime's Shop manager script? If so, what other add ons to the script you have? AFAIK Shop Manager is meant to be more of a "core script" for the rest of Hime's shop-related scripts.
    How are you adding the new items to the shop?
    Have you tried hiding/disabling goods instead of adding them later?
    You can create a shop with all the goods you want it to have, then hide the goods you want available until later in the game by using a formula.
     
    #2
    Banjo likes this.
  3. Banjo

    Banjo Veteran Veteran

    Messages:
    60
    Likes Received:
    11
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thanks for the reply! I really appreciate the help!

    Yes, that's the script I'm using, and it's worked well for me in terms of hiding/unhiding items according to switches and variables. I first added it for that reason. Now I am finding that it's key element - i.e. keeping "track" of each shop's stock in memory as separate IDs - is causing issues.

    I am adding items by adding them to the "shop processing" list... which I assume is the problem, but I can't see how else I'd do it.

    To reiterate, I am talking about adding items when I *update* (edit) my game, not having an event add an item during the game (I've used hide/unhide for that and it works fine). That is, my game is currently in development, but if I add a new type of potion (for example), I'd go and put it in some of my shops... but if I test play and load a previous save game that shop does not sell the potion! Presumably, this is because I am adding the new potion via the "shop processing" event *but* this is not being run as the shop was already "initialized" for that old save. I'd rather not force players to have to restart the game every time I update it if this can be avoided.

    What I want to know is how do I *force* the shop to re-initialize/refresh from the "shop processing" list? I am happy to edit the script to make this an option, but I can't find where I'd edit this.

    The only addon I have for Hime's Shop (core) script is the Sell-Only addon. I don't know if there are any others besides that and the Skill Shop addon, are there? I'd love a "limited item stock" one, but I don't think Hime ever made one for this?
     
    #3
  4. Mawichan

    Mawichan Veteran Veteran

    Messages:
    55
    Likes Received:
    6
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    This is a pretty late replay, and for that I'm sorry.
    Thanks for explaining the situation some more.
    Unfortunately, you do have to test your updated shop in a new game everytime you change something in the editor.
    As far as I know, there's no way around that. I'd recommend adjusting your plan of work taking that into account. Though I understand it can be quite a hassle.
    If your game is more of the linear type and all players are supposed to progress in the same way, you could add an optional, separate download of a savefile that allows the player to pick up the game from where they left.
    If you are planning on releasing your game part by part (like chapters and such), you should plan each area/story chapter/progression line very carefully so that each game version you release is as completed as possible and there's little to no need to go back to working on them for future releases.
    For testing, you could make a copy of your project, but only use it to test your events, then copy paste them to the main project to implement them in the final game. That way, you'd only need to check how everything fits together for game progression, every once in a while.
    I hope I'm not being too bad at explaining this.
    BTW, Hime does have a Shop Stock script, it must be on Hime's website. I have it in my project right now, so I know it must be somewhere there.
    Good luck with your project!
     
    #4
    Banjo likes this.
  5. Banjo

    Banjo Veteran Veteran

    Messages:
    60
    Likes Received:
    11
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thanks heaps for replying! It's really bugging me that I can't fix this. :(

    So there really is *no* way to "reset" or refresh a shop using Hime's script?

    Not even if I was to edit the script to add a "refresh" command? I've been looking through the code, and I've edited several other scripts in the past, but I can't find where Hime's shop actually calls the initial "setup", otherwise I was hoping to add a new command that let this be re-called (to reset the shop to initial settings).

    Since my game is going to be in a fairly constant state of release/update, having players need to start a whole new game every time I edit a shop is pretty much a no-go. I will likely be continually tweaking and updating things for a year or two, since this isn't a commercial release.

    Maybe I need to use a different shop script? I went with Hime's because it otherwise did all I need. Can you or anyone else (seems a bit quiet here, though!) suggest a shop plugin/script that is fairly low weight (i.e. doesn't require a ton of "core" plugins I don't need) as an alternative?

    My main requirement is being able to show and hide shop goods according to switches and variables, though other features like limited stock, etc. are useful, it's really only the show/hide goods part of the script I need. Heck, I'd be happy to stick with Hime's script and just disable the whole "shop id" tracking part if possible.
     
    #5
  6. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,737
    Likes Received:
    381
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I see an option or two I would like to try, but I have never used this script.
    Can you make a demo and send me a link for myself to test with?
     
    #6

Share This Page