OK, made it, although might not the best script. You won't need to script by your own (as opposed to my script before, you must add
when and
@something_plus += some_value for each skills). You just need to define which skills are passive (don't forget to set the Occassion to Never) and what attributes will be raised up (or even raised down!).
This is how to install:
1. Just make a new page above Main (press Insert when you highlight Main, you will have a blank new page). Name it something, like
EDIT Game_Actor.
2. Copy this code and paste it to your new page:
#include all passive skills ID here
#separate each input by a comma
PASSIVE_SKILL = [1, 4, 7]
#set which attribute would increase
#separate each input by comma (and new line for easy reading)
#follow the format:
#skill_id => [HP+, SP+, STR+, DEX+, AGI+, INT+]
#as the example:
ATTRIBUTE =
{
1 => [5, 0, 0, 0, 0, 0] ,
4 => [0, 5, 0, 0, 0, 0] ,
7 => [0, 0, 5, 5, 5, 5]
}
class Game_Actor < Game_Battler
alias my_learn_skill learn_skill
def learn_skill(skill_id)
my_learn_skill(skill_id)
if PASSIVE_SKILL.include?(skill_id)
#p ATTRIBUTE[skill_id]
@maxhp_plus += ATTRIBUTE[skill_id][0]
@maxsp_plus += ATTRIBUTE[skill_id][1]
@str_plus += ATTRIBUTE[skill_id][2]
@dex_plus += ATTRIBUTE[skill_id][3]
@agi_plus += ATTRIBUTE[skill_id][4]
@int_plus += ATTRIBUTE[skill_id][5]
end
end
end
Instruction given within the script in case you are not online and check this page.
Now, how to set up "passive skill" (I'd refer to skills that are unusable and raises attributes as "passive skill" from now on)...
1. Look up part of the script which reads
PASSIVE_SKILLS = [1, 4, 7]
It should be at the third line. For an example, I've added 3 passive skills (which are really silly to be passive, but this is just only an example) which IDs are 1, 4, 7. You can always know the skill ID from the database: just look at the skill number and you get skill ID(WITHOUT leading zeroes). To add new passive skill, just add its ID within
PASSIVE_SKILLS array. Remember to separate each entry by a comma.
2. To set up which attributes the passive skill will increase, find the 9th line which reads:
ATTRIBUTE =
{
1 => [5, 0, 0, 0, 0, 0] ,
4 => [0, 5, 0, 0, 0, 0] ,
7 => [0, 0, 5, 5, 5, 5]
}
The format I used is:
Skill_ID => [HP+, SP+, STR+, DEX+, AGI+, INT+]
so follow that format. I think the format is self explanatory.
For example, if you want skill #2 gives you additional 5 STR, set it like this:
ATTRIBUTE =
{
2 => [0, 0, 5, 0, 0, 0]
}
As before, remember to separate each entry with a comma.
Don't forget that you can use negative values for any attributes you want to decrease. For example, a
5 => [0, 0, 5, 0, 0, -10]
would simply mean that skill #5 will increade 5 STR and decrease 10 INT.
That's it! From now on, all passive skills learnt by any actors will have attribute effects like you want.
I hope you find it useful. Should there be any questions, errors, or improvements, let me know.