taaspider

Regular
Regular
Joined
Jan 27, 2017
Messages
221
Reaction score
257
First Language
Portuguese
Primarily Uses
RMMV
TAA_EnemyReinforcements - v1.2.1
Created by taaspider

Terms of Use
Any plugins developed by taaspider are free for use for both commercial and noncommercial RPG Maker games, unless specified otherwise. Just remember to credit "taaspider".

Redistribution of parts or the whole of taaspider plugins is forbidden (which also includes reposting), unless it comes from the official website (linked within the post). You are allowed to edit and change the plugin code for your own use, but you're definitely not allowed to sell or reuse any part of the code as your own. Although not required to use my plugins, a free copy of your game would be nice!

Introduction

The plugin provides a flexible way for you to create skills or in battle cutscenes where enemies can call for backup! Use comments on troop event pages to setup reinforcement slots, and then note tags on skills or plugin commands to summon reinforcements into action!

Main Features
  • Prepare reinforcement slots that allows you to setup how large reinforcements can get. You can setup a single default set of placements, or customize it for a specific troop, or battle;
  • Create skills for enemies, so that they can cry for help and summon any enemy you want, or even multiple enemies, be they multiple copies of the same, or a selection of many;
  • Summoning skills can have success probability. That means you can setup a skill that has a chance of failing to summon one or more enemies;
  • Use Plugin Commands to change the plugin configurations midgame, setting things up for that special boss battle you designed!
  • Compatibility with TAA_EnemyLevels, so you can define a specific level or range of levels (to add some randomness) to summoned reinforcements;
  • Automatic management of summon order, to ensure that sprites will be given the proper priority (not have a back row enemy displayed over a front row one);

Screenshots



How to Use

First of, download the plugin here. There's a few parameters you use to setup default configs:
  • Enable Self State: This determines if main enemies on troop (usually those that are already there at the start of the battle) will free a reinforcement slot when defeated. That means, if another enemy can be summoned in its place or not after they're dead;
  • Play Summon Animation: Enable or disable animations on summoned reinforcements when they're called into action;
  • Summon Animation: The animation itself to be played;
  • Entrance Delay: Define a number of frames to wait before presenting the enemy at the screen after reinforcements are called. This is usefull if you want to time it just right to your summon animation ;)
  • Entrance Type: Defines how the summoned reinforcement will enter the battle:
    • Enter from Spot: Enemy start to fade in from a few pixels below its target position, as if it is comming out of the ground;
    • Enter from Left: Enemy slides from the left, from out of the screen;
    • Enter from Above: Enemy slides from above, from out of the screen;
    • Enter from Right: Enemy slides from the right, from out of the screen;
    • Enter from Below: Enemy slides from below, from out of the screen;
    • None: Enemy simply appears in its target position;
  • Entrance Duration: Defines how long reinforcements fade in will take in frames;
  • Enable Battle Logs: Enable or disable plugin specific battle logs;
  • Single Summon Message: Message displayed at the battle log when any number of a single enemy is summoned. Use %1 to substitute for the number of reinforcements summoned, and %2 for the enemy name;
  • Auto Plural: If enable, the plugin will automatically add an 's' at the end of the enemy name when more than one is successfully summoned. It has its limitations, but should work fine most of the time for games in english;
  • Multi-Summon Message: Defines a single generic message to display at the battle log when more than one enemy Ids are summoned at the same time;
  • Failed Summon Message: Defines a message to display at the battle logs when a reinforcement call fails, be it by having no reinforcement slots available or any other reason;

Note tags can be applied to troops to customize reinforcement slots. For that, include them as commentaries into the troop's first page (regardless of how many pages you have setup). You can carefully set each slot position through its x and y coordinates, either as a single tag or as a collection of coordinates inside enclosing tags.

Code:
<TAA_ER: x1,y1; x2,y2; ... xn,yn>
      or
<TAA_ER>
x1,y1
x2,y2; x3,y3
...
xn,yn
</TAA_ER>

You can load slots from enemies position on another troop:
Code:
<TAA_ER: TROOP x>
     or
