Enemy Reinforcements

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English




Do you want to add new enemies to battle, during the battle? This plugin provides you with a variety of commands that allow you to create more dynamic battles through enemy reinforcements.

You can create enemy skills that will essentially summon new enemies to battle. Enemies can be added as a single enemy, or entire troops of enemies.

Do you want to make sure a particular reinforcement does not already exist? With this plugin, methods are provided to allow you to check whether a certain enemy from a certain troop exists at a certain position.

If you want reinforcements to automatically disappear after a certain amount of time has passed, you can easily do so by making a single command to remove all enemy reinforcements from another troop!
 
More information and downloads are available at HimeWorks
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
And x1000 like for alive condition from specific enemies in the troop.

This is a must have plugin for any game.
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
350
Reaction score
163
First Language
English
Primarily Uses
RMMV
Does it deal with positioning like how modern algebra's version does for Ace?

Spoiler




#===============================================================================## Enemy Summon Skill (1.0)# 30/1/12# By modern algebra and (ported to VXA) Pacman# This script allows you to make skills for enemies where they can summon or# call additional enemies to the battlefield. This is NOT a summon skill that# can be used by actors - it can ONLY be used by enemies.# You can set up some basic configuration at line 44. Please check the comments# to see what each option does.# To create a summoning skill (which can only be used by enemies), simply put# the following code in the skill's notebox:## \SUMMON_ENEMY[id, x, y, n]## id : the ID of the enemy it can summon.# x : the additional pixels along the axis the summoned creature is from# its summoner. If omitted, it defaults to the value at line 64.# y : the additional pixels along the axis the summoned creature is from# its summoner. If omitted, it defaults to the value at line 67.# n : of the potential candidates for summoning, how likely this one# will be chosen over the others. If omitted, this defaults to 1.## As you can probably tell, you can place a number of these codes in the# same notebox and thus you can make the same skill potentially summon# different enemies, and you can control that through the chance.## EXAMPLES:## A skill with its notebox set up like this:# \summon_enemy[1, 35, 45, 3]# \summon_enemy[2, 25, 35, 1]## Would, when it succeeds (which is governed directly by the hit ratio of the# skill) summon the enemy with ID 1 (Default: Slime) 75% of the time and the# enemy with ID 2 (Default: Bat) 25% of the time, and the position, if it is# a slime would be 35 pixels to the right of the summoner and 45 pixels down,# or if it is the bat, then 25 pixels to the right of the summoner and 35# pixels down. The chances are 75-25 because 3 + 1 = 4, which means that 3/4# times the slime will be summoned and 1/4 times the bat will be summoned.##=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です==## CONFIGURATION#module MA_ESS # Don't touch this. SUMMON_FAILURE = "%s failed to summon ally!" # Message shown when skill fails. MAX_TROOP_SIZE = 8 # Maximum number of enemies in a troop (caps summons) DEFAULT_X_PLUS = 35 # The default x offset for a summoned enemy from its # summoner. If you manually set this in the note box, # this value will not be used. DEFAULT_Y_PLUS = 25 # The default y offset for a summoned enemy from its # summoner. If you manually set this in the note box, # this value will not be used.end # Don't touch this either.## END CONFIGURATION##=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です== #==============================================================================# ** RPG::Skill#------------------------------------------------------------------------------#  Data class for skills. Subclass of RPG::UsableItem. Some Japanese twaddle.#============================================================================== class RPG::Skill < RPG::UsableItem #-------------------------------------------------------------------------- # * 味方のスキルを呼んでいるのか? #-------------------------------------------------------------------------- def ma_call_ally? self.note[/\\SUMMON[_ ]?ENEMY\[\d+.*?\]/i] != nil end #-------------------------------------------------------------------------- # * 同盟国統計情報を呼び出す #-------------------------------------------------------------------------- def ma_call_ally miss = rand(100) return nil if self.success_rate < miss possibilities = [] note = self.note.dup note.gsub!(/\\SUMMON[_ ]?ENEMY\[(\d+)[,;]?\s*(-?\d*)[,;]?\s*(-?\d*)[,;]?\s*(\d*)\]/i) { |match| i = $1.to_i x = $2.empty? ? MA_ESS::DEFAULT_X_PLUS : $2.to_i y = $3.empty? ? MA_ESS::DEFAULT_Y_PLUS : $3.to_i n = $4.empty? ? 1 : $4.to_i (n).times do possibilities.push([i, x, y]) end "" } return *possibilities[rand(possibilities.size)] endend #==============================================================================# ** Game_Enemy#------------------------------------------------------------------------------#  見て、いずれにしてもこれを読んでするつもりはない、ので、私は基本的に私が好きなこの発言を行うことができます。#============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :ma_summon_count #-------------------------------------------------------------------------- # * オブジェクトの初期化 #-------------------------------------------------------------------------- alias maess_initialize initialize def initialize(*args) @ma_summon_count = 0 maess_initialize(*args) endend #==============================================================================# ** Game_BattlerBase#------------------------------------------------------------------------------#  私は本当にエンターブレインが同時に、英語版と日本語版をリリースしたところは思った。#============================================================================== class Game_BattlerBase #-------------------------------------------------------------------------- # エイリアスのリスト #-------------------------------------------------------------------------- alias maess_sklconditionsmet? skill_conditions_met? #-------------------------------------------------------------------------- # * スキルの条件が満たさ? #-------------------------------------------------------------------------- def skill_conditions_met?(skill, *args) return false if skill.ma_call_ally? && (self.is_a?(Game_Actor) || $game_troop.members.size >= MA_ESS::MAX_TROOP_SIZE) maess_sklconditionsmet?(skill, *args) endend #==============================================================================# ** Game_Troop#------------------------------------------------------------------------------#  戦闘シーンのクラスはすべての場所を超えているため、このスクリプトでは、予想よりもはるかに困難だった。#============================================================================== class Game_Troop < Game_Unit #-------------------------------------------------------------------------- # * コールの味方のスキル #-------------------------------------------------------------------------- def ma_call_ally(user, id, x, y) user.ma_summon_count += 1 enemy = Game_Enemy.new(@enemies.size, id) good_position = false while !good_position enemy.screen_x = user.screen_x + (x * user.ma_summon_count) enemy.screen_y = user.screen_y + (y * user.ma_summon_count) good_position = true @enemies.each { |baddie| if baddie.screen_x == enemy.screen_x && baddie.screen_y == enemy.screen_y user.ma_summon_count += 1 good_position = false end } end @enemies.push(enemy) make_unique_names return enemy endend #==============================================================================# ** Spriteset_Battle#------------------------------------------------------------------------------#  この水は実際に青であることをご存知ですか?#============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # * コールの敵のスキル #-------------------------------------------------------------------------- def ma_call_enemy(battler) @enemy_sprites.push(Sprite_Battler.new(@viewport1, battler)) endend #==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  彼らはこの1つを作ったとき、私はエンターブレインのプログラマーたちが、考えていたのか見当がつかない。# レッツだけでこの作品を願って、えっ?#============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # エイリアスのリスト #-------------------------------------------------------------------------- alias maess_use_item use_item #-------------------------------------------------------------------------- # * アイテムを使用してください #-------------------------------------------------------------------------- def use_item(*args) item = @subject.current_action.item if item.is_a?(RPG::Skill) skill = item if skill.ma_call_ally? id, x, y = skill.ma_call_ally if id.nil? text = sprintf(MAESS::SUMMON_FAILURE, @subject.name) @log_window.add_text(text) wait(30) return else target = $game_troop.ma_call_ally(@subject, id, x, y) @spriteset.ma_call_enemy(target) show_animation([target], skill.animation_id) end end end maess_use_item(*args) endend $imported ||= {}$imported[:pac_maess] #===============================================================================## スクリプトの最後# それは、このスクリプトは日本語で書かれていることに思えるかもしれません。# しかし、実際に、私はちょうど退屈し、すべてのコメントを翻訳しまった。# 悪い。##=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です=です==



