Save-Point
Issue with RTAB and battle event systems... - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Issue with RTAB and battle event systems... (/thread-1723.html)



Issue with RTAB and battle event systems... - samsonite789 - 11-07-2009

I am having a bit of a strange problem with RTAB and I'm not sure how to solve it...

So, I'm using battle event systems for certain kinds of skills, such as regeneration or doom. I've tried various scripts for those, but they don't work with RTAB. Using event systems DOES work, but there's a catch. I'll explain...

So, for Regen, I have an event system that checks each turn (Span: Turn) whether or not each character has the state [Regen] inflicted. This state is "inflicted" using the Regen skill, of course. I tried setting the condition for the event to "Don't Run" but for some reason it doesn't work. So, I set a switch (RegenUsed) to ON in a common event called when Regen is cast, and the event runs if RegenUsed is ON. It works: the character regenerates X hp every turn when they have regen.

However (and here is my problem), if the state Regen is inflicted, the command window redraws every time it's a new turn. This is the same for Doom, Auto Life, etc. The problem with the command window redrawing is that it resets the cursor to the top command which will get really annoying really fast when you're in the middle of a fast-paced battle and BOOM the cursor resets each turn.

Does anyone have any idea how I can fix this irritating problem?


Issue with RTAB and battle event systems... - DerVVulfman - 11-07-2009

The problem is that RTAB was designed to be a true ATB (active Timer Battle) system. In this, cogwheel rewrote many key sections in the Scene_Battle and Game_Battler codes. Many values were rewritten including the replacement of the @active_battler value with the 'battler' local value that is passed from one method to another. Cogwheel rewrote these values so 'each' battler had his/her own timer system and separately tracked values (damage, attack, defend, etc...), but in doing so he made many features incompatible with other scripts.

You may find many default battlesystem scripts won't work with RTAB because of his unique system.


Issue with RTAB and battle event systems... - samsonite789 - 11-07-2009

DerVVulfman Wrote:You may find many default battlesystem scripts won't work with RTAB because of his unique system.

I have found that to be true, yes :)

The thing is, I'm not using scripts for Regen, Auto Life, or Doom. They're all event systems that just check each turn to see if a certain state is inflicted on the character and then applies the effects accordingly. The problem is that each "turn" (a loose term in ATB), RTAB redraws the command window and resets the cursor to the top option, which can interfere with the game and is overall an annoying bug. I'm wondering if there is a way to modify RTAB or work around it with events so the command window doesn't redraw.


Issue with RTAB and battle event systems... - DerVVulfman - 11-07-2009

Yes... turns... is pretty outdated with RTAB in that one battler (be it actor or enemy) can take an action more times in a span of time than another. As such, there are really no actual 'turns' in my viewpoint.

There IS a way to pause, RTAB while screens come up. It is possible to accomplish in a script call in fact. I forgot how though. Something along the lines of... @help_wait = @help_time. The default system uses help_wait. RTAB uses help_time. (or visa versa). I think if you can throw in a script call as the window pops up to set both wait & time to 40, you should get a 1 second screen delay.

Code:
$scene_battle.help_wait = $scene_battle.help_time = 40

Dunno if that will work straight away. You may have to add 'help_wait' and 'help_time' to the initialize and public instant values sections of Scene_Battle. *shrugs*

I'm at work, so I don't even have RMXP with me.


Issue with RTAB and battle event systems... - Jaberwocky - 11-08-2009

I had this same problem.
It's caused by RTAB basically closing all the windows to let the event run.
I -think- it's either controlled in the anime_wait_return function, or in Scene_Battle's update method.
Probably the update method. I think anime_wait_return just controls whether or not the AT gauge can fill or not.
I dunno how to make it not do that, but I wouldn't mess with it, since in most cases having the interpreter run at the same time as the battle would make bad stuff happen (i.e. message window pops up behind inventory window).
I think I just moved my re/degen stuff into a script. I don't remember, I rewrote maybe half the RTAB system already...

Oh yeah, you should be careful with status conditions,, since the default RTAB's turn increments whenever -any- battler acts... so you can poison an enemy, then spam defend to make the poison damage tic super fast, for example.
Remedied that by giving the turn counter its own AT gauge or something like that, I don't remember. Like I said... rewrote half the system already >_>;