Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rudria

1
please fix it !!! :^_^':
2
G_G you know ???
State cycling Original script not only need sdk but need several support script.

bitmap.memory
Spoiler: ShowHide

=begin
==============================================================================
** Bitmap.memory
------------------------------------------------------------------------------
Description:
------------
 Specialized Methods for tbe bitmap class for remembering text. Also includes
 a non-laggy draw_text method based on the original draw text which stores the
 text in memory and calls blt instead of draw_text if it is needed again. One
 thing to remember is to call Bitmap.clear_text_memory
 Bitmap.clear_formatted_text_memory to dispose of all memorized sprites
 when you are finished (preferably at the end of a scene).
   
 When Benchmarked drawing the string 'Hello World '*5 100 times the results
   draw_text_memory around 0.266 seconds
   draw_wrap_text_memory around 1.969 seconds
   draw_formatted_text_memory around 0.266 seconds
   draw_text around 6.235 seconds
 
Method List:
------------
 Bitmap.clear_text_memory
 Bitmap.clear_formatted_text_memory
 clear_memory
 cleat_to_memory
 draw_formatted_text_memory
 draw_text_memory
 draw_wrap_text_memory
 get_formatted_size (from Bitmap.text)
 set_memory
 
Support Methods:
-------------
 class Hash
   contains_key?
   get_value
 class Font
   == (comparision equals)
==============================================================================
=end

MACL::Loaded << 'Bitmap.memory'

