How can I sell fire or ice skills in a shop?
How to sell magic/skills in a shop
● ARCHIVED · READ-ONLY
-
-
Are you looking to sell an item that you can then teach the skill to anyone in the party with? If so, just make an item (call it whatever you want) and, under the effects, on the "other" tab, set it to "Learn Skill" and choose what you want the person to learn. Presumably you'd also want to set it to be consumable. So something like this:
If, instead, you're trying to make it so that you purchase skills directly for certain characters (that is, you pay 100g and, for example, Eric immediately learns Whirlwind), one idea is to then make items for each skill you want to sell. In the shop event, do a shop processing call, then afterwards do some conditional statements for each item - something like, "Conditional: Item Whirlwind in inventory," then within each conditional, make it teach the corresponding actor the skill and remove the item from the inventory. Like so:Spoiler
I'm not sure if there's a default way to make it so you can only buy an item once out of the shop, if you want to add that in, as well. You could probably add to a variable in each of those conditional statements, then make several shop processing calls according to what variables are still equal to 0, but that seems like a somewhat cumbersome solution. Also, I'm not sure how you could prevent the player from buying more than one the first time they go to the shop. I'll see if I can maybe find a script with that functionality, if that's something you want.Spoiler
-
you can follow the advice given above, and you can search on the master script list for a skill shop script. Those scripts basically are advanced variants of the second solution above, where you don't need the conditionals after the shop event.
And if you want a lot of options, search for the "Ability system script", that will add ability points for purchasing the abilities as well as conditions to allow for skill trees and more.