iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

The 2nd Quarter Contest has arrived! Go check it out in the Community Announcements now!
 
Reply to this topicStart new topic
> Three Way Battle script request, Party vs Enemies vs Enemies
Spaceball
post Jan 27 2012, 03:43 AM
Post #1



Group Icon


Type: Undisclosed




Hey guys, I was looking to see if there is any way that you could make a group of enemies attack another group of enemies during a battle, like they do in final fantasy 13. I have tried doing it via battle events but it will do it in a fixed way and will still attack the party each turn.

Say, there's 8 enemies on-screen. 4 on one side, 4 on another side with the party on the right (I'm using the Takentai ATB SBS 3.4e). The enemies will fight each other first until one side has been taken out then it will return to a standard battle and the remaining enemies focus on the party.

If anyone could help with this or direct me to an alternative solution, it would be greatly appreciated.

This post has been edited by Spaceball: Jan 27 2012, 03:48 AM
Go to the top of the page
 
+Quote Post
   
Spaceball
post Feb 5 2012, 01:27 AM
Post #2



Group Icon


Type: Undisclosed




bump
Go to the top of the page
 
+Quote Post
   
Spaceball
post Feb 25 2012, 02:52 AM
Post #3



Group Icon


Type: Undisclosed




bump once more
Go to the top of the page
 
+Quote Post
   
Spaceball
post Mar 15 2012, 04:02 AM
Post #4



Group Icon


Type: Undisclosed




bump
Go to the top of the page
 
+Quote Post
   
Spaceball
post Apr 6 2012, 01:31 AM
Post #5



Group Icon


Type: Undisclosed




BUMP

I'm guessing no-one knows then?
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 10 2012, 09:26 PM
Post #6


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




I saw something like that some where try searching for it.


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
Spaceball
post Apr 16 2012, 07:18 PM
Post #7



Group Icon


Type: Undisclosed




QUOTE (jesse120 @ Apr 10 2012, 10:26 PM) *
I saw something like that some where try searching for it.


Well, after a lot of thorough searching in various places with many different wordings of what I was after, I have found this which is extremely close to what I am after. It is Shanghai's friendly monsters script. Basically, the monsters attack each other as I want and the non-friendly units attack the party when the friendly units go down.

The only drawback is once the non-friendly units are down, the battle ends and you gain exp, gold, etc. Does anyone know a way that I can alter it so that if the friendly side wins, they then attack the party? Then I would be set!

The script is below.

CODE
#===============================================================================
#
# Shanghai Simple Script - Friendly Monsters
# Last Date Updated: 2010.06.17
# Level: Normal
#
# This script sets certain monsters to be designated as friendly monsters. These
# monsters will attack other monsters while those monsters will attack them in
# return (almost always so long as they're alive). If the friendly monsters are
# alive when all other monsters are killed, the player gets extra rewards.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# <friendly>
# Place this tag into the enemy's notebox to designate that monster type as a
# friendly monster.
#
# <friendly exp: x>
# Place this tag into the enemy's notebox. If the enemy is left alive when the
# battle ends, you gain this much exp from this enemy.
#
# <friendly gold: x>
# Place this tag into the enemy's notebox. If the enemy is left alive when the
# battle ends, you gain this much gold from this enemy.
#
# <friendly i: x>
# <friendly w: x>
# <friendly a: x>
# Place this tag into the enemy's notebox. If the enemy is left alive when the
# battle ends, you gain this item from this enemy. Place multiple if needed.
# Use "i" for item. Use "w" for weapon. Use "a" for armor.
#===============================================================================

$imported = {} if $imported == nil
$imported["FriendlyMonsters"] = true

#==============================================================================
# RPG::Enemy
#==============================================================================

class RPG::Enemy
#--------------------------------------------------------------------------
# * Friendly Monster
#--------------------------------------------------------------------------
def friendly_monster
return @friendly_monster if @friendly_monster != nil
@friendly_monster = false
self.note.split(/[\r\n]+/).each { |line|
case line
when /<(?:FRIENDLY|friendly monster)>/i
@friendly_monster = true
end
}
return @friendly_monster
end
#--------------------------------------------------------------------------
# * Friendly EXP
#--------------------------------------------------------------------------
def friendly_exp
return @friendly_exp if @friendly_exp != nil
@friendly_exp = @exp * 2
self.note.split(/[\r\n]+/).each { |line|
case line
when /<(?:FRIENDLY_EXP|friendly exp):[ ](\d+)>/i
@friendly_exp = $1.to_i
end
}
return @friendly_exp
end
#--------------------------------------------------------------------------
# * Friendly Gold
#--------------------------------------------------------------------------
def friendly_gold
return @friendly_gold if @friendly_gold != nil
@friendly_gold = @gold * 2
self.note.split(/[\r\n]+/).each { |line|
case line
when /<(?:FRIENDLY_GOLD|friendly gold):[ ](\d+)>/i
@friendly_gold = $1.to_i
end
}
return @friendly_gold
end
#--------------------------------------------------------------------------
# * Friendly Drops
#--------------------------------------------------------------------------
def friendly_drops
return @friendly_drops if @friendly_drops != nil
@friendly_drops = []
self.note.split(/[\r\n]+/).each { |line|
case line
when /<(?:FRIENDLY_ITEM|friendly item|friendly i):[ ]*(\d+)>/i
@friendly_drops.push($data_items[$1.to_i])
when /<(?:FRIENDLY_WEP|friendly wep|friendly w):[ ]*(\d+)>/i
@friendly_drops.push($data_weapons[$1.to_i])
when /<(?:FRIENDLY_ARM|friendly arm|friendly a):[ ]*(\d+)>/i
@friendly_drops.push($data_armors[$1.to_i])
end
}
return @friendly_drops.compact
end
end

