- Joined
- Jan 28, 2013
- Messages
- 776
- Reaction score
- 487
- First Language
- English
- Primarily Uses
- RMMV
Good day.
I'm trying to make a little script snippet to force an actor to optimize their equipment when they change classes. I am using Yanfly's class change core plugin.
I found a script call that will optimize equipment on the actor it is called by ($gameActors.actor(id).optimizeEquiments()), but any attempt I've made to insert it into yanfly's plugin has failed. The most success I've seen actually had it working, but it was re-optimizing equips every time you scrolled through classes on the class change menu, instead of when actually changing classes. This caused a lot of lag as well.
I also tried modifying the Game_Actor.prototype.changeClass function from rpg_objects.js, but had the same issue, in that yanfly's class change plugin was causing it to attempt to optimize by scrolling through the menu of classes, instead of actually when changing them. Additionally, while the optimize seemed like it would happen on job change (the stat preview information on the right side of the screen updated as if it were being optimized), it actually didn't happen, but still caused massive lag afterwards.
So here's what I want:
Thanks in advance, anyone who takes a look at this.
I'm trying to make a little script snippet to force an actor to optimize their equipment when they change classes. I am using Yanfly's class change core plugin.
I found a script call that will optimize equipment on the actor it is called by ($gameActors.actor(id).optimizeEquiments()), but any attempt I've made to insert it into yanfly's plugin has failed. The most success I've seen actually had it working, but it was re-optimizing equips every time you scrolled through classes on the class change menu, instead of when actually changing classes. This caused a lot of lag as well.
I also tried modifying the Game_Actor.prototype.changeClass function from rpg_objects.js, but had the same issue, in that yanfly's class change plugin was causing it to attempt to optimize by scrolling through the menu of classes, instead of actually when changing them. Additionally, while the optimize seemed like it would happen on job change (the stat preview information on the right side of the screen updated as if it were being optimized), it actually didn't happen, but still caused massive lag afterwards.
So here's what I want:
- When you change classes using yanfly's class change core, (or optionally when doing it manually as well) the actor who just changed classes gets their equipment optimized.
- Obviously needs to be compatible with Yanfly's class change core plugin
- The stat preview window on the right side of the class change menu should update to show what the actors stats will be after the equipment optimize after changing classes (if possible).
- (Optional) Pops a window up after class change that advises that equips have been optimized
- (Super Optional) Add-on to the options menu to disable auto-optimizing equipment on class change
- Should not optimize the equips of any actor unless that actor has just changed classes. (no lag)
Thanks in advance, anyone who takes a look at this.