<TAA_ER>
TROOP x
TROOP y
</TAA_ER>

You can enable or disable self as reinforcement individually for each troop using the following tags:

Code:
<TAA_ER: Self on>
<TAA_ER: Self off>
     or
<TAA_ER>
Self on|off
</TAA_ER>

You can also mix and match tags using both the single line and multiline tags. Just separate each command with a semicolon ( ; ):

Code:
<TAA_ER: x1,y1; TROOP n;Self off>
     or
<TAA_ER>
x1,y1
TROOP n
self on
x2,y2;TROOP n2
</TAA_ER>

Finally, you can add note tags to skills to make it call for reinforcements. Be advised though, that calling for reinforcements without any available slots will result in, well, nothing. Also, this tag only applies for enemies calling for reinforcement. You can have an actor with the same skill, but using it will still summon troop reinforcement. The plugin cannot be used to summon new allies.

To make a skill call for reinforcements, use the following note tags:

Code:
<TAA_ER: id1,n1;id2,n2; ... idn,nn>
    or
<TAA_ER>
id1,n1
id2,n2
...
idn,nn
</TAA_ER>

"id" is the enemy id you want to summon, while n is the number of enemies to summon (so you can have a skill that calls one bat, and another that calls two, for example). You can have as many enemies listed as you want, just remember that reinforcements will be summoned as long as there are slots available. For instance, if you create a skill that calls 3 bats, and the current troop has only two available slots, only two bats are summoned. Every other summon listed for the skill after that will result in nothing. Likewise, if player party kill one of the enemies clearing one slot, that means the next time the skill is used only the first enemy listed on the tag will be summoned and so forth.

Still on skill note tags, you can also add additional notes to define how likely a reinforcement call is to succeed, or a specific level / level range the summoned reinforcement is going to have (YEP_EnemyLevels or TAA_EnemyLevels is needed for this feature):

Code:
<TAA_ER: id1,n1,rX,lvY;id2,n2,lvY2:W2>
[INDENT]or[/INDENT]
<TAA_ER>
id1,n1,rX,lvY
id2,n2,lvY2:W2
...
</TAA_ER>

To add randomness to a reinforcement call, set the tag with the enemy id to be summoned, the number of times it will happen, and then add another comma followed by the letter 'r' and the probability of the summoning succeeding, in a number between 0 and 100 (the higher the number, the most likely it is to succeed). For example: <TAA_ER: 1,1,r85>

If the summon specifies more than one summon for a given enemy the probability will be applied for each individual summon. Take the example below:
Code:
<TAA_ER: 1,2,r85>

Enemy 1 will be summoned two times, and each time has 85% chance of succeeding. That means the skill can summon from zero to two enemy reinforcements.

To define levels for the summoned enemies, add the letters 'lv' followed by the specific level wanted, or a level range separated by ':'. Here's some examples:
Code:
<TAA_ER: 1,1,lv10>
<TAA_ER: 2,1,lv2:5>
<TAA_ER: 5,2,r87,lv5>
<TAA_ER: 1,2,lv8,r95>

Random and Level clauses can appear in any order, as long as the id and number of summons comes first.

Manage Self State
Enable, disable or reset self state to its original config.​

Manage Animations
Enable, disable, set an animation or reset to original config.​
Change Entrance Delay
Change or reset entrance delay frames.​
Change Entrance Duration
Change or reset entrance duration frames.​

Change Entrance Type
Change or reset entrance type.​

Add Reinforcements
Call reinforcements into battle.​

Reset All Configs
Reset all configs to their default values.​

$enrConfig.selfAsReinforcement()
Returns true if the option to turn each enemy position on the current troop available for a reinforcement (after the original enemy is killed). Returns false otherwise.

$enrConfig.enableSelfState()
Enable the use of enemy placement on the current troop as available reinforcement slots after they're defeated.

$enrConfig.disableSelfState()
Disable the use of enemy placement on the current troop as available reinforcement slots after they're defeated.

$enrConfig.resetSelfState()
Returns self state to the default config defined in the plugin parameters.

