• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  
estriole

EST - YANFLY Class system addon: Subclass gain exp, learn skill, trait, etc

75 posts in this topic

 ** EST - YANFLY - SUBCLASS ADD ON : GAIN EXP , LEARN SKILL, WORKING TRAIT, ETC
 REWRITTEN !!!
 v 3.07

 

This is add on for YANFLY Class Script.

https://yanflychannel.wordpress.com/rmvxa/core-scripts/class-system/

 

Introduction

  This script is addon to YEA class system. Subclass equipped will gain full or some exp. gain skill as the subclass level up. actor will have all the subclass trait. also if using Tsukihime Effect Manager. subclass can be given 'effect' too like normal class.

 

Feature
- subclass gain exp

- subclass gain skill

- subclass trait worked

- subclass can have effect (if using tsukihime effect manager)

- built in compatibility to formar extra trait lv up and yanfly adjust limit script.

- ability to set class/subclass MAX LEVEL

- ability to customize MAINCLASS exp rate. so each class can have different growth rate as mainclass

- ability to customize SUBCLASS exp rate. so each class can have different growth rate as subclass

- ability to give modifier to actor/class/subclass/weapon/armor/state to increase/decrease MAINCLASS exp rate

- ability to give modifier to actor/class/subclass/weapon/armor/state to increase/decrease SUBCLASS exp rate

- ability to give multiplier to actor/class/subclass/weapon/armor/state to multiply to MAINCLASS exp rate

- ability to give multiplier to actor/class/subclass/weapon/armor/state to multiply to SUBCLASS exp rate

- SEPARATE rate for mainclass and subclass. so increasing main class exp rate didn't raise subclass gained exp.

- compatibility with yanfly adjust limit script

- ability to stop exp gained if exceed max level of class/subclass. so when you change the max level later it will not auto level up

 

 Version History:

 


  v 1.00 - 2012.06.21 > First relase
  v 2.00 - final - 2012.06.25 > updated skill and trait from subclass works
  v 3.00 - 2013.03.24 > - rewritten the script. to make it lots more
                        compatible with another script.
                        - add ability to set class max level by notetags:
                        <class_max_lv: 20>
                        to set the class max lv to 20.
                        - add ability to set subclass exp rate for each class.
                        so when that class is equipped as subclass. how many
                        percent exp it will gained.
                        <sub_exp_rate: 50>
                        to set the class sub exp rate to 50 percent
  v 3.01 - 2013.03.29 > - add configuration to set when exp divided by sub exp
                        rate below 1. it could set exp gain to 1 instead of 0.
                        example1: slimex2 give 8 exp * subrate 10% = 0,8 -> 1 exp
                        example2: slimex2 give 0 exp * subrate 10% = 0 -> 0 exp.
  v 3.02 - 2013.05.26 > - add support for float percentage sub exp rate. ex:
                        <sub_exp_rate: 1.5> means 1.5% rate.
                        even i doubt people will use it... but the function is available in case
                        someone crazy enough to use it :D.
                        - add ability to boost/reduce sub exp rate
                        give notetags to actor/class/weapon/armor/state
                        <sub_exp_mod: 30> means +30%
                        it's direct addition to current rate so if the rate 50% it will become 80%
                        <sub_exp_mod: -30> means -30%
                        it's direct substraction to current rate so if the rate 50% it will become 20%
                        all actor/class/subclass/weapon/armor/state mod stacks
                        usefull to make accessory that make your subclass gain (+30% battle exp)
                        - add ability to grant multiplier to sub_exp_rate. ex:
                        <sub_exp_mult: 150> will multiply current rate to 150%
                        multiplier STACKS
  v 3.03 - 2013.05.28 > - add MAIN EXP RATE function. this function is SEPARATE
                        with SUB EXP RATE. means increasing MAIN EXP RATE didn't
                        raise sub exp gained. ONLY raised exp gained by main class.
                        notetags the class with:
                        <main_exp_rate: 75> -> to set main class exp rate to 75 percent
                        - add ability to boost/reduce main exp rate
                        give notetags to actor/class/weapon/armor/state
                        <main_exp_mod: 30> means +30%
                        it's direct addition to current rate so if the rate 50% it will become 80%
                        <main_exp_mod: -30> means -30%
                        it's direct substraction to current rate so if the rate 50% it will become 20%
                        all actor/class/subclass/weapon/armor/state mod stacks
                        usefull to make accessory that make your mainclass gain (+30% battle exp)
                        - add ability to grant multiplier to main_exp_rate. ex:
                        <main_exp_mult: 150> will multiply current rate to 150%
                        multiplier STACKS
  v 3.04 - 2013.10.22 > - add compatibility patch to yanfly adjust limit script                       
  v 3.05 - 2014.01.09 > - stop exp gain when max level reached. (both subclass and main class works now)
                        in case the exp gained will make the actor exceed max level... it will add to maximum exp
                        you can get to reach next level and ignore the rest. 


  v 3.06 - 2014.01.16 > - compatibility patch with yanfly victory aftermath. to recognize exp rate.
  v 3.07 - 2014.07.16 > - fix the script. IF maintain level set to true. stop the sub exp gain.
                        since the level should be the same with main class.
 

