DoubleX

DoubleX RMVXA Unison Addon to YSA Battle System: Classical ATB

12 posts in this topic

Note

This addon doesn't work if the battle system isn't catb

Using DoubleX RMVXA Tag Addon to Yami Engine Symphony - Battle Symphony as well may improve the compatibility with Yami Engine Symphony - Battle Symphony:

http://www.rpgmakervxace.net/topic/22409-doublex-rmvxa-tag-addon-to-yami-engine-symphony-battle-symphony/

 

Prerequisites

DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB

http://www.rpgmakervxace.net/topic/21110-doublex-rmvxa-bug-fixes-to-ysa-battle-system-classical-atb/

YSA Battle System: Classical ATB(Created by Yami)

http://www.rpgmakervxace.net/topic/865-ysa-battle-system-classical-atb/page-3?hl=+active%20+time%20+battle

 

Script name

DoubleX RMVXA Unison Addon to YSA Battle System: Classical ATB

 

Author

DoubleX:

- This script

Yami:

- YSA Battle System: Classical ATB

 

Terms of use

Same as that of YSA Battle System: Classical ATB except that you must also give Yami credit(you should do this anyway) if you give DoubleX or his alias credit

 

Introduction

Adds unison skills and items to YSA Battle System: Classical ATB

 

 

#------------------------------------------------------------------------------|
#  * Notetag <custom catb unison item: x> for skills and items:                |
#    x is the list of id of actors needed for the skill or item. For instance: |
#    - <custom catb unison item: 1> means actor with id 1 is required to use it|
#    - <custom catb unison item: 4, 2> means actors with id 4 and 2 are needed |
#      to use it                                                               |
#    All actors in list x needs to have full atb bar, able to use it and pay   |
#    its cost. They'll all charge it and pay the cost including cooldown after |
#    using it. Only actors in list x can select it.                            |
#------------------------------------------------------------------------------|
#  * Notetag <custom catb unison rule: x> for skills and items:                |
#    x is the rule of setting parameters used in the charge and cooldown rate  |
#    and damage formula of the skill or item. Notetag setting overrides the    |
#    universal UNISON_PARAM_RULE. This notetag doesn't work if                 |
#    <custom catb unison item: x> is absent or x is nil.                       |
#------------------------------------------------------------------------------|
#  * Notetag <custom catb unison param: x> for skills and items:               |
#    x is the list of id of actors needed for the skill or item and stat is    |
#    parameters used in its damage formula. For instance:                      |
#    - <custom catb unison atk: 1> means atk in its damage formula uses atk of |
#      actor with id 1                                                         |
#    - <custom catb unison agi: 4, 2> means agi in its damage formula uses agi |
#      of actors with id 4 and 2 under unison rule specified in                |
#      <custom catb unison rule: x> notetag                                    |
#    Charge and cooldown rate won't be altered by this notetag                 |
#    param can be hp, mp, tp, level, mhp, mmp, atk, def, mat, mdf, agi or luk. |
#------------------------------------------------------------------------------|

#==============================================================================|
#  ** You only need to edit this part as it's about what this script does      |
#------------------------------------------------------------------------------|

module DoubleX_RMVXA
  module YSA_CATB_Unison_Addon

#------------------------------------------------------------------------------|
#  * SHOW_UNISON_ACTOR, default = YEA::BATTLE::MSG_CURRENT_ACTION              |
#    The battlelog will show all actors involved in the unison skill or item   |
#    instead of only the one invoking it if SHOW_UNISON_ACTOR is true.         |
#------------------------------------------------------------------------------|
  SHOW_UNISON_ACTOR = YEA::BATTLE::MSG_CURRENT_ACTION

#------------------------------------------------------------------------------|
#  * UNISON_PARAM_RULE, default = 2                                            |
#    AGI in the charge and cooldown rate and each parameter in the damage      |
#    formula of the unison skill or item used will be altered by one of the    |
#    rules below if it's no working <custom catb unison item: x> notetag:      |
#    0 - No changes will take place                                            |
#    1 - Its minimum among all actors involved in the unison skill or item used|
#        will be used in its charge and cooldown rate and damage formulae      |
#    2 - Its average among all actors involved in the unison skill or item used|
#        will be used in its charge and cooldown rate and damage formulae      |
#    3 - Its maximum among all actors involved in the unison skill or item used|
#        will be used in its charge and cooldown rate and damage formulae      |
#------------------------------------------------------------------------------|
  UNISON_PARAM_RULE = 2

  end # YSA_CATB_Unison_Addon