See, his positions the summoned enemy a certain number of pixels away from the enemy that summoned it. Although I haven't tested his script out yet, I think it positions them so they don't overlap each other. If your plugin doesn't already handle positioning, do you think you could incorporate it in so they don't overlap each other? Please?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
See, his positions the summoned enemy a certain number of pixels away from the enemy that summoned it. Although I haven't tested his script out yet, I think it positions them so they don't overlap each other. If your plugin doesn't already handle positioning, do you think you could incorporate it in so they don't overlap each other? Please
Positions are based on where you place them in the troop editor. This is largely the reason why all of the commands require you to reference a troop or a specific enemy from a troop.


I will include a section to discuss enemy placement.
 
Last edited by a moderator:

Eisenwain

Veteran
Veteran
Joined
Oct 12, 2015
Messages
78
Reaction score
16
First Language
Spanish
Primarily Uses
This can be used to summon allies reinforcements as well?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
This can be used to summon allies reinforcements as well?
No, this only supports enemy reinforcements, but actors can summon enemies if they wanted to.


Actor summoning is a bit different and would require some more consideration.
 
Last edited by a moderator:

clitvin

Veteran
Veteran
Joined
Oct 26, 2015
Messages
95
Reaction score
11
Primarily Uses
I was having issues with the check if troops are still alive returning true even if they are dead. And then I looked at the code here:

if (needsAlive && enemies.isAlive()) {

          return true;

        }

        else {

          return true;

        }

 

I don't understand how this would ever return false? ............
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
I was having issues with the check if troops are still alive returning true even if they are dead. And then I looked at the code here:

if (needsAlive && enemies.isAlive()) {

          return true;

        }

        else {

          return true;

        }

 

I don't understand how this would ever return false? ............
Oops, now that I look at it, that wasn't right. 

Code:
/* Needs to be alive */if (needsAlive) {  if (enemies[i].isAlive()) {    return true;  }          }/* Doesn't need to be alive */else {  return true;}
I've updated the plugin with the new logic.
 
Last edited by a moderator:

tsunetakaryu