$enrConfig.isAnimationEnabled()
Returns true if animations on calling a reinforcement is enabled, or false if it's not.

$enrConfig.enableAnimation()
Turn on animation display when a reinforcement is called into the battlefield.

$enrConfig.disableAnimation()
Turn off animation display when a reinforcemente is called into the battlefield.

$enrConfig.resetAnimationEnabled()
Reset to default parameters config if animation on reinforcement call is enabled or not.

$enrConfig.summonAnimation()
Returns the animation ID configured to run when a reinforcement is called into the battlefield.

$enrConfig.setSummonAnimation(animationId)
Change the animation to use when an enemy reinforcement is called into the battlefield.

$enrConfig.resetSummonAnimation()
Restore default configured animation to play when a reinforcement is called.

$enrConfig.entranceDelay()
Returns the configured time (in frames) to wait after calling a reinforcement and it actually starting to appear on the battlefield.

$enrConfig.updateEntranceDelay(delay)
Update configured delay in frames with the provided value.

$enrConfig.resetEntranceDelay()
Restore default delay value as configured in the plugin parameters.

$enrConfig.entranceType()
Returns the current entrance type configured. See plugin help for the list of possible values.

$enrConfig.updateEntrance(type)
Update the currently configured entrance type. The provided type is case sensitive and must be spelled exactly like displayed in the plugin parameters.

$enrConfig.resetEntrance()
Reset entrance type to default value, set in the plugin parameters.

$enrConfig.entranceDuration()
Returns the number of frames it takes for the summoned enemy to appear on the screen (turning from full transparent to full opaque).

$enrConfig.updateEntranceDuration(duration)
Updates the currently configured entrance duration. The parameter 'duration' must be a number greater or equals to zero.

$enrConfig.resetEntranceDuration()
Resets entrance duration to its default value, as configured in the plugin parameters.

$enrConfig.resetAll()
Resets all configs to default.

Demo

You can also test the plugin using my sample demo project. It was built with MV, but you can open it with MZ as well (just open the game.rmmzproject file and you're good to go).

  • Version 1.2.1:
    • Fixed a bug in MZ plugin commands that could cause game crash;
    • Fixed a bug that could cause reinforcements to not issue any action in MZ's TPB mode;
  • Version 1.2.0:
    • Added MZ compatibility;
    • Added compatibility and specific features related to TAA_EnemyLevels;
    • Fixed a bug when a summon were performed with no slots configured for the troop;
  • Version 1.1.0:
    • Reinforcements now are layered according to its coordinates, preventing a back row enemy from appearing over a front row one;
    • Included some randomness on skill tags, allowing you to set a probability that a reinforcement summon can succeed;
    • Added a feature to skill note tags allowing you to specify a level, or level range for the enemy reinforcements. YEP_EnemyLevels is needed for this feature;
    • Added the option to use multiple single summon messages when more than one enemy ID is summoned, or keep using the grouped Multi-Summon Message;
  • Version 1.0.0:
    • Initial release;
 
Last edited:

imcatman

Regular
Regular
Joined
Apr 12, 2019
Messages
52
Reaction score
19
First Language
German
Primarily Uses
RMMV
Very nice plugin!
The Reinforce Enemy plugin has never existed in MZ, so it's very important to use the skill to call allies.
By the way, I succeeded in summoning an enemy with this plugin, but when I set it to TPB mode, the enemy does not take action after being summoned. Can you fix this issue?
Thank you so much in advance.
 

taaspider

Regular
Regular
Joined
Jan 27, 2017
Messages
221
Reaction score
257
First Language
Portuguese
Primarily Uses
RMMV
Very nice plugin!
The Reinforce Enemy plugin has never existed in MZ, so it's very important to use the skill to call allies.
By the way, I succeeded in summoning an enemy with this plugin, but when I set it to TPB mode, the enemy does not take action after being summoned. Can you fix this issue?
Thank you so much in advance.
Hi there!

I'll take a look at what could be causing this issue... I'll let you know as soon as it is fixed! :)
 

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
1666464237288.png
What does this mean and how do I fix it?
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,071
Reaction score
8,994
First Language
English
Primarily Uses
RMMV
What does this mean and how do I fix it?
You need to show the full error trace. When it crashes, press F8 and go to the console tab.

