NPC Dialogue Shop

● ARCHIVED · READ-ONLY
Started by mjshi 241 posts Page 9 of 13 View original ↗
  1. Hey there.

    This is a really good plugin but I'm having a problem. I get a Syntax Error - Unexpected token u in JSON at position 0 when I try to access a shop. What's strange is that if I start a new game with the shop right next to me (to test), it works fine. But when I continue from a save slot or play a new game normally, the bug happens. I thought it was Yanfly's Item Core but I still get the bug with or without.

    Any ideas or help?
  2. @Lumicakery how did you set up the parameters?
    what shops do you use more or plugins?

    to see what conflicts it gives, turn off all plugins and turn them on 1 by 1.
    and see which conflicts it.

    if you found the one that create this bug, move this plugin above it (when below)
    otherwise when below, place it above.

    if it continue to happen, report back with the parameter, plugin list and event
    setup, so mjshi or me can help you out.

    because it works correctly on my end with alot of plugins.
  3. @Lumicakery Also its a note to take that when adding a new plugin or just doing anything with plugins in general, that you shouldn't start from a save file to reduce the possibility of errors happening. Always start a new game.
  4. ShadowDragon said:
    @Lumicakery how did you set up the parameters?
    what shops do you use more or plugins?

    to see what conflicts it gives, turn off all plugins and turn them on 1 by 1.
    and see which conflicts it.

    if you found the one that create this bug, move this plugin above it (when below)
    otherwise when below, place it above.

    if it continue to happen, report back with the parameter, plugin list and event
    setup, so mjshi or me can help you out.

    because it works correctly on my end with alot of plugins.
    Thanks for the quick replies.

    I'm using default parameters and just a standard shop event with no additional stuff. Also, I've removed all other plugins but no dice. Starting a new game doesn't help either. Like I said, if I start a new game just to test the shop, it works. But when I start a new game and play for real, it doesn't. It's really weird (and pretty hard to find the cause). I might just end up just using a different plugin I think.
  5. does it crash? if so, make a screenshot of the console log, which tell
    us the cause of the problem and where to look.
  6. Is it this? 1620137707360.png
  7. thats the one, if it's the only plugin active, mjshi might know the cause,
    but I look into it what it cause and what the function does, because it
    would be strange if it happend on your end.

    (PS: if I dont respond, I hope @mjshi can help you out, as she is the creator of it).
    she might need additional info in order to fix it :). I respond in a couple of hours
    unless she helped you.

    EDIT:
    Did you assign a variable?
    the default is variable 1, if you have 1 in use, change this variable to an unused variable.
    and it should work afterwards, because it's checking a gamevariable.
  8. Lumicakery said:
    Hey there.

    This is a really good plugin but I'm having a problem. I get a Syntax Error - Unexpected token u in JSON at position 0 when I try to access a shop. What's strange is that if I start a new game with the shop right next to me (to test), it works fine. But when I continue from a save slot or play a new game normally, the bug happens. I thought it was Yanfly's Item Core but I still get the bug with or without.

    Any ideas or help?
    I tried this plugin out for the first time today and had this problem. What caused it for me was the variable was looking for a shop I had not defined. It's a little counter intuitive but to call the first shop as defined by the plugin, the variable has to be set to 0 (rather than 1 as I had it).
    Double check your variables with this knowledge, you might be one off somewhere.
  9. @SaburoX the variable assigned the ID, not the value, you can store
    any number of value for different shop or to say different things when
    a common event is called.
  10. ShadowDragon said:
    @SaburoX the variable assigned the ID, not the value, you can store
    any number of value for different shop or to say different things when
    a common event is called.
    I worded my post poorly. What I mean is that when the variable equals 0 it looks for id 1, rather than 1 = 1. variable to id.png
    mjshi does point this out but it's something I overlooked so it's possible someone else might have this problem.
  11. what is your conditional branch dialogue common event is 0?
    because it looks like this isn't triggered.

    Also your commen event ID = 3, you use variable 10 instead!
  12. Sorry for the long absence, @ShadowDragon thanks for helping out!

    @Lumicakery, were you able to resolve your problem with what @SaburoX suggested? I probably should add more descriptive error messages in that case. If not, please PM me a test project so I can take a look!
  13. mjshi said:
    @gothicvoid

    There's some setup necessary to get everything running here. If you double click on shopkeepers, then on an empty row, it should pop up something like this:

    screenshot
    View attachment 111296

    That's how you add shopkeepers. Just follow the instructions and read the description boxes/names to figure out what each thing is.

    Once you configure all of that you set the shopkeep variable (control variable #1, in this case) equal to whatever shopkeep you want to use.

    After that, make sure your event looks something like what dragoon posted:



    run, and you should be good to go! Let me know if you need a video tutorial, but that will take some time to make. I'm a bit busy at the moment, and it may be at least 3 or 4 weeks before I can find the time to sit down and do all of that.
    Heya, I dunno if you're still active on here but if you are and can do that video that would be extremely helpful thanks!
  14. @Looperdooper What problems are you having with the plugin? The basic set up is quite easy to start.
  15. dragoonwys said:
    @Looperdooper What problems are you having with the plugin? The basic set up is quite easy to start.
    Well basically I have this sort of set up as to where you enter the room it opens the shop and if you close it well you leave the room, though the text doesn't appear when I hit talk instead of when I leave in which it brings me back to the shop menu and never appears again afterward, even if leaving and reentering such. I'm trying to set up the shop sort of like an undertale shop.
  16. @Looperdooper It sounds like you didn't set up the common event for the talk option and/or its something from how your autorun shop event is set up.
    Can you take a screenshot of how you are setting up an event?
  17. Here you are, when you walk into the room it autoruns this event.
    dragoonwys said:
    @Looperdooper It sounds like you didn't set up the common event for the talk option and/or its something from how your autorun shop event is set up.
    Can you take a screenshot of how you are setting up an event?
  18. The shop appears and junk, it's all good, just the talk option seems broken and closes the shop instead, can only talk once, then never again.
  19. This is also my common event setup.
  20. @Looperdooper I can see that you set your setting is the other way around for the if statement

    Please set it to
    "If: common event called = ON"
    "Control switches: common event called = OFF"

    The plugin auto turns ON the switch, you have to turn it off instead.
    dragoonwys said:
    @gothicvoid
    It's written in the help file.
    First, change the variable chosen in Shopkeeper Variable to the index of your NPC, in the Shopkeepers list. 1st NPC = 0, 2nd = 1, 3rd = 2, etc.
    Then, call the shop as per normal!

    Here's the example of how the event looks in an event.
    gtHZqUy.png