Jump to content
Rpg²S Forum

Rei Actor Resize


Melosx
 Share

Recommended Posts

Rei Actor Resize

Descrizione

Cambia la grandezza della grafica di chara ed eventi.

 

Autore

reijubv

 

Istruzioni per l'uso

All'interno dello script.

 

Script

 

 

#===============================================================================# �€� [VX] �€� Rei Actor Resize �€� �€�# �€� Change player's or event's graphic size �€�#-------------------------------------------------------------------------------# �€� by reijubv [aruyasoft@comic.com]# �€� Released on: 27/04/2009# �€� Version: 2.2c (June 12th 2009)#-------------------------------------------------------------------------------# > Changelog:#   V.1.0 (25-04-09) = Initial release#   V.2.0 (01-05-09) = Now resizing event's graphic is possible!#   V.2.1 (04-05-09) = Compatible with Woratana's caterpillar script!#   V.2.1b(13-05-09) = Compatible with Trickster's caterpillar script!#   V.2.1c(14-05-09) = Compatible with Originalwij's pet script!#   V.2.2 (17-05-09) = Now resizing individual event's size is possible!#   V.2.2b(17-05-09) = Now using array to store event's size, making it easier#					  for people to resize each events individually!#   V.2.2c(12-06-09) = Added a global variable used for compatibility#-------------------------------------------------------------------------------# �€� Information:# A small script that allows you to change the size of player/event's graphic#----------------# V.2.0 Feature :#----------------# You can also change an event's graphic size now!# To change an event's graphic size, you MUST do these things :# (these examples are from the script's default settings)# 1. adds this line to event's comment :# rzoom# 2. turn on the switch from the setting below (the one that called EFLAG)# 3. see the effect yourself on your game!# See the demo if you don't understand!#----------------# V.2.1 Feature :#----------------# Compatible with Woratana caterpillar script!# For setting compatibility with it, uncomment line 226-228#-----------------# V.2.1b Feature :#-----------------# Compatible with Trickster's caterpillar script!# For setting compatibility with it, uncomment line 232-234#-----------------# V.2.1c Feature :#-----------------# Compatible with Originalwij's pet script!# For setting compatibility with it, uncomment line 238-240#----------------# V.2.2 Feature :#----------------# (NOT FUNCTIONAL ANYMORE, SKIP TO V.2.1b INSTEAD!) :# You can now specify each event's size by using these comments :# [rsx#] and [rsy#]# Put those comments in one line or in other comment command,# [rsx#] Will change the event's X size to ## [rsy#] Will change the event's Y size to ## Those feature will only works for non-decymal value.# Decymal value will use an integer that is the closest to it, example :# 1.2 will return 1, and 1.8 will return 2# Example for usage :# [rsx2][rsy3]# Will change event's X size to 2, and Y size to 3# ----------------# V.2.2b Feature :#-----------------# Now you can use an array to store value you can use to resizing events,# Setup it in Rei module below.# [rsvx#] and [rsvy#];# To use them, type those comments in 1 line, like V.2.1 feature, but never use# both V.2.2 and V.2.1 features in 1 event, to avoid bugs.# [rsvx#] Will change the event's X size to index #  in the ARR variable below# [rsvy#] Will change the event's Y size to index #  in the ARR variable below# Example for usage :# [rsvx0][rsvy3]# Change event's X size to a number in ARR variable from Rei module in index 0# and Y size to a number in ARR variable from Rei module in index 3#-------------------------------------------------------------------------------# You can put all those comments in one line, like rzoom[rsvx#][rsvy#]#-------------------------------------------------------------------------------# reijubv for making this script.# Miget man12 for making this script compatible with Woratana's caterpillar script.#-------------------------------------------------------------------------------# ? Installation:# Put this script above main, setup script below#=============================================================================== $imported = {} if $imported == nil$imported["Rei_"+"ZoomActor"] = true #---------------------------------------------------------------------------# ** Rei Module#---------------------------------------------------------------------------module Rei  module ZoomActor	#---------------------------------------------------------------------------	# * Customize script here!	#---------------------------------------------------------------------------	#For player	ZOOMX = 0.6	 # Change actor's horizontal size here	ZOOMY = 0.6	 # Change actor's vertical size here	FLAG  = 599	   # Switch Id to (de)activate this script effect to player   	# (V.2.0)	# For event	ECOMM = "rzoom" # Write this to an event's comment to change it's size					# automatically.					# Event that doesn't have this comment won't be affected					# even if the switch is turned on!	EFLAG = 4	   # Switch Id to (de)activate this script effect to events				EZUMX = 0.6	 # Change event's horizontal size here, 0.1 minimum	EZUMY = 0.6	 # Change event's vertical size here, 0.1 minimum 					# To change those variables in game, call script :					# Rei::ZoomActor::FLAG =switchId					# Rei::ZoomActor::EFLAG=switchId					# Rei::ZoomActor::ECOMM="writesomethinghere"					# Rei::ZoomActor::ZOOMX=#					# Rei::ZoomActor::ZOOMY=#					# Rei::ZoomActor::EZUMX=#					# Rei::ZoomActor::EZUMY=#					# Change siwtchId with, ehm, a switch's Id..					# Change # with a number!					# Change writesomethinghere with umm, something you want    # V.2.2b  			 #0	1	2	3	4	5	6	7	8	9	 ARR  = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,			 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0,			 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0,			 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0,			 #You can add more here			 ]			 # This array is for storing predefined size value			 # to be used when using V.2.2b feature.			 # Each line after the first have it's index added by 10			 # Example : 3.1 index is 30, 1.6 index is 15 	#---------------------------------------------------------------------------	# * Stop customize script here!	#---------------------------------------------------------------------------  endend #==============================================================================# ** Game_Event#------------------------------------------------------------------------------#  This class deals with events. It handles functions including event page# switching via condition determinants, and running parallel process events.# It's used within the Game_Map class.#============================================================================== class Game_Event < Game_Character  attr_accessor :reixid  attr_accessor :reiyid  attr_reader :reiarr  alias reiinit initialize unless method_defined?('reiinit')   def initialize(map_id, event)	@reixid = 9	@reiyid = 9	@reiarr  = [@reixid,@reiyid]	reiinit(map_id, event)  end    def getsizeindex	if !@list.nil?	for i in 0...@list.size - 1	  next if @list[i].code != 108		if @list[i].parameters[0].include?("[rsvx")		  list = @list[i].parameters[0].scan(/[rsvx([0-9]+)]/)		  @reixid = $1.to_i		end		if @list[i].parameters[0].include?("[rsvy")		  list = @list[i].parameters[0].scan(/[rsvy([0-9]+)]/)		  @reiyid = $1.to_i		end	  end	  @reiarr = [@reixid,@reiyid]	  return @reiarr	end  end	#---------------------------------------------------------------------------	# * check if event has a specified comment	#---------------------------------------------------------------------------  def has_comment?(comment, return_comment = false )	if !@list.nil?	  for i in 0...@list.size - 1		next if @list[i].code != 108		  if @list[i].parameters[0].include?(comment)			return @list[i].parameters[0] if return_comment			return true		  end	  end	  return '' if return_comment	  return false	end  endend #==============================================================================# ** Sprite_Character#------------------------------------------------------------------------------#  This sprite is used to display characters. It observes a instance of the# Game_Character class and automatically changes sprite conditions.#============================================================================== class Sprite_Character < Sprite_Base  #--------------------------------------------------------------------------  # * Aliases  #--------------------------------------------------------------------------    alias rei_update update unless method_defined?('rei_update')  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update	if @character.is_a?(Game_Player) and $game_switches[Rei::ZoomActor::FLAG]	  self.zoom_x = Rei::ZoomActor::ZOOMX	  self.zoom_y = Rei::ZoomActor::ZOOMY	elsif @character.is_a?(Game_Event) and $game_switches[Rei::ZoomActor::EFLAG] and @character.has_comment?(Rei::ZoomActor::ECOMM)	  if @character.has_comment?("[rsvx")		self.zoom_x = Rei::ZoomActor::ARR[@character.getsizeindex[0]]	  else		self.zoom_x = Rei::ZoomActor::EZUMX	  end	  if @character.has_comment?("[rsvy")		self.zoom_y = Rei::ZoomActor::ARR[@character.getsizeindex[1]]	  else		self.zoom_y = Rei::ZoomActor::EZUMY	  end 	#UNCOMMENT BELOW LINES IF YOU USE WORATANA'S CATERPILLAR SCRIPT		#elsif @character.is_a?(Game_WCateracter) and $game_switches[Rei::ZoomActor::FLAG]==true	#  self.zoom_x = Rei::ZoomActor::ZOOMX	#  self.zoom_y = Rei::ZoomActor::ZOOMY	#UNCOMMENT ABOVE LINES IF YOU USE WORATANA'S CATERPILLAR SCRIPT 	#UNCOMMENT BELOW LINES IF YOU USE TRICKSTER'S CATERPILLAR SCRIPT	#elsif @character.is_a?(Game_Follower) and $game_switches[Rei::ZoomActor::FLAG]	#  self.zoom_x = Rei::ZoomActor::ZOOMX	#  self.zoom_y = Rei::ZoomActor::ZOOMY	#UNCOMMENT ABOVE LINES IF YOU USE TRICKSTER'S CATERPILLAR SCRIPT 	#UNCOMMENT BELOW LINES IF YOU USE ORIGINALWIJ'S PET SCRIPT	#elsif @character.is_a?(Game_Pet) and $game_switches[Rei::ZoomActor::FLAG]	#  self.zoom_x = Rei::ZoomActor::ZOOMX	#  self.zoom_y = Rei::ZoomActor::ZOOMY	#UNCOMMENT ABOVE LINES IF YOU USE TRICKSTER'S CATERPILLAR SCRIPT	   else	  self.zoom_x = 1.0	  self.zoom_y = 1.0	end	rei_update  endend

 

 

 

Bugs e Conflitti Noti

N/A

http://i.imgur.com/ROhv4te.png



287x66-white.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...