PatchRPG Maker vx

Fermé
walidos195 - 11 sept. 2008 à 01:40
 Sovty - 25 oct. 2008 à 00:08
Bonjours,
je veux un patch pour lancer RPG Maker vx avec une résolution de 800x600!
merci
A voir également:

1 réponse

Viste mon site www.jeuvideo.over-blog.org. Il n'y a pas de patch mais un script que tu dois mettre au-dessus de main.
Le voila :
#==============================================================================
# ** Retour à la résolution 640x480 (pour RPG Maker VX)
#------------------------------------------------------------------------------
# Résolution 640x480 (pour RPG Maker VX) par Krazplay
# Version 1.0 (23/01/2008)
# Dernière version, commentaires : http://rpgmakerxp-factory.net/forum/index.php?topic=12460
#------------------------------------------------------------------------------
# Ce script ne fait pas que changer la résolution, il modifie pas mal de choses
# pour que le jeu soit adapté à sa nouvelle résolution.
# Sachant que ce script redéfinit pas mal de méthodes, il est vivement conseillé
# de le placer au-dessus de vos autres scripts ajoutés (mais en-dessous de ceux
# de base, à part Main évidemment)
#
# Résolution de base : 544x416 (17x13 cases de 32 pixels)
# Nouvelle résolution : 640x480 (20x15 cases de 32 pixels)
# On gagne donc 96x64 pixels
#------------------------------------------------------------------------------
# Toutes les méthodes modifiées :
#
# □ Game_Map : calc_parallax_x, calc_parallax_y, setup_scroll,
# scroll_down, scroll_right
# □ Game_Player : center
# □ Sprite_Base : start_animation
# □ Sprite_Timer : initialize
# □ Spriteset_Map : create_viewports
# □ Spriteset_Battle : create_viewports, create_enemies, create_battleback,
# create_battlefloor
# □ Window_Help, Window_SkillStatus, Window_Equip : initialize
# □ Window_Status, Window_SaveFile, Window_NumberInput : initialize
# □ Window_ShopBuy, Window_ShopStatus : initialize
# □ Window_MenuStatus : initialize, refresh, update_cursor
# □ Window_Message : initialize, reset_window
# □ Scene_Title : create_title_graphic, create_command_window
# □ Scene_Menu : start
# □ Scene_Item : start, show_target_window, hide_target_window
# □ Scene_Skill : start, show_target_window, hide_target_window
# □ Scene_Equip : create_item_windows
# □ Scene_End : create_command_window
# □ Scene_Shop : start
# □ Scene_Battle : create_info_viewport, start_skill_selection,
# start_item_selection, create_info_viewport,
# start_skill_selection, start_item_selection
#==============================================================================

# Agrandir les images Title.png et BattleFloor.png si elles sont trop petites.
AGRANDIR_IMAGES = true
Graphics.resize_screen(640, 480)

#==============================================================================
# ■ Game_Objects
#==============================================================================

# □ Game_Map #
class Game_Map
def calc_parallax_x(bitmap)
if bitmap == nil
return 0
elsif @parallax_loop_x
return @parallax_x / 16
elsif loop_horizontal?
return 0
else
w1 = bitmap.width - 640
w2 = @map.width * 32 - 640
if w1 <= 0 or w2 <= 0
return 0
else
return @parallax_x * w1 / w2 / 8
end
end
end

def calc_parallax_y(bitmap)
if bitmap == nil
return 0
elsif @parallax_loop_y
return @parallax_y / 16
elsif loop_vertical?
return 0
else
h1 = bitmap.height - 480
h2 = @map.height * 32 - 480
if h1 <= 0 or h2 <= 0
return 0
else
return @parallax_y * h1 / h2 / 8
end
end
end

def setup_scroll
@scroll_direction = 2
@scroll_rest = 0
@scroll_speed = 4
@margin_x = (width - 20) * 256 / 2 # 画面非表示分の横幅 / 2
@margin_y = (height - 15) * 256 / 2 # 画面非表示分の縦幅 / 2
end

def scroll_down(distance)
if loop_vertical?
@display_y += distance
@display_y %= @map.height * 256
@parallax_y += distance
else
last_y = @display_y
@display_y = [@display_y + distance, (height - 15) * 256].min
@parallax_y += @display_y - last_y
end
end

def scroll_right(distance)
if loop_horizontal?
@display_x += distance
@display_x %= @map.width * 256
@parallax_x += distance
else
last_x = @display_x
@display_x = [@display_x + distance, (width - 20) * 256].min
@parallax_x += @display_x - last_x
end
end
end

# □ Game_Player #
class Game_Player < Game_Character
CENTER_X = (640 / 2 - 16) * 8 # 画面中央の X 座標 * 8
CENTER_Y = (480 / 2 - 16) * 8 # 画面中央の Y 座標 * 8

def center(x, y)
display_x = x * 256 - CENTER_X # 座標を計算
unless $game_map.loop_horizontal? # 横にループしない?
max_x = ($game_map.width - 20) * 256 # 最大値を計算
display_x = [0, [display_x, max_x].min].max # 座標を修正
end
display_y = y * 256 - CENTER_Y # 座標を計算
unless $game_map.loop_vertical? # 縦にループしない?
max_y = ($game_map.height - 15) * 256 # 最大値を計算
display_y = [0, [display_y, max_y].min].max # 座標を修正
end
$game_map.set_display_pos(display_x, display_y) # 表示位置変更
end
end

#==============================================================================
# ■ Sprites
#==============================================================================

