Upgrade an Item (Spell book) that Changes a Skill

Hi there,
I am a decently experienced RPG Maker user, but not proficient in Java. I have a dilemma that is crucial to my game and was wondering if anyone could help me out. I have searched extensively for a solution but have found nothing that matches this. Here goes:

In my game I have items that are called Spell Books. When a character equips this item, they should learn a specific skill, but only while that Spell Book is equipped. That's not the challenging part. The spell book can be upgraded by an item called an "upgrade", and when the spell book is upgraded, the skill changes. So, after upgrading a spell book, it needs to change the skill it will give the actor when equipped. And if it is upgraded again, the skill changes once more to a new one. So basically I need to know how to use an item ("upgrade") on another item ("spell book") to change it, and multiple "upgrade" items need to be able to be used multiple times on the same Spell Book and also on other, different types of Spell Books (for example, a Fire Spell book and a Water Spell Book). The "upgrade" needs to be the same item that you can find or buy, so that all upgrades work on any spell book.

Does that makes sense? If anyone could help me out, I'm stumped! Thank you! 🙂
What if instead of putting the spell on the book put a common event call on the book? Then you could work a variable system for upgrades where each upgrade sets that skill books variable to a certain number then the common event runs what ever spell you put in the if condition branch for that spell variable number.
What if instead of putting the spell on the book put a common event call on the book? Then you could work a variable system for upgrades where each upgrade sets that skill books variable to a certain number then the common event runs what ever spell you put in the if condition branch for that spell variable number.
This sounds like it can work. I will give it a try. Thank you so much for the speedy response!
Np hope it works out for you feel free to post back with any questions.
I still have one question though: How do you use an "upgrade" on the spell book? How do you use an item on another item?
You wouldn't be using it on the book you would be using it on the event but the upgrade item can be used to select the person with it equipped. Then in the common event have a condition branch start with if spell books equipped and and probably check else so you can tell the person they don't have the book equipped. The upgrade when used needs to set a variable to say +1 if there's only 1 upgrade item for all spell books. then the common event would read what variable number is assigned and apply it to the proper condition branch.
You wouldn't be using it on the book you would be using it on the event but the upgrade item can be used to select the person with it equipped. Then in the common event have a condition branch start with if spell books equipped and and probably check else so you can tell the person they don't have the book equipped. The upgrade when used needs to set a variable to say +1 if there's only 1 upgrade item for all spell books. then the common event would read what variable number is assigned and apply it to the proper condition branch.
Interesting approach. I bet it works. However, what if the character has multiple spell books equipped? Characters could have 5 spell books equipped and I wouldn't want an "upgrade" to upgrade every spell book with one use. One "upgrade" should only upgrade one spell book, once. It upgrade the spell book again, or to upgrade a different spell book, you would need to buy another "upgrade" and use it.
Are there different spell books or only one spell book to cover everything? Also for the upgrade item to work it has to call an event and in the event use a script window to place $gameVariables.setValue(x, y) Set x to the variable for the upgrade number and y to the amount
Are there different spell books or only one spell book to cover everything? Also for the upgrade item to work it has to call an event and in the event use a script window to place $gameVariables.setValue(x, y) Set x to the variable for the upgrade number and y to the amount
Multiple kinds of spell books. For example, there is Fire, Water, Earth, Wind, etc. Each spell book has 4 "levels" which each have their own skill. When you upgrade a Fire spell book, it becomes a different fire skill. If you had 2 fire spell books, you could upgrade them to different "levels" and therefore have two different skills. Or they could be the same level and therefore useless because they have the same skill. Same for water, etc.
@jglag

You could probably make specific upgrade items for each scroll, or have a choice box when you use the upgrade scroll.
Cool that makes it easier, so in the common event for the books you just set up a different set for each book. What I would do is each book gets its own common event with its own upgrades inside. Then the upgrade item calls its own common event and asks what book type would you like to upgrade? I'd have a choice window then with say Fire, Water Etc. And in each choice I would set a call to that books common event. Doing it that way you wouldn't need to set the variable just have a consumable upgrade that works on the user.
@Jeremiah Eastman - He was using spellbooks as equipments which make it such that spells added on the book are only usable by a player if it's equipped. If he adds spells via common event instead, then first he needs a plugin that allows running of events on equip of an item.

