Help - Search - Members - Calendar
Full Version: Side View Battle System
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS
Pages: 1, 2, 3
jasonicus
What have you changed on the script? Obviously something. It works fine if you just add it in. Unless something else you have added is conflicting with it.
prinsu kun
QUOTE (jasonicus @ Mar 13 2008, 08:23 AM) *
What have you changed on the script? Obviously something. It works fine if you just add it in. Unless something else you have added is conflicting with it.



I was using the old one ^////////////^

solved ^_______________^
jasonicus
See, it is always something simple. Good that you solved it.
boievo
I need help sad.gif . I have a battle where all the formation is set at a different coordinate. How do you switch on certain coordinates and then off it back to the normal coordinates?
Wyzrd
QUOTE (jasonicus @ Mar 13 2008, 02:53 AM) *
What other scripts have you added? I have not heard of this issue and more than likely something is conflicting with it.

Other scripts I currently have added are.

http://www.rpgrevolution.com/script/74
http://www.rpgrevolution.com/script/71
http://www.rpgrevolution.com/script/79
http://www.rpgrevolution.com/script/80
http://www.rpgrevolution.com/script/99


I think that is it but I'm at school right now so there might be something else.
jasonicus
Try removing the battleback script first. Also, which version of the maker are you using?
cankingja
Thank for scripts this is very good and easy script
BlasterBoy
It seems that the Slime is the most easiest monster to do this with.
blade911
I need help with this script, when I go into a battle I get this:
CODE
"Script 'sideview_formation' line 53: NoMethodError occured.
undefined method '[]' for nil:NilClass"

Here is a screenshot

how can I fix it?


Thanks in advanced.
jasonicus
What exactly is on Line 53? Might help a little.
blade911
return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
jasonicus
How many characters do you have in the party? Using any other scripts?
blade911
I took out some of the scripts that werent being used and i got it to work happy.gif

Thanks for the clue.
filtymcnasty
My question or a possible request is: Is it possible to add more animations, i.e. Char swings a sword when he attacks or has a recoil animation when struck, so on and so forth?
jasonicus
Probably, but since I can't read Japanese I am unsure how everything is set up just yet. I am sure there is a way to code this crap but it is difficult to understand how they have done things.
matty0828
Great script, but I get this error:

QUOTE
Script 'sideview_formation' line 30: SyntaxError occurred.


Here's the line in question:

CODE
@battle_formation = 0          # Initial formation


And here's the block that it's in, if that helps:

CODE
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
  attr_accessor :battle_formation                # Formation ID
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
alias init_game_system initialize
   def initialize
   init_game_system
   @battle_formation = 0          # Initial formation
   end
end


I'm using lots of scripts... is it possible that woratana's mouse system script is interfering somehow? I think the problems might have started around then.... I hope not though!

Thanks in advance!
JayD
when will someone translate the battle system I can translate some but not the names in the battle system
Ishizimaru
Is there anyway to have more than 4 party members using this script, or at least make it compatible with other large party scripts? I tried to add in another character in the formation section, but to no avail...
Taintedh
I am unable to access the site to download the script, can you possibly post it here as a quote or something?>

Thanks smile.gif
MochaMaster


Whats going on? huh.gif
jasonicus
What other scripts are you using? Or better yet, what have you changed? Need more info to help figure out the problem.
MochaMaster
Well, I copied all 3 of the scripts into one page. Maybe that's it.
I didn't tinker with it.

The scripts I'm using are:
Caterpillar
Jump
Woratana's Neo Save System
Woratana's NeoFace System
Woratana's(AGAIN) Custom Title Screen Menu
DeadlyDan's type writing messages
Woratana's Custom Menu Background Effects & Opacity
Weather script
Kylok's Light Effects
SephirothSpawn's Slanted bars
and this script.
Warder
QUOTE (Wyzrd @ Mar 12 2008, 10:00 PM) *
I have a problem where sometimes in battle. One of my party members will go to attack but their sprite disappears and the game freezes. Can anyone help with this?

I am having the exact same problem, even with no other scripts added and no alterations made.

EDIT: Nevermind. Checked the other forum he'd linked to and apparently it has to do with the battler positions.
bausa
Nice script... I had troubles at first, but realized I had other scripts that wouldn't work together, so problem solved and now I have a sideview battle system-

Thanks!
Timeaisis
That happened to me too for a while. Did the character attack, go off the screen, and then freeze?
It might have to do with the character's graphic placement in battle. Try changing the battler's formation to something like this:

CODE
[Formation Setup]
# $game_system.battle_formation = Formation ID
# It’s possible to change the formation (Even an event script is possible).
FORM = {
# Formation ID => [[Member 1 x、y], [Member2 x, y],
# [Member 3 x, y], [Member 4 x, y]]
0 => [[460,260], [440, 240], [420, 220], [480, 280]]
}


In lines 11-22 in sideview_formation.

After doing that, I haven't got the error again...(yet).
MochaMaster
Umm...any help with my problem?
Lato
unable to find graphis/battlers/ralph is what it say when i get into a battle, who i fix plz?
syvkal
:EDIT:

Ooops sorry xD
Posted on the wrong window x_X
jasonicus
QUOTE (lato22 @ Jun 29 2008, 07:27 AM) *
unable to find graphis/battlers/ralph is what it say when i get into a battle, who i fix plz?

Exactly what it says. You need to have a battler that is named the same as your actor.
Phili
Thanks, I was looking for a CBS.
HydroATMK
Um help. The script appears to be affecting the states aswell. Whenever I confuse an opponent and it kills itself or another enemy, they die, and then the game just stops on "The enemy attacks". The music keeps playing but then nothing happens. On a new game, this does not happen, with the script, it does. So what can I do to fix this, please and thanks. smile.gif
sugarcub1
QUOTE (Magdreamer @ Jan 27 2008, 06:36 AM) *
I can see that alot of scripters are working hard to get a full database of scripts for RMVX done for future projects! =)
Indeed! I'm giving some serious credits the builder of this, who is it? He will be mentioned in my game project =D
karu89
when i get into a battle, the enemies are in the right place, but my party is almost like sitting on top of the command menu
jasonicus
Go into the Formation setup and change the settings.
karu89
i did do that and nothing happened
jasonicus
Put a picture up. IF you have any other scripts, remove them and see if that solves it.
karu89
idk what the heck i did wrong

i also have the damage pop-up script but idk if that is the problem
[Show/Hide] Formation Mess Up
DerVVulfman
I already encountered this problem... or I should say I was asked about it and solved the problem for someone using my Damage Pops script with Claihm's system.

SETUP:
Now Claihm's sideview system is broken down into three scripts... Formations, Motion Control, and Motion Execution. That is the typical order of the scripts in the demo... like this:
* Formations
* Motion Control
* Motion Execution

But, if you want to use Damage Pops (as Damage Pops has it's own system to re-arrange the battlers), you want to move the Formations script to the bottom of the list... like this:
* Motion Control
* Motion Execution
* Damage Pops
* Formations

See the difference? It is NECESSARY for Formations to be the bottom most script so its battler positioning system takes over.
karu89
nothing changed
karu89
now i get this error

Click to view attachment
Ataris
when I attack the monster b my player disappears .. how to fix that?
karu89
anybody help f what i should do with that error as if the formation problem isn't enough to screw up my game
Grandhoug
can anyone post the script because the link isn't working for me
munkey_head_69
QUOTE (ss3dj @ Jan 26 2008, 02:47 AM) *
QUOTE (Elemental Crisis @ Jan 26 2008, 12:04 AM) *
@ss3dj
Did you make sure to change the enemy positions in the database?


tongue.gif thanks !


I'm having the same trouble, could you explain more? please.
Do you mean the database where i make everything or on the script.
i'm very new to this game.
bausa
QUOTE (Timeaisis @ Jun 6 2008, 02:03 PM) *
That happened to me too for a while. Did the character attack, go off the screen, and then freeze?
It might have to do with the character's graphic placement in battle. Try changing the battler's formation to something like this:

CODE
[Formation Setup]
# $game_system.battle_formation = Formation ID
# It’s possible to change the formation (Even an event script is possible).
FORM = {
# Formation ID => [[Member 1 x、y], [Member2 x, y],
# [Member 3 x, y], [Member 4 x, y]]
0 => [[460,260], [440, 240], [420, 220], [480, 280]]
}


In lines 11-22 in sideview_formation.

After doing that, I haven't got the error again...(yet).



I had the same problem so I did this, and it did in fact solve the problem, but little miss picky that I am I don't like how the battlers are so clumped together on the screen. Any possible way to make the battle work and have them spread out a bit?
Zinos666
Can someone put a link the text file of it cause i'm getting a 404 error when I click either links.
usaki0502
Hi, thanks very much for sharing, I've been looking for this so long,
however, the link doesn't open....it said: page not found,
Would you please post the link again somewhere?
I really appreciate!Thanks!!

BB

QUOTE (Elemental Crisis @ Jan 21 2008, 04:22 PM) *
I told SeeYouAlways I would post this.

Script Name: Side View Battle System
Author: Claimh (English Translation By: Elemental Crisis)
Version: 1.0.0
Number Of Scripts: 3
Description:
Replaces the default battle system with a side view battle system. Unlike other scripts that might require you to use side-view battlers this script uses the character set as battlers. You will need to modify enemy groups to properly work with this script as well as any animations you will be using during battle.

Although not required it's recommend you use Claimh's Battle Background script to enhance your battles. You can view Claimh's Battle Background script by clicking the link below.
http://www.rpgcrisis.net/forums/Battle-Backgrounds-t89.html
Screenshots:
A battle starting.


Character attacking a slime.


Using a spell on a slime.


Victory message at end of battle.


Instructions:
1. This first step is optional but I like to keep all my scripts organized so make a new section above MAIN and call it "Side View Battle System".
2. Copy each script on the next three pages EXACTLY how they are shown into a blank section, if you made the "Side View Battle System" section put them under there.
3. The script name is posted above the script, make sure to use the EXACT name or you will run into problems.

If you view the support topic for this script I've attached the "scripts.rvdata" file that already has the side view battle system scripts.

Script Link:
http://www.rpgcrisis.net/forums/Side-View-...ystem-t111.html

Naridar
Both links are down, can you reupload it right here (in spoiler tag, to avoid dead links)? Thanks in advance.
mikeawmids
Yeah, if either the original scripter or anyone who already copy/pasted the script could please repost it here, that would be dynamite. biggrin.gif
Warder
Here you go. It's a three-parter.

[Show/Hide] Sideview Motion Crtl
#==========================================================================
====
# ■ VX-RGSS2-6 サイドビュー戦闘[MotionCtrl] [Ver.1.0.1] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# This script carries out the movement controls of the actors.
#==============================================================================

#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● Battle Start Process
#--------------------------------------------------------------------------
alias process_battle_start_sideview process_battle_start
def process_battle_start
for battler in $game_party.members + $game_troop.members
battler.move_mode = SideView::M_MODE_WAIT
end
process_battle_start_sideview
end
#--------------------------------------------------------------------------
# ● Victory Process
#--------------------------------------------------------------------------
alias process_victory_sideview process_victory
def process_victory
for actor in $game_party.members
actor.move_mode = SideView::M_MODE_WIN
end
process_victory_sideview
end
#--------------------------------------------------------------------------
# ● Wait Until Motion Control Is Finished
#--------------------------------------------------------------------------
def wait_for_motion
while @active_battler.motion_stop
update_basic
end
end
#--------------------------------------------------------------------------
# ● Execute Combat Operations: Attack [Redefinition]
#--------------------------------------------------------------------------
def execute_action_attack
text = sprintf(Vocab::DoAttack, @active_battler.name)
@message_window.add_instant_text(text)
targets = @active_battler.action.make_targets
#---Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Proximity (Going)
SideView.set_target_point(@active_battler, targets[0])
@active_battler.move_mode = SideView::M_MODE_ATK1
@active_battler.motion_stop = true
wait_for_motion
#--- Attack
wait(5)
@active_battler.move_mode = SideView::M_MODE_ATK2
#---
display_attack_animation(targets)
wait(20)
for target in targets
target.attack_effect(@active_battler)
display_action_effects(target)
end
#--- Proximity (Return)
@active_battler.move_mode = SideView::M_MODE_ATK3
@active_battler.motion_stop = true
wait_for_motion
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# ● Execute Combat Operations: Skill [Redefinition]
#--------------------------------------------------------------------------
def execute_action_skill
skill = @active_battler.action.skill
text = @active_battler.name + skill.message1
@message_window.add_instant_text(text)
unless skill.message2.empty?
wait(10)
@message_window.add_instant_text(skill.message2)
end
#--- Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Long distance attack.
@active_battler.move_mode = SideView::M_MODE_MAGI
#---
targets = @active_battler.action.make_targets
display_animation(targets, skill.animation_id)
@active_battler.mp -= @active_battler.calc_mp_cost(skill)
$game_temp.common_event_id = skill.common_event_id
for target in targets
target.skill_effect(@active_battler, skill)
display_action_effects(target, skill)
end
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# Execute Combat Operations: Item [Redefinition]
#--------------------------------------------------------------------------
def execute_action_item
item = @active_battler.action.item
text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
@message_window.add_instant_text(text)
#--- Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Long distance attack
@active_battler.move_mode = SideView::M_MODE_MAGI
#---
targets = @active_battler.action.make_targets
display_animation(targets, item.animation_id)
$game_party.consume_item(item)
$game_temp.common_event_id = item.common_event_id
for target in targets
target.item_effect(@active_battler, item)
display_action_effects(target, item)
end
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# ● Attack Animation Display [Redefinition]
# Targets : Object's Arrangement
#--------------------------------------------------------------------------
# 【Changed part】
# Enemy sound effect is changed so it can be used in each phase of operation.
# It changes so that the attack animation of an enemy can be displayed.
#--------------------------------------------------------------------------
def display_attack_animation(targets)
display_normal_animation(targets, @active_battler.atk_animation_id, false)
display_normal_animation(targets, @active_battler.atk_animation_id2, true)
wait_for_animation
end
#--------------------------------------------------------------------------
# ● HP Damage display [Redefinition]
# Target : Candidate
# object : Skill or item
#--------------------------------------------------------------------------
def display_hp_damage(target, obj = nil)
if target.hp_damage == 0 # No damage
return if obj != nil and obj.damage_to_mp
return if obj != nil and obj.base_damage == 0
fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
text = sprintf(fmt, target.name)
elsif target.absorbed # Absorption
fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
elsif target.hp_damage > 0 # Damage
if target.actor?
text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
Sound.play_actor_damage
$game_troop.screen.start_shake(5, 5, 10)
target.blink = true # Only adds here
else
text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
Sound.play_enemy_damage
target.blink = true
end
else # Recovery
fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
Sound.play_recovery
end
@message_window.add_instant_text(text)
wait(30)
end
end


[Show/Hide] Sideview Motion Exe
#===========================================================================
===
# ■ VX-RGSS2-6 サイドビュー戦闘[MotionExe] [Ver.1.0.1] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# This script executes movement controls of the actors.
#==============================================================================

module SideView
#----------------------------------------------------------------------------
#-----[Operation Setup]-----
# Operation Speed
MOTION_SPEED = 20

#-----[アニメーション設定]-----
# Usual enemy attack animation setup.
E_ANIME = {
# EnemyID => [Usually atttack and additional attack animations.]
1 => [1, 0]
}

#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Motion Control Mode
M_MODE_WAIT = 0 # Standby
M_MODE_MAGI = 1 # Attack
M_MODE_DAMG = 2 # Non-Damage Attack
M_MODE_WIN = 3 # Victory
M_MODE_ATK1 = 4 # Direct Attack (Approaching)
M_MODE_ATK2 = 5 # Direct Attack (Attacking)
M_MODE_ATK3 = 6 # Direct Attack (Returning)

module_function
#--------------------------------------------------------------------------
# ● Movement-Zone Calculation
#--------------------------------------------------------------------------
def set_target_point(attacker, target)
case target
when Game_Actor
bits = Cache.character(target.character_name)
attacker.target_x = target.screen_x + (bits.width / 8)
attacker.target_y = target.screen_y
when Game_Enemy
bits = Cache.battler(target.battler_name, target.battler_hue)
attacker.target_x = target.screen_x + (bits.width / 2)
attacker.target_y = target.screen_y
end
end
end

class Game_Battler
attr_accessor :move_mode # Operation Mode
# 0:Standby 1:Attack 2: Un-useless 3:Victory
attr_accessor :motion_stop # Operation Stop Flag (Under Movement Flag)
attr_accessor :target_x # Move Position(x)
attr_accessor :target_y # Move Position(y)
#--------------------------------------------------------------------------
# ● Object Initialization
#--------------------------------------------------------------------------
alias initialize_sdva_corpse initialize
def initialize
initialize_sdva_corpse
@move_mode = 0
@motion_stop = false
@target_x = 0
@target_y = 0
end
end

#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● Attack Animation ID Acquisition
#--------------------------------------------------------------------------
def atk_animation_id
return 0 if SideView::E_ANIME[@enemy_id].nil?
return SideView::E_ANIME[@enemy_id][0]
end
#--------------------------------------------------------------------------
# ● Attack Animation ID Acquisition (2 Sword Style : 2 Weapons )
#--------------------------------------------------------------------------
def atk_animation_id2
return 0 if SideView::E_ANIME[@enemy_id].nil?
return SideView::E_ANIME[@enemy_id][1]
end
end



#==============================================================================
# ■ Sprite_Battler
#==============================================================================
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# ● Object Initialization
# Viewport : View Port
# Battler : Battler (Game_Battler)
#--------------------------------------------------------------------------
alias initialize_sideview initialize
def initialize(viewport, battler = nil)
initialize_sideview(viewport, battler)
init_direct_attack
end
#--------------------------------------------------------------------------
# ● Set Proximity Value For Attack
#--------------------------------------------------------------------------
def init_direct_attack
@direct_attack_cnt = 0
@direct_attack_phase = 0
@direct_move_cnt = 0
@battler_x_plus = 0
@battler_y_plus = 0
@moving_mode = 0
@pattern = 0
@direction = 0
end
#--------------------------------------------------------------------------
# ● Frame Renewal [Redefinition]
#--------------------------------------------------------------------------
def update
super
if @battler == nil
self.bitmap = nil
else
@use_sprite = @battler.use_sprite?
if @use_sprite
self.x = @battler.screen_x + @battler_x_plus
self.y = @battler.screen_y + @battler_y_plus
self.z = @battler.screen_z
update_battler_bitmap
end
setup_new_effect
update_effect
end
end
#--------------------------------------------------------------------------
# ● Bitmap Transfer Source Renewal
#--------------------------------------------------------------------------
alias update_battler_bitmap_sideview update_battler_bitmap
def update_battler_bitmap
case @battler
when Game_Actor
if @battler.character_name != @battler_name or
@battler.character_index != @battler_hue
@battler_name = @battler.character_name
@battler_hue = @battler.character_index
draw_pre_character
draw_character
if (@battler.dead? or @battler.hidden)
self.opacity = 0
end
end
when Game_Enemy
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
draw_battler
if (@battler.dead? or @battler.hidden)
self.opacity = 0
end
end
end
motion_control
end
#--------------------------------------------------------------------------
# ● Battler Drawing
#--------------------------------------------------------------------------
def draw_battler
self.bitmap = Cache.battler(@battler_name, @battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width / 2
self.oy = @height
end
#--------------------------------------------------------------------------
# ● Pre-Character Drawing [Common]
#--------------------------------------------------------------------------
def draw_pre_character
self.bitmap = Cache.character(@battler_name)
sign = @battler_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
@width = bitmap.width / 3
@height = bitmap.height / 4
else
@width = bitmap.width / 12
@height = bitmap.height / 8
end
self.ox = @width / 2
self.oy = @height
end
#--------------------------------------------------------------------------
# ● Character Drawing [Common]
#--------------------------------------------------------------------------
def draw_character
index = @battler_hue
pattern = @pattern < 3 ? @pattern : 1
sx = (index % 4 * 3 + pattern) * @width
sy = (index / 4 * 4 + (@direction - 2) / 2) * @height
self.src_rect.set(sx, sy, @width, @height)
end
#--------------------------------------------------------------------------
# ● Motion Control
#--------------------------------------------------------------------------
def motion_control
# Memory Operation Mode
@moving_mode = @battler.move_mode
# Battler Drawing
case @battler
when Game_Actor # Actor
actor_motion_control
when Game_Enemy # Enemy
enemy_motion_control
end
end
#--------------------------------------------------------------------------
# ● Motion Control (Actor)
#--------------------------------------------------------------------------
def actor_motion_control
# Operation Change
case @moving_mode
when SideView::M_MODE_WAIT # Standby
init_direct_attack
@battler_x_plus = 0
@direction = 4
@pattern = 1
when SideView::M_MODE_MAGI # Attack
@battler_x_plus = -10
@direction = 4
@pattern = 3
when SideView::M_MODE_DAMG # Non-Damage Attack
@battler_x_plus = 10
@direction = 4
@pattern = 3
when SideView::M_MODE_WIN # Victory
@direction = 2
@pattern = 1
when SideView::M_MODE_ATK1 # Direct Attack (Approaching)
exe_moving_attack_start
@end_pos_x = @battler_x_plus
when SideView::M_MODE_ATK2 # Direct Attack (Attacking)
@battler_x_plus = @end_pos_x - 10
when SideView::M_MODE_ATK3 # Direct Attack (Returning)
exe_moving_attack_end
else
p "error:Sprite_Battler>> @moving_mode"
end
draw_character
end
#--------------------------------------------------------------------------
# ● Motion Control (Enemy)
#--------------------------------------------------------------------------
def enemy_motion_control
# Operation Change
case @moving_mode
when SideView::M_MODE_WAIT # Standby
init_direct_attack
when SideView::M_MODE_MAGI # Attack
@battler_x_plus = 10
when SideView::M_MODE_DAMG # Non-Damage Attack
@battler_x_plus = -10
@shake_flg = true
when SideView::M_MODE_ATK1 # Direct Attack (Approaching)
exe_moving_attack_start
@end_pos_x = @battler_x_plus
when SideView::M_MODE_ATK2 # Direct Attack (Attacking)
@battler_x_plus = @end_pos_x + 10
when SideView::M_MODE_ATK3 # Direct Attack (Returning)
exe_moving_attack_end
else
p "error:Sprite_Battler>> @moving_mode", @moving_mode
end
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution Method
#--------------------------------------------------------------------------
def exe_moving_attack_start
return unless @battler.motion_stop
case @direct_attack_phase
when 0 # Start Operation Preparation
diratk_start
when 1 # Move Operation (Going)
diratk_move
when 2 # After-Movement Wait
diratk_wait
end
end
def exe_moving_attack_end
case @direct_attack_phase
when 0 # Attack Operation
diratk_attack
when 1 # Move Operation (Return)
diratk_back
when 2 # Operation End
diratk_end
end
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution [Start Operation Preparation]
#--------------------------------------------------------------------------
def diratk_start
# Pose Change
@pattern = 1
# The number of frames needed is the distance between current position and
# target position.
pos_x = @battler.target_x - self.x
pos_y = @battler.target_y - self.y
# Caculation for ammount of frames needed.
@direct_move_cnt = @direct_attack_cnt = (pos_x.abs / SideView::MOTION_SPEED).round
# NEXT Phase
@direct_attack_phase += 1
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution [Move Operation (Going)]
#--------------------------------------------------------------------------
def diratk_move
case @battler
when Game_Actor
x_plus = @width
y_plus = -@height / 4
when Game_Enemy
x_plus = -@width - 10
y_plus = @height / 4
end
# The next movement location is figured out by the distance between
# current position and target position.
pos_x = @battler.target_x - self.x + x_plus
pos_y = @battler.target_y - self.y + y_plus
@battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
@battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
# End count
@direct_attack_cnt -= 1
# Last movement (Insurance: Last correction)
if @direct_attack_cnt <= 0
@battler_x_plus = @battler.target_x - @battler.screen_x + x_plus
@battler_y_plus = @battler.target_y - @battler.screen_y + y_plus
# NEXTフェーズ
@direct_attack_cnt = 5
@direct_attack_phase += 1
end
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution [Attack Operation Return]
#--------------------------------------------------------------------------
def diratk_wait
# End Count
@direct_attack_cnt -= 1
# Last Movement
if @direct_attack_cnt <= 0
# Pose Change
@pattern = 3
# END Phase
@direct_attack_phase = 0
@battler.motion_stop = false
end
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution [Attack Operation Return]
#--------------------------------------------------------------------------
def diratk_attack
# Pose Change
@pattern = 1
# End Wait Count
@direct_attack_cnt = @direct_move_cnt
# NEXT Phase
@direct_attack_phase += 1
end
#--------------------------------------------------------------------------
# ● Proximity Attack Execution [Move Operation (Return)]
#--------------------------------------------------------------------------
def diratk_back
# The next movement location is figured out by the distance between
# current position and target position.
pos_x = @battler.screen_x - self.x
pos_y = @battler.screen_y - self.y
@battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
@battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
# End Count
@direct_attack_cnt -= 1
# Last Movement
if @direct_attack_cnt == 0
@battler_x_plus = 0
@battler_y_plus = 0
# NEXT Phase
@direct_attack_phase += 1
end
end
#--------------------------------------------------------------------------
# ● Proximity attack execution [Operation End]
#--------------------------------------------------------------------------
def diratk_end
init_direct_attack
@battler.motion_stop = false
# END Phase
@direct_attack_phase = 0
end
end


[Show/Hide] Sideview Formation
#=====================================================================
=========
# ■ VX-RGSS2-6 サイドビュー戦闘[Formation] [Ver.1.0.1] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# Actor location [Formation]
# The same amount of damage will be given regardless of formation setup.
#==============================================================================

module Battle_Formation
#------------------------------------------------------------------------------
# [Formation Setup]
# $game_system.battle_formation = Formation ID
# It’s possible to change the formation (Even an event script is possible).
FORM = {
# Formation ID => [[Member 1 x、y], [Member2 x, y],
# [Member 3 x, y], [Member 4 x, y]]
0 => [[380,150], [400, 230], [460, 170], [480, 250]]
}
#------------------------------------------------------------------------------
end

#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :battle_formation # Formation ID
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias init_game_system initialize
def initialize
init_game_system
@battle_formation = 0 # Initial formation
end
end

#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● Are sprites used? [Redefinition]
#--------------------------------------------------------------------------
def use_sprite?
return true
end
#--------------------------------------------------------------------------
# ● Battle Screen Acquiring X Coordinate
#--------------------------------------------------------------------------
def screen_x
return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
end
#--------------------------------------------------------------------------
# ● Battle Screen Acquiring Y Coordinate
#--------------------------------------------------------------------------
def screen_y
return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
end
#--------------------------------------------------------------------------
# ● Battle Screen Acquiring Z Coordinate
#--------------------------------------------------------------------------
def screen_z
bitmap = Cache.character(self.character_name)
# Height + Y Coordinates
return screen_y + bitmap.height / 4
end
end



#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● Battle Screen Acquiring Z Coordinate [Redefinition]
#--------------------------------------------------------------------------
def screen_z
bitmap = Cache.battler(self.battler_name, self.battler_hue)
# Height + Y Coordinates
return screen_y + bitmap.height
end
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.