How to use:

PUT this script below Yanfly Class Script

PUT this script below Yanfly Victory Aftermath Script

 

you could see the script header or open spoiler box below:

 

 

 HOW TO USE:
 1) by plugging this script automatically...
    - subclass gain exp (default sub_exp_rate is using what you defined in config)
    - subclass's skill and trait gained by actor
    - subclass's effect is executed (if using tsukihime effect manager)
    
 2) you can set a class max level by notetagging the class with:

    <class_max_lv: 20>
    to set the class max lv to 20. change the number as you want.

 3) to customize each class to have different sub exp rate. give the class

    <sub_exp_rate: 50>
    to set the class sub exp rate to 50%.  change the number as you want.
    
    support float percentage. ex:
    
    <sub_exp_rate: 2.5>
    to set the class sub exp rate to 2.5%    
 
 4) you can give sub_exp_rate modifier by notetagging:
    actor / class / subclass / weapon / armor / state
    
    <sub_exp_mod: 30> means +30% increase to sub exp rate

    it's direct addition so if current sub_exp_rate is 50% it will become 80%
    support negative value too
    
    <sub_exp_mod: -30> means -30% decrease to sub exp rate
    
    it's direct substraction so if current sub_exp_rate is 50% it will become 20%
    ALL sub exp rate modifier STACKS
    so example current sub exp rate 50%
    actor +10%, class -5%, subclass -5%, weapon +100%, armor1 -10%, armor2 -5%, state1 10%, state2 - 10%
    final rate = (50%) +10% -5% -5% +100% -10% -5% +10% + 10%
    count it yourself :D.
 
 5) you can give sub_exp_rate multiplier by notetagging:
    actor / class / subclass / weapon / armor / state
    
    <sub_exp_mult: 150> means sub exp rate multiplied by 150%

    it's multiplication so if current sub_exp_rate is 50% it will become 75%
    current sub_exp rate is sub exp rate after adding sub_exp_mod
    ALL sub exp rate multiplier STACKS
    so example current sub exp rate 50% (after adding exp_mod)
    actor *150%, class *50%, subclass *500%, weapon *125%, armor1 *250%, armor2 *105%, state1 *410%, state2 *310%
    final rate = (50%) * 150% * 500% * 125% * 250% * 105% * 410% * 310%
    count it yourself :D.

 6) to customize each class to have different main exp rate. give the class

    <main_exp_rate: 50>
    to set the class main exp rate to 50%.  change the number as you want.
    
    support float percentage. ex:
    
    <main_exp_rate: 2.5>
    to set the class main exp rate to 2.5%    
 
 7) you can give main_exp_rate modifier by notetagging:
    actor / class / subclass / weapon / armor / state
    
    <main_exp_mod: 30> means +30% increase to main exp rate

    it's direct addition so if current main_exp_rate is 50% it will become 80%
    support negative value too
    
    <main_exp_mod: -30> means -30% decrease to main exp rate
    
    it's direct substraction so if current main_exp_rate is 50% it will become 20%
    ALL main exp rate modifier STACKS
    so example current main exp rate 50%
    actor +10%, class -5%, subclass -5%, weapon +100%, armor1 -10%, armor2 -5%, state1 10%, state2 - 10%
    final rate = (50%) +10% -5% -5% +100% -10% -5% +10% + 10%
    count it yourself :D.
 
 8) you can give main_exp_rate multiplier by notetagging:
    actor / class / subclass / weapon / armor / state
    
    <main_exp_mult: 150> means main exp rate multiplied by 150%

    it's multiplication so if current main_exp_rate is 50% it will become 75%
    current main_exp rate is main exp rate after adding main_exp_mod
    ALL main exp rate multiplier STACKS
    so example current main exp rate 50% (after adding exp_mod)
    actor *150%, class *50%, subclass *500%, weapon *125%, armor1 *250%, armor2 *105%, state1 *410%, state2 *310%
    final rate = (50%) * 150% * 500% * 125% * 250% * 105% * 410% * 310%
    count it yourself :D.
    
interesting play with subexpmod and subexpmult...
create a subclass only which have no growth in subclass. but after equipping
some accessory that increase subexpmod. it will have some growth and raised lv.
could create a weapon/armor which is strong but subexpmult = 0%. so no growth.    

 

 