class Bitmap
 #--------------------------------------------------------------------------
 # * Class Variables
 #--------------------------------------------------------------------------
 class_reader :text_memory, :formatted_text_memory
 #-------------------------------------------------------------------------
 # * Class Variables
 #-------------------------------------------------------------------------
 @@text_memory, @@formatted_text_memory = {}, {}
 #-------------------------------------------------------------------------
 #   Name      : Clear Text Memory
 #   Info      : Clears Text Memory
 #   Author    : Trickster
 #   Call Info : No Arguments
 #   Comment   : Should be called at the end of every scene where
 #               draw_text_memory or draw_wrap_text_memory is used
 #-------------------------------------------------------------------------
 def self.clear_text_memory
   # Run Through Each Bitmap In Text Memory and dispose
   @@text_memory.each_value {|bitmap| bitmap.dispose}
   # Clear
   @@text_memory.clear
 end
 #-------------------------------------------------------------------------
 #   Name      : Clear Formatted Text Memory
 #   Info      : Clears Formatted Text Memory
 #   Author    : Trickster
 #   Call Info : No Arguments
 #   Returns   : Nothing
 #   Comment   : Should be called at the end of every scene where
 #               draw_formatted_text_memory is used
 #-------------------------------------------------------------------------
 def self.clear_formatted_text_memory
   # Run Through Each Bitmap In Text Memory and dispose
   @@formatted_text_memory.each_value {|bitmap| bitmap.dispose}
   # Clear
   @@formatted_text_memory.clear
 end
 #-------------------------------------------------------------------------
 #   Name      : Clear Memory
 #   Info      : Clears Bitmap Memory
 #   Author    : Trickster
 #   Call Info : No Arguments
 #-------------------------------------------------------------------------
 def clear_memory
   # Dispose Memory
   @memory.dispose
   # Set To nil
   @memory = nil
 end
 #-------------------------------------------------------------------------
 #   Name      : Clear To Memory
 #   Info      : Clears to Bitmap Memory
 #   Author    : Trickster
 #   Call Info : No Arguments
 #-------------------------------------------------------------------------
 def clear_to_memory
   # Clear Bitmap
   clear
   # Draw Memory if it is a Bitmap
   blt(0, 0, @memory, rect) if @memory.is_a?(Bitmap)
 end
 #-------------------------------------------------------------------------
 #   Name      : Draw Formatted Text Memory
 #   Info      : Draws Formatted Wrapped Text from Memory
 #   Author    : Trickster
 #   Call Info : Five Arguments
 #               Integer Offset_x and Offset_Y, define starting position
 #               Integer Width, defines the width of the text rectangle
 #               Integer Height, defines the height of the text drawn
 #               String Text, The text to be drawn
 #   Comment   : C[rrggbb] -> Change Color values are in hex
 #               C[N] -> Change Color to Normal Color
 #               B[] -> Turns on/off Bold
 #               I[] -> Turns on/off Italics
 #               T[] -> Tab (4 Spaces)
 #               N[] -> Newline
 #-------------------------------------------------------------------------
 def draw_formatted_text_memory(x, y, width, height, text)
   # If Already drawn
   if @@formatted_text_memory.has_key?(text)
     # Get Bitmap
     bitmap = @@formatted_text_memory[text]
     # Draw Bitmap
     blt(x, y, bitmap, bitmap.rect)
   else
     # Get Height of Text Drawn
     height = get_formatted_size(x, y, width, height, text).height
     # Create Text Bitmap
     text_bitmap = Bitmap.new(width, height)
     # Initialize X and Y
     cx, cy = 0, 0
     # Setup Font Color
     text_bitmap.font.color = Color.new(255, 255, 255)
     # Setup Save String
     string = text.dup
     # Make a Copy of Text
     text = text.dup
     # Replace C[Hex+] or C[N] with \001[Matched]
     text.gsub!(/[Cc]\[([A-F a-f 0-9]+|N)\]/) {" \001[#{$1}] "}
     # Replace B[] with \002
     text.gsub!(/[Bb]\[\]/) {" \002 "}
     # Replace I[] with \003
     text.gsub!(/[Ii]\[\]/) {" \003 "}
     # Replace T[] with \004
     text.gsub!(/[Tt]\[\]/) {" \004 "}
     # Replace N[] with \005
     text.gsub!(/[Nn]\[\]/) {" \005 "}
     # Run Through each text
     text.split(/\s/).each do |word|
       # If String \001 is included
       if word.include?("\001")
         # Slice from String
         word.slice!("\001")
         # Change text color
         word.sub!(/[Cc]\[([A-F a-f 0-9]+|N)\]/, '')
         # If matched is not nil and size of match is > 1
         if $1 != nil and $1.size > 1
           # Create Color
           color = Color.new($1[0..1].hex, $1[2..3].hex, $1[4..5].hex)
         else
           # Normal Color
           color = Color.new(255, 255, 255)
         end
         # Set Color
         self.font.color = color
         # Go to next text
         next
       end
       # If String \002 is included
       if word.include?("\002")
         # Invert Bold Status
         self.font.bold = !self.font.bold
         # Go to next text
         next
       end
       # If String \003 is included
       if word.include?("\003")
         # Invert Italic Status
         self.font.italic = !self.font.italic
         # Go to next text
         next
       end
       # If String \004 is included
       if word.include?("\004")
         # Add Four Spaces
         x += text_size('    ').width
         # Go to next text
         next
       end
       # If String \005 is included
       if word.include?("\005")
         # Move to new line
         cy = cx / width + 1
         # Move to start
         cx = cy * width
         # Go to next text
         next
       end
       # Get Word Width
       word_width = text_size("#{word} ").width
       # If can't fit on line
       if (cx + word_width) % width < x % width
         # Move to new line
         cy = cx / width + 1
         # Move to start
         cx = cy * width
       end
       # Get Draw X
       dx = cx % width + x
       # Get Draw Y
       dy = cx / width * height + y
       # Draw Text
       text_bitmap.draw_text(dx, dy, word_width, 32, word)
       # Increase by Word Width
       cx += word_width
     end
     # Save Copy of Bitmap
     @@formatted_text_memory[string] = text_bitmap
     # Draw onto Bitmap
     blt(x, y, text_bitmap, text_bitmap.rect)
   end
 end
 #-------------------------------------------------------------------------
 #   Name      : Draw Text Memory
 #   Info      : Draws Text and Saves it to Text_Memory
 #   Author    : Trickster
 #   Call Info : Two,Three,Five or Six Arguments
 #               Two Arguments: rect, str
 #                 Rect rect for the text to be drawn
 #                 String str text to be drawn
 #               Three Arguments: rect, str, align
 #                 Rect rect for the text to be drawn
 #                 String str text to be drawn
 #                 Integer align 0: left 1: center 2:right
 #               Five Arguments: x,y,width,height,str
 #                 Integer X and Y, Defines Position
 #                 Width and Height, Defines Width and Hieght of the text drawn
 #                 String str text to be drawn
 #               Six Arguments: x,y,width,height,str,align
 #                 Integer X and Y, Defines Position
 #                 Width and Height, Defines Width and Hieght of the text drawn
 #                 String str text to be drawn
 #                 Integer align 0: left 1: center 2:right
 #-------------------------------------------------------------------------
 def draw_text_memory(*args)
   # If Two Arguments Sent
   if args.size == 2
     # Default align, Rect and String were sent
     align, rect, str = 0, *args
   # If Three Arguments Sent
   elsif args.size == 3
     # All Were Sent Rect String and Alignment
     rect, str, align = args
   # If Five Arguments Sent
   elsif args.size == 5
     # Create Rect from (X,Y,Width,Height), Set String, Default align
     rect, str, align = Rect.new(*args[0, 4]), args[4], 0
   # If Six Arguments Sent
   elsif args.size == 6
     # Create Rect from (X,Y,Width,Height), Set String and align      
     rect, str, align = Rect.new(*args[0, 4]), *args[4, 2]
   end
   # Create Text Rect from Rect
   txt_rect = Rect.new(0, 0, rect.width, rect.height)
   # If Key is contained
   if @@text_memory.contains_key?([font, txt_rect, str])
     # Get Bitmap
     bitmap = @@text_memory.get_value([font, txt_rect, str])
     # Draw Bitmap by getting value from hash
     blt(rect.x, rect.y, bitmap, txt_rect)
   else
     # Create Bitmap
     bitmap = Bitmap.new(rect.width, rect.height)
     # Make A Copy of the Font
     bitmap.font = font.dup
     # Draw Text on bitmap
     bitmap.draw_text(txt_rect, str, align)
     # Draw Bitmap
     blt(rect.x, rect.y, bitmap, txt_rect)
     # Set Text Memory
     @@text_memory[[font.dup, txt_rect, str]] = bitmap
   end
 end
 #-------------------------------------------------------------------------
 #   Name      : Draw Wrapped Text From Memory
 #   Info      : Draws Text with Text Wrap and Saves it
 #   Author    : Trickster
 #   Call Info : Five
 #               Integer X and Y, Define Position
 #               Integer Width, defines the width of the text rectangle
 #               Integer Height, defines the height of the text
 #               String Text, Text to be drawn
 #-------------------------------------------------------------------------
 def draw_wrap_text_memory(x, y, width, height, text)
   # Get Array of Text
   strings = text.split
   # Run Through Array of Strings
   strings.each do |string|
     # Get Word
     word = string + ' '
     # Get Word Width
     word_width = text_size(word).width
     # If Can't Fit on Line move to next one
     x, y = 0, y + height if x + word_width > width
     # Draw Text Memory
     draw_text_memory(x, y, word_width, height, word)
     # Add To X
     x += word_width
   end
 end
 #-------------------------------------------------------------------------
 #   Name      : Get Formatted Text Size
 #   Info      : Gets Rect information for drawing formatted text
 #               The Rect Object Returned will have this information
 #               x, x coordinate where drawing ends
 #               y, y coordinate where drawing ends
 #               width, the width sent to this method
 #               height, the height of all of the text drawn
 #   Author    : Trickster
 #   Call Info : Five
 #               Integer X and Y, Define Position
 #               Integer Width, defines the width of the text rectangle
 #               Integer Height, defines the height of the text
 #               String Text, Text to get information for
 #-------------------------------------------------------------------------
 def get_formatted_size(x, y, width, height, text)
   # Make a Copy and Save
   text = text.dup
   # Replace C[Hex+ or N] I[] B[] with nothing
   text.gsub!(/[BbIiCc]\[([A-F a-f 0-9]+|N)*\]/) {''}
   # Replace T[] with \004
   text.gsub!(/[Tt]\[\]/) {" \004 "}
   # Replace N[] with \005
   text.gsub!(/[Nn]\[\]/) {" \005 "}
   # Setup Cx and Cy
   cx, cy = 0, 0
   # Declare Dx and Dx as local variables
   dx, dy = 0, 0
   # Run Through each text
   text.split(/\s/).each do |word|
     # If \004 is included
     if word.include?("\004")
       # Add Four Spaces
       x += text_size(' '*4).width
       # Go to Next Text
       next
     end
     # If \005 is included
     if word.include?("\005")
       # Move to new line
       cy = cx / width + 1
       # Move to start
       cx = cy * width
       # Go to Next Text
       next
     end
     # Get Word Width
     word_width = text_size("#{word} ").width
     # If can't fit on line
     if (cx + word_width) % width < x % width
       # Move to new line
       cy = cx / width + 1
       # Move to start
       cx = cy * width
     end
     # Add Width to X
     cx += word_width
     # Get Draw X and Y
     dx = cx % width + x
     dy = cx / width * height + y
   end
   # Return Rect Object
   return Rect.new(dx, dy, width, (dy - y + height).to_i)
 end
 #-------------------------------------------------------------------------
 #   Name      : Set Memory
 #   Info      : Sets Bitmap Memory
 #   Author    : Trickster
 #   Call Info : No Arguments
 #   Comment   : Use with Clear To Memory
 #-------------------------------------------------------------------------
 def set_memory
   # Make A Clone of itself
   @memory = self.dup
 end
