I have a few questions:
1) Do you want it to be used on them and they permanently learn the ability like Pokemon's TMs/HMs? This is the simplest one, but the second isn't that hard either.
Explanation: Player gets item called 'Fire'. Player uses item on a party member and that party member learns the ability 'Fire'. Whether the item is consumed from one use or not is up to you.
2) Do you want it to be equipped on them and they temporarily learn the ability like Saiyuki's Scrolls? There's a trick for this I'll post.
Explanation: Player gets item called 'Fire'. Player equips a party member with the item and the party member learns the ability 'Fire' while that item is equipped, but only while that item's equipped.
3) Do you want it to be equipped on them and they temporarily learn the ability and they permanently learn the ability after a certain amount of fighting with it equipped like FF9's Equipment Abilities? This is more challenging.
Explanation: Player gets item called 'Fire'. Player equips a party member with the item and the party member learns the ability 'Fire' while that item is equipped. Once a party has fought enough battles to earn a certain amount of 'Fire' points (each party member would have their own 'Fire' custom variable), they will retain the 'Fire' ability after the 'Fire' item is unequipped.
4) Do you want it to be equipped on them and they temporarily learn the ability and that item gains experience towards a new ability after a certain amount of fighting with it equipped like FF7's Materia? This is harder because you can't use my trick and therefore can't do it through the default menu.
Explanation: Player gets item called 'Fire'. Player equips a party member with the item and the party member learns the ability 'Fire' while that item is equipped. Once a party has fought enough battles to earn a certain amount of 'Fire' points (each item would have its own 'Fire' variable), the 'Fire' item will now teach the 'Fire' and 'Fire2' abilities while it's equipped.
Anyways, I think I should start by teaching you #1 since the rest are similar and build on it.
Here's number 1 for a 'Fire' item:
Data: Member Info: Change to Member Order
var86[Member Number] = var48[Insti Member] + 0 (these two commands find the current member’s database number and store it in var86[Member Number], the direct effect will have made the target of the item be the current member)
Data: Member Info: Load
**you can add Conditions of var86[Member Number] here to make certain Abilities only teachable to certain members
**Member Info: [Member] Ability + 'Fire' (this command teaches a member an Ability)
This goes in the ‘Result’ slot of the Item’s Direct Effect.
Otherwise, just copy the preset 'Herb' Item and 'Herb' Direct Effect. Also, feel free to remove the 'Check Heal' script from the Direct Effect: that script makes it so the Direct Effect only carries through if the party member isn't KO'd. The 'Item (One)' Script can be changed to 'Item (Multi)' if you wish to have it be usable an infinite amount of times.
**This is where you put what you asked about. Simply do this:
Sort: var86[Member Number]
Apply If 1
Member Info: [Member 'Bob'] Ability + 'Fire'
Text Message: 'Bob learned Fire!'
To End
Apply If 2
Member Info: [Member 'Joe'] Ability + 'Fire'
Text Message: 'Joe learned Fire!'
To End
Apply If 3
Text Message: 'Fred is unable to learn Fire...'
To End
...(repeat for every party member)
Branch End
Trick for Numbers 2 and 3, from my guide found here:
williampaladin.tripod.com/id2.html"6. A Basic Equip-Scrolls-to-Use-Abilities System.
I’ve seen this done in lots of ways in numerous games including Final Fantasy 7, Final Fantasy 8, Final Fantasy 9, and Saiyuki: Journey to the West - so don’t think there’s only one satisfactory way to do it! If I were doing this I’d make it in the simplest way possible - equip a scroll on a member and they can use an ability while it’s equipped/un-equip a scroll on a member and they can’t use an ability while it’s equipped. This is about as difficult as Idea #3, unless you use the trick in Idea #7. The easiest way to do this is to re-name one of the Equipment Slots (default = Weapon, Head, Body, Shield, and Accessory) and use the technique in Idea #7.
7. Abilities from Equipment.
It does not have to be exactly like Final Fantasy 9's system! It’s difficult to figure this out since there is a script that runs when something is equipped, but no script that runs when something is unequipped. My easy solution to that is making a script that runs when any/every equipment gets equipped, that 1) removes all equipment-abilities from that member 2) checks that party member’s equipment by doing a plain Data: Load Member Info command and 3) teaches them all the abilities for their current equipment, in that order."