Basically, what I want to do is have the main character learn skills by fighting battles with specific allies in the party.
For example, let's say I have a Black Mage character. I bring him into the party, and at level 1 he has the Fire spell.
The main character on the other hand doesn't have any skills at level 1 at all - but if he fights 10 battles with the Black Mage character, he will learn Fire himself.
This also needs to be limited by level and/or skills available to the party member in question. For example, even if the hero fights 100 battles with the Black Mage in the party, if Black Mage hasn't learned Ice yet, then Hero shouldn't be able to learn it from him either. In this case, there would need to be a scene to not only track progress with learning skills, but also to inform you that your progress is "locked" with a given party member because he/she has not yet learned the skill you're trying to learn from them.
I drew a quick and dirty example of what this scene might look like:
Then, after a battle, once the conditions are met, the Hero will learn the skill in the victory scene as if he would during a level up.
Of course, for skills you have not yet met the level condition for, the battles they participate in won't be counted at all. So in this case, even if you have Mage (F) in your party for 20 battles up till level 10, the meter will read 0/20 once it becomes available.
I'd really appreciate it if someone could make this kind of ability system for me
Edit: Another thing. Because in my game, you would be able to learn the same skills from different characters, there should be a clause where, if you already know a skill, it will display the next skill to learn. For example, if you've already learned Thunder from the Mage (M), then instead of displaying Thunder for Mage (F), it will just discard whatever progress you've made with Thunder on Mage (F) and display the next skill you could learn instead. And of course, if there are no more skills to learn from that character, it will display something like "COMPLETE!"