grab script here:

http://pastebin.com/9GP3iwUK

 

DEMO:

dropbox demo for latest script.

https://www.dropbox.com/s/f2axqd80dxca329/Yanfly_Subclass_Patch.rar

 

in demo i also add some script

- KMS Generic Gauge Modded to work with yanfly status menu

- Yanfly status menu mod to have exp bar of main and subclass instead just text. the bar is simple bar only (no good cosmetic bar like moghunter)

 

the older version script (before rewritten) is removed since i think it's useless now.

 

if there's still bug feel free to post here. i will offer assistance as long as i could. :D

Edited by estriole

Share this post


Link to post
Share on other sites

There's a bug that causes the sub class not to go past level 2 or 3. Other's have experienced this as well, but they posted on yanfly's website. Also, if you fix this, can you edit the script to make a subclass have a max level of lower than 99? Such as 10 or so?

Share this post


Link to post
Share on other sites

There's a bug that causes the sub class not to go past level 2 or 3. Other's have experienced this as well, but they posted on yanfly's website. Also, if you fix this, can you edit the script to make a subclass have a max level of lower than 99? Such as 10 or so?

actually my own version have that feature... i will try to implement it so it could run in new fresh project. if you desparate and need quick solution. you could change this line instead (simple version)

@exp[class_id] = cur_lv_exp + expvalue

to

if sub_lv >= yourmaxlvhere

@exp[class_id] = cur_lv_exp + expvalue

end

so it won't add exp if sublevel is larger than your max defined level. but this is global (affect all subclass). :D.

to make it individual you need to use notetags and call the notetags inside the conditional branch. hope that helps.

Share this post


Link to post
Share on other sites

Just one bug.

 

The code you pasted here has "&&" in a couple places. As far as I can tell, RMVXA doesn't like that, and those need to be changed to "&&"

 

Other than that, this fix seems to be working great. : D

Edited by Mitroll

Share this post


Link to post
Share on other sites

it's the forum bug before. whenever we edit the message it will automatically change & to &. :B to link text, etc.

 

and since the forum bug already fixed. i guess i will fix the script above :D.

 

*i guess it's fixed. tell me if i missed something. :D.

Edited by estriole

Share this post


Link to post
Share on other sites
Hey Estriole, thanks a ton for the script, appears to work perfectly for leveling subclasses.

 

Quick question however, is there any way to have some (or all) of the jp earned by the primary from a battle also awarded to the subclass? The JP is a YEA module found here:

http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/jp-manager/

 

Thanks!

I support this message, I would love the ability to have JP go into the subclass as well. But if it is possible, is it possible to make the JP amount of the subclass appear on the menu. I have my primary's class JP shown.

Share this post


Link to post
Share on other sites

Hey Estriole! I, umm, kind of got ahold of your script. Oops?

 

~ Removed because it's no longer needed since the script was updated ~

Edited by Ebonflame

Share this post


Link to post
Share on other sites

Awesome!! This is something I really wanted! You able to add a code that will make the subclasses JP appear in the menu screen as well?

Share this post


Link to post
Share on other sites

Erics,

 

Sadly, that's beyond my scope of ability at the moment, haha. Give me another couple weeks at it, at least (I just started messing with scripting two, two and a half weeks ago, and really don't know what I'm doing yet). Next on my list is making an add-on for the victory aftermath that will allow me to show the exp and jp gain for the subclass, and hopefully the stat change for the main class vs the subclass when you level. After that is the parameter bonus growth modification, then (hopefully) the ability to implement the features/traits for a subclass... maybe. After that I'll look at the subclass JP for the menu.

Share this post


Link to post
Share on other sites

@ebonflame: nice addition. but this script is created when i'm starting to script. so i guess it contain many turn around path and method rewrites. :D. maybe sometimes when i have time i will fix the script and add your part of JP. (and you will also in the author name :D). not now but eventually i will work on this since i also need this part of system to work (including subclass add feature which i scripted in other script will also merged to this script

Share this post


Link to post
Share on other sites

Estriole - haha, I hear you. It was a pain in the butt trying to figure out how to script so I could add JP addition in here. I'm still not great at it, but I'm a lot better than I was two weeks ago! :-D I'm so used to LSL syntax that I still sometimes find myself using it instead of Ruby when I'm scripting for VX Ace. 

 

No worries, take your time - I've made the last modifications I'm going to on this version, haha. I got bored and re-wrote the entire thing, so now it bears no resemblance to yours XD. I'm making a new topic for the re-written version, since I plan to make a lot of compatibility updates for it and before you know it, the entire project will be out of control. o.0 I'll put a link-back to this one, though, since you're the one who inspired me to get motivated and start scripting! :-) 

