[Ace] Giving Everyone EXP In the Sapphire Action System IV

● ARCHIVED · READ-ONLY
Started by Cutie Mark Keldeo 4 posts View original ↗
  1. I'm having a small issue making some modifications to the Sapphire Action System IV by Khas.

    What I am attempting to do is have all of the actors in the player's party gain EXP when an enemy is defeated, rather than just whoever is in the lead. This system allows only one actor to be on the map at a time, and while it is not intended to be used with parties, having other party members seems to have no ill effects. However, EXP is granted only to the lead character (aka the one visible on the field whom the player is controlling).

    I have located the line that grants EXP after an enemy is defeated, which goes like this. It is line 1671 on an unmodified script.

    actor = $game_party.members[0] current_level = actor.level actor.change_exp(actor.exp + @enemy.exp,false)What this does is grant EXP to the leader of the party, regardless of which actor that may be. This works without any errors, as it should.I modified it to this in an attempt to grant to everyone in the party.

    actor = $game_party.members[0] current_level = actor.level actor.change_exp(actor.exp + @enemy.exp,false) actor = $game_party.members[1] current_level = actor.level actor.change_exp(actor.exp + @enemy.exp,false) actor = $game_party.members[2] current_level = actor.level actor.change_exp(actor.exp + @enemy.exp,false)My project features only three playable characters. The script in this state grants EXP to all three of them, but crashes if they are not all present. I believe this is because the game is attempting to give EXP to a character that isn't in the party at the time. I am looking for another method that will either grant EXP to the party without being dependent on how many actors are there. Ultimately, I would like for the lead character to gain full EXP while other members get half, but this is likely more complicated to program. The game only starts with one character, and the other two are recruited as you play, so it's necessary for EXP to be grantable no matter who is present and who isn't. My scripting skills are rather lackluster, but I am beginning to understand the most basic aspects and how to configure things. Any help on this would be greatly appreciated.
  2. replace the whole method with this one...

      def kill_enemy(by_player)    @direction = 2    moveto(@x,@y)    @request_view = false    @step_anime = false    @move_type = 0    @character_name = ""    @tile_id = 0    @priority_type = 0    @opacity = 255    if by_player      $game_party.members.each do |m|        if m == $game_party.leader          l = m.level          m.change_exp(m.exp + @enemy.exp,false)          if l != m.level            $game_map.sas_hud.refresh_base            $game_map.level_up          end          $game_map.sas_hud.refresh_bars        else         m.change_exp(m.exp+@enemy.exp,false)        end      end    end    run_enemy_commands  endLet me know if you have any issues.

    Lucky I had SAS opened for a friends script :D
  3. Thank you very much!  I actually modified this ever so slightly and made it so the lead actor receives more EXP and the others (all I did was paste the old clause after the party is granted exp).  This makes it so the inactive characters receive half as much as the active one.  

    Also, if you or your friend are using SAS for a project and need help with it, feel free to give me a shout or get your friend in contact with me.   :p  I've been playing around with things, and I even devised an event-based system to give monster drops, which SAS seems to have removed.
  4. Yea, I was gonna mention that to you once you had replied. You could easily make the percentage a variable if you wanted as well - to give you more control :D

    Thanks very much - i will let him know and he wishes to contact you thats upto him :p