MV Need help with Yanfly ATB system Per Tick

Howdy all, I've been setting up the ATB system provided by Yanfly and because I have no experience with Java, I've hit a hurdle in setting up the custom Per Tick speed I had wanted. So far, this is the amount of code I've got working:

100 + user.agi + (user.luk/3)

Which is good and all, but then want the result above to be multiplied by a percentage created by dividing the user's agility against the enemies' agility. My first attempt was:

100 + user.agi + (user.luk/3) * ($gameParty.agility/$gameTroop.agility)

Which just seemed to break the ATB system and made turns happen instantly, so that's a bust. Plus, I don't know if the system will just have made the generated percentage the same for the enemies or correctly place their agility in the gameParty position and the Party members' in the gameTroop or if it runs off a completely separate system all together. I also tried:

100 + user.agi + (user.luk/3) * (user.agi/enemy.agi)

Which just crashed the game. It wasn't terribly surprising but no less frustrating. And so, I admit my defeat and come to the Forums to consult those wiser than me for answers. Thank you all for your time and have a pleasant day.
instead of enemy.agi, try target.agi... with enemy, it doesn't know what your looking for since that's not really a term it knows. you'd have to have either b.agi or target.agi, tho to be on the safe side with yanfly stuff, I'd use target.
Sadly, no luck. Both crashed the game. Here's the code, for posterity:

100 + user.agi * (user.agi / target.agi)

100 + user.agi * (user.agi / b.agi)
100 + user.agi * (user.agi / $gameTroop.agility())

I got this to work after turning off a couple of plugins I was specifically using... but it essentially just had everyone going at the same speed so I don't think that's what you'd want either. unfortunately, I'm not quite knowledgeful enough to know exactly what is you're trying to pull, as while I've used the ATB before, I never messed with the ticks.
Alright! If the fact that isn't crashing is any indication, it seems to be working! Thank you very much for the help!

To give some explanation, I'm going for a system that gives a percentile boost or disadvantage based on the Agility of the two opposing sides. The Per Tick refers to the number of points you'll receive per game tick to fill up the ATB Gauge. So, say if the Actor has 5 Agi and the enemy has 10, the formula would run like this:

100 + 5 * (5/10)

Resulting in 105 points per game tick but then cut in half by the .5 percentage to 52 or 53 points depending on if the game rounds up or down, I'm still not sure myself. A system that can be punishing or rewarding depending on how well the player prepares or weighs the odds on their equipment and tactics, derived from a similar system I'm using for battle damage calculation. Now, both the formula here and above are more for demonstrative purposes, I'm still working on balancing some stuff out for the final product.

I hope I was able to explain myself clearly enough and again, thank you so much for your help and time!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-yanfly-atb-system-per-tick.156378/