end

class Hash
 #-------------------------------------------------------------------------
 #   Name      : Contains Key?
 #   Info      : Compares all Keys using == similiar to has_key?
 #   Author    : Trickster
 #   Call Info : One, Key an Object
 #-------------------------------------------------------------------------
 def contains_key?(key)
   # Run Through and Return true if keys are equal
   each_key {|other_key| return true if key == other_key}
   # Return false
   return false
 end
 #-------------------------------------------------------------------------
 #   Name      : Get Value
 #   Info      : Gets Value using == similiar to []
 #   Author    : Trickster
 #   Call Info : One, Key an Object
 #-------------------------------------------------------------------------
 def get_value(key)
   # Run Through and Return Key if equal
   each_key {|other_key| return self[other_key] if key == other_key}
   # If Default Proc is undefined return default else call proc
   return default_proc.nil? ? default : default_proc.call(self, key)
 end
end

class Font
 #-------------------------------------------------------------------------
 #   Name      : == (Comparision Equals)
 #   Info      : Compares two Fonts
 #   Author    : Trickster
 #   Call Info : One Argument Font other, Font to Check
 #-------------------------------------------------------------------------
 def ==(other)
   return false unless (name == other.name && size == other.size &&
     color == other.color && bold == other.bold && italic == other.italic)
   instance_variables.each do |var|
     var = var[1...var.size]
     return false if method(var).call != other.method(var).call
   end
   return true
 end