end # DoubleX_RMVXA

#==============================================================================|

 

 

 

Video

http://www.youtube.com/watch?v=xlFEF0yIosc&feature=youtu.be

 

Features

Use of notetags(needs knowledge of notetag usage) to set specific skills or items needing specific actors and using specific parameter rules in their charge and cooldown rate and damage formulae in notetags in these skills or items' notebox

 

Instructions

Open the script editor and put this script into an open slot between the script DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB and Main. Save to take effect.

 

Compatibility

Same as that of YSA Battle System: Classical ATB

 

FAQ

None

 

Changelog

v1.02f(GMT 1400 1-4-2016):

- Fixed not confirming skills/items not for opponents only or allies only

v1.02e(GMT 1200 27-2-2015):

- Fixed interrupted unison skill/item upon confirming targets bug

- Fixed unison skill/item cooldown bug

v1.02d(GMT 1200 26-2-2015):

- Fixed unison guard not working bug

v1.02c(GMT 1200 25-2-2015):

- Compatible with

  DoubleX RMVXA CATB Charge Addon to YSA Battle System: Classical ATB

- Increased the efficiency of this script

v1.02b(GMT 0000 1-7-2014):

- Compatible with DoubleX RMVXA Action Addon to YSA Battle System: Classical ATB

- Fixed unison item not invoking common event bug

- Fixed nil BattleManager.actor while picking target bug

v1.02a(GMT 0900 7-2-2014):

- Added <custom catb unison param: x> notetag

v1.01a(GMT 1500 26-1-2014):

- Compatible with Actor Personal Hotkeys and fixed charge and nil item bug

v1.00a(GMT 0000 23-1-2014):

- 1st version of this script finished

 

(DoubleX)YSA CATB Unison Addon v1.02f.txt

Edited by DoubleX

Share this post


Link to post
Share on other sites

Hey, DoubleX,

I am using Yami's classic ATB system in my game. Your unison skill scripts give a nice flavor to the battle system. I thought I would give it a try.

It generally works great. Except I kept getting this error that crashes the game. I wonder if you can have a look at it for me?

 

It's a NoMethodError on line611. Specifically, it is: ( if BattleManager.actor.input.item.catb_unison_item)

 

The odd thing is that it happens when I did NOT use unison skills. My gut tells me that it was because the battle was fast. The script somehow recognizes multiple attacks as "unison", while they were not tagged for unison skills. Hope this helps. But don't take my word for it.

 

Thanks ahead. Excellent job, by the way.

Share this post


Link to post
Share on other sites

Hey, DoubleX,

I am using Yami's classic ATB system in my game. Your unison skill scripts give a nice flavor to the battle system. I thought I would give it a try.

It generally works great. Except I kept getting this error that crashes the game. I wonder if you can have a look at it for me?

 

It's a NoMethodError on line611. Specifically, it is: ( if BattleManager.actor.input.item.catb_unison_item)

 

The odd thing is that it happens when I did NOT use unison skills. My gut tells me that it was because the battle was fast. The script somehow recognizes multiple attacks as "unison", while they were not tagged for unison skills. Hope this helps. But don't take my word for it.

 

Thanks ahead. Excellent job, by the way.

May you please quote the whole error log and all other custom scripts you used if any?

 

I haven't investigated thoroughly, but if there's no other custom scripts, my guess is that the cause is that the actor doesn't exist or is dead while he/she/it's trying to target enemies. If so, Changing line611 to

if BattleManager.actor && BattleManager.actor.input.item.catb_unison_item

may stop your crash.

Share this post


Link to post
Share on other sites

Thanks for your response, DoubleX. Appreciate it.

 