But any time you see "of undefined" it means exactly that - you've somehow told RPG Maker to work with something that doesn't exist.

Maybe you specified an incorrect animation ID, enemy ID, troop, something...we'll have a better idea when you show the full error.
 

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
1666474502470.png
1666474657267.png
1666474741347.png
It crashes whenever I do anything related to the plugin, but a regular battle won't crash
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,071
Reaction score
8,994
First Language
English
Primarily Uses
RMMV
It crashes whenever I do anything related to the plugin, but a regular battle won't crash
That error on that line is indicating you did not specify an action. So something about the value of variable 155 is wrong - it's not given a value (undefined), it's 0 (not a valid enemy ID) or it's another ID you no longer have a enemy in.

Are you testing this in-game? The Battle Test in the editor doesn't work properly when you start introducing plugins.

But that's what you need to troubleshoot, that variable.
 

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
That error on that line is indicating you did not specify an action. So something about the value of variable 155 is wrong - it's not given a value (undefined), it's 0 (not a valid enemy ID) or it's another ID you no longer have a enemy in.

Are you testing this in-game? The Battle Test in the editor doesn't work properly when you start introducing plugins.

But that's what you need to troubleshoot, that variable.
It is not the variable that is the problem. I tried another version where I just gave the plugin a flat value of enemy 1, (goblin since I was using a default game for testing) Yet, whenever I used the command it will crash. And yes, I was using an in game test. Most likely its a plugin bug.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,071
Reaction score
8,994
First Language
English
Primarily Uses
RMMV
It is not the variable that is the problem. I tried another version where I just gave the plugin a flat value of enemy 1, (goblin since I was using a default game for testing) Yet, whenever I used the command it will crash. And yes, I was using an in game test. Most likely its a plugin bug.
Does it happen for you in the demo project linked in the first post?
 

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
Does it happen for you in the demo project linked in the first post?
it only happens when i use the plugin command, which is not seen in that

To me it just seems like this plugin doesn't work correctly on MZ so spider guy should probably get an update out
 

taaspider

Regular
Regular
Joined
Jan 27, 2017
Messages
221
Reaction score
257
First Language
Portuguese
Primarily Uses
RMMV

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
Hello!

I'll look into it later today.
The plugin was tested both in MV and MZ, and it should be working. But it's been a long time since I worked on this one, I can't rule out anything before I take a proper look.
Thanks for responding. To be more description I think the plugin command for reinforcements doesn't work on MZ, and only the skill works
 

taaspider

Regular
Regular
Joined
Jan 27, 2017
Messages
221
Reaction score
257
First Language
Portuguese
Primarily Uses
RMMV
Thanks for responding. To be more description I think the plugin command for reinforcements doesn't work on MZ, and only the skill works
Very nice plugin!
The Reinforce Enemy plugin has never existed in MZ, so it's very important to use the skill to call allies.
By the way, I succeeded in summoning an enemy with this plugin, but when I set it to TPB mode, the enemy does not take action after being summoned. Can you fix this issue?
Thank you so much in advance.

There was indeed a bug both in this particular plugin command and that reported by @imcatman . I managed to fix both and just released version 1.2.1 on itch... please try it out and let me know how it goes! :D
 

imcatman

Regular
Regular
Joined
Apr 12, 2019
Messages
52
Reaction score
19
First Language
German
Primarily Uses
RMMV
I just tested it, now works just fine.
thank you so much for taking the time to check and fix it!
 

chrimp

Regular
Regular
Joined
Jul 29, 2020
Messages
69
Reaction score
19
First Language
English
Primarily Uses
RMMZ
There was indeed a bug both in this particular plugin command and that reported by @imcatman . I managed to fix both and just released version 1.2.1 on itch... please try it out and let me know how it goes! :D
It seems like the enemy shows up but the game freezes afterward... it might just be me though
 