@jglag

So you want spellbooks to be equipped and extra spellbooks can be "used" to upgrade an equipped spellbook of the same type?

The problem here is that you seem to want to have spellbooks as both equippable and also usable which cannot be done via normal means. Equippables cannot be used and usables cannot be equipped under normal conditions.

One easy way is to have the spellbook equipment and something like "Spellbook Upgrade Scrolls" which will be the ones used to upgrade the equipments. Now if you want to really make spellbooks as both equipment and usable item (for upgrading) then you will need to find a plugin that allows you to "use" equipment.
Really I only want the spell book to be an equipment. I want it to have the character know a skill when it is equipped. I don't need the spell book to be used as a skill itself. And the "upgrades" are separate items, not the spell books themselves. The "upgrade" items I want to be used on the spell book itself.
Could he have a parallel process that checks for if fire book equipped or not, if not remove skill, or class type fire?
Cool that makes it easier, so in the common event for the books you just set up a different set for each book. What I would do is each book gets its own common event with its own upgrades inside. Then the upgrade item calls its own common event and asks what book type would you like to upgrade? I'd have a choice window then with say Fire, Water Etc. And in each choice I would set a call to that books common event. Doing it that way you wouldn't need to set the variable just have a consumable upgrade that works on the user.
Makes sense. I do feel like the game "asking" which spell book I want to upgrade (when I don't own some of the spell books, since there will be many different types) feels a bit clumsy. The player will feel like it's silly that the game can't just know what spell books I have equipped.
@Jeremiah Eastman yes, but common events only run in the map so he won't unlearn them or learn them until he closes the menu..

But really he can just make each spellbook level a different equipment and just have the event of the upgrade item replace the current spellbook with the new equipment. That way the spells will be added via features and thus are added/removed right away when the player equips/unequip the spellbook.

You could maybe have a different upgrade item for each type of book so that you won't need to ask the player which book he wants to upgrade.
That wouldn't matter though would it if these are spells for battle, but if he equips them in battle through a plugin he would need the plugin for parallel processes to be ran also in battles.
That wouldn't matter though would it if these are spells for battle, but if he equips them in battle through a plugin he would need the plugin for parallel processes to be ran also in battles.
It doesn't have to happen in battles. But thank you.
@Jeremiah Eastman yes, but common events only run in the map so he won't unlearn them or learn them until he closes the menu..

But really he can just make each spellbook level a different equipment and just have the event of the upgrade item replace the current spellbook with the new equipment. That way the spells will be added via features and thus are added/removed right away when the player equips/unequip the spellbook.

You could maybe have a different upgrade item for each type of book so that you won't need to ask the player which book he wants to upgrade.
Again, thank you guys for all this help. I really appreciate it.

This is what I was thinking as well, as I thought about it. However, still a bit unsure on how to use the "upgrade" item on the spell book to make it change.
Makes sense. I do feel like the game "asking" which spell book I want to upgrade (when I don't own some of the spell books, since there will be many different types) feels a bit clumsy. The player will feel like it's silly that the game can't just know what spell books I have equipped.
You could set it up with condition branches so if actor has fire book equip ask would you like to upgrade your fire book, and so on. You could get creative and probably work out a system to have a choice menu for each possible combination of books but that would be pretty messy work I would think.🙂
Well, you can't really select an item as a target without scripting/plugins so what I'd do ,for now at least, is simply have the event check which spellbook you have equipped of that type.

Something like

If Fire I is equipped
Remove Fire I
Equip Fire 2
If Fire 2 is equipped
Remove Fire 2
Equip Fire 3

and so on

but ofc the downside of this method is that you can only upgrade spellbooks if they are currently equipped.

or you can also just make it check items (via setting a variable to the amount of that spellbook then checking if it's more than 0) instead so it upgrades a spellbook that is in the inventory instead of an equipped spellbook.

Original thread: https://forums.rpgmakerweb.com/threads/upgrade-an-item-spell-book-that-changes-a-skill.79850/