end


and

MACL
Spoiler: ShowHide

module MACL
 #-------------------------------------------------------------------------
 # * Pose Names for Charactersets
 #-------------------------------------------------------------------------
 Poses = ['down','left','right','up']
 #-------------------------------------------------------------------------
 # * Number of Frames Per Pose for charactersets
 #-------------------------------------------------------------------------
 Frames = 4
 #--------------------------------------------------------------------------
 # * Real Elements
 #--------------------------------------------------------------------------
 Real_Elements = 1, 2, 3, 4, 5, 6, 7, 8
 #-------------------------------------------------------------------------
 # * Version Number (Do not Touch)
 #-------------------------------------------------------------------------
 Version   = 2.0
 #-------------------------------------------------------------------------
 # * Path for MACL
 #   - Set to nil to not using outside requiring
 #-------------------------------------------------------------------------
 Path = nil
 #--------------------------------------------------------------------------
 # * Do not Touch
 #--------------------------------------------------------------------------
 Loaded = []
 #--------------------------------------------------------------------------
 # * Set Require Path
 #--------------------------------------------------------------------------
 $: << Path unless $:.include?(Path) and Path != nil
end

#==============================================================================
# ** Action Test Setup
#==============================================================================
class Game_BattleAction
 #-------------------------------------------------------------------------
 # * Attack Using
 #   - Set this to the basic ids that perform an attack effect
 #-------------------------------------------------------------------------
 ATTACK_USING = [0]
 #-------------------------------------------------------------------------
 # * Skill Using
 #   - Set this to the kinds that perform an skill effect
 #-------------------------------------------------------------------------
 SKILL_USING  = [1]
 #-------------------------------------------------------------------------
 # * Defend Using
 #   - Set this to the basic ids that perform an defend effect
 #-------------------------------------------------------------------------
 DEFEND_USING = [1]
 #-------------------------------------------------------------------------
 # * Item Using
 #   - Set this to the kinds that perform a item using effect
 #-------------------------------------------------------------------------
 ITEM_USING   = [2]
 #-------------------------------------------------------------------------
 # * Escape Using
 #   - Set this to the basic ids that perform an escape effect
 #-------------------------------------------------------------------------
 ESCAPE_USING = [2]
 #-------------------------------------------------------------------------
 # * Wait Using
 #   - Set this to the basic ids that perform a wait effect
 #-------------------------------------------------------------------------
 WAIT_USING  = [3]
end

#==============================================================================
# ** Module    
#-----------------------------------------------------------------------------
#  Superclass of the Class class      
#==============================================================================

class Module
 #-------------------------------------------------------------------------
 # * Name      : Class Attribute
 #   Info      : Calls class_reader/writer for a symbol
 #   Author    : Yeyinde
 #   Call Info : symbol, writable
 #               symbol:   A Symbol
 #               writable: Boolean telling is symbol is writable
 #-------------------------------------------------------------------------
 private
 def class_attr(symbol, writable = false)
   class_reader(symbol)
   class_writer(symbol) if writable
   return nil
 end
 #-------------------------------------------------------------------------
 # * Name       : Class Accessor
 #   Info       : Creates reader and writer methods for one or more class
 #                variables
 #   Author     : Yeyinde
 #   Call Info  : One or more Symbols
 #-------------------------------------------------------------------------
 def class_accessor(*symbols)
   class_writer(*symbols)
   class_reader(*symbols)
 end
 #-------------------------------------------------------------------------
 # * Name      : Class Writer
 #   Info      : Creates writer method for one or more class variables
 #   Author    : Yeyinde
 #   Call Info : One or more Symbols
 #-------------------------------------------------------------------------
 def class_writer(*symbols)
   symbols.each do |symbol|
     method = symbol.id2name
     eval("def self.#{method}=(var); @@#{method} = var; end")
   end
   return nil
 end
 #-------------------------------------------------------------------------
 # * Name      : Class Reader
 #   Info      : Creates reader method for one or more class variables
 #   Author    : Yeyinde
 #   Call Info : One or more Symbols
 #-------------------------------------------------------------------------
 def class_reader(*symbols)
   symbols.each do |symbol|
     method = symbol.id2name
     eval("def self.#{method}; return @@#{method}; end")
   end
   return nil
 end
