Learn Skill Shop

● ARCHIVED · READ-ONLY
Started by Tsukihime 20 posts View original ↗
  1. Learn Skill Shop

    This script provides a shop that allows you to buy new skills for your actors. It comes with a unique shop scene that will display all of the skills or spells that are available for sale.

    shop_LearnSkillShop4.jpg

    Download

    Get it at Hime Works

    Usage

    In the Class tab, create some learning objects and note-tag them with

    <buyable>You can set a minimum level requirement in order to buy the skill.shop_LearnSkillShop1.jpg

    In the Items tab, create some items that will represent the skill to learn. Note-tag these items with

    <buy_skill: x>For some skill ID x.shop_LearnSkillShop2.jpg

    In your event, make a script call before the Shop Processing command

    @shop_type = "LearnSkillShop"Then setup the skills that will be available for sale.shop_LearnSkillShop3.jpg

    You can setup vocabulary in the configuration section, in the Vocab module.
  2. Nice.
  3. Good job Princess ~
  4. I notice this after I set up skills to be bought through common events.

    Ugh. Dx

    But this is really nice! I'll definitely use it; saves me having to make a seperate common event per skill anyway.

    Thanks for making and sharing this!
  5. You would still have to create a separate item for each skill, but that is probably easier to manage and more intuitive than common events.
  6. Hi Tsukihime, i've a problem , please help me
  7. Place it below Shop Manager.
  8. I've only just noticed this script.  Looks very interesting.  I do have one query, though.

    From the second screen shot it looks like if a skill is for sale it cannot be learnt in the usual way.  Is that correct, or is there a way of it being both/and rather than either/or?
  9. Create a copy of the learning without the note-tag.
  10. ok thank you ! Nice script
  11. Thanks for the clarification.
  12. You are awesome, thank you. Noooo idea how it manages to not put an item called Heal in my item menu, but I'm not going to worry about it ;p
  13. Please help!

    This is causing an intermittent, VERY difficult to consistently reproduce, but common enough to break the game bug.

    First let me start by saying I'm using 'Shop Manager' script ONLY so that I can get this skill shop. That means that I may have missed steps for making all my old 'regular' shops compatible when I installed Shop Manager.

    Issue: All shops in the game will start displaying the same goods

    Everything will be working 100% fine at first. I walk into a magic shop, and the guy sells me skills. I walk into an item shop, the guy sells me items.

    Something happens to trigger it such that all shops in the game now start displaying all the same goods until I use a common event ability that simply transfers the player to another map. Simply walking into another map using a Player Touch transfer Event does not fix the problem once in the 'bad' state.

    I'm a software tester by occupation, and I still can't find any consistent steps to reproduce this at all. I've tried every permutation of actions I can think of to reproduce it, and its just totally out of my control. It happens whenever the hell it feels like it lol.

    My Skill Shop Events look like this:

    Script: @shop_type = "LearnSkillShop"

    Shop Processing: [ice]

                               : [lightning]

    And my regular Shop Events are just:

    Shop Processing: [Potion]

    I tried adding something to 'regular' shops like:
    Script: @shop_type = nil

    but that had no effect.

    Again, I want to emphasize that everything works correctly the first few times I visit various shops during a single session. It gets into a bad state of some kind!

    Some things about the design of my particular game that might be causing it, but probably not:

    - On every map in the game, I set a var to the current 'Map ID'. The event that sets this is on parallel process with no condition, and it runs constantly. Perhaps the constant usage of MapID is confusing the shops, which also using that system var?

    - I am constantly using a skill that calls a common event which teleports me to other maps. I assume this isn't a big deal because the teleports don't take me directly to a map with a shopkeeper. At best, the teleport takes me to the map adjacent to the shopkeeper, and then I still have to manually walk into the shop (thus refreshing the Map Id)

    - I use a script in battle that changes my character's class temporarily, and re-paints all his skills. At the end of each battle, however, the character's class and skills are returned exactly to the way they were before the battle.

    If anyone has any ideas, please help. I'll be working on this game for like 10 more months, so no hurry. But, the game can't be released with this bug unfortunately.

    *Additional debug info, will be updating this list as I find more clues:

    1. If I save my game and restart the whole playtest console, the glitch goes away. So that probably means nothing about the game campaign data is screwed up, and it is some temporary variable.
  14. It might be related to common events.

    The script uses a [mapID, eventID] pair as the shop ID. Whenever a shop is created or retrieved, it uses that ID.

    One thing to note is the way common event shops are handled. Because I don't have access to the ID, I set it when you call a common event, and then clear it out after it's used. So for example, if you call common event 7, the game will store 7 as the "common event shop ID". After the event is done, it gets cleared out.

    Now, those two pieces of information are gathered here:

    def shop_map_id $game_temp.shop_common_event_id ? 0 : @map_idend def shop_event_id $game_temp.shop_common_event_id ? $game_temp.shop_common_event_id : @event_idendIt is very possible that the shop common event ID somehow got "stuck" somewhere in your common event calls, and it's always being used.A possible situation is this:

    The shop key ended up getting stuck with a certain value.

    A shop was created with that shop key.

    When you access another shop, because the key is still stuck, it returns that shop instead of the correct shop.

    Now, you continue to access shops and it just keeps using that same key. When you call a common event again, NOW it resets the common event ID, gets cleared out properly, and the issue disappears.
    This would explain why simply moving from one map to another normally does not fix the issue, but calling a common event does.

    If you print the map ID and event ID out when you're trying to reproduce the issue, you may find that they are always the same at some point when the issue occurs.

    I haven't found a way to trigger the issue.
  15. Tsukihime said:
    It might be related to common events.

    The script uses a [mapID, eventID] pair as the shop ID. Whenever a shop is created or retrieved, it uses that ID.

    One thing to note is the way common event shops are handled. Because I don't have access to the ID, I set it when you call a common event, and then clear it out after it's used. So for example, if you call common event 7, the game will store 7 as the "common event shop ID". After the event is done, it gets cleared out.

    Now, those two pieces of information are gathered here:

    def shop_map_id $game_temp.shop_common_event_id ? 0 : @map_idend def shop_event_id $game_temp.shop_common_event_id ? $game_temp.shop_common_event_id : @event_idendIt is very possible that the shop common event ID somehow got "stuck" somewhere in your common event calls, and it's always being used.A possible situation is this:

    This would explain why simply moving from one map to another normally does not fix the issue, but calling a common event does.

    If you print the map ID and event ID out when you're trying to reproduce the issue, you may find that they are always the same at some point when the issue occurs.

    I haven't found a way to trigger the issue.
    Thanks a lot! That was a really quick and thoughtful reply.

    Everything you said makes a lot of sense. I bet I can isolate the issue much better by focusing testing on the teleporting common events. Now that I think about it, I think 100% of the time I reproduce the issue, it involved me teleporting at some point earlier.

    Or, more than likely, my own event that sets a variable to MapID every time I enter a new map needs to not be on perpetual parallel process. Perhaps if it just ran once and then got switched off, it wouldn't throw off the Map ID var being passed around in Shop Manager.
  16. Each event holds a game interpreter with an instance variable for the map ID.


    This is generated on event creation, which occurs on map load.


    The map ID is fetched from an internal Map object, which you typically would not have any access to unless you're using script calls.
  17. Holy cow!

    Fixed it finally.

    My teleporting common event wasn't "letting go" of something after I use it from the skill menu. I'm not a programmer so that's the best way I can really describe it.

    Even thought the teleport script appeared to be done, and map transfers were working as usual, it screwed with something in the Shop Manager.

    To fix the bug, all I had to do is automatically call a blank common event upon entering a shop. This interrupted whatever hadn't "let go" in my other common event, which allowed the shop to instantiate correctly.

    Thanks a lot for your help debugging, Tsukihime! You helped me isolate the exact steps to reproduce, and got me thinking a lot harder about how things are working.
  18. Send me the instructions for reproducing the issue.


    It sounds like a bug on shop manager's part which can occur in other places as well.
  19. Setup:
    1. Create 2 shops on different maps. Connect them together for convenience.

    2. For one shop, set @shop_type = "LearnSkillShop". The other can use the default Ace Shop Processing command. (not sure if this setup step even matters)

    3. Create a menu skill that has Effect - Common Event. I'll call that skill "Teleport" since I was calling it that earlier.

    4. For Common Event script, simply have it display a line of text. This test string should display every time you call the Teleport skill in the skill menu.

    Steps:

    1. Test both shops and make sure the goods are populating as expected

    2. Use the Teleport skill from the skill menu, which will run the common event and display the test string.

    3. Test both shops again after you used the skill

    Results:

    Whichever shop you use first in step 3 will become locked as the only shop available. When you go to the second shop, it will display the same goods (and shop type, skill shop vs regular) as the first shop. If you are in a large game, every shop in the game will display the same goods.

    Fix:

    In every shop, I have a perpetually running Parallel Process Event that calls a Common Event with no script contents.

    It is possible that the difference is the Common Event being called as a Skill Effect vs part of Event code. Skill Effect seems to break the processing of Shop Manager.
  20. The problem was the common event call being made from a skill.


    If it were an event common event call, the problem doesn't occur.


    Get the latest copy and you should be able to use your skills without having to create an empty common event.