Share this post


Link to post
Share on other sites

glad that i help community give birth to new scripter :D. i also learn by reading from other people script when i start scripting. you might want to see tsukihime script. his/her script make me learn a lot when i start scripting(so i could say i'm motivated and inspired by him/her). also Enelvon script good to read. i learned how to make scenes and easy command window from him :D.

Share this post


Link to post
Share on other sites

*grins* Yep yep, you sure did. :-)

 

Oh, nod... Tsukihime's are good too. I have his hidden choice script, though I'm not currently using it at the moment. It's on my 'modify to death' waiting list. :-p I haven't checked Enelvon's scripts out yet, though... still working my way through Yanfly's 100+ script list, XD. 

Share this post


Link to post
Share on other sites

I ran into a tiny bug while testing the other night. I'm not sure if it's just me

or others as well but whenever I use an item to boost a stat, it crashes.

line 213: NoMethodError occured.

undefined method `+' for nil:NilClass

 

Is that something I messed up on my end? I don't remember touching line 213...

Share this post


Link to post
Share on other sites

need more info on how you occur that bug.

1) do it still crash in fresh project? (it might be incompatibility)

2) what is the item setting you 'give' to the actor. (screenshot of the item in database would be appreciated)

3) this script below 100 lines. since you said the error return line 213... so i assume that the crash pointed to other script (or base script). may i know what the script/base script it pointed out.

 

once again this script created when i was still learning scripting... maybe i will rewrite this script when i have time.

Share this post


Link to post
Share on other sites
need more info on how you occur that bug.

1) do it still crash in fresh project? (it might be incompatibility)

2) what is the item setting you 'give' to the actor. (screenshot of the item in database would be appreciated)

3) this script below 100 lines. since you said the error return line 213... so i assume that the crash pointed to other script (or base script). may i know what the script/base script it pointed out.

 

once again this script created when i was still learning scripting... maybe i will rewrite this script when i have time.

Haha yeah, sorry. I was tired when I wrote that so I was a little lazy with details.

I started a new project and there was no crash at all. It might have something to do with the 20+ scripts running at one time. Hmm.

I'll look into it a bit more and tell you where the crash happens.

In regards to the item itself, it was just a simple hp/mp booster.

 

Edit: That's the strangest thing. I moved the script up a few spaces in my script manager until it was RIGHT

below the class script and the error vanished. Hmm. Weird. Oh well, I suppose that one solved itself. Sorry for the hassle. :(

post-20084-0-07092900-1362208159_thumb.png

Edited by VagrantEnchanter

Share this post


Link to post
Share on other sites

@vagrantenchanter: it's maybe because this script is written when i'm still learn to script. and it have many overwrites. :D. so it's expected to put above other script that alias :D.

Share this post


Link to post
Share on other sites

Hi ,I have a bug/problem.

This script doesnt seem to be compatible with the Equipment Level Up Script. - http://cobbtocs.co.uk/wp/?p=155

When i was testing a battle with the Subclass level up script it ONLY leveled up the subclass and completely ignored the weapon .  Before i had put this script in the weapon Leveled fine. think you can make this compatible?  Thank you.

 

ALSO , It stops at level 10 ? I dont know why but i does. i want the subclass to stop at 70 like the primary class.

Edited by xdexlessinal

Share this post


Link to post
Share on other sites

maybe try putting this script above the equipment level up script. since this script written when i started scripting. and has many 'overwrites'.

for stop at lv 10. i will check that first when i have free times. currently got many works to finish.

Share this post


Link to post
Share on other sites

maybe try putting this script above the equipment level up script. since this script written when i started scripting. and has many 'overwrites'.

for stop at lv 10. i will check that first when i have free times. currently got many works to finish.

Ok Thanks for the adviice!  it works. i had to put the equipment leveler under the Subclassscript. 

Thanks for you help. looking forward to the LV 10 problem

Share this post


Link to post
Share on other sites

Its been a few days , i was wondering if anyone has found anything?

 

Also , i noticed that after level to 70. On the HUD it shows 70. But on Priest it shows 63? I dont really get it.

 

Also. When you subclass The Attacj element doesnt carry over.   Ex -  my priest is light. when it subclasses t exorist i want it to be Light/holy  or just Holy.  ANy ideas?

Share this post


Link to post
Share on other sites

sorry but i'm really busy at the moment. my store harddisk got broken. and the last backup is 3 month ago. (yeah lazy me >.<). so i got to input all those transaction and puchase back to the new installed harddisk >.<. i promise that i will rewrite this script when i finish doing that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.