end

# If Path Defined
if MACL::Path != nil
 # Require Files
 Dir.entries(MACL::Path).each {|file| require file if file.include?('.rb')}
end
3
thank!  :)
but, again, it say 
script 'part2' line 14: NoMethodError Occured
undefinied method 'viewport2' for nil:NillClass
then what must I do (again) :plz: :sos: :bow:
4
awesome !!! :-*
but when I try it, it say
line11: NoMethodError Occured
undefinied method 'viewport2' for nil:NillClass  :???:
then what must I do ???
5
Haha... sorry ! :^_^':
and thankyou for fixing it ! :haha:
6
Script Troubleshooting / [XP]Please help me !(SDK Removal)
September 03, 2011, 11:53:41 pm
For expert scripter,
Should you remove SDK need from this script,

State Cycling by Trickster

Part 1 (Setup)
Spoiler: ShowHide

#==============================================================================
# ●● State Cycling
#------------------------------------------------------------------------------
# Trickster (tricksterguy@hotmail.com)
# Version 4.1
# Date 4/27/07
# Goto RMXP.org for updates/bug reports/comment
#==============================================================================
#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('State Cycling', 'Trickster', 4.1, '4.27.07')

#--------------------------------------------------------------------------
# * Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3])

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('State Cycling')
 
module State_Cycling
 #--------------------------------------------------------------------------
 # * State Change Speed
 #--------------------------------------------------------------------------
 Speed = 100
 #--------------------------------------------------------------------------
 # * High Priority States
 #--------------------------------------------------------------------------
 High_Priority = [1]
 #--------------------------------------------------------------------------
 # * Use Viewport
 #   - Use A Viewport for the Sprite (For Side View Battle Systems
 #--------------------------------------------------------------------------
 Use_Viewport = true
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end



Part 2 (Sprite_ActorStateText)
Spoiler: ShowHide

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('State Cycling')
 
class Sprite_ActorStateText < Sprite
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :level_up
 #--------------------------------------------------------------------------
 # * Initialize
 #--------------------------------------------------------------------------
 def initialize(actor, x, y, width)
   # Get Actor Viewport if in scene battle else nil
   viewport = $game_temp.in_battle ? $scene.spriteset.viewport2 : nil
   # Set Viewport to nil if not using viewport
   viewport = nil if not State_Cycling::Use_Viewport
   # Call Sprite#initialize
   super(viewport)
   # Set Position
   self.x, self.y, self.z = x, y, actor.screen_z + 1
   # Set Z to 101 if no viewport defined
   self.z = 101 if viewport.nil?
   # Setup Width
   @width = width
   # Setup Bitmap
   self.bitmap = Bitmap.new(@width, 32)
   # Setup Actor Instance Variable
   @actor = actor
   # Set Counter
   @count = 0
   # Set Level Up Flag
   @level_up = false
   # Refresh
   refresh
 end
 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   # Call Sprite#update
   super
   # Increase counter
   @count = (@count + 1) % State_Cycling::Speed
   # Refresh if @count is 0
   refresh if @count == 0 || @actor.state_changed || @level_up
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   # Clear Bitmap
   self.bitmap.clear
   # Get State
   state = $data_states[@actor.current_state]
   # If state is nil then Normal else Name
   text = state.nil? ? '[Normal]' : '[' + state.name + ']'
   # Draw Text from Memory (MACL)
   self.bitmap.draw_text_memory(0, 0, @width, 32, text)
   # Reset Actor State Changed Flag
   @actor.state_changed = false
 end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end



Part 3 (Edits To Classes)
Spoiler: ShowHide

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('State Cycling')
 
class Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_base_initialize, :initialize
 def initialize(*args)
   # Setup Bar Sprites
   @state_sprites = {}
   # The Usual
   trick_cycle_base_initialize(*args)
 end
 #--------------------------------------------------------------------------
 # * Draw State
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_state(actor, x, y, width = 120)
   # Return if sprite is already set up
   return if @state_sprites[actor] != nil
   # Setup the bar
   dx, dy = self.x + x + 16, self.y + y + 16
   # Create Sprite
   sprite = Sprite_ActorStateText.new(actor, dx, dy, width)
   # Tag Sprite
   sprite.tag(self)
   # Set Reference
   @state_sprites[actor] = sprite
   # Add Sprite to Window Sprites
   @window_sprites << sprite
 end
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------  
 alias_method :trick_cycle_base_dispose, :dispose
 def dispose
   # The Usual
   trick_cycle_base_dispose
   # Clear Text Memory
   # (Removes all items drawn by <bitmap>.draw_text_memory)
   Bitmap.clear_text_memory if not @state_sprites.empty?
 end
end

class Window_BattleStatus
 #--------------------------------------------------------------------------
 # * Level Up
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battlestatus_level_up, :level_up
 def level_up(actor_index)
   # The Usual
   trick_cycle_battlestatus_level_up(actor_index)
   # Get Actor
   actor = $game_party.actors[actor_index]
   # Set State Sprite to Invisible if exists and has key
   if @state_sprites != nil and @state_sprites.has_key?(actor)
     # Set Level Up Flag
     @state_sprites[actor].level_up = true
   end
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battlestatus_refresh, :refresh
 def refresh
   # The Usual
   trick_cycle_battlestatus_refresh
   # If Sprites is not nil
   if @state_sprites != nil
     # Run Through Each Actor
     $game_party.actors.each do |actor|
       # If Sprite Level Up Flag set Invisible
       @state_sprites[actor].visible = !@state_sprites[actor].level_up
     end
   end
 end
end

class Window_Help < Window_Base
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 if @trick_state_cycle_help.nil?
   alias_method :trick_cycle_help_visible=, :visible=
   @trick_state_cycle_help = true
 end
 #--------------------------------------------------------------------------
 # * Set Visibility
 #--------------------------------------------------------------------------
 def visible=(bool)
   # The Usual
   self.trick_cycle_help_visible = bool
   # If Setting to Invisible
   if bool == false
     # Dispose All
     @state_sprites.each_value {|sprite| sprite.dispose}
     # Remove Each From Window Sprites
     @state_sprites.each_value {|sprite| @window_sprites.delete(sprite)}
     # Clear Hash
     @state_sprites.clear
   # If Actor Defined
   elsif @actor != nil
     # Set All to Invisible
     @state_sprites.each_value {|sprite| sprite.visible = false}
     # Set State sprite to Visible
     @state_sprites[@actor].visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Set Actor
 #     actor : status displaying actor
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_help_set_actor, :set_actor
 def set_actor(actor)
   # If Actor Change and An Actor
   if actor != @actor and @actor != nil
     # Set Old Actor State to invisible
     @state_sprites[@actor].visible = false
     # Set New Actor State to visible if sprite exists
     @state_sprites[actor].visible = true if @hp_bar_sprites.has_key?(actor)
   end
   # The Usual
   trick_cycle_help_set_actor(actor)
 end
 #--------------------------------------------------------------------------
 # * Set Text
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_help_set_text, :set_text
 def set_text(*args)
   # Dispose All
   @state_sprites.each_value {|sprite| sprite.dispose}
   # Remove Each From Window Sprites
   @state_sprites.each_value {|sprite| @window_sprites.delete(sprite)}
   # Clear Hash
   @state_sprites.clear
   # The Usual
   trick_cycle_help_set_text(*args)
 end
end

