Darkfault - Pią 24 Wrz, 2010 11:22 Temat postu: Powiększona rozdziałka + Melody Battle System = ErrorDzieńdobry? :|
Mam taki... SPORY problem.
Mam w grze Melody Battle System. Nie mogę z niego zrezygnować, ponieważ pod niego mam większość rzeczy, a także 90% skryptów wymaga go do działania.
Dodatkowo mam skrypt powiększający rozdziałkę [nie 'rozciągający' mapki, tylko sprawiający że widać większy obszar mapy w grze.] i pod niego mam zrobiony title, systemy wiadomości, menu oraz mapki.
Teraz problem:
Kiedy próbuję odpalić walkę w grze, wywala mi następujący błąd:
Fragment kodu do którego przeskakuje kursor po błędzie:
Podejrzewam, że skrypty są ze sobą 'średnio' kompatybilne. Logicznym wyjściem byłoby zrezygnowanie z jednego ale... nie mogę :(
Czy dałoby się zmodyfikować Melody tak, by współpracowało z pełną rozdziałką? [640x460 bodajże] Może nawet 'ucinać' kawałek ekranu walki i wywalać w niego czarną ramkę, byle działało [choć wolałbym rozciągnięcie ekranu walki] Czy ktoś mógłby się tego podjąć? :| Czy ktoś uratuje mi tyłek? :(Sabikku - Pią 24 Wrz, 2010 13:27 Przy prośbie o pomoc przydałyby się gotowe linki do obu skryptów, albo dema z oboma w środku :). Raczej do zrobienia.Darkfault - Pią 24 Wrz, 2010 14:43 No tak :|
#==============================================================================
# ** Resolution Changer VX
#------------------------------------------------------------------------------
# by Syvkal
# Version 1.0
# 06-27-08
#==============================================================================
#
# - INTRODUCTION -
#
# This system allows you to resize the Game screen without stretching the
# graphics. It enables you to be able to fit more onto one screen
#
#------------------------------------------------------------------------------
#
# - USAGE -
#
# Simply use the one line:
#
# Graphics.resize_screen(width,height)
#
# Place this in main just below 'begin'
#
#------------------------------------------------------------------------------
#
# - PROBLEMS -
#
# Certain problems may occur while using this script
# These include:
# - Windows not properly sized
# - Windows not in the proper position
# - Images such as the Title Graphic not fitting
#
# NONE OF THESE PROBLEMS ARE ERRORS
# -------------------------------
#
# Please do not report any of these problems, the resolution script will
# the screen size, it's up to you to make the scripts fit it
#
# However the script is quite new and only took me about 10 minutes, so if
# there are any errors please do report them
#
#------------------------------------------------------------------------------
#
# - IMPORTANT -
#
# When resizing the window try to make the width and height a multiple of 32
# This will reduce the amount of errors
#
# Also due to the Built in function, the current max screen size is 640 x 480
# In later versions this problem may be able to be over come, but I'm not sure
#
#==============================================================================
#==============================================================================
# ** Sprite_Base
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Sprite_Base < Sprite
#--------------------------------------------------------------------------
# * Start Animation
#--------------------------------------------------------------------------
def start_animation(animation, mirror = false)
dispose_animation
@animation = animation
return if @animation == nil
@animation_mirror = mirror
@animation_duration = @animation.frame_max * 4 + 1
load_animation_bitmap
@animation_sprites = []
if @animation.position != 3 or not @@animations.include?(animation)
if @use_sprite
for i in 0..15
sprite = ::Sprite.new(viewport)
sprite.visible = false
@animation_sprites.push(sprite)
end
unless @@animations.include?(animation)
@@animations.push(animation)
end
end
end
if @animation.position == 3
if viewport == nil
@animation_ox = Graphics.width / 2
@animation_oy = Graphics.height / 2
else
@animation_ox = viewport.rect.width / 2
@animation_oy = viewport.rect.height / 2
end
else
@animation_ox = x - ox + width / 2
@animation_oy = y - oy + height / 2
if @animation.position == 0
@animation_oy -= height / 2
elsif @animation.position == 2
@animation_oy += height / 2
end
end
end
end
#==============================================================================
# ** Sprite_Timer
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Set Map Display Position to Center of Screen
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def center(x, y)
center_x = (Graphics.width / 2 - 16) * 8
center_y = (Graphics.width / 2 - 16) * 8
display_x = x * 256 - center_x # Calculate coordinates
unless $game_map.loop_horizontal? # No loop horizontally?
max_x = ($game_map.width - (Graphics.width / 32)) * 256
display_x = [0, [display_x, max_x].min].max # Adjust coordinates
end
display_y = y * 256 - center_y # Calculate coordinates
unless $game_map.loop_vertical? # No loop vertically?
max_y = ($game_map.height - (Graphics.height / 32)) * 256
display_y = [0, [display_y, max_y].min].max # Adjust coordinates
end
$game_map.set_display_pos(display_x, display_y) # Change map location
end
#--------------------------------------------------------------------------
# * Update Scroll
#--------------------------------------------------------------------------
def update_scroll(last_real_x, last_real_y)
center_x = (Graphics.width / 2 - 16) * 8
center_y = (Graphics.width / 2 - 16) * 8
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
if ay2 > ay1 and ay2 > center_y
$game_map.scroll_down(ay2 - ay1)
end
if ax2 < ax1 and ax2 < center_x
$game_map.scroll_left(ax1 - ax2)
end
if ax2 > ax1 and ax2 > center_x
$game_map.scroll_right(ax2 - ax1)
end
if ay2 < ay1 and ay2 < center_y
$game_map.scroll_up(ay1 - ay2)
end
end
end
Sabikku - Pią 24 Wrz, 2010 15:07 Skrypt na zmianę rozdzielczości z drobnymi zmianami - jeśli coś nadal nie działa, napisz dokładnie gdzie błąd (u mnie nie było już błędów).
Spoiler:
Kod:
#==============================================================================
# ** Resolution Changer VX
#------------------------------------------------------------------------------
# by Syvkal
# Version 1.0
# 06-27-08
#==============================================================================
#
# - INTRODUCTION -
#
# This system allows you to resize the Game screen without stretching the
# graphics. It enables you to be able to fit more onto one screen
#
#------------------------------------------------------------------------------
#
# - USAGE -
#
# Simply use the one line:
#
# Graphics.resize_screen(width,height)
#
# Place this in main just below 'begin'
#
#------------------------------------------------------------------------------
#
# - PROBLEMS -
#
# Certain problems may occur while using this script
# These include:
# - Windows not properly sized
# - Windows not in the proper position
# - Images such as the Title Graphic not fitting
#
# NONE OF THESE PROBLEMS ARE ERRORS
# -------------------------------
#
# Please do not report any of these problems, the resolution script will
# the screen size, it's up to you to make the scripts fit it
#
# However the script is quite new and only took me about 10 minutes, so if
# there are any errors please do report them
#
#------------------------------------------------------------------------------
#
# - IMPORTANT -
#
# When resizing the window try to make the width and height a multiple of 32
# This will reduce the amount of errors
#
# Also due to the Built in function, the current max screen size is 640 x 480
# In later versions this problem may be able to be over come, but I'm not sure
#
#==============================================================================
#==============================================================================
# ** Sprite_Base
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Sprite_Base < Sprite
#--------------------------------------------------------------------------
# * Start Animation
#--------------------------------------------------------------------------
def start_animation(animation, mirror = false)
dispose_animation
@animation = animation
return if @animation == nil
@animation_mirror = mirror
@animation_duration = @animation.frame_max * 4 + 1
load_animation_bitmap
@animation_sprites = []
if @animation.position != 3 or not @@animations.include?(animation)
if @use_sprite
for i in 0..15
sprite = ::Sprite.new(viewport)
sprite.visible = false
@animation_sprites.push(sprite)
end
unless @@animations.include?(animation)
@@animations.push(animation)
end
end
end
if @animation.position == 3
if viewport == nil
@animation_ox = Graphics.width / 2
@animation_oy = Graphics.height / 2
else
@animation_ox = viewport.rect.width / 2
@animation_oy = viewport.rect.height / 2
end
else
@animation_ox = x - ox + width / 2
@animation_oy = y - oy + height / 2
if @animation.position == 0
@animation_oy -= height / 2
elsif @animation.position == 2
@animation_oy += height / 2
end
end
end
end
#==============================================================================
# ** Sprite_Timer
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Set Map Display Position to Center of Screen
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def center(x, y)
center_x = (Graphics.width / 2 - 16) * 8
center_y = (Graphics.width / 2 - 16) * 8
display_x = x * 256 - center_x # Calculate coordinates
unless $game_map.loop_horizontal? # No loop horizontally?
max_x = ($game_map.width - (Graphics.width / 32)) * 256
display_x = [0, [display_x, max_x].min].max # Adjust coordinates
end
display_y = y * 256 - center_y # Calculate coordinates
unless $game_map.loop_vertical? # No loop vertically?
max_y = ($game_map.height - (Graphics.height / 32)) * 256
display_y = [0, [display_y, max_y].min].max # Adjust coordinates
end
$game_map.set_display_pos(display_x, display_y) # Change map location
end
#--------------------------------------------------------------------------
# * Update Scroll
#--------------------------------------------------------------------------
def update_scroll(last_real_x, last_real_y)
center_x = (Graphics.width / 2 - 16) * 8
center_y = (Graphics.width / 2 - 16) * 8
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
if ay2 > ay1 and ay2 > center_y
$game_map.scroll_down(ay2 - ay1)
end
if ax2 < ax1 and ax2 < center_x
$game_map.scroll_left(ax1 - ax2)
end
if ax2 > ax1 and ax2 > center_x
$game_map.scroll_right(ax2 - ax1)
end
if ay2 < ay1 and ay2 < center_y
$game_map.scroll_up(ay1 - ay2)
end
end
end
Darkfault - Pią 24 Wrz, 2010 16:14 Wygląda na to, że działa :| Kocham Cię ;|
[ Dodano: Nie 26 Wrz, 2010 18:02 ] Ok, chcę rozwodu :| Jednak nie działa :[
Jeśli się raz zawalczy, to potem przy próbie otworzenia menu po prostu wywala grę, bez żadnego komunikatu o skrypcie. Pokazuje się okienko 'Program xxx napotkał problem i zostanie zamknięty' itp. Po usunięciu skryptu działa normalnie :|
Co może być przyczyną?Ayene - Pią 22 Paź, 2010 20:27 Czy problem jest nadal aktualny?