+ Glasses 606 Posted June 11, 2014 (edited) Author: Mr TrivelIdea from: here Name: Static EXP Version: 1.2 Version History: 1.1a - Reserve Members now properly gain XP if specified. 1.1 - Fixed overflow XP bug and a crash if you had inactive party members. Features: Every level now requires same amount of EXP. And enemies give xp based on their level. If enemy is below your character's level, it gives less xp and vice versa. Screenshots: No? Instructions: EXP box in Enemy database now denotes the Enemies level. E.g. an Enemy with EXP set to 3 will be thought as level 3 enemy. Compatibility fixes:Yanfly's Victory Aftermath: Script order: --Yanfly's_Aftermath --Static_EXP --Static_EXP_Aftermath_Fix Static_EXP_Aftermath_Fix <Link> Script: <Link: Pastebin> Blog: <Link: On blog> Edited July 11, 2014 by Mr. Trivel 1 Share this post Link to post Share on other sites
esterk 1 Posted June 11, 2014 Thank you so much for this! Now, it doesn't appear to work with Yanfly's Victory Aftermath. I'm getting the error: Script 'Victory_Aftermath' line 421: NoMethod Error occured undefined mathod 'name' for nil: NilClass Is there a way these two scripts can become compatible? Share this post Link to post Share on other sites
+ Glasses 606 Posted June 11, 2014 Quick makeshift compatibility fix: Make sure Static Exp script is below Yanfly's Aftermath script. Get rid of my display_exp method. (delete it) Replace Yanfly's self.skip_aftermath with def self.skip_aftermath $game_party.all_members.each do |actor| actor.gain_exp($game_troop.exp_total[$game_party.members.index(actor)]) end $game_party.gain_gold($game_troop.gold_total) $game_troop.make_drop_items.each do |item| $game_party.gain_item(item, 1) end close_windows SceneManager.return replay_bgm_and_bgs battle_end(0) end And actor_exp_gain with def actor_exp_gain(actor) n = @exp_total[$game_party.members.index(actor)] * actor.final_exp_rate return n.to_i end And it works. Share this post Link to post Share on other sites
esterk 1 Posted June 12, 2014 Awesome! Thank you so much! Share this post Link to post Share on other sites
ToastyCheese 46 Posted June 12, 2014 Yuh know that's actually a clever way to handle that without resorting to an enemy level tag system. Share this post Link to post Share on other sites
esterk 1 Posted June 12, 2014 Okay I'm pretty sure I followed the Aftermath fix correctly, but now I'm getting this error: Script 'Victory_Aftermath' line 251: NameError occured. undefined local variable or method 'close_windows' for Switch:Module Share this post Link to post Share on other sites
+ Glasses 606 Posted June 12, 2014 (edited) My bad. There were 2 self.skip_aftermath methods. One in Switch module another in BattleManager module. Replace the BattleManager one, not Switch one. Or to make it more friendly. Keep the yanfly script unmoded with my makeshift code. Just delete display_exp method in my script. And add this on the bottom of my script. module BattleManager #----------------------------------- # new method: self.skip_aftermath #-------------------------------------------------------------------------- def self.skip_aftermath $game_party.all_members.each do |actor| actor.gain_exp($game_troop.exp_total[$game_party.members.index(actor)]) end $game_party.gain_gold($game_troop.gold_total) $game_troop.make_drop_items.each do |item| $game_party.gain_item(item, 1) end close_windows SceneManager.return replay_bgm_and_bgs battle_end(0) end end class Window_VictoryEXP_Back < Window_Selectable #-------------------------------------------------------------------------- # actor_exp_gain #-------------------------------------------------------------------------- def actor_exp_gain(actor) n = @exp_total[$game_party.members.index(actor)] * actor.final_exp_rate return n.to_i end end Edited June 12, 2014 by Mr Trivel Share this post Link to post Share on other sites
esterk 1 Posted June 12, 2014 Works perfectly now! Thank you!!! Share this post Link to post Share on other sites
Stefan 0 Posted July 4, 2014 Seems, that level-up results aren't shown in the aftermath. Everything else works fine. Share this post Link to post Share on other sites
+ Glasses 606 Posted July 4, 2014 @Stefan Fix: module BattleManager def self.gain_exp i = 0 $game_party.all_members.each do |actor| temp_actor = Marshal.load(Marshal.dump(actor)) actor.gain_exp($game_troop.exp_total[i]) if $game_party.battle_members.include?(actor) next if actor.level == temp_actor.level SceneManager.scene.show_victory_level_up(actor, temp_actor) set_victory_text(actor, :level) wait_for_message i += 1 end end end Or complete one-file fix is updated in OP. Share this post Link to post Share on other sites
Allbireo 0 Posted July 11, 2014 Mr. Trivel, this is a great script and is exactly what I was looking for. I am having an issue though. It seems whenever I kill an enemy my reserve party members do not gain experience from the kills. I have the box in systems for reserve member exp checked as well. Any help would be appreciated. Share this post Link to post Share on other sites
+ Glasses 606 Posted July 11, 2014 @Allbireo, Updated the script. It works now. Share this post Link to post Share on other sites
Stefan 0 Posted July 16, 2014 @Stefan Fix: module BattleManager def self.gain_exp i = 0 $game_party.all_members.each do |actor| temp_actor = Marshal.load(Marshal.dump(actor)) actor.gain_exp($game_troop.exp_total[i]) if $game_party.battle_members.include?(actor) next if actor.level == temp_actor.level SceneManager.scene.show_victory_level_up(actor, temp_actor) set_victory_text(actor, :level) wait_for_message i += 1 end end end Or complete one-file fix is updated in OP. Works like a charm! Thx Share this post Link to post Share on other sites
Stefan 0 Posted February 11, 2016 I found another compatibly issue with yanfly's victory aftermath. Even through the exp-rates are shown correctly after the battle, every actor actualy gets the exp-rate of the current leader of your party. This seems to be handled in the line 507 of victory aftermath change_exp(self.exp + (exp * final_exp_rate).to_i, enabled) the method does not accept an array witch is build in the static exp-script. Stefan Share this post Link to post Share on other sites
Stefan 0 Posted February 12, 2016 (edited) It seems that i found the solution. It mostly works now, when you rewrite the overwrite method gain_exp in yanfly's victory aftermath to: def gain_exp(exp)enabled = !SceneManager.scene_is?(Scene_Battle)f = 0$game_party.all_members.each do |actor|$game_party.members[f].change_exp($game_party.members[f].exp + ($game_troop.exp_total[f]/$game_party.members.size),enabled)f += 1endend Weirdly the last member of the party always gets 1 exp less tha he/she should. Edited February 12, 2016 by Stefan Share this post Link to post Share on other sites