Last edited:

Onox

Villager
Member
Joined
Apr 17, 2020
Messages
10
Reaction score
3
First Language
French
Primarily Uses
RMMZ
hello, first of all thank you for your work on this plugin which has been useful to me for years.
Right now I'm trying to port my game to MZ and there seems to be a problem (maybe compatibility between scripts): everything works perfectly fine, unless I try to select a command other than "attack" in combat.
Simply hovering over the command crashes the game.
Here is what the debug console says:
rmmz_managers.js:2032 TypeError: Cannot set property '_reinforcementCalls' of null
at Game_Action.setSkill (TAA_EnemyReinforcements.js:1644)
at Window_ActorCommand.<computed>.applyBattleItemWindowOTB (VisuMZ_2_BattleSystemOTB.js:1741)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> (VisuMZ_2_BattleSystemOTB.js:1741)
at Window_ActorCommand.Window_Selectable.<computed> [as select] (VisuMZ_2_ItemCraftingSys.js:1591)
at Window_ActorCommand.Window_Selectable.smoothSelect (rmmz_windows.js:929)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as cursorDown] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as processCursorMoveModernControls] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as processCursorMove] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.update (rmmz_windows.js:1115)

Sorry I can't import the screenshot...
 

taaspider

Regular
Regular
Joined
Jan 27, 2017
Messages
221
Reaction score
257
First Language
Portuguese
Primarily Uses
RMMV
It seems like the enemy shows up but the game freezes afterward... it might just be me though
Hi there!
Are there any other plugins active in your project?
Since my test project works without this issue, my first guess is that it may be a compatibility issue.

hello, first of all thank you for your work on this plugin which has been useful to me for years.
Right now I'm trying to port my game to MZ and there seems to be a problem (maybe compatibility between scripts): everything works perfectly fine, unless I try to select a command other than "attack" in combat.
Simply hovering over the command crashes the game.
Here is what the debug console says:
rmmz_managers.js:2032 TypeError: Cannot set property '_reinforcementCalls' of null
at Game_Action.setSkill (TAA_EnemyReinforcements.js:1644)
at Window_ActorCommand.<computed>.applyBattleItemWindowOTB (VisuMZ_2_BattleSystemOTB.js:1741)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> (VisuMZ_2_BattleSystemOTB.js:1741)
at Window_ActorCommand.Window_Selectable.<computed> [as select] (VisuMZ_2_ItemCraftingSys.js:1591)
at Window_ActorCommand.Window_Selectable.smoothSelect (rmmz_windows.js:929)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as cursorDown] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as processCursorMoveModernControls] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.<computed>.<computed> [as processCursorMove] (VisuMZ_0_CoreEngine.js:8641)
at Window_ActorCommand.Window_Selectable.update (rmmz_windows.js:1115)

Sorry I can't import the screenshot...
From the error trace, I think this may be due to compatibility issues with Visustella's plugins. I have an idea on how to prevent this issue on my side, but I cannot be sure if it will work, neither if the plugin will still work as intended even if the crash is prevented. Since VisuMZ_2_BattleSystemOTB is a paid plugin, I can't setup a test environment here.

Would it be possible for you to send me the plugin via a private message (I'll use it for debug purposes only)?
If it's not possible, I can try to code my idea and send you a test version, but we may take way more time with back and forth messages trying to make it work.
 

Latest Threads

Latest Posts

Latest Profile Posts

Was real busy today but I found a few minutes to start on the named cultists and how to give each of them visually distinctive morphology within the confined of the cult robes. I really dislike straight recolors so I trying real hard with the small details on these.
Here's a BlueSkies 3 Announcement Trailer up! :yhappy: Hope you all enjoy! ^^ <3

Art Twitter is nice, Im so used to that platform being....A literal maw of despair.
ezgif.com-video-to-gif.gif
with the apartment done, I've finished work on the first area and begun the tutorial. Have a sneak peak at the Biting Boroughs.

Forum statistics

Threads
134,834
Messages
1,251,045
Members
177,629
Latest member
tttttt
Top