Hey all. As the title states, I'm looking at creating a different spell system. My goal is to not use MP/Mana at all; all spells are instead going to be alchemy based. For those of you that have played the game Secret of Evermore, similar to that.
Basically, a character knows a spell, but requires the ingredients in thier inventory in order to cast it. So, for example, if I wanted to cast "Fireball", I'd need to have 2 oil and 1 ash in my inventory. Using it would consume them, and (eventually, once i figure out how) level up your pyrotechnics skill, making all fire spells hit harder.
My question is this: How do I make spells require and consume items from your inventory? I looked at the tutorials, and didn't see one that fit what I was trying to do. Closest I could see was Bob Sagots Alchemy tutorial, but that (to my understanding) makes consumable potions outside of battle, not spells in combat.
Any advice would be greatly appreciated. Thank you =)
Creating A New Spell/Alchemy System
● ARCHIVED · READ-ONLY
-
-
I've been able to implement something like this using this script: http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/. It allows you to set up custom costs for skills (or spells) so that they cost mp, or items, or both. The link will show you the description, go to his home page to find out how to download the script itself.
Example of use from my game, where I have a skill cost a potion (item 1) + one of the items (item 12): Add this to the note column for the skill:
<custom cost requirement>
$game_party.item_number($data_items[12])>=1&&$game_party.item_number($data_items[1])>=1
</custom cost requirement>
<custom cost perform>
$game_party.lose_item(($data_items[12]),1)&&$game_party.lose_item(($data_items[1]), 1)
</custom cost perform>
Change the number in [] by data_items to be the item number you wish to use up in both the custom cost requirement and custom cost perform, and change the 1 to be the number you wish to use up.
Hope that helps!
Edit: Just saw the part on leveling up the skills. You will need more than this script for that part. Maybe another user can help you on that, as I don't know how to do that part. -
That is an immense help, thank you!
I'm honestly not worried about the level-up portion at the moment; just starting the game, and want to get the basic spell system in play first. Later, I'll re-work it to include the leveling. -
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
Do you still need more help with this? You MIGHT be able to do it via the damage formula, but that would alter its success, not whether you could actually select the skill or not, and I suspect the formula box would really be too small for anything even semi-complicated, so you'd have to resort to scripting anyway.