Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Spoofus on April 14, 2011, 08:09:20 am

Title: agility based turns
Post by: Spoofus on April 14, 2011, 08:09:20 am
hey y'all been awhile

i have this request i been meaning to put up for a good while now just never had the chance to do it.

my request is this,
know how in the default RMXP battle system when it comes to the player turn all the party members take their turns at the same time.
i pretty much want that changed,instead of that happening i was wanting it to where when a party members turn to be based on agility or hell if you could implement a new and call it speed that would work too.but to pretty much sum it up i just really want agility to affect turn orders,as in the higher the agility the sooner the turn,this would effect enemies as well.

i have found a CBS that uses the agility to determine turn order but i tend to get errors trying to get it to work with how my system is now.(from this CBS i found i tried taking the agility affecting turns only parts from it and combining it to mine and i get one error after another,i have tried everything i think would work and it has just been giving on hell of a headache in return.)

now my system it pretty much the default battle system that has a heavily edited look to it,i still want the rest of the battle system to stay the way it is with the exception of the turns based on agility, but whom ever wants to help me out on this i can provide my scripts that i currently have and the agility based CBS i found that gives nothing but error for me :(
Title: Re: agility based turns
Post by: ForeverZer0 on April 15, 2011, 11:27:01 pm
Modify how the action order is sorted in the "make_action_orders" method of Scene_Battle (Part 4).
Something like this may work:

class Scene_Battle
  alias agility_turn_order make_action_orders
  def make_action_orders
    agility_turn_order
    @action_battlers.sort! {|a, b| a.agi - b.agi }
  end
end
Title: Re: agility based turns
Post by: winkio on April 16, 2011, 01:28:23 am
do you still want all enemies to go then all allies to go?  Or is it purely based on the speed stat, so it might alternate?