Repository navigation
Dynrpg battlerchange - #3723
Open
LizardKing777 wants to merge 4 commits into
Open
Dynrpg battlerchange#3723LizardKing777 wants to merge 4 commits into
LizardKing777 wants to merge 4 commits into
Conversation
This runs Aubrey the Bard's DynBattlerChange plugin out of the box. Variables are read from DynRPG.ini just like the real thing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This integrates Aubrey the Bard's "DynBattlerChange" plugin. With this, you can change a number of features in the battle mode - such as the x and y position of a monster, the monster's ID, the colour you see when flashing, the x and y positions of party members, and several other tidbits - largely by tying them to variables. With this, you can use a single enemy party to handle all your in game battles - saving you lots of database bloat and only having to edit in-battle event code once instead of for every possible enemy combination in your game. You can also start to do cool things like moving enemies and players around the screen like in Chrono Trigger or Lunar.
One additional feature of this integration is it also works with the RM2K battle mode - but only for up to eight monsters at this point. I had intended to add comment commands to tell the game what variables to use at runtime, but I'm not having any luck so I'll come back to that at a later date when I have a better idea what I'm doing.
From the plugin's Readme file:
The DynBattlerChange plugin is a plugin for the DynRPG project. If you've taken the time to download this plugin then odds are you're already familiar with DynRPG and how to use it, but just in case, you can find the main DynRPG website at http://rewking.com/dynrpg/.
The DynBattlerChange plugin allows enemies to be transformed according to the values of RPG Maker 2003 variables at the start of a battle and/or by comment command. It also allows battlers (both enemies and actors) to be repositioned according to RPG Maker 2003 variables. This allows run-time customization of enemy groups (aka troops), freeing designers from having to define enemy groups in the database for every possible combination of enemies they might want to use in the game. This is also extremely useful for projects involving ambitious amounts of battle event scripting, because a single enemy group can be used to implement a combat system, rather than having to put the same scripting into hundreds of different enemy groups (which, on top of being difficult to manage, is a surprisingly big source of database bloat).
Installation and Setup
To install DynBattlerChange in an RPG Maker 2003 project:
Configuration Options
The configuration options of DynBattlerChange are set in DynRPG.ini. Any of the configuration fields in DynRPG.ini can be "commented out" by putting a ; at the start of the line the are on, for example:
;FirstEnemyIdVar=2
would comment out the first enemy ID variable field and disable the related aspect of the DynBattlerChange plugin. Note that this may have the opposite effect of what you might be thinking when used on fields that decide "whether" something happens or not, as DynBattlerChange defaults to treating most of them as true if DynRPG.ini does not say otherwise (the exception is flash at battle start, which defaults to false).
First Enemy ID Variable
The reference number of the first RPG Maker 2003 variable allocated for holding enemy IDs. There should be 8 of these variables allocated in your RPG Maker 2003 project, each one coming directly after the previous. These variables are used to tell the DynBattlerChange plugin what type of enemy (referenced from the Enemy tab of your project's database) to transform each of the eight possible enemies in a battle into. The enemy ID variables are used whenever DynBattlerChange transforms monsters, either at battle start or in response to a @dynbattlerchange_transform_enemy comment command. It does not affect enemy transformations done as a result of normal enemy behaviors.
If one of these variables holds a 0 value, that acts as a signal to remove an enemy from combat by making it "hidden". It's possible to return an enemy removed from combat in this way using the "Show Hidden Monster" battle event command in RPG Maker 2003. If one of these variables holds a negative value, that acts as a signal that the enemy should not be transformed.
First Party Member Position Variable
The reference number of the first RPG Maker 2003 variable allocated for holding party member position data. By 'party member', we mean an actor (AKA hero) referenced by their spot within the party (1 through 4), not by their database ID. The party member position variables are used to hold values for repositioning the actors, either at the start of battle when the reposition party members at battle start configuration option is true, or in mid-battle using the @dynbattlerchange_reposition_party_member comment command.
The variables should be allocated in your RPG Maker 2003 project in X, Y pairs. For example, if your first party member position variable is 57 as in the DynBattlerChange demo project, your enemy position variables would need to look something like this:
0057: Party Mbr 1 X
0058: Party Mbr 1 Y
0059: Party Mbr 2 X
0060: Party Mbr 2 Y
0061: Party Mbr 3 X
0062: Party Mbr 3 Y
0063: Party Mbr 4 X
0064: Party Mbr 4 Y
If a position variable holds a negative value, the default location originally found in the database will be used.
First Actor Position Variable
The reference number of the first RPG Maker 2003 variable allocated for holding actor position data. By 'actor', we mean an actor (AKA hero) referenced by their database ID, not by their spot within the party. The actor position variables are used to hold values for repositioning the actors, either at the start of battle when the reposition actors at battle start configuration option is true, or in mid-battle using the @dynbattlerchange_reposition_actor comment command. It's important to note that the reposition party members at battle start configuration option takes precedence, so if that option is on, the actor position variables will be ignored for battle start repositioning, although they can still be used for mid-battle repositioning. It's expected that most party member position variables will be easier to use for most projects, but the actor position variables could be useful in cases where you want to reposition a specific actor without worrying about their spot within the party.
The variables should be allocated in your RPG Maker 2003 project in X, Y pairs. For example, if your first actor position variable is 41 as in the DynBattlerChange demo project, your enemy position variables would need to look something like this:
0041: Actor 1 X
0042: Actor 1 Y
0043: Actor 2 X
0044: Actor 2 Y
0045: Actor 3 X
0046: Actor 3 Y
0047: Actor 4 X
0048: Actor 4 Y
0049: Actor 5 X
0050: Actor 5 Y
0051: Actor 6 X
0052: Actor 6 Y
0053: Actor 7 X
0054: Actor 7 Y
0055: Actor 8 X
0056: Actor 8 Y
.
.
.
Note that for actors, the variables represent the starting positions of actors in the database, not in the positions of the current party. This means that he number of variables needed for actors depends on how many actors you want to be able to reposition.
If a position variable holds a negative value, the default location originally found in the database will be used.
First Enemy Position Variable
The reference number of the first RPG Maker 2003 variable allocated for holding enemy position data. Enemies can be repositioned at battle start, and can also be manually repositioned in mid-battle with the @dynbattlerchange_reposition_enemy comment command. The enemy position variables are used to hold values for repositioning the enemies, either at the start of battle when the reposition enemies at battle start configuration option is true, or in mid-battle using the @dynbattlerchange_reposition_enemy comment command.
The variables should be allocated in your RPG Maker 2003 project in X, Y pairs. For example, if your first enemy position variable is 10 as in the DynBattlerChange demo project, your enemy position variables would need to look something like this:
0010: Enemy 1 X
0011: Enemy 1 Y
0012: Enemy 2 X
0013: Enemy 2 Y
0014: Enemy 3 X
0015: Enemy 3 Y
0016: Enemy 4 X
0017: Enemy 4 Y
0018: Enemy 5 X
0019: Enemy 5 Y
0020: Enemy 6 X
0021: Enemy 6 Y
0022: Enemy 7 X
0023: Enemy 7 Y
0024: Enemy 8 X
0025: Enemy 8 Y
If a position variable holds a negative value, the default location originally found in the database will be used.
First Transform Flash Variable
The reference number of the first RPG Maker 2003 variable allocated for holding values which can override enemy flash data during a transformation. By default, RPG Maker 2003 causes enemies to briefly flash white when they transform. By using these variables, you can change the appearance of this flash. This does not affect enemy transformations done as a result of normal enemy behaviors. Note that it's also possible to completely suppress the flash from either battle start or comment command transformations.
There are 5 variables, which should be allocated in a row together, involved in controlling the flash. If any of these variables hold a negative value, the DynBattlerChange plugin ignores it, which effectively makes it the follow the RPG Maker 2003 default.
Transform at Battle Start
Whether all the enemies should be transformed according to the values in the enemy ID variables at the start of battle. This allows you to completely hide from the player the fact that the enemies are being changed, especially if you use the flash at battle start field to suppress the flash from the transformations. Note that this behavior will be skipped if the game is run in Test Battle mode from the M. Groups tab of the RPG Maker 2003 database editor, since there is no opportunity to set the variables before the battle begins in this case.
Flash at Battle Start
Whether any enemy transformations which take place at battle start should involve a flash, as typical in RPG Maker 2003 when an enemy transforms. By default, the DynBattlerChange plugin takes this field to be false, as you will presumably not want the player to see all the enemies flash at the start of the battle for no obvious reason. The field is available to set true if you wish though, and you can also change the coloration, intensity, and duration of the flash using the transform flash variables.
Flash on Transform
Whether an enemy transformation done by the DynBattlerChange plugin due to a @dynbattlerchange_transform_enemy comment command should involve a flash, as typical in RPG Maker 2003 when an enemy transforms. This does not affect transformations done by DynBattlerChange at battle start, and it also does not affect transformations done as a result of normal enemy behaviors. Note that you can change the coloration, intensity, and duration of the flash using the transform flash variables.
Adjust Mana at Battle Start
Whether an enemy transformation done by the DynBattlerChange plugin at battle start should adjust the enemy's mana if it is greater than it was before transforming. By default, when RPG Maker 2003 transforms an enemy, it adjusts the enemy's current health to be either the same as it was before the transformation, or equal to the new form's maximum health. For mana, however, it sets the enemy's current mana to at least the new form's maximum mana, and will even leave the enemy's current mana as it is if it is greater than the new form's maximum mana. Setting this field to true will cause the DynBattlerChange plugin to remember the enemy's previous mana and restore it to that number after transforming unless the enemy's new form has a lower maximum mana value than that number, in which case it will set the enemy's current mana to its new maximum. This does not affect transformations done by DynBattlerChange due to a @dynbattlerchange_transform_enemy comment command, and it also does not affect transformations done as a result of normal enemy behaviors.
Adjust Mana on Transform
Whether an enemy transformation done by the DynBattlerChange plugin due to a @dynbattlerchange_transform_enemy comment command should adjust the enemy's mana if it is greater than it was before transforming. By default, when RPG Maker 2003 transforms an enemy, it adjusts the enemy's current health to be either the same as it was before the transformation, or equal to the new form's maximum health. For mana, however, it sets the enemy's current mana to at least the new form's maximum mana, and will even leave the enemy's current mana as it is if it is greater than the new form's maximum mana. Setting this field to true will cause the DynBattlerChange plugin to remember the enemy's previous mana and restore it to that number after transforming unless the enemy's new form has a lower maximum mana value than that number, in which case it will set the enemy's current mana to its new maximum. This does not affect transformations done by DynBattlerChange at battle start, and it also does not affect transformations done as a result of normal enemy behaviors.
Reposition Party Members at Battle Start
Whether to reposition actors according to the party member position variables at the start of battle. Note that this behavior will be skipped if the game is run in Test Battle mode from the M. Groups tab of the RPG Maker 2003 database editor, since there is no opportunity to set the variables before the battle begins in this case.
Reposition Actors at Battle Start
Whether to reposition actors according to the actor position variables at the start of battle. Note that this behavior will be skipped if the game is run in Test Battle mode from the M. Groups tab of the RPG Maker 2003 database editor, since there is no opportunity to set the variables before the battle begins in this case. Also, this configuration option will be ignored if the reposition party members at battle start configuration option is true.
Reposition Enemies at Battle Start
Whether to reposition enemies according to the enemy position variables at the start of battle. Note that this behavior will be skipped if the game is run in Test Battle mode from the M. Groups tab of the RPG Maker 2003 database editor, since there is no opportunity to set the variables before the battle begins in this case.
Reposition at Battle Start (DEPRECATED)
Whether to reposition enemies according to the enemy position variables at the start of battle. Note that this behavior will be skipped if the game is run in Test Battle mode from the M. Groups tab of the RPG Maker 2003 database editor, since there is no opportunity to set the variables before the battle begins in this case.
This configuration option is redundant with the reposition enemies at battle start configuration option, and will be ignored if that one is set to either true or false. It is retained in order to prevent the updated DynBattlerChange plugin from breaking existing projects that use it, but it is deprecated as of v1.2.
Comment Commands
Comment commands are the primary way for RPG Maker 2003 scripting in-game to communicate with DynRPG plugins. To make a comment command in RPG Maker 2003, use the Insert Comment event command option in the scripting of an event and put the appropriate text within the comment. Often, you will want to use variable values rather than preset values as arguments. You can do this by using DynRPG's standard syntax for a variable in a comment command, which is a V followed by the number of the variable you wish to reference. For example,
@dynbattlerchange_transform_enemy V10
would use the value of the game's 10th variable as the argument of the command.
@dynbattlerchange_transform_enemy
The @dynbattlerchange_transform_enemy command causes the DynBattlerChange plugin to transform the specified enemy to the enemy type held in the enemy ID variable for that enemy. It can be used to transform enemies in mid-battle without needing for it to happen by the enemy's behavior. For example,
@dynbattlerchange_transform_enemy 3
causes enemy 3 to be transformed according to the 3rd enemy ID variable's value.
@dynbattlerchange_reposition_party_member
The @dynbattlerchange_reposition_party_member command causes the DynBattlerChange plugin to set the battle position for the actor in the specified party spot to the X and Y values held in the party member position variables for that party spot. The party spot number refers to the actor's current spot in the party, not their database reference number.
@dynbattlerchange_reposition_actor
The @dynbattlerchange_reposition_actor command causes the DynBattlerChange plugin to set the battle position for the specified actor to the X and Y values held in the actor position variables for that actor. The actor number refers to the actor's database reference number, not their current spot in the party.
In versions of DynBattlerChange previous to v1.2, @dynbattlerchange_reposition_actor command was used to change the actor's starting battle position in the database, and could not change the actor's position mid-battle. As of v1.2, it instead changes the current position of the actor, leaving the database value unchanged. Using this command outside of battle now has no effect, so the change should have no effect on existing game projects. However, if you want actors to be automatically repositioned at the start of battle by the actor position variables, you need to make sure the reposition actors at battle start configuration option is true and the reposition party members at battle start configuration option is false.
@dynbattlerchange_reposition_enemy
The @dynbattlerchange_reposition_enemy command causes the DynBattlerChange plugin to set the battle position for the specified enemy to the X and Y values held in the enemy position variables for that enemy. This can be used to change an enemy's position in mid-battle.
@dynbattlerchange_get_party_member_position
The @dynbattlerchange_get_party_member_position command causes the DynBattlerChange plugin to set the party member position variables for the specified party spot to the position of the actor in that party spot. The party spot number refers to the actor's current spot in the party, not their database reference number.
This comment command behaves differently depending on whether the game is currently in a battle. During a battle, the variables will be set to the current 'home' position of the actor, meaning the place that actor typically stands when not doing some special movement (for example, a 'Move to Target' weapon attack animation). Outside of battle, the variables will be set to the actor's starting battle position as held in the database.
@dynbattlerchange_get_actor_position
The @dynbattlerchange_get_actor_position command causes the DynBattlerChange plugin to set the actor position variables for the specified actor to the position of that actor. The actor number refers to the actor's database reference number, not their current spot in the party.
This comment command behaves differently depending on whether the game is currently in a battle. During a battle, the variables will be set to the current 'home' position of the actor, meaning the place that actor typically stands when not doing some special movement (for example, a 'Move to Target' weapon attack animation). Outside of battle, the variables will be set to the actor's starting battle position as held in the database.
@dynbattlerchange_get_enemy_position
The @dynbattlerchange_get_enemy_position command causes the DynBattlerChange plugin to set the enemy position variables for the specified enemy to the position of that enemy.
This comment command is only useful when the game is currently in a battle. Outside of battle, it has no effect.