DYNBATTLECHOICES

A DynRPG plugin which records data about battle actions




The DynBattleChoices plugin records data about the choices made by battlers into RPG Maker 2003 variables. The data recorded includes the type of action taken (basic attack, skill, defend, item, etc.), the ID of the skill or item used if any, and the ID, party position, and side (actors or enemies) of both the battler taking the action and the target if any. This allows developers to add extra effects to battlers' actions through scripting, or even implement entirely scripted battle effects which use skills simply to determine the player's and enemies' choices.

Change Log

v1.3 (2/2/2019):
  • Fixed a bug that would cause the game to crash if a battler does one action which targets a party position greater than the number of battlers on the non-targeted side, then does another action which targets all of that side (i.e., an actor attacks enemy 5, then does a heal-all skill on their own party).


v1.2 (1/7/2017):
  • Created a workaround to avoid a DynRPG bug which caused problems when a battler targets itself with a skill that uses more than half of its remaining MP.


v1.1 (11/15/2016):
  • Fixed a bug which caused the "Current battler is enemy" switch to work incorrectly.


v1.0 (8/11/2016):
  • First public release.

Details

  • 859.5 KB
  • 162
  • 01/21/2024 06:21 PM

Actions

Posts

Pages: 1
November 15, 2016: uploaded a version with the following changes:

  • Fixed a bug which caused the "Current battler is enemy" switch to work incorrectly.
A nice plugin to enhance battles with custom skills!
Thanks AubreyTheBard! :)
January 7, 2017: uploaded a version with the following changes:

  • Created a workaround to avoid a DynRPG bug which caused problems when a battler targets itself with a skill that uses more than half of its remaining MP.
Amazing plugin Aubrey!
I wondered if it was possible to extend its potential to the menu.
Above all the part concerning the Equip.
I would like to be able to equip or unequip some elements, (shield, armor, helmet, accessory) according to the weapon or one of the elements mentioned above, currently equipped.(As in FF7 with slots)
Without having to resort to external custom menus, in which for the changes to be effective, they must be performed outside the main rpgmaker menu.
Hmmm. Theoretically it might be possible to make a plugin that keeps variables updated according to what equipment each actor has, and even trigger a common event when the equipment changes. It would have to be checking every frame, though, because there's no callback in DynRPG for when something happens in a menu. It probably wouldn't noticeably affect performance, but stuff that checks every frame for an event which rarely happens always feels icky to me. X) Also, I'm not sure what would happen if you have a plugin forcing a common event call while the player is in the menu. Even if it calls the event without any problems, the menu may not update according to what changes are made in the event, so you could, for example, have the system removing equipment but the menu showing it as still equipped. It's not a project I'd want to attempt myself.
Thank you for answering, I figured it was complicated.
I would have a second request, it would be possible to get the statistics of the monsters in battle by comment? (Current Hp, Current Mp, Hp Max, Mp Max, Atk, Def, Agi, Int)
eg:

@GetMonsterAtk IdMonster(from 1 to 8), IdVar(to save the value)

Thanks in advance.
Yes, those are all already accessible through the Variable Operations command in a battle events page. I guess you probably want the plugin so that it can be done in a common event, though. It would be a relatively straightforward plugin to make, just a matter of pulling data that's not normally accessible and stuffing it into RM2K3 variables...ideally there should be a plugin that gives access to all of that sort of data, but making that would be a ton of slog-work. X) I might consider starting up such a plugin, but I have too much going on right now to begin working on it immediately.
it's feasible then! take the time you need, I'm not in a hurry. ^^
Hey Aubrey, just a quick question about this plugin. I know it's possible to make skills that do nothing so you can essentially control their damage output yourself with events, but is this possible to do with basic attacks? (Like using the basic Attack command)
You mean make it so that a basic attack doesn't deal damage and doesn't create a damage number popup? I don't believe so, no. The solution I've found for my own project is to make "Fight" yet another skill, and entirely remove the default Fight battle command. Of course, that means you need to handle the animations for basic attacks with scripting, and you don't have the option of using the actor-based weapon animations. It's doable, but it involves hacky tricks involving conditions which I don't have time to describe right now. X)
author=AubreyTheBard
You mean make it so that a basic attack doesn't deal damage and doesn't create a damage number popup? I don't believe so, no. The solution I've found for my own project is to make "Fight" yet another skill, and entirely remove the default Fight battle command. Of course, that means you need to handle the animations for basic attacks with scripting, and you don't have the option of using the actor-based weapon animations. It's doable, but it involves hacky tricks involving conditions which I don't have time to describe right now. X)


It's the method described in the readme right? Where you set a condition that does nothing?
That's part of it, but really I was referring to having a "doing a technique" status condition which I slap onto an actor. This condition causes all actors to become fully invisible while it's on them. Then I show a battle animation on the target enemy which includes the actor swinging a weapon or whatever, and immediately after it's done (which involves another hacky trick of using a "Wait 0-tenths of a second" command instead of the battle animation command's built-in wait-for-animation-to-complete option) I remove the status condition from the actor. The effect from the player's perspective is that the actor blinks over to the enemy and strikes them, then blinks back. It doesn't look quite as nice as RM2K3's built-in weapon attack animation system, which can show the actor running over to the enemy and back, but it's sufficient for my purposes.

The big problem with this sort of method is that you have to keep track of which animation you want to show and call it in script. Before I created DynParams, my project's combat code had huuuuuuge long pages that listed conditional checks for every possible battle animation that might be needed in a given situation. Now it's far more manageable because DynParams can just overwrite the battle animation number in a single battle animation command. You still need code to decide what that battle animation number is, though.
yeesh, that is hacky. I have a quickpatch that changes the damage formula but I use I could use variables in addition to statistics. Oh well.
How does the @dynbattlechoices_next_action work? I currently have an event page set up to trigger 1x turns elapsed, with the comment command in it, so that I can keep track of the last action, skill, etc taken, but the command doesn't change any of the specified variables I set. I've read the source code and from what I understand the command should write to the variables I specified in the dynrpg settings, but they always remain unchanged.

Edit: Turns out test battling is buggy. I tried a battle in game and it worked, but I noticed it affects the ATB_Overhaul plugin. The battler's atb bar speed gets reset to the default speed.
author=McBick
How does the @dynbattlechoices_next_action work? I currently have an event page set up to trigger 1x turns elapsed, with the comment command in it, so that I can keep track of the last action, skill, etc taken, but the command doesn't change any of the specified variables I set. I've read the source code and from what I understand the command should write to the variables I specified in the dynrpg settings, but they always remain unchanged.

Edit: Turns out test battling is buggy. I tried a battle in game and it worked, but I noticed it affects the ATB_Overhaul plugin. The battler's atb bar speed gets reset to the default speed.


It's been a while since I've tried using this and remember having the same problem with variables never being written.
I got the command to work, but it takes 2 turns to actually write to the variables. The 32 hero variables work no problem, albeit a turn behind. I had to stop using it because it seemingly randomly changes the battlers ATB value and the variables don't update till the next battler's turn before they go.

I ended up modding the DynDataAccess plugin to do what I needed. If I didn't use a turn based(No ATB) system I could have probably used this plugin instead.
Pages: 1