Jump to content
Sign in to follow this  
TheCaliMack

MOG ATB: Help to make ATB AGI-Based

Recommended Posts

So I may need some help with MOG's ATB script.

The ATB_MAX value is a fixed value you set up in the module. There's a problem with that, however. At smaller levels, it takes quite a while to fill up each unit's gauge until it's their turn. But when the party is high-leveled, almost everyone gets their turn to fast and it becomes a war against the speed of light.

Is there a way to balance this out? Maybe make it based on the all enemy's and allies' average initial AGI? Any input would be great, guys. If you can whip up a patch, I will kiss the floor where your feet stand.

 

I could probably record a demo to show what I mean, but you can check out MOG's website and see it for yourself.

Share this post


Link to post
Share on other sites

THEORY AND DEVELOPMENT ( ͡° ͜ʖ ͡°)

As you have noticed, ATB_MAX is a fixed number of required ATB Points to get the turn.

 

Now, around line 789 (+/- few lines ^^) (or press CTRL + F and type "atb speed" then search) you should find this:

  #--------------------------------------------------------------------------
  # ● Atb Speed
  #--------------------------------------------------------------------------          
   def atb_speed
       return self.agi # < THIS ONE
   end

There you have the formula for the filling speed of the ATB gauge. This number is added each frame during charging ATB. (multiply this by 60 (in your head ~ don't do that in the script ^^) to have 'per second' rate (since you have 60 frames per second)) By default it just equals user's AGI.

 

 

EXAMPLE BRING IT ON!

 

Now let's put some numbers and see what happens!

 

SETTING EXAMPLE VALUES:

ATB_MAX is set to 50000

 

the code is edited to this:

  #--------------------------------------------------------------------------
  # ● Atb Speed
  #--------------------------------------------------------------------------          
   def atb_speed
       return (100 + self.agi)
   end

And let's assume, that ERIC has 20 AGI and GRYMEZULDA has 100 AGI

 

So, both actors (and enemies of course) need 50000 ATB Points in order to be able to move.

 

CALCULATIONS:

ERIC is getting 100 + AGI = 120 ATB Points per frame, which gives 120 * 60 = 7200 ATB Points per second.

 

GRYMEZULDA is getting 100 + AGI = 200 ATB Points per frame, which gives 200 * 60 12000 ATB Points per second.

 

RESULT:

ERIC will be charging his ATB in 50000 / 7200 = ~6.9 seconds

GRYMEZULDA will be charging her ATB in 50000 / 12000 = ~4.2 seconds

 

 

That way, you can set the proper formula to reduce the 'speed variety' when AGI of characters are different.

By default one AGI makes a lot of difference, but if you'd put for example 1000 + agi and set the ATB_MAX to a high number, then 1 AGI wouldn't change much, so you can try few things until you get wanted result.

 

Is this enough or you want something else? =3

Hope that helps! =3

Share this post


Link to post
Share on other sites

A math problem! ^^ Maybe this formula will work?

(self.agi/($game_troop.agi+$game_party.agi))*100

 

$game_troop.agi should put out the avarage agi of the troop

 

$game_party.agi should put out the avarage agi of the party

 

Ex.

self.agi = 50

$game_troop.agi = 45

$game_party.agi = 60

 

(50/105)*100 = 48

 

48 atb points per second

 

Then it will be up to you how many atb points it takes to make a turn^^

 

Note: haven't tested it out, so might require some fiddling :P

Share this post


Link to post
Share on other sites

9RWO0dm.png This thread is closed, due to being solved. If for some reason anybody would like to re-open this thread, just send me a PM or report the thread. (=

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted