Conectarse
Buscar
Últimos temas
Los posteadores más activos del mes
No hay usuarios |
Estadísticas
Tenemos 98 miembros registradosEl último usuario registrado es Lawdesifi
Nuestros miembros han publicado un total de 6208 mensajes en 777 argumentos.
Centrar Battlers
Drupogame :: RPG Maker :: RPG maker XP :: Scripts
Página 1 de 1.
Centrar Battlers
Ficha técnica
Crear un nuevo script sobre "Main" y pegar en él el siguiente código:
- Nombre original: Desconocido
- Nombre del autor: Cogwheel
- Utilidad: Permite centrar los Battlers en el sistema de batalla por defecto del RPG Maker y otros similares.
- Dependencia de otros scripts: No.
- Incompatibilidades: Script de batalla de MakirouAru y Script Limit Breaks de KGC.
Crear un nuevo script sobre "Main" y pegar en él el siguiente código:
- Spoiler:
- # 퓬”wŒi‘S‘̉» Ver 1.01
# ”z•zŒ³EƒTƒ|
#==============================================================================
# ¡ Game_Actor
#------------------------------------------------------------------------------
# @ƒAƒNƒ^[‚ðˆµ‚¤ƒNƒ‰ƒX‚Å‚·B‚±‚̃Nƒ‰ƒX‚Í Game_Actors ƒNƒ‰ƒX ($game_actors)
# ‚Ì“à•”‚ÅŽg—p‚³‚êAGame_Party ƒNƒ‰ƒX ($game_party) ‚©‚ç‚àŽQÆ‚³‚ê‚Ü‚·B
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹‰æ– X À•W‚̎擾
#--------------------------------------------------------------------------
def screen_x
# ƒp[ƒeƒB“à‚Ì•À‚ч‚©‚ç X À•W‚ðŒvŽZ‚µ‚Ä•Ô‚·
if self.index != nil
return self.index * 160 + (4 - $game_party.actors.size) * 80 + 80
else
return 0
end
end
end
#==============================================================================
# ¡ Spriteset_Battle
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–‚̃Xƒvƒ‰ƒCƒg‚ð‚Ü‚Æ‚ß‚½ƒNƒ‰ƒX‚Å‚·B‚±‚̃Nƒ‰ƒX‚Í Scene_Battle ƒNƒ‰
# ƒX‚Ì“à•”‚ÅŽg—p‚³‚ê‚Ü‚·B
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
# ƒrƒ…[ƒ|[ƒg‚ðì¬
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# ƒoƒgƒ‹ƒoƒbƒNƒXƒvƒ‰ƒCƒg‚ðì¬
@battleback_sprite = Sprite.new(@viewport1)
# ƒGƒlƒ~[ƒXƒvƒ‰ƒCƒg‚ðì¬
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# ƒAƒNƒ^[ƒXƒvƒ‰ƒCƒg‚ðì¬
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# “VŒó‚ðì¬
@weather = RPG::Weather.new(@viewport1)
# ƒsƒNƒ`ƒƒƒXƒvƒ‰ƒCƒg‚ðì¬
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
# ƒ^ƒCƒ}[ƒXƒvƒ‰ƒCƒg‚ðì¬
@timer_sprite = Sprite_Timer.new
# ƒtƒŒ[ƒ€XV
update
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒAƒNƒ^[ƒXƒvƒ‰ƒCƒg‚Ì“à—e‚ðXV (ƒAƒNƒ^[‚Ì“ü‚ê‘Ö‚¦‚ɑΉž)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# ƒoƒgƒ‹ƒoƒbƒN‚̃tƒ@ƒCƒ‹–¼‚ªŒ»Ý‚Ì‚à‚̂ƈႤê‡
if @battleback_name != $game_temp.battleback_name
@battleback_name = $game_temp.battleback_name
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
@battleback_sprite.src_rect.set(0, 0, 640, 480)
if @battleback_sprite.bitmap.height == 320
@battleback_sprite.zoom_x = 2.0
@battleback_sprite.zoom_y = 2.0
@battleback_sprite.x = 320
@battleback_sprite.y = 480
@battleback_sprite.ox = @battleback_sprite.bitmap.width / 2
@battleback_sprite.oy = @battleback_sprite.bitmap.height
else
@battleback_sprite.x = 0
@battleback_sprite.y = 0
@battleback_sprite.ox = 0
@battleback_sprite.oy = 0
@battleback_sprite.zoom_x = 1
@battleback_sprite.zoom_y = 1
end
end
# ƒoƒgƒ‰[ƒXƒvƒ‰ƒCƒg‚ðXV
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# “VŒóƒOƒ‰ƒtƒBƒbƒN‚ðXV
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# ƒsƒNƒ`ƒƒƒXƒvƒ‰ƒCƒg‚ðXV
for sprite in @picture_sprites
sprite.update
end
# ƒ^ƒCƒ}[ƒXƒvƒ‰ƒCƒg‚ðXV
@timer_sprite.update
# ‰æ–‚ÌF’²‚ƃVƒFƒCƒNˆ’u‚ðÝ’è
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# ‰æ–‚̃tƒ‰ƒbƒVƒ…F‚ðÝ’è
@viewport4.color = $game_screen.flash_color
# ƒrƒ…[ƒ|[ƒg‚ðXV
@viewport1.update
@viewport2.update
@viewport4.update
end
end
#==============================================================================
# ¡ Window_BattleStatus
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–‚Ńp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
x = (4 - $game_party.actors.size) * 80
width = $game_party.actors.size * 160
super(x, 320, width, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
super
if self.x != (4 - $game_party.actors.size) * 80
self.x = (4 - $game_party.actors.size) * 80
self.width = $game_party.actors.size * 160
self.contents = Bitmap.new(self.width - 32, self.height - 32)
refresh
end
# ƒƒCƒ“ƒtƒF[ƒY‚Ì‚Æ‚«‚Í•s“§–¾“x‚ð‚â‚≺‚°‚é
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
#==============================================================================
# ¡ Scene_Battle (•ªŠ„’è‹` 3)
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–‚̈—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# œ ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃ZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
def phase3_setup_command_window
# ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
@party_command_window.active = false
@party_command_window.visible = false
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ð—LŒø‰»
@actor_command_window.active = true
@actor_command_window.visible = true
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̈’u‚ðÝ’è
@actor_command_window.x = @actor_index * 160 +
(4 - $game_party.actors.size) * 80
# ƒCƒ“ƒfƒbƒNƒX‚ð 0 ‚ÉÝ’è
@actor_command_window.index = 0
end
end
#==============================================================================
# ¡ Spriteƒ‚ƒWƒ…[ƒ‹
#------------------------------------------------------------------------------
# @ƒAƒjƒ[ƒVƒ‡ƒ“‚ÌŠÇ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
#==============================================================================
module RPG
class Sprite < ::Sprite
def animation_set_sprites(sprites, cell_data, position)
for i in 0..15
sprite = sprites[i]
pattern = cell_data[i, 0]
if sprite == nil or pattern == nil or pattern == -1
sprite.visible = false if sprite != nil
next
end
sprite.visible = true
sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
if position == 3
if self.viewport != nil
sprite.x = self.viewport.rect.width / 2
if $game_temp.in_battle and self.battler.is_a?(Game_Actor)
sprite.y = self.viewport.rect.height - 160
else
sprite.y = self.viewport.rect.height - 320
end
else
sprite.x = 320
sprite.y = 240
end
else
sprite.x = self.x + self.viewport.rect.x - self.ox + self.src_rect.width / 2
sprite.y = self.y + self.viewport.rect.y - self.oy * self.zoom_y + self.src_rect.height * self.zoom_y / 2
sprite.y -= self.src_rect.height / 4 if position == 0
sprite.y += self.src_rect.height / 4 if position == 2
end
sprite.x += cell_data[i, 1]
sprite.y += cell_data[i, 2]
sprite.z = 2000
sprite.ox = 96
sprite.oy = 96
sprite.zoom_x = cell_data[i, 3] / 100.0
sprite.zoom_y = cell_data[i, 3] / 100.0
sprite.angle = cell_data[i, 4]
sprite.mirror = (cell_data[i, 5] == 1)
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
sprite.blend_type = cell_data[i, 7]
end
end
end
end
Drupogame :: RPG Maker :: RPG maker XP :: Scripts
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.
Lun Ene 23, 2012 11:32 pm por edux
» edux returns
Lun Ene 23, 2012 11:30 pm por edux
» The Elder Scrolls IV: Oblivion
Vie Ene 20, 2012 11:28 pm por Aljevalsar
» Kojima promete que habrá un Metal Gear Solid de auténtico sigilo
Jue Dic 22, 2011 7:33 pm por Anime_Maker
» Este fin de semana habrá nuevos modos para Modern Warfare 3
Jue Dic 15, 2011 12:03 pm por Akeo
» Kojima quiso crear un Metal Gear Solid 5 ambientado en la Segunda Guerra Mundial
Jue Dic 15, 2011 11:01 am por Akeo
» Darksiders II se dejará ver en los Spike VGA
Miér Dic 14, 2011 11:50 am por Akeo
» El creador de Bayonetta desmiente estar implicado en el desarrollo de Metal Gear Rising
Miér Dic 14, 2011 1:54 am por Akeo
» Los creadores de Bayonetta se encargan del desarrollo de Metal Gear Rising
Miér Dic 14, 2011 1:52 am por Akeo
» En Construccion: Mundo Abismal
Lun Oct 24, 2011 4:03 am por SagahonArturo
» Visceral Games busca nuevo personal para la franquicia Dead Space
Mar Oct 11, 2011 3:22 am por The_King_Jaas
» buenas
Mar Oct 11, 2011 3:21 am por The_King_Jaas
» Batman: Arkham City llegará "sin ninguna limitación"
Sáb Oct 08, 2011 1:44 am por Akeo
» Los creadores de Bulletstorm admiten divertidos que el juego tenía demasiadas palabras malsonantes
Sáb Oct 08, 2011 1:41 am por Akeo
» PES 2012: El primer DLC estará disponible el 11 de octubre
Sáb Oct 08, 2011 1:39 am por Akeo