I am sure the actors were still alive. It was more likely the targets were not. But it's hard to tell if the target was dead or not, since it was a crash error.  Imagine multuple actors hitting the same target.  When actions took place really quickly, I am guessing the script "thought" I was inputting a unison skill, while these attacks were not tagged as unison skills. Is that even possible? Apologize if I'm talking nonsense. I can't script. I have no ideas.

 

I'll test out the new line and see if it works the next few days. I hope it'll solve the problem. I have SO many scripts working at the same time. I don't even know where to start trouble-shooting with.

 

I'm just leaving this message so you know I got your message. I'll tell you what happens whether it works or not. I'm sure you would like to know, too. Thanks. I'll be back.

Edited by Samji

Share this post


Link to post
Share on other sites

Updates

v1.02b(GMT 0000 1-7-2014):

- Compatible with DoubleX RMVXA Action Addon to YSA Battle System: Classical ATB

- Fixed unison item not invoking common event bug

- Fixed nil BattleManager.actor while picking target bug

Share this post


Link to post
Share on other sites

Me again, doubleX, reporting my testing results.

After your suggestion changing line611 (above), it worked perfectly. Your instinct was spot on.

Then there was your new update, which didn't seem to agree with my other millions of scripts. So I reverted back to the previous version, with line 611 altered. I might use it in new games, but for at least this one, the old one works. The only problem I still get occasionally was in fact from YF's Ace battle engine, line 2285 (Window Help). It kept telling me the term "name" for "battler_name" was not defined. But it does not seem to have come from either Yami's CATB or your Unison scripts. It regulates the name of enemy selected during battles on top of the screen, which I don't think your script overwrites anything about it.

So, that's about it. I'm done! Game is done! Yay! It's starting the b-testing process. Thank you very much. Look for your name in the credit screen.

Share this post


Link to post
Share on other sites

Me again, doubleX, reporting my testing results.

After your suggestion changing line611 (above), it worked perfectly. Your instinct was spot on.

Then there was your new update, which didn't seem to agree with my other millions of scripts. So I reverted back to the previous version, with line 611 altered. I might use it in new games, but for at least this one, the old one works. The only problem I still get occasionally was in fact from YF's Ace battle engine, line 2285 (Window Help). It kept telling me the term "name" for "battler_name" was not defined. But it does not seem to have come from either Yami's CATB or your Unison scripts. It regulates the name of enemy selected during battles on top of the screen, which I don't think your script overwrites anything about it.

So, that's about it. I'm done! Game is done! Yay! It's starting the b-testing process. Thank you very much. Look for your name in the credit screen.

I'm interested in which custom scripts have compatibility issues with the v1.02b update of my script :)

For that error in YF's Ace Battle Engine, it should have nothing to do with any YSA CATB script nor my fixes nor addons to them, like what you've said. It seems that you've asked this in Yanfly's Channel before and I suspect it's a compatibility issue with other custom scripts. Technically speaking:

 

 

This error occurs as the battler is nil when the method battler_name tries to access the battler's name. As you said there that it occurs at the end of a battle, all battlers are cleared and thus become nil at that time. If there's any custom script that show, activate or refresh or do some other things with the help window(@help_window under class Scene_Battle) at that time, your error can occur.

 

 

Edited by DoubleX

Share this post


Link to post
Share on other sites

Right again. And I actually understand what you are saying! I am definitely improving.

 

I think I've looked and can't recall any scripts other than YF's ever touched the "Window_help" section. Plenty scripts did "update" after battles, though, including scene_base and Scene_battle, which I know we absolutely can not touch (well, I am afraid to touch, anyway). It looks like there is actually an "update battler_name" coming up right after this little "battler_name" section. But I don't think YF would have missed it when it is within the same script. So I think I should look for other scripts that overwrite the window _help part.

 

Anyway, I'll look again in details, just in case I've missed it. This is the one and only problem left in the game. It bugs me that I can't make it all "healthy".

 

Come to think of it, is there a way to add a line to tell it to just sort of "forget it" with an "if .... = nil" condition to bypass it, like the little magic you did with your own script above? It's not supposed to show anything anyway with no battlers left. Apologize if I'm going astray. It seems like battle engines are your expertise.

Share this post


Link to post
Share on other sites

Right again. And I actually understand what you are saying! I am definitely improving.

 