class Game_Battler
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :state_changed
 attr_accessor :state_index
 attr_accessor :state_count
 attr_accessor :shown_states
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battler_initialize, :initialize
 def initialize
   # The Usual
   trick_cycle_battler_initialize
   # Setup Instance Variables
   @state_changed = false
   @state_index = 0
   @state_count = 0
   @shown_states = []
 end
 #--------------------------------------------------------------------------
 # * Reset States
 #--------------------------------------------------------------------------
 def reset_states
   # Clear
   @shown_states.clear
   # Return if states size is 0
   return if states.size == 0
   # Run Through High Priority States
   State_Cycling::High_Priority.each do |state_id|
     # if included?
     if @shown_states.include?(state_id)
       # Set to only that state
       @shown_states = [state_id]
       # Break
       break
     end
   end
   # If Shown States are empty?
   if @shown_states.empty?
     # Run through all states
     states.each do |state_id|
       # Get State
       state = $data_states[state_id]
       # Push State Id if rating is not 0
       @shown_states << state_id if state.rating >= 1
     end
   end
   # If Count is zero Increment State Index Restrict to [0, states.size-1]
   @state_index = (@state_index + 1) % @shown_states.size if @state_count == 0
 end
 #--------------------------------------------------------------------------
 # * Current State
 #--------------------------------------------------------------------------
 def current_state
   # Reset States
   reset_states
   # Return 0 if empty or current state
   return @shown_states.empty? ? 0 : @shown_states[@state_index].to_i
 end
 #--------------------------------------------------------------------------
 # * Get State Animation ID
 #--------------------------------------------------------------------------
 def state_animation_id
   # If no states are added
   return 0 if states.size == 0
   # Get State
   state = $data_states[current_state]
   # Return state animation ID
   return state.nil? ? 0 : state.animation_id
 end
 #--------------------------------------------------------------------------
 # * Add State
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battler_add_state, :add_state
 def add_state(*args)
   # Create Copy of States
   states = self.states.dup
   # The Usual
   trick_cycle_battler_add_state(*args)
   # If An Actor and in battle
   if self.is_a?(Game_Actor) and $game_temp.in_battle
     # Set State Changed Flag
     self.state_changed = self.states != states
   end
 end
 #--------------------------------------------------------------------------
 # * Remove State
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battler_remove_state, :remove_state
 def remove_state(*args)
   # Create Copy of States
   states = self.states.dup
   # The Usual
   trick_cycle_battler_remove_state(*args)
   # If An Actor and in battle
   if self.is_a?(Game_Actor) and $game_temp.in_battle
     # Set State Changed Flag
     self.state_changed = self.states != states
   end
 end
end

class Sprite_Battler
 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_battler_update, :update
 def update
   # If Battler is defined
   if @battler != nil
     # Add 1 to state count
     @battler.state_count = (@battler.state_count + 1) % State_Cycling::Speed
   end
   # The Usual
   trick_cycle_battler_update
 end
end
 
class Scene_Battle
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_reader :spriteset
end

class SDK::Scene_Base
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 alias_method :trick_cycle_skill_main_variable, :main_variable
 def main_variable
   # If Game Party is not nil
   unless $game_party.nil?
     # Run Through Each Actor
     $game_party.actors.each do |actor|
       # State Changed
       actor.state_changed = false
       # Reset State index
       actor.state_index = 0
       # Reset State Count
       actor.state_count = 0
     end
   end
   # The Usual
   trick_cycle_skill_main_variable
 end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end



That all !!!
7
H-Mode7
Authors: MGCaladtogel
Version: 1.2.1
Type: 3D Map Display
Key Term: Custom Environment System



Important Notes
I did NOT make this!
Introduction

This engine is an alternative to the NeoMode7 engine.
While the purpose of the NeoM7 is to emulate the Mode7 feature of the NES, this new engine go further in the 3D feeling.
The main cause of negative feedbacks regarding the NeoM7 is that the map seems too flat, like a paper sheet.
The HM7 engine is a response to these critics. It handles heightmaps so that the rendered map is embossed.
The relief is not very pronounced, so this engine is more suited for worldmaps-like maps, where graphical elements are small.
The script might be hard to master, because it requires specific graphics and it is important to understand how the elements are drawn to create them properly.
Therefore this script is not suited for RM beginners.


