- KyoMauditMembre
- Nombre de messages : 236
Age : 26
Localisation : Pas de Calais
Distinction : aucune
Date d'inscription : 19/10/2014
Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Mar 5 Mai 2015 - 22:14
Bondouuur !
J'ai décidé de faire un petit tutoriel sur comment augmenté la résolution de RPG Maker Vx Ace ! On pourra donc dépassé les limites des 480*640 '-'
Commençons !
Tout d'abord téléchargeons un pack que j'avais fais vite fait il y a 2jours (Il y a la dll modifier dedans)
Lien : http://ge.tt/4NquMgF2/v/0
Maintenant qu'on a la dll tout est prêt !
Je créer un nouveau projet et je vais ensuite :
Mes documents > RPGVXAce > Le nom de votre projet > System
Ici vous metterai la dll modifier (RGSS301.dll) a coté de RGSS300.dll
Ensuite nous allons ajouter un script !
Cliquer ici sur RPG Maker :
Descender jusqu'a matérial :
Clique droit sur le Insert here juste en dessous et cliquer sur Insérer
Une case blanche c'est créer
Dans le grand cadre blanc a droite ( (1) sur l'image) copier coller ce script :
Et dans la petite zone texte en bas a gauche ( (2) sur le screen) nous marquons le titre du script par exemple : Résolution
Maintenant enregistré la projet (Important)
Maintenant dernière manoeuvre pour que le script fonctionne, nous allons dans :
Mes documents > RPGVXAce > Le nom de votre projet
Et nous nous interresserons au Game.ini
Ouvrons le avec Bloc note (Ou notepad++ c'est la même chose) et vous trouverai ça :
Maintenant lancé votre jeu.. IL EST EN LA RESOLUTION QUE VOUS AVEZ MIS !
(Screenshoot sur une map fait a l'arrache avec les RTP)
Mais vous remarquerez que le jeu lag donc on va arranger ca avec ces scripts que vous allez ajouter de la même façon que vous avez ajoutez le 1er script :
1er script anti-lag :
Après en combat, les personnages ne sont pas a la bonne place, utilisé donc ce script :
Si vous avez des questions ou des problèmes n'hésitez pas a les posés
J'ai décidé de faire un petit tutoriel sur comment augmenté la résolution de RPG Maker Vx Ace ! On pourra donc dépassé les limites des 480*640 '-'
Commençons !
Tout d'abord téléchargeons un pack que j'avais fais vite fait il y a 2jours (Il y a la dll modifier dedans)
Lien : http://ge.tt/4NquMgF2/v/0
Maintenant qu'on a la dll tout est prêt !
Je créer un nouveau projet et je vais ensuite :
Mes documents > RPGVXAce > Le nom de votre projet > System
Ici vous metterai la dll modifier (RGSS301.dll) a coté de RGSS300.dll
Ensuite nous allons ajouter un script !
Cliquer ici sur RPG Maker :
Descender jusqu'a matérial :
Clique droit sur le Insert here juste en dessous et cliquer sur Insérer
Une case blanche c'est créer
Dans le grand cadre blanc a droite ( (1) sur l'image) copier coller ce script :
- Code:
#==============================================================================
# ▼ Viewports/Map Fix for Modified RGSS300.dll File
# Origin of Code: Yanfly Engine Ace - Ace Core Engine v1.06
# -- Last Updated: 2011.12.26
# -- Level: Easy, Normal
# -- Requires: n/a
#
#==============================================================================
Graphics.resize_screen(1088,672)
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# overwrite method: scroll_down
#--------------------------------------------------------------------------
def scroll_down(distance)
if loop_vertical?
@display_y += distance
@display_y %= @map.height * 256
@parallax_y += distance
else
last_y = @display_y
dh = Graphics.height > height * 32 ? height : screen_tile_y
@display_y = [@display_y + distance, height - dh].min
@parallax_y += @display_y - last_y
end
end
#--------------------------------------------------------------------------
# overwrite method: scroll_right
#--------------------------------------------------------------------------
def scroll_right(distance)
if loop_horizontal?
@display_x += distance
@display_x %= @map.width * 256
@parallax_x += distance
else
last_x = @display_x
dw = Graphics.width > width * 32 ? width : screen_tile_x
@display_x = [@display_x + distance, width - dw].min
@parallax_x += @display_x - last_x
end
end
end # Game_Map
#==============================================================================
# ■ Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# overwrite method: create_viewports
#--------------------------------------------------------------------------
def create_viewports
if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal?
dx = (Graphics.width - $game_map.width * 32) / 2
else
dx = 0
end
dw = [Graphics.width, $game_map.width * 32].min
dw = Graphics.width if $game_map.loop_horizontal?
if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical?
dy = (Graphics.height - $game_map.height * 32) / 2
else
dy = 0
end
dh = [Graphics.height, $game_map.height * 32].min
dh = Graphics.height if $game_map.loop_vertical?
@viewport1 = Viewport.new(dx, dy, dw, dh)
@viewport2 = Viewport.new(dx, dy, dw, dh)
@viewport3 = Viewport.new(dx, dy, dw, dh)
@viewport2.z = 50
@viewport3.z = 100
end
#--------------------------------------------------------------------------
# new method: update_viewport_sizes
#--------------------------------------------------------------------------
def update_viewport_sizes
if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal?
dx = (Graphics.width - $game_map.width * 32) / 2
else
dx = 0
end
dw = [Graphics.width, $game_map.width * 32].min
dw = Graphics.width if $game_map.loop_horizontal?
if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical?
dy = (Graphics.height - $game_map.height * 32) / 2
else
dy = 0
end
dh = [Graphics.height, $game_map.height * 32].min
dh = Graphics.height if $game_map.loop_vertical?
rect = Rect.new(dx, dy, dw, dh)
for viewport in [@viewport1, @viewport2, @viewport3]
viewport.rect = rect
end
end
end # Spriteset_Map
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# alias method: post_transfer
#--------------------------------------------------------------------------
alias scene_map_post_transfer_ace post_transfer
def post_transfer
@spriteset.update_viewport_sizes
scene_map_post_transfer_ace
end
end # Scene_Map
#==============================================================================
# ■ Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# overwrite method: near_the_screen?
#--------------------------------------------------------------------------
def near_the_screen?(dx = nil, dy = nil)
dx = [Graphics.width, $game_map.width * 256].min/32 - 5 if dx.nil?
dy = [Graphics.height, $game_map.height * 256].min/32 - 5 if dy.nil?
ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
end
end # Game_Event
- Code:
Graphics.resize_screen(1088,672)
Et dans la petite zone texte en bas a gauche ( (2) sur le screen) nous marquons le titre du script par exemple : Résolution
Maintenant enregistré la projet (Important)
Maintenant dernière manoeuvre pour que le script fonctionne, nous allons dans :
Mes documents > RPGVXAce > Le nom de votre projet
Et nous nous interresserons au Game.ini
Ouvrons le avec Bloc note (Ou notepad++ c'est la même chose) et vous trouverai ça :
- Code:
[Game]
RTP=RPGVXAce
Library=System\RGSS300.dll
Scripts=Data\Scripts.rvdata2
Title=Résolution
- Code:
Library=System\RGSS300.dll
- Code:
Library=System\RGSS301.dll
Maintenant lancé votre jeu.. IL EST EN LA RESOLUTION QUE VOUS AVEZ MIS !
(Screenshoot sur une map fait a l'arrache avec les RTP)
Mais vous remarquerez que le jeu lag donc on va arranger ca avec ces scripts que vous allez ajouter de la même façon que vous avez ajoutez le 1er script :
1er script anti-lag :
- Code:
#===============================================================================
# Framerate Independence
# By Jet10985 (Jet)
#===============================================================================
# This snippet will change the inner movement and time-based operations of
# Ace to accomadate a lower fps than expected, meaning it will experience the
# same change despite not having been interated over as many times as expected.
# This script has: 0 customization options.
#===============================================================================
# Overwritten Methods:
# Spriteset_Weather: update_sprite_rain, update_sprite_snow, update_sprite_storm
# Game_Map: update_parallax
# Game_Picture: update_rotate
# Game_Screen: update_weather
#-------------------------------------------------------------------------------
# Aliased methods:
# Graphics: update
# Game_CharacterBase: distance_per_frame
# Game_Map: scroll_distance
# Game_Picture: update_move, update_tone_change
# Game_Screen: update_fadeout, update_fadein, update_shake, update_flash,
# update_tone
#===============================================================================
class << Graphics
def delta
@delta
end
def update_delta
@this_frame = Time.now
@delta = (@this_frame - @last_frame)
@last_frame = @this_frame
if @delta >= 1 || @delta == 0.0
@delta = 1 / Graphics.frame_rate.to_f
end
end
def fps_difference
((1 / Graphics.delta).round / Graphics.frame_rate.to_f)
end
alias jet2734_update update
def update(*args, &block)
jet2734_update(*args, &block)
@last_frame ||= Time.now
update_delta
end
end
class Game_CharacterBase
alias jet3845_distance_per_frame distance_per_frame
def distance_per_frame(*args, &block)
jet3845_distance_per_frame(*args, &block) / Graphics.fps_difference
end
end
class Spriteset_Weather
def update_sprite_rain(sprite)
sprite.bitmap = @rain_bitmap
sprite.x -= Graphics.frame_rate * Graphics.delta
sprite.y += Graphics.frame_rate * Graphics.delta * 6
sprite.opacity -= Graphics.frame_rate * Graphics.delta * 12
end
def update_sprite_storm(sprite)
sprite.bitmap = @storm_bitmap
sprite.x -= Graphics.frame_rate * Graphics.delta * 3
sprite.y += Graphics.frame_rate * Graphics.delta * 6
sprite.opacity -= Graphics.frame_rate * Graphics.delta * 12
end
def update_sprite_snow(sprite)
sprite.bitmap = @snow_bitmap
sprite.x -= Graphics.frame_rate * Graphics.delta
sprite.y += Graphics.frame_rate * Graphics.delta * 3
sprite.opacity -= Graphics.frame_rate * Graphics.delta * 12
end
end
class Game_Map
alias jet7345_scroll_distance scroll_distance
def scroll_distance(*args, &block)
jet7345_scroll_distance(*args, &block) / Graphics.fps_difference
end
def update_parallax
sx = @parallax_sx / 64.0
sx /= Graphics.fps_difference
sy = @parallax_sy / 64.0
sy /= Graphics.fps_difference
@parallax_x += sx if @parallax_loop_x
@parallax_y += sy if @parallax_loop_y
end
end
class Game_Picture
alias jet2938_update_move update_move
def update_move(*args, &block)
did = @duration != 0
jet2938_update_move(*args, &block)
return if !did || @duration == 0
@duration += 1
@duration -= Graphics.frame_rate * Graphics.delta
if @duration > 0 && @duration < 1
@duration = 1
else
@duration = [@duration, 0].max
end
end
alias jet2938_update_tone_change update_tone_change
def update_tone_change(*args, &block)
did = @tone_duration != 0
jet2938_update_tone_change(*args, &block)
return if !did || @tone_duration == 0
@tone_duration += 1
@tone_duration -= Graphics.frame_rate * Graphics.delta
if @tone_duration > 0 && @tone_duration < 1
@tone_duration = 1
else
@tone_duration = [@tone_duration, 0].max
end
end
def update_rotate
return if @rotate_speed == 0
to_add = @rotate_speed / 2.0
to_add /= Graphics.fps_difference
@angle += to_add
@angle += 360 while @angle < 0
@angle %= 360
end
end
class Game_Screen
alias jet2938_update_fadeout update_fadeout
def update_fadeout(*args, &block)
did = @fadeout_duration != 0
jet2938_update_fadeout(*args, &block)
return if !did || @fadeout_duration == 0
@fadeout_duration += 1
@fadeout_duration -= Graphics.frame_rate * Graphics.delta
if @fadeout_duration > 0 && @fadeout_duration < 1
@fadeout_duration = 1
else
@fadeout_duration = [@fadeout_duration, 0].max
end
end
alias jet2938_update_fadein update_fadein
def update_fadein(*args, &block)
did = @fadein_duration != 0
jet2938_update_fadein(*args, &block)
return if !did || @fadein_duration == 0
@fadein_duration += 1
@fadein_duration -= Graphics.frame_rate * Graphics.delta
if @fadein_duration > 0 && @fadein_duration < 1
@fadein_duration = 1
else
@fadein_duration = [@fadein_duration, 0].max
end
end
alias jet2938_update_tone update_tone
def update_tone(*args, &block)
did = @tone_duration != 0
jet2938_update_tone(*args, &block)
return if !did || @tone_duration == 0
@tone_duration += 1
@tone_duration -= Graphics.frame_rate * Graphics.delta
if @tone_duration > 0 && @tone_duration < 1
@tone_duration = 1
else
@tone_duration = [@tone_duration, 0].max
end
end
alias jet2938_update_flash update_flash
def update_flash(*args, &block)
did = @flash_duration != 0
jet2938_update_flash(*args, &block)
return if !did || @flash_duration == 0
@flash_duration += 1
@flash_duration -= Graphics.frame_rate * Graphics.delta
if @flash_duration > 0 && @flash_duration < 1
@flash_duration = 1
else
@flash_duration = [@flash_duration, 0].max
end
end
alias jet2938_update_shake update_shake
def update_shake(*args, &block)
did = @shake_duration != 0
jet2938_update_shake(*args, &block)
return if !did || @shake_duration == 0
@shake_duration += 1
@shake_duration -= Graphics.frame_rate * Graphics.delta
if @shake_duration > 0 && @shake_duration < 1
@shake_duration = 1
else
@shake_duration = [@shake_duration, 0].max
end
end
def update_weather
if @weather_duration > 0
d = @weather_duration
@weather_power = (@weather_power * (d - 1) + @weather_power_target) / d
@weather_duration -= Graphics.frame_rate * Graphics.delta
if @weather_duration <= 0 && @weather_power_target == 0
@weather_type = :none
end
end
end
end
- Code:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# RGSS3 Plane v1.3.1
# FenixFyreX
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This is a rewrite of RGSS3's Plane class, mainly for use with custom resolution
# alterations of RPG Maker VXAce. This allows Plane to function properly on
# larger resolutions than the hard-coded 640px x 480px in the dll.
#
# It also correctly displays ox and oy offset and such, just like the original.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# CHANGELOG
# - Added in caching of plane bitmaps, to stop the lag from persisting.
# - Fixed potential bug where when the viewport was set, the bitmap would
# retile incorrectly.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# To remove any artifacts / conflicts with the original, we alias it then remove
# the original tie.
RGSS3Plane = Plane
Object.send(:remove_const, :Plane)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Bitmap
# Saves a bitmap's name, for future reference.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
class Bitmap
alias fyx_initialize_save_name initialize
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# initialize
# Instantiate a bitmap's name, if given one.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def initialize(*argv, &argb)
@name = ''
if name = argv.find {|arg| arg.is_a?(String) }
@name = name
end
fyx_initialize_save_name(*argv, &argb)
end
attr_reader :name
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache
# Add in Plane caching, to speed up processing at the slight cost of memory.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
module Cache
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache::plane_cache
# Convenience method, to not have to type it out in the below methods.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def self.plane_cache
@plane_cache ||= {}
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache::plane
# Get a cached plane bitmap.
# key : Object ( most likely an Array e.g. [Rect, String] )
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def self.plane(key)
return plane_cache[key]
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache::add_plane
# Add a tiled plane bitmap to the cache.
# key : Object ( see above )
# bmp : Bitmap
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def self.add_plane(key, bmp)
plane_cache[key] = bmp
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache::has_plane?
# Check for a cached plane bitmap.
# key : Object ( see above )
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def self.has_plane?(key)
plane_cache[key].is_a?(Bitmap)
end
class << self; alias clear_b4_fyx_plane_cache clear; end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Cache::clear
# See original documentation.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def self.clear
plane_cache.each_value {|v| v.dispose unless v.nil? || v.disposed? }
plane_cache.clear
clear_b4_fyx_plane_cache
end
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Plane
# Tiles a bitmap across either the window rect, or a given viewport's rect.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
class Plane
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# initialize
# Setup an allocated instance of Plane.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def initialize(v = nil)
@sprite = Sprite.new(v)
@bitmap = nil
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# dispose
# Free an instance of Plane.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def dispose
@sprite.bitmap.dispose unless bitmap_disposed?
@sprite.dispose unless disposed?
return nil
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# bitmap_disposed?
# Check whether this instance of Plane's bitmap has been freed.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def bitmap_disposed?
disposed? || @sprite.bitmap.nil? || @sprite.bitmap.disposed?
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# disposed?
# Check whether this instance of Plane has been freed.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def disposed?
@sprite.nil? || @sprite.disposed?
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# ox=
# Set the offset x of this instance of Plane.
# val : Integer
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def ox=(val)
@sprite.ox = (val % (@bitmap.nil? ? 1 : @bitmap.width))
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# oy=
# Set the offset y of this instance of Plane.
# val : Integer
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def oy=(val)
@sprite.oy = (val % (@bitmap.nil? ? 1 : @bitmap.height))
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# bitmap
# Get the tile bitmap of this instance of Plane.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def bitmap
@bitmap
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# viewport=
# Set the viewport, and refresh if the vrect has changed.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def viewport=(v)
r = v.nil? ? Rect.new(0, 0, Graphics.width, Graphics.height) : v.rect
b = r != vrect
ret = @sprite.viewport = v
self.bitmap = @bitmap if b
return ret
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# bitmap=
# Set the tile bitmap of this instance of Plane.
# bmp : Bitmap
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def bitmap=(bmp)
w, h = vrect.width, vrect.height
nw = bmp.width <= 100 ? 2 : 3
nh = bmp.height <= 100 ? 2 : 3
dx = [(w / bmp.width).ceil, 1].max * nw
dy = [(h / bmp.height).ceil, 1].max * nh
bw = dx * bmp.width
bh = dy * bmp.height
@bitmap = bmp
key = [vrect.clone, bmp.name]
if Cache.has_plane?(key)
@sprite.bitmap = Cache.plane(key)
else
@sprite.bitmap = Bitmap.new(bw, bh)
dx.times do |x|
dy.times do |y|
@sprite.bitmap.blt(x * bmp.width, y * bmp.height, @bitmap, @bitmap.rect)
end
end
Cache.add_plane(key, @sprite.bitmap)
end
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# method_missing
# Here we let any methods not found in this class be redirected to our
# underlying sprite.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def method_missing(sym, *argv, &argb)
if @sprite.respond_to?(sym)
return @sprite.send(sym, *argv, &argb)
end
super(sym, *argv, &argb)
end
# private methods from here down
private
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# vrect
# Get the view rect of this instance of Plane, which depends on if the
# viewport has been set or not.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def vrect
@sprite.viewport.nil? ? Rect.new(0, 0, Graphics.width, Graphics.height) :
@sprite.viewport.rect
end
end
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# SCRIPT END
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Après en combat, les personnages ne sont pas a la bonne place, utilisé donc ce script :
- Code:
=begin
================================================================================
Title: Battle Sprite Auto-position
Author: Hime
Date: Dec 19, 2014
--------------------------------------------------------------------------------
** Change log
Dec 19, 2014
- Use ratios to adjust the resolutions rather than offsetting by the
difference between resolutions
May 6, 2012
-Initial release
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Contact me for commercial use
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Hime Works in your project
* Preserve this header
--------------------------------------------------------------------------------
** Description
This script adjusts the position that the battle sprites are drawn
relative to the game screen size. This allows you to set your enemy
positions in the troop editor without having to consider the size of
your window (544x416 default vs sizes)
--------------------------------------------------------------------------------
** Installation
In the script editor, place this script below Materials and above Main
--------------------------------------------------------------------------------
** Usage
Plug-n-play
==============================================================================
=end
$imported = {} if $imported.nil?
$imported[:TH_BattleSpriteAutoPosition] = true
#===============================================================================
# ** Rest of the Script
#===============================================================================
class Game_Troop < Game_Unit
#--------------------------------------------------------------------------
# alias method
#--------------------------------------------------------------------------
alias :th_sprite_autopos_setup :setup
def setup(troop_id)
th_sprite_autopos_setup(troop_id)
adjust_coords
end
#--------------------------------------------------------------------------
# new method: adjust enemy battler coords
#--------------------------------------------------------------------------
def adjust_coords
adjust_x = Graphics.width / 750.0
adjust_y = Graphics.height / 360.0
@enemies.each do |enemy|
enemy.screen_x *= adjust_x
enemy.screen_y *= adjust_y
end
end
end
Si vous avez des questions ou des problèmes n'hésitez pas a les posés
- Narak1Membre
- Nombre de messages : 130
Age : 32
Distinction : aucune
Date d'inscription : 09/11/2014
Re: Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Mer 6 Mai 2015 - 11:43
- KyoMauditMembre
- Nombre de messages : 236
Age : 26
Localisation : Pas de Calais
Distinction : aucune
Date d'inscription : 19/10/2014
Re: Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Jeu 7 Mai 2015 - 10:54
Le screen est ajouté
Et le comme question avec le lien vers le problème je n'ai pas compris
Et le comme question avec le lien vers le problème je n'ai pas compris
- Narak1Membre
- Nombre de messages : 130
Age : 32
Distinction : aucune
Date d'inscription : 09/11/2014
Re: Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Jeu 7 Mai 2015 - 11:01
Pardon Pardon
Pour le inintéressant, j'ai surement oublié la majuscule en début de phrase, j'ai voulu réécrire et le "in" est passé deux fois. j'ai édité mon message.
Pour la question est ce qu'il faut modifier le dll après chaque sauvegarde du projet?
Pour le inintéressant, j'ai surement oublié la majuscule en début de phrase, j'ai voulu réécrire et le "in" est passé deux fois. j'ai édité mon message.
Pour la question est ce qu'il faut modifier le dll après chaque sauvegarde du projet?
- ZangtherMembre
- Nombre de messages : 913
Distinction : aucune
Date d'inscription : 06/02/2013
Re: Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Jeu 7 Mai 2015 - 11:51
Est ce que ça fonctionne correctement avec les panoramas, image défilantes et autres effets graphiques ?
- KyoMauditMembre
- Nombre de messages : 236
Age : 26
Localisation : Pas de Calais
Distinction : aucune
Date d'inscription : 19/10/2014
Re: Tutoriel : Augmenter la résolution de RPG Maker Vx Ace
Jeu 7 Mai 2015 - 12:47
Narak : J'ai donc aussi modifier mon message ^^
Tout dépends ta version, sur certaine version de RPG Maker on a une RGSS300.dll et d'autre RGSS301.dll
Si tu possède une RGSS300.dll (comme moi) Laisse le RGSS301.dll et Modifie le Game.ini a chaque enregistrement car sinon tu possède une RGSS300.dll et que tu renomme RGSS301.dll en RGSS300.dll (Ce que tu peux faire) A chaque enregistrement de ton projet la dll est remplacé par c'elle d'origine et donc c'est plus facile de Modifier un Game.ini que remplacé a chaque fois la dll car si tu la laisse en RGSS301.dll et que tu as une RGSS300.dll et que dans Game.ini tu met en library RGSS301.dll cela fonctionne mais comme je l'ai dis, a chaque sauvegarde le Game.ini retourne a son état de library RGSS300.dll Mais j'ai beau me retourner la tête je trouve pas de solution au problème :/
Zangther : Pour les paronamas et image défilantes ca marche parfaitement, il faut juste redimensionner les images et pour les effets graphiques apparament ca marche parfaitement, j'utilise MOG - Weather EX de Moghunter (Qui grace a un appel de script fait par exemple tombé de la neige), il marche parfaitement après avoir modifier dans le script de Moghunter la taille car il ne le faisait que sur une partie de l'écran (Taille de RPG Maker par défaut)
Tout dépends ta version, sur certaine version de RPG Maker on a une RGSS300.dll et d'autre RGSS301.dll
Si tu possède une RGSS300.dll (comme moi) Laisse le RGSS301.dll et Modifie le Game.ini a chaque enregistrement car sinon tu possède une RGSS300.dll et que tu renomme RGSS301.dll en RGSS300.dll (Ce que tu peux faire) A chaque enregistrement de ton projet la dll est remplacé par c'elle d'origine et donc c'est plus facile de Modifier un Game.ini que remplacé a chaque fois la dll car si tu la laisse en RGSS301.dll et que tu as une RGSS300.dll et que dans Game.ini tu met en library RGSS301.dll cela fonctionne mais comme je l'ai dis, a chaque sauvegarde le Game.ini retourne a son état de library RGSS300.dll Mais j'ai beau me retourner la tête je trouve pas de solution au problème :/
Zangther : Pour les paronamas et image défilantes ca marche parfaitement, il faut juste redimensionner les images et pour les effets graphiques apparament ca marche parfaitement, j'utilise MOG - Weather EX de Moghunter (Qui grace a un appel de script fait par exemple tombé de la neige), il marche parfaitement après avoir modifier dans le script de Moghunter la taille car il ne le faisait que sur une partie de l'écran (Taille de RPG Maker par défaut)
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|