# □ Sprite_Base #
class Sprite_Base < Sprite
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 = 640 / 2
@animation_oy = 480 / 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 #
class Sprite_Timer < Sprite
def initialize(viewport)
super(viewport)
self.bitmap = Bitmap.new(88, 48)
self.bitmap.font.name = "Arial"
self.bitmap.font.size = 32
self.x = 640 - self.bitmap.width
self.y = 0
self.z = 200
update
end
end

# □ Spriteset_Map #
class Spriteset_Map
def create_viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 50
@viewport3.z = 100
end
end

# □ Spriteset_Battle #
class Spriteset_Battle
def create_viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 50
@viewport3.z = 100
end

def create_enemies
@enemy_sprites = []
for enemy in $game_troop.members.reverse
enemy.screen_x += 48 # Recentrage des ennemis
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
end

def create_battleback
source = $game_temp.background_bitmap
bitmap = Bitmap.new(640+96, 480+64)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.radial_blur(90, 12)
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.ox = 320+48
@battleback_sprite.oy = 240+32
@battleback_sprite.x = 320 #272
@battleback_sprite.y = 208 #176
@battleback_sprite.wave_amp = 8
@battleback_sprite.wave_length = 240
@battleback_sprite.wave_speed = 120
end

def create_battlefloor
@battlefloor_sprite = Sprite.new(@viewport1)
battle_floor = Cache.system("BattleFloor")
if AGRANDIR_IMAGES and battle_floor.width < 640
rect_dest = Rect.new(0, 0, 640, battle_floor.height)
new_bitmap = Bitmap.new(640, battle_floor.height)
new_bitmap.stretch_blt(rect_dest, battle_floor, battle_floor.rect)
@battlefloor_sprite.bitmap = new_bitmap
else
@battlefloor_sprite.bitmap = battle_floor
end
@battlefloor_sprite.x = 0
@battlefloor_sprite.y = 192
@battlefloor_sprite.z = 1
@battlefloor_sprite.opacity = 128
end
end

#==============================================================================
# ■ Windows
#==============================================================================

# □ Window_Help #
class Window_Help < Window_Base
def initialize
super(0, 0, 640, WLH + 32)
end
end

# □ Window_MenuStatus #
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(x, y, 480, 480)
refresh
self.active = false
self.index = -1
end

def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * (96+21) + 2, 92)
x = 104
y = actor.index * (96+21) + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1, 216)
draw_actor_mp(actor, x + 120, y + WLH * 2, 216)
end
end

def update_cursor
if @index < 0 # カーソルなし
self.cursor_rect.empty
elsif @index < @item_max # 通常
self.cursor_rect.set(0, @index * (96+21), contents.width, 96)
elsif @index >= 100 # 自分
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else # 全体
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end

# □ Window_SkillStatus #
class Window_SkillStatus < Window_Base
def initialize(x, y, actor)
super(x, y, 640, WLH + 32)
@actor = actor
refresh
end
end

# □ Window_Equip #
class Window_Equip < Window_Selectable
def initialize(x, y, actor)
super(x, y, 336+96, WLH * 5 + 32)
@actor = actor
refresh
self.index = 0
end
end

# □ Window_Status #
class Window_Status < Window_Base
def initialize(actor)
super(0, 0, 640, 480)
@actor = actor
refresh
end
end

# □ Window_SaveFile #
class Window_SaveFile < Window_Base
def initialize(file_index, filename)
super(0, 56 + file_index % 4 * (90+21), 640, 90)
@file_index = file_index
@filename = filename
load_gamedata
refresh
@selected = false
end
end

# □ Window_NumberInput #
class Window_NumberInput < Window_Base
def initialize
super(0, 0, 640, 64)
@number = 0
@digits_max = 6
@index = 0
self.opacity = 0
self.active = false
self.z += 9999
refresh
update_cursor
end
end

# □ Window_ShopBuy #
class Window_ShopBuy < Window_Selectable
def initialize(x, y)
super(x, y, 304+96, 304+64)
@shop_goods = $game_temp.shop_goods
refresh
self.index = 0
end
end

# □ Window_ShopStatus #
class Window_ShopStatus < Window_Base
def initialize(x, y)
super(x, y, 240, 304+64)
@item = nil
refresh
end
end

# □ Window_Message #
class Window_Message < Window_Selectable
def initialize
super(0, 352, 640, 128)
self.z = 200
self.active = false
self.index = -1
self.openness = 0
@opening = false # ウィンドウのオープン中フラグ
@closing = false # ウィンドウのクローズ中フラグ
@text = nil # 表示すべき残りの文章
@contents_x = 0 # 次の文字を描画する X 座標
@contents_y = 0 # 次の文字を描画する Y 座標
@line_count = 0 # 現在までに描画した行数
@wait_count = 0 # ウェイトカウント
@background = 0 # 背景タイプ
@position = 2 # 表示位置
@show_fast = false # 早送りフラグ
@line_show_fast = false # 行単位早送りフラグ
@pause_skip = false # 入力待ち省略フラグ
create_gold_window
create_number_input_window
create_back_sprite
end

def reset_window
@background = $game_message.background
@position = $game_message.position
if @background == 0 # 通常ウィンドウ
self.opacity = 255
else # 背景を暗くする、透明にする
self.opacity = 0
end
case @position
when 0 # 上
self.y = 0
@gold_window.y = 360
when 1 # 中
self.y = 208
@gold_window.y = 0
when 2 # 下
self.y = 352
@gold_window.y = 0
end
end
end
1