Features


  • more 3D, more lag (don't even try this engine if you find the NeoM7 too laggy)

  • adjustable slant angle

  • 360° rotation

  • zoom in, zoom out

  • animated autotiles

  • probably a throng of bugs since it's the first version

  • works with 200 * 200 tiles² maps (HM7 won't activate if the width or height exceeds 200 tiles)




Screenshots

N/A


Demo

http://www.mediafire.com/?0l2jk2kn7lmqh8j


Script

The script can be found in the demo.


Instructions

What is required :
- the script (above main, as usual)
- the file MGC_Hmode7.dll at the root of your project
- specific autotiles, tilesets, textures and heightmaps

To activate the H-Mode7, you must add [HM7] to the map name.
The following tags are optionnal :
[HMAPXXX] : XXX is the identifier of the ground heightmap that must be used for the map
[#XX] : XX is the angle of slant (in degree) : 0 -> 80, 0 by default
[%XXX] : XXX is the angle of rotation (in degree) : 0 -> 359, 0 by default
[X] : enable horizontal map looping
[Y] : enable vertical map looping
[DA] : deactivate animated autotiles
[AFXXX] : XXX is the animations period for animated autotiles : 1 -> 999, 20 frames by default
[DL] : deactivate automatic lighting effects
[RX] : X = 1 -> high resolution (default)
X = 2 -> medium resolution (to increase performance)
X = 3 -> low resolution (to drastically increase performance)
[CX] : X = 0 -> no vertical offset (default)
X = 1 -> vertical offset so that the camera do not cut the ground at the bottom of the screen.
Should be used only when the horizon is visible.
X = 2 -> vertical offset so that the camera do not cut the map at the bottom of the screen.
Should be used only when the horizon is visible.
[DF] : deactivate the filter (better quality, drastically decrease performance)
[HF] : refresh the map every two frames (less fluent, increase performance)
[E] (V.1.2.1) : edmhotta's request to have less cut elements at the bottom of the screen. May cause massive lag, especially when rotating.
[DB] (V.1.2.1) : cut elements at the bottom of the screen are not filled with black (but they're still cut).

You can also associate a keyword to a configuration at the beginning of the script.
For example, with the following command :
HM7::Maps_Settings["MyKeyword"] = ["#60", "X", "HMAP3"]
if a map name contains "MyKeyword", then the HM7 will be activated, with a slant angle of 60 degrees, horizontal looping,
and using the picture "Heightmap_003" as ground heightmap.

- To set a new angle of slant (0~80) :
$scene.hm7_set_alpha(new angle)
To slide progressively into a new angle of slant :
$scene.hm7_to_alpha(new angle, speed)
To increase/decrease the slant :
$scene.hm7_increase_alpha(value)

- To set a new angle of rotation (0~379) :
$scene.hm7_set_theta(new angle)
To slide progressively into a new angle of rotation :
$scene.hm7_to_theta(angle, speed, dir)
To increase/decrease the angle of rotation :
$scene.hm7_increase_theta(value)

- To set a new zoom level (in percentage - default = 100) :
$scene.hm7_set_zoom(new value)
To slide progressively into a new zoom level :
$scene.hm7_to_zoom(value, speed)
To increase/decrease the zoom level :
$scene.hm7_increase_zoom(value)

- To change the horizon light fading :
$scene.hm7_set_fading(red, green, blue, flag)
flag = 1 : the color determined by (red, green, blue) will be added to the horizon line
flag = 0 : the color determined by (red, green, blue) will be substracted to the horizon line

- To set the altitude of an event :
add a comment in the commands list with : "Altitude X", where X is the
height value ("Altitude 64" will draw the event 64 pixels above its original position)
- To set the altitude of the player :
use : $game_player.altitude = X
- To have a fixed altitude for an event (not dependant on the maps heights) :
add the comment "Floating" in the commands list
- To have a fixed altitude for the player :
use : $game_player.floating = true


Compatibility

Most probably not compatible with special map display customizations that affect sprites.


Credits and Thanks


  • MGCaladtogel for The script

  • DerVVulfman for his help file about textures




Author's Notes

For the moment there is only a handful of tileset elements compatible with this script.
It would be really great if anyone that creates such elements decides to share them.
8
RMXP Script Database / Re: [XP] Bestiary
June 09, 2011, 10:53:50 am
why blizzard ??? why you retired from RMXP ???
is RMXP is not funny anymore for you ???
9
RMXP Script Database / Re: [XP] Bestiary
June 09, 2011, 08:33:32 am
Blizzard, can you make this code compatible with Tons Multi drop Item, that if monster drop up to one item it show in bestiary.
10
Name : Ox
Physical Appearance: Bald Hair and Brown face
Gender : Male
Weapons : Hex-Blastgun (Future Shotgun) as main weapon and Stun-Machete as sub weapon
Personality : He is a strongest cyborg and but a kindly man (act like a Captain)
11
Quote from: The Niche on June 01, 2011, 04:37:03 am

Rudria: Welcome. Welcome to chaos.



Thank for a welcome senior  :haha:
12
Quote from: stripe103 on June 01, 2011, 01:43:23 am
Welcome to our beloved forums!
Take care me it, and it will take care of you.   :)


Yes, thanks for a welcome.
I like this forum, cause this forum is simple and many of kindly man like you in here !  :D
13
Quote from: Tuggernuts on May 31, 2011, 11:31:04 pm
Oh. Forgot to say I was kidding.


Uh... kidding. xD


what !
fuh...  :^_^': I think its really happen because me !!!
14
Quote from: Tuggernuts on May 31, 2011, 10:13:30 pm
It is so obvious you're the person who just spammed the website, Rudria. You should have at least waited 5 or more minutes to make this topic.

At least, I am assuming it's you.


Oh my, I don't know :o !!!
I'm sorry :( !!!!
15
Greeting all !
I come from far far away place from your home ( wait, but I am not an Ogre  :haha: )
My name is Rudria and I come from Indonesia (Obama Home, when he still children 8) )
I wish we could be friend ;)
That all about me (Very Simple cause I like Simple :haha: )

(Sorry if my language so bad, I'm not very skilled in speaking english  ;) )