#==============================================================================
# ** Game_Temp
#==============================================================================

class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :friendly_monster
end

#==============================================================================
# ** Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * states
#--------------------------------------------------------------------------
def friendly?
return enemy.friendly_monster
end
#--------------------------------------------------------------------------
# * Create Battle Action
#--------------------------------------------------------------------------
alias make_action_sss_friendly_monsters make_action unless $@
def make_action
$game_temp.friendly_monster = true
make_action_sss_friendly_monsters
$game_temp.friendly_monster = false
end
end

#==============================================================================
# ** Game_BattleAction
#==============================================================================

class Game_BattleAction
#--------------------------------------------------------------------------
# * Get Allied Units
#--------------------------------------------------------------------------
alias friends_unit_sss_friendly_monsters friends_unit unless $@
def friends_unit
if !battler.actor? and battler.friendly?
return $game_party
else
return friends_unit_sss_friendly_monsters
end
end
#--------------------------------------------------------------------------
# * Get Enemy Units
#--------------------------------------------------------------------------
alias opponents_unit_sss_friendly_monsters opponents_unit unless $@
def opponents_unit
if !battler.actor? and battler.friendly?
return $game_troop
else
return opponents_unit_sss_friendly_monsters
end
end
#--------------------------------------------------------------------------
# * Create Normal Attack Targets
#--------------------------------------------------------------------------
alias make_attack_targets_sss_friendly_monsters make_attack_targets unless $@
def make_attack_targets
$game_temp.friendly_monster = true if !battler.actor?
result = make_attack_targets_sss_friendly_monsters
$game_temp.friendly_monster = false
return result
end
#--------------------------------------------------------------------------
# * Create Normal Attack Targets
#--------------------------------------------------------------------------
alias make_obj_targets_sss_friendly_monsters make_obj_targets unless $@
def make_obj_targets(obj)
$game_temp.friendly_monster = true if !battler.actor?
result = make_obj_targets_sss_friendly_monsters(obj)
$game_temp.friendly_monster = false
return result
end
end

#==============================================================================
# ** Game_Troop
#==============================================================================

class Game_Troop < Game_Unit
#--------------------------------------------------------------------------
# * Members
#--------------------------------------------------------------------------
alias members_troop_sss_friendly_monsters members unless $@
def members
result = members_troop_sss_friendly_monsters
result -= $game_troop.friendlies if $game_temp.friendly_monster
return result
end
#--------------------------------------------------------------------------
# * Friendlies
#--------------------------------------------------------------------------
def friendlies
result = []
for member in members_troop_sss_friendly_monsters
result.push(member) if member.friendly?
end
return result.compact
end
#--------------------------------------------------------------------------
# * Friendlies Alive?
#--------------------------------------------------------------------------
def friendlies_alive?
for member in friendlies
return true unless member.dead?
end
return false
end
#--------------------------------------------------------------------------
# * Determine Everyone is Dead
#--------------------------------------------------------------------------
def all_dead?
n = existing_members
n -= $game_troop.friendlies
return n.empty?
end
#--------------------------------------------------------------------------
# * Calculate Total Experience
#--------------------------------------------------------------------------
alias exp_total_sss_friendly_monsters exp_total unless $@
def exp_total
n = exp_total_sss_friendly_monsters
for member in $game_troop.friendlies
next if member.dead?
n += member.enemy.friendly_exp
end
return n
end
#--------------------------------------------------------------------------
# * Calculate Total Gold
#--------------------------------------------------------------------------
alias gold_total_sss_friendly_monsters gold_total unless $@
def gold_total
n = gold_total_sss_friendly_monsters
for member in $game_troop.friendlies
next if member.dead?
n += member.enemy.friendly_exp
end
return n
end
#--------------------------------------------------------------------------
# * Create Array of Dropped Items
#--------------------------------------------------------------------------
alias make_drop_items_sss_friendly_monsters make_drop_items unless $@
def make_drop_items
n = make_drop_items_sss_friendly_monsters
for member in $game_troop.friendlies
next if member.dead?
n += member.enemy.friendly_drops
end
return n
end
end

#==============================================================================
# ** Game_Party
#==============================================================================

class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Members
#--------------------------------------------------------------------------
alias members_party_sss_friendly_monsters members unless $@
def members
result = members_party_sss_friendly_monsters
if $game_temp.friendly_monster and $game_troop.friendlies_alive?
return $game_troop.friendlies
end
return result
end
end

#===============================================================================
#
# END OF FILE
#
#===============================================================================
Go to the top of the page
 
+Quote Post
   
Spaceball
post Apr 27 2012, 01:59 PM
Post #8



Group Icon


Type: Undisclosed




Bump
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th April 2014 - 05:34 AM

RPGMakerVX.net is an Privacy Policy, Legal.