I think I've looked and can't recall any scripts other than YF's ever touched the "Window_help" section. Plenty scripts did "update" after battles, though, including scene_base and Scene_battle, which I know we absolutely can not touch (well, I am afraid to touch, anyway). It looks like there is actually an "update battler_name" coming up right after this little "battler_name" section. But I don't think YF would have missed it when it is within the same script. So I think I should look for other scripts that overwrite the window _help part.

 

Anyway, I'll look again in details, just in case I've missed it. This is the one and only problem left in the game. It bugs me that I can't make it all "healthy".

 

Come to think of it, is there a way to add a line to tell it to just sort of "forget it" with an "if .... = nil" condition to bypass it, like the little magic you did with your own script above? It's not supposed to show anything anyway with no battlers left. Apologize if I'm going astray. It seems like battle engines are your expertise.

A precise solution for this usually requires at least some testing by experienced scripters, but you can first add 

return "" if !battler

to the method battler_name, i.e.:

def battler_name(battler)
  return "" if !battler
  text = battler.name.clone
  return text
end

These kind of fixes are generally the quickest but also most lazy ones(as they didn't address any root cause at all) and it may produce some other problems, that's why at least some testing is almost a must :)

Edited by DoubleX

Share this post


Link to post
Share on other sites

Well, the quick and dirty fix worked. Should have asked you before I stupidly tried to fix it for months.

 

I see that you have updated the unison skill add on yet again. So I think I would test your new version for you. As I recall, the problem I had was scene_battle line 404. Def the_enemy_OK was .... well... not OK after I switch on the updated version previously.

Now I think of it. It could have been a coincidence (although I am not a believer of coincidences). To be fair, I am going to test it out again, since you worked hard on it, and are very good at communicating with users. I'll report back later, after another maybe 10-20 hours of testing.

 

PS. Yep! It happened again. Scene_battle, Line 404. Undefined method "index" for Nil/NilClass. It occured at the end of the battles.

I bet it's the same problem. It can not find the enemy after they are dead. I see that this add on script has an alias on the same section (line 591). Does this have something to do with it? Or is it the YF ace battle engine?

And why doesn't it happen to the alias def_on_actor_ok part? (Oh, right. My actors didn't die. That's why.)

 

PS. OK. Here's what's odd. I also have CATB bug fix (between Yami's CATB and your unison skills), which is supposed to fix exactly this problem. It looks like it's not working. Let me investigate further.

Edited by Samji

Share this post


Link to post
Share on other sites

Updates

v1.02e(GMT 1200 27-2-2015):

- Fixed interrupted unison skill/item upon confirming targets bug

- Fixed unison skill/item cooldown bug

v1.02d(GMT 1200 26-2-2015):

- Fixed unison guard not working bug

v1.02c(GMT 1200 25-2-2015):

- Compatible with

  DoubleX RMVXA CATB Charge Addon to YSA Battle System: Classical ATB

- Increased the efficiency of this script

 

Well, the quick and dirty fix worked. Should have asked you before I stupidly tried to fix it for months.

 

I see that you have updated the unison skill add on yet again. So I think I would test your new version for you. As I recall, the problem I had was scene_battle line 404. Def the_enemy_OK was .... well... not OK after I switch on the updated version previously.

Now I think of it. It could have been a coincidence (although I am not a believer of coincidences). To be fair, I am going to test it out again, since you worked hard on it, and are very good at communicating with users. I'll report back later, after another maybe 10-20 hours of testing.

 

PS. Yep! It happened again. Scene_battle, Line 404. Undefined method "index" for Nil/NilClass. It occured at the end of the battles.

I bet it's the same problem. It can not find the enemy after they are dead. I see that this add on script has an alias on the same section (line 591). Does this have something to do with it? Or is it the YF ace battle engine?

And why doesn't it happen to the alias def_on_actor_ok part? (Oh, right. My actors didn't die. That's why.)

 

PS. OK. Here's what's odd. I also have CATB bug fix (between Yami's CATB and your unison skills), which is supposed to fix exactly this problem. It looks like it's not working. Let me investigate further.

Almost forgot about this lol

It should have already been fixed by the v1.04c+ bug fix :)

Edited by DoubleX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.