Veteran
Veteran
Joined
Nov 4, 2015
Messages
40
Reaction score
28
First Language
Chinese
This plugin reminds me of a NDS game, Metal Max 2R.

There are 3 individual wanted boss in the sea, while encounter any one from them, there is a high chance that the other two will reinforce to this boss battle. They reinforcing each other. Such good friends...

BTW, the MOG_EnemyHP 1.0 with this plugin will return a bitmap related error when enemies reinforcing. After updated the MOG_EnemyHP to 1.1 the problem was gone. 

If anyone else have this problem, make sure update MOG_EnemyHP plugin. 
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
This plugin reminds me of a NDS game, Metal Max 2R.


There are 3 individual wanted boss in the sea, while encounter any one from them, there is a high chance that the other two will reinforce to this boss battle. They reinforcing each other. Such good friends...


BTW, the MOG_EnemyHP 1.0 with this plugin will return a bitmap related error when enemies reinforcing. After updated the MOG_EnemyHP to 1.1 the problem was gone. 


If anyone else have this problem, make sure update MOG_EnemyHP plugin.
Thanks for the info.


Hmm, I think I should list compatibility information somewhere so others will also know as well if they don't read all the replies.
 
Last edited by a moderator:

Rexxon

Veteran
Veteran
Joined
Mar 13, 2012
Messages
88
Reaction score
32
First Language
English
Primarily Uses
Woohoo! A wonderful script indeed.

Thank you for all of your help and support. :)
 
 

Urashima09

Warper
Member
Joined
Apr 27, 2017
Messages
2
Reaction score
0
First Language
Portuguese
Primarily Uses
RMXP
Hi, Hime! Great job, as always!

Maybe you (or everyone) can help me? I use the Sideview Enemies from Yanfly, and when the enemies I put in with this script die their bodies stay there (as it should be). So far so good, but when I put the same enemy repeated again then their bodies disappear (all of them), and I would like to keep them there.

Summing up,

I use the command: add_enemy 2 from troop 4. The enemy appears.
I use again: add_enemy 2 from troop 4. Now there are 2 repeated.
I kill A. Your body stays there. B is still alive.
I kill B. Your body stays there, and A's too.
I use it again: add_enemy 2 from troop 4. The bodies of A and B disappear at this point, C appears. C stays alive normally, but A and B disappear.

When I ask to resurrect all dead enemies, all are resurrected normally (both those who are drawn dead and those who have disappeared).

Please help me fix this! I need the sprites to stand there dead!
Thank you!

Sorry for the bad english.
 

Warpmind

Twisted Genius
Veteran
Joined
Mar 13, 2012
Messages
914
Reaction score
566
First Language
Norwegian
Primarily Uses
So, trying to implement this for a necromancer who keeps summoning zombies, one at a time...

Checking if the zombie he's trying to summon is already present on the battlefield, I keep getting an error:
"Reference Error
checkIsAlive is not defined"

What to do, since I am using the precise
$gameTroop.isTroopReinforcementAdded(troopId, checkIsAlive)
line as presented in the plugin page?

EDIT: Found workaround - checkIsAlive is superfluous; needing an event in the summoning troop to make sure the summoned troop is unsummoned again upon death, though.
 
Last edited:

furan

Villager
Member
Joined
May 10, 2018
Messages
19
Reaction score
0
First Language
English
Primarily Uses
RMMV
I want to use this to set up enemy waves. So when the first waves of enemies are dead, the next wave arrives to battle. But the battle ends once all of the initial enemies are cleared. Is there a way to add the new enemies just before the battle ends? I still want the players to get the experience from the first enemies so I do not want to give them Resist Dead then remove them when their health is zero.
 
Joined
Sep 10, 2019
Messages
2
Reaction score
0
First Language
Greek
Primarily Uses
RMMV
Hello, just a quick question. When I try and add the plugin command in the Battle Events page, nothing actually rises.
This is the command I used, just like on the website: add_troop 1
 

Wavelength

Pre-Merge Boot
Global Mod
Joined
Jul 22, 2014
Messages
4,623
Reaction score
3,886
First Language
English
Primarily Uses
RMVXA
Hello, just a quick question. When I try and add the plugin command in the Battle Events page, nothing actually rises.
This is the command I used, just like on the website: add_troop 1
Show us a screenshot of your entire troop page, and also let us know what's in your Troop #1.
 
Joined
Sep 10, 2019
Messages
2
Reaction score
0
First Language
Greek
Primarily Uses
RMMV
Nevermind. I found a way for it to work. Sorry for my inconvenience, and thank you for trying to help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I forgot I had an account on rpgmakercentral lol
"What do you think the best place to visit on this cold days?" "Hell..."
Been so busy lately that I wonder if I should slowly start preparing the advent calendar resources so I have enough in december.
Man, I wish it was harder for mean d-holes to make me feel like crying.
Made 8 games. Was aiming for 20. Gonna go for 40. Because 20 + 20. /Bed.

Forum statistics

Threads
94,538
Messages
921,718
Members
124,401
Latest member
sgh636
Top