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.

Topics - R5GAMER

1
Script Requests / H-Mode 7[1.4.4] + Blizz ABS[2.87]
September 29, 2015, 03:51:47 am
Hello!

Since then, quite a lot of time(weather) I did not stop asking(raising) questions, rather boring(tiresome) and stupid because,
I had too much no idea of my final project. Today, things are literally different and I settled all the necessary codes to realize my project.
I like(love) enormously, the script Blizz-ABS and I remain fascinated on the power of a Hour-mode 7 [ 1.4.4 ] = > http: // save-point.org / thread-3151.html
However, I tried to test him(it) and I saw that he(it) was not compatible, what seems to me rather logical.
The question I ask myself, it is if there is well a way(means) to return them compatible because if it is the case that would be interesting
that there is a single engine of fight (ABS) which is compatible with.

P.S : If you have not understood anything I ask a friend to translate for me xDD

R5GAMER
2
I have this error :
Spoiler: ShowHide
Script 'HM7 NEW CLASSES' line 1139: RGSSError occurred
disposed bitmap


H-MOD 7 : http://save-point.org/thread-3151.html

Thank you guys ...
3
Script Requests / Status HUD MogHunter
May 30, 2015, 07:06:56 am
Hello!

I would like that the system of status does not show icons following the others but that it shows an icon of state for 2 seconds (for example) and another icon of state just after and so on...

Example look Player 3:
Spoiler: ShowHide


Spoiler: ShowHide

#_______________________________________________________________________________
# MOG - C Hud 2.0 (Classic Hud)      
#_______________________________________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Hud estilo clássico.
#
# ARQUIVOS NECESSÁRIOS
#
# C_Layout
# C_Exp_Meter
# C_Layout
# C_HP_Meter
# C_SP_Meter
# Hud_HP_Number
# Hud_SP_Number
# Hud_Exp_Number
#
# Deixe as imagens na pasta Windowskins
#_______________________________________________________________________________
# HISTÓRICO
# 30/12/2010 (v2.0) -> Melhor codificação e compatibilidade.
#_______________________________________________________________________________
module MOG_C_HUD
   #Posição geral da HUD
   HUD_POS = [10,10]
   #Posição do numero de HP
   HP_NUMBER_POS = [999,999]
   #Posição do medidor de HP
   HP_METER_POS = [83,10]
   #Posição do numero de SP
   SP_NUMBER_POS = [999,999]
   #Posição do medidor de SP
   SP_METER_POS = [999,999]
   #Posição posição do level
   LEVEL_POS = [999,999]  #Posição posição do medidor de exp
   LEVEL_METER_POS = [999,999]
   #Posição dos ícones de status
   STATES_POS = [170,94]
   #Deixar a HUD opaco caso o herói estiver em cima da HUD.
   FADE = true
   #Tamanho planejado da hud, isso influência no sensor do FADE.
   HUD_SIZE = [420,64]
   #Switch que desativa a HUD
   DISABLE_C_HUD_SWITCH = 209
   #Prioridade da hud. (Z)
   HUD_PRIORITY = 5000
end
 
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler  
 
 #--------------------------------------------------------------------------
 # * Now Exp
 #--------------------------------------------------------------------------
 def now_exp
     return @exp - @exp_list[@level]
 end  
 
 #--------------------------------------------------------------------------
 # * Next Exp
 #--------------------------------------------------------------------------
 def next_exp
     return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
 end
end

#==============================================================================
# ** C_Hud
#==============================================================================
class C_Hud < Sprite  
 include MOG_C_HUD
 
 #--------------------------------------------------------------------------
 # * Initialize
 #--------------------------------------------------------------------------
 def initialize(viewport)
     super(viewport)
     @actor = $game_party.actors[0]
     return if @actor == nil
     setup
     create_layout
     create_hp_number
     create_hp_meter
     create_sp_number
     create_sp_meter
     create_level_number
     create_level_meter
     create_state
     update_visible
     sp_flow_update
     sp_number_refresh        
     hp_flow_update
     hp_number_refresh  
 end

 #--------------------------------------------------------------------------
 # * Setup
 #--------------------------------------------------------------------------
 def setup
     @low_sp = 30
     @low_hp = 30
     @hp = @actor.hp
     @sp = @actor.sp
     @exp = @actor.exp
     @level = @actor.level
     @hp_old = @actor.hp
     @hp_ref = @hp_old
     @hp_refresh = false
     @sp_old = @actor.sp
     @sp_ref = @sp_old
     @sp_refresh = false
     hud_size_x = HUD_SIZE[0]
     hud_size_y = HUD_SIZE[1]
     @oc_range_x = hud_size_x + HUD_POS[0]
     @oc_range_y = hud_size_y + HUD_POS[1]
 end  
   
 #--------------------------------------------------------------------------
 # * Create Layout  
 #--------------------------------------------------------------------------  
 def create_layout  
     @layout_sprite = Sprite.new
     @layout_sprite.bitmap = RPG::Cache.windowskin("C_Layout")
     @layout_sprite.z = 1 + HUD_PRIORITY
     @layout_sprite.x = HUD_POS[0]
     @layout_sprite.y = HUD_POS[1]    
 end  
 
 #--------------------------------------------------------------------------
 # * Create HP Number  
 #--------------------------------------------------------------------------  
 def create_hp_number
     @hp_number_image = RPG::Cache.windowskin("Hud_HP_Number")
     @hp_number_bitmap = Bitmap.new(@hp_number_image.width,@hp_number_image.height)
     @hp_number_sprite = Sprite.new
     @hp_number_sprite.bitmap = @hp_number_bitmap
     @hp_number_sprite.z = 3 + HUD_PRIORITY
     @hp_number_sprite.x = HUD_POS[0] + HP_NUMBER_POS[0]
     @hp_number_sprite.y = HUD_POS[1] + HP_NUMBER_POS[1]
     @im_cw = @hp_number_image.width / 10
     @im_ch = @hp_number_image.height / 2    
     @hp_src_rect = Rect.new(@im_cw,0, @im_cw, @im_ch)
     @hp_number_text = @actor.hp.abs.to_s.split(//)
     lowhp2 = @actor.maxhp * 30 / 100
     if @actor.hp < lowhp2
        @health2 = @im_ch
     else
        @health2 = 0
     end
     @hp_health = @health2
     for r in 0..@hp_number_text.size - 1        
        @hp_number_abs = @hp_number_text[r].to_i
        @hp_src_rect = Rect.new(@im_cw * @hp_number_abs, @hp_health, @im_cw, @im_ch)
        @hp_number_bitmap.blt(20 + ((@im_cw - 7) *  r), 0, @hp_number_image, @hp_src_rect)        
     end        
 end  
 
 #--------------------------------------------------------------------------
 # * Create HP Meter
 #--------------------------------------------------------------------------    
 def create_hp_meter
     @hp_flow = 0
     @hp_damage_flow = 0
     @hp_image = RPG::Cache.windowskin("C_HP_Meter")
     @hp_bitmap = Bitmap.new(@hp_image.width,@hp_image.height)
     @hp_range = @hp_image.width
     @hp_width = @hp_range  * @actor.hp / @actor.maxhp  
     @hp_height = @hp_image.height
     @hp_width_old = @hp_width
     @hp_src_rect = Rect.new(@hp_range, 0, @hp_width, @hp_height)
     @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
     @hp_sprite = Sprite.new
     @hp_sprite.bitmap = @hp_bitmap
     @hp_sprite.z = 2 + HUD_PRIORITY
     @hp_sprite.x = HUD_POS[0] + HP_METER_POS[0]
     @hp_sprite.y = HUD_POS[1] + HP_METER_POS[1]  
 end

 #--------------------------------------------------------------------------
 # * Create SP Number
 #--------------------------------------------------------------------------      
 def create_sp_number
     @sp_number_image = RPG::Cache.windowskin("Hud_SP_Number")
     @sp_number_bitmap = Bitmap.new(@sp_number_image.width,@sp_number_image.height)
     @sp_number_sprite = Sprite.new
     @sp_number_sprite.bitmap = @sp_number_bitmap
     @sp_number_sprite.z = 3 + HUD_PRIORITY
     @sp_number_sprite.x = HUD_POS[0] + SP_NUMBER_POS[0]
     @sp_number_sprite.y = HUD_POS[1] + SP_NUMBER_POS[1]
     @sp_im_cw = @sp_number_image.width / 10
     @sp_im_ch = @sp_number_image.height / 2    
     @sp_src_rect = Rect.new(@sp_im_cw,0, @sp_im_cw, @sp_im_ch)
     @sp_number_text = @actor.sp.abs.to_s.split(//)
     for r in 0..@sp_number_text.size - 1
        @sp_number_abs = @sp_number_text[r].to_i
        @sp_src_rect = Rect.new(@sp_im_cw * @sp_number_abs, 0, @sp_im_cw, @sp_im_ch)
        @sp_number_bitmap.blt(20 + ((@sp_im_cw - 7) *  r), 0, @sp_number_image, @sp_src_rect)        
     end          
 end  
 
 #--------------------------------------------------------------------------
 # * Create SP Meter
 #--------------------------------------------------------------------------        
 def create_sp_meter
     @sp_flow = 0
     @sp_damage_flow = 0
     @sp_image = RPG::Cache.windowskin("C_SP_Meter")
     @sp_bitmap = Bitmap.new(@sp_image.width,@sp_image.height)
     @sp_range = @sp_image.width
     @sp_width = @sp_range  * @actor.sp / @actor.maxsp  
     @sp_height = @sp_image.height
     @sp_width_old = @sp_width
     @sp_src_rect = Rect.new(@sp_range, 0, @sp_width, @sp_height)
     @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)
     @sp_sprite = Sprite.new
     @sp_sprite.bitmap = @sp_bitmap
     @sp_sprite.z = 2 + HUD_PRIORITY
     @sp_sprite.x = HUD_POS[0] + SP_METER_POS[0]
     @sp_sprite.y = HUD_POS[1] + SP_METER_POS[1]  
 end  
 
 #--------------------------------------------------------------------------
 # * Create Level Number
 #--------------------------------------------------------------------------          
 def create_level_number
     @level_number_image = RPG::Cache.windowskin("Hud_Exp_Number")
     @level_number_bitmap = Bitmap.new(@level_number_image.width,@level_number_image.height)
     @level_number_sprite = Sprite.new
     @level_number_sprite.bitmap = @level_number_bitmap
     @level_number_sprite.z = 3 + HUD_PRIORITY
     @level_number_sprite.x = HUD_POS[0] + LEVEL_POS[0]
     @level_number_sprite.y = HUD_POS[1] + LEVEL_POS[1]
     @level_im_cw = @level_number_image.width / 10
     @level_im_ch = @level_number_image.height    
     @level_number_text = @actor.level.abs.to_s.split(//)
     for r in 0..@level_number_text.size - 1
        @level_number_abs = @level_number_text[r].to_i
        @level_src_rect = Rect.new(@level_im_cw * @level_number_abs, 0, @level_im_cw, @level_im_ch)
        @level_number_bitmap.blt(13 + ((@level_im_cw - 12) *  r), 0, @level_number_image, @level_src_rect)        
     end        
 end  
 
 #--------------------------------------------------------------------------
 # * Create Level Meter
 #--------------------------------------------------------------------------          
 def create_level_meter
     @level_image = RPG::Cache.windowskin("C_Exp_Meter")
     @level_bitmap = Bitmap.new(@level_image.width,@level_image.height)
     @level_sprite = Sprite.new  
     rate = @actor.now_exp.to_f / @actor.next_exp
     rate = 1 if @actor.next_exp == 0
     @level_cw = @level_image.width * rate
     @level_cw = @level_image.width if @actor.level == 99
     @level_src_rect_back = Rect.new(0, 0,@level_cw, @level_image.height)
     @level_bitmap.blt(0,0, @level_image, @level_src_rect_back)
     @level_sprite.bitmap = @level_bitmap
     @level_sprite.z = 2 + HUD_PRIORITY
     @level_sprite.x = HUD_POS[0] + LEVEL_METER_POS[0]
     @level_sprite.y = HUD_POS[1] + LEVEL_METER_POS[1]    
  end  
   
 #--------------------------------------------------------------------------
 # * Create State
 #--------------------------------------------------------------------------            
 def create_state
      @states_max = 0
      @states = Sprite.new
      @states.bitmap = Bitmap.new(156,24)
      @states_x = @actor.states.size
      @states_y = 0
      @states_f = false
      sta = []
      for i in @actor.states
         unless @states_max > 5
             sta.push($data_states[i].name)
             image = RPG::Cache.icon(sta[@states_max])
             cw = image.width
             ch = image.height
             @states.bitmap.blt(26 * @states_max, 0, image, Rect.new(0, 0, cw, ch))
             @states_max += 1
         end
      end  
      @states.x = HUD_POS[0] + STATES_POS[0]
      @states.y = HUD_POS[1] + STATES_POS[1]
      @states.z = 4 + HUD_PRIORITY              
  end  
 
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 def dispose
     return if @actor == nil
     #Layout Dispose
     @layout_sprite.bitmap.dispose
     @layout_sprite.dispose
     #Hp Number Dispose
     @hp_number_sprite.bitmap.dispose
     @hp_number_sprite.dispose
     @hp_number_bitmap.dispose
     #HP Meter Dispose
     @hp_sprite.bitmap.dispose
     @hp_sprite.dispose
     @hp_bitmap.dispose
     #SP Number Dispose
     @sp_number_sprite.bitmap.dispose
     @sp_number_sprite.dispose
     @sp_number_bitmap.dispose
     #SP Meter Dispose
     @sp_sprite.bitmap.dispose
     @sp_sprite.dispose
     @sp_bitmap.dispose
     #Level Number Dispose
     @level_number_sprite.bitmap.dispose
     @level_number_sprite.dispose
     @level_number_bitmap.dispose
     #Level Meter Dispose
     @level_sprite.bitmap.dispose
     @level_sprite.dispose
     @level_bitmap.dispose
     #States Dispose
     @states.bitmap.dispose
     @states.dispose
     @states = nil
     super
 end  
 
 #--------------------------------------------------------------------------
 # * Updade
 #--------------------------------------------------------------------------
 def update
     super
      return if @actor == nil
      update_visible
      hp_number_update if @hp_old != @actor.hp
      hp_number_refresh if @hp_refresh == true or @actor.hp == 0
      sp_number_update if @sp_old != @actor.sp
      sp_number_refresh if @sp_refresh == true    
      level_update if @level != @actor.level    
      exp_update if @exp != @actor.exp
      hp_flow_update
      sp_flow_update
      update_fade if FADE == true
      update_states
 end
 
 #--------------------------------------------------------------------------
 # * update fade
 #--------------------------------------------------------------------------
 def update_fade
     x = ($game_player.real_x - $game_map.display_x) / 4
     y = ($game_player.real_y - $game_map.display_y) / 4
     if x < @oc_range_x and x > HUD_POS[0] - 5 and
        y > HUD_POS[1] - 5 and y < @oc_range_y and
          @hp_number_sprite.opacity > 120
          @hp_number_sprite.opacity -= 10
          @hp_sprite.opacity -= 10
          @sp_number_sprite.opacity -= 10
          @sp_sprite.opacity -= 10
          @states.opacity -= 10
          @level_sprite.opacity -= 10
          @level_number_sprite.opacity -= 10
          @layout_sprite.opacity -= 10
     elsif @hp_number_sprite.opacity < 255
          @hp_number_sprite.opacity += 10
          @hp_sprite.opacity += 10
          @sp_number_sprite.opacity += 10
          @sp_sprite.opacity += 10
          @states.opacity += 10
          @level_sprite.opacity += 10
          @level_number_sprite.opacity += 10
          @layout_sprite.opacity += 10
    end
 end    
 
 #--------------------------------------------------------------------------
 # * Update States
 #--------------------------------------------------------------------------
 def update_states
     @states.x = HUD_POS[0] + STATES_POS[0]
     @states.y = HUD_POS[1] + STATES_POS[1]
     if @states_x != @actor.states.size
        @states_x = @actor.states.size
        @states.bitmap.clear
        @states_max = 0
        sta = []
        for i in @actor.states
          unless @states_max > 5
            sta.push($data_states[i].name)
            image = RPG::Cache.icon(sta[@states_max])
            cw = image.width
            ch = image.height
            @states.bitmap.blt(26 * @states_max, 0, image, Rect.new(0, 0, cw, ch))
            @states_max += 1
          end
        end  
      sta = nil
    end
  end
 
 #--------------------------------------------------------------------------
 # * update_visible
 #--------------------------------------------------------------------------
 def update_visible
     if $game_switches[DISABLE_C_HUD_SWITCH] == true
        hud_visible = false
     else  
        hud_visible = true
     end  
     @layout_sprite.visible = hud_visible
     @hp_number_sprite.visible = hud_visible
     @hp_sprite.visible = hud_visible
     @sp_number_sprite.visible = hud_visible
     @sp_sprite.visible = hud_visible
     @level_number_sprite.visible = hud_visible
     @states.visible = hud_visible
 end
 
 #--------------------------------------------------------------------------
 # * hp_number_update
 #--------------------------------------------------------------------------
 def hp_number_update
      @hp_refresh = true
      if @hp_old < @actor.hp
          @hp_ref = 5 * (@actor.hp - @hp_old) / 100
          @hp_ref = 1 if @hp_ref < 1
          @hp += @hp_ref    
          if @hp >= @actor.hp
             @hp_old = @actor.hp
             @hp = @actor.hp  
             @hp_ref = 0
          end              
       elsif @hp_old > @actor.hp  
          @hp_refresh = true
          @hp_ref = 5 * (@hp_old - @actor.hp) / 100
          @hp_ref = 1 if @hp_ref < 1
          @hp -= @hp_ref                
          if @hp <= @actor.hp
             @hp_old = @actor.hp
             @hp = @actor.hp  
             @hp_ref = 0
          end            
       end  
  end    
 
 #--------------------------------------------------------------------------
 # * hp_number_refresh
 #--------------------------------------------------------------------------
 def hp_number_refresh
     @hp_number_sprite.bitmap.clear
     @hp = 0 if @actor.hp == 0
     @hp_number_text = @hp.abs.to_s.split(//)
     lowhp2 = @actor.maxhp * @low_hp / 100
     if @actor.hp < lowhp2
        @health2 = @im_ch
     else
        @health2 = 0
     end
     @hp_health = @health2
     for r in 0..@hp_number_text.size - 1        
        @hp_number_abs = @hp_number_text[r].to_i
        @hp_src_rect = Rect.new(@im_cw * @hp_number_abs, @hp_health, @im_cw, @im_ch)
        @hp_number_bitmap.blt(20 + ((@im_cw - 7) *  r), 0, @hp_number_image, @hp_src_rect)        
      end  
      @hp_refresh = false if @hp == @actor.hp
 end  
 
 #--------------------------------------------------------------------------
 # * Hp Flow Update
 #--------------------------------------------------------------------------
 def hp_flow_update
     @hp_sprite.bitmap.clear
     @hp_width = @hp_range  * @actor.hp / @actor.maxhp
         #HP Damage---------------------------------
         valor = (@hp_width_old - @hp_width) * 3 / 100
         valor = 0.5 if valor < 1          
         if @hp_width_old != @hp_width
            @hp_width_old -= valor if @hp_width_old > @hp_width
            @hp_width_old = 0 if @actor.hp == 0
            if @hp_width_old < @hp_width
               @hp_width_old = @hp_width
            end      
            @hp_src_rect_old = Rect.new(@hp_flow, 0,@hp_width_old, @hp_height)
            @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect_old)      
         end        
     #HP Real------------------------------------
     @hp_src_rect = Rect.new(@hp_flow, 0,@hp_width, @hp_height)
     @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
 end          
 
 #--------------------------------------------------------------------------
 # * Sp_number_update
 #--------------------------------------------------------------------------
 def sp_number_update
     @sp_refresh = true
     if @sp_old < @actor.sp
        @sp_refresh = true
        @sp_ref = 5 * (@actor.sp - @sp_old) / 100
        @sp_ref = 1 if @sp_ref < 1
        @sp += @sp_ref  
        if @sp >= @actor.sp
           @sp_old = @actor.sp
           @sp = @actor.sp  
           @sp_ref = 0
        end  
     elsif @sp_old >= @actor.sp    
        @sp_ref = 5 * (@sp_old - @actor.sp) / 100
        @sp_ref = 1 if @sp_ref < 1
        @sp -= @sp_ref    
        if @sp <= @actor.sp
           @sp_old = @actor.sp
           @sp = @actor.sp  
           @sp_ref = 0
         end          
     end    
 end  
 
 #--------------------------------------------------------------------------
 # * sp_number_refresh
 #--------------------------------------------------------------------------
 def sp_number_refresh
   @sp_number_sprite.bitmap.clear
   @s = @actor.sp * 100 / @actor.maxsp
   @sp_number_text = @sp.abs.to_s.split(//)
     for r in 0..@sp_number_text.size - 1        
        @sp_number_abs = @sp_number_text[r].to_i
        if @actor.sp <= @actor.maxsp * @low_sp / 100
           @sp_src_rect = Rect.new(@sp_im_cw * @sp_number_abs, @sp_im_ch, @sp_im_cw, @sp_im_ch)  
        else  
           @sp_src_rect = Rect.new(@sp_im_cw * @sp_number_abs, 0, @sp_im_cw, @sp_im_ch)
        end
        @sp_number_bitmap.blt(20 + ((@sp_im_cw - 7) *  r), 0, @sp_number_image, @sp_src_rect)        
    end  
    @sp_refresh = false if @sp == @actor.sp
 end    
 
 #--------------------------------------------------------------------------
 # * Sp Flow Update
 #--------------------------------------------------------------------------
 def sp_flow_update
     @sp_sprite.bitmap.clear
     @sp_width = @sp_range  * @actor.sp / @actor.maxsp
         #SP Damage---------------------------------
         if @sp_width_old != @sp_width
         valor = (@sp_width_old - @sp_width) * 3 / 100
         valor = 0.5 if valor < 1              
         @sp_width_old -= valor if @sp_width_old > @sp_width  
         if @sp_width_old < @sp_width
            @sp_width_old = @sp_width
         end      
         @sp_src_rect_old = Rect.new(@sp_flow, 0,@sp_width_old, @sp_height)
         @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect_old)
         end
     #SP Real------------------------------------
     @sp_src_rect = Rect.new(@sp_flow, 0,@sp_width, @sp_height)
     @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)
   end  
 
 #--------------------------------------------------------------------------
 # * level_update
 #--------------------------------------------------------------------------
 def level_update
     @level_number_sprite.bitmap.clear
     @level_number_text = @actor.level.abs.to_s.split(//)
     for r in 0..@level_number_text.size - 1
        @level_number_abs = @level_number_text[r].to_i
        @level_src_rect = Rect.new(@level_im_cw * @level_number_abs, 0, @level_im_cw, @level_im_ch)
        @level_number_bitmap.blt(13 + ((@level_im_cw - 12) *  r), 0, @level_number_image, @level_src_rect)        
     end      
     @level = @actor.level
 end  
 
 #--------------------------------------------------------------------------
 # * exp_update
 #--------------------------------------------------------------------------
 def exp_update
     @level_sprite.bitmap.clear    
     rate = @actor.now_exp.to_f / @actor.next_exp
     rate = 1 if @actor.next_exp == 0
     @level_cw = @level_image.width * rate
     @level_cw = @level_image.width if @actor.level == 99
     @level_src_rect_back = Rect.new(0, 0,@level_cw, @level_image.height)
     @level_bitmap.blt(0,0, @level_image, @level_src_rect_back)  
     @exp = @actor.exp
 end    
end  

#===============================================================================
# ** Spriteset_Map
#===============================================================================
class Spriteset_Map
 
 #--------------------------------------------------------------------------
 # * initialize
 #--------------------------------------------------------------------------
 alias mog_chud_initialize initialize
 def initialize
     @cthud = C_Hud.new(@viewport3)    
     mog_chud_initialize
 end
 
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 alias mog_chud_dispose dispose
 def dispose
     mog_chud_dispose
     @cthud.dispose
 end  
   
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 alias mog_chud_update update
 def update
     mog_chud_update
     @cthud.update
 end      
end    

$mog_rgssxp_c_hud = true


Thanks .. all :)
4
Script Requests / GamePad and Blizz-ABS
March 28, 2015, 10:08:08 pm
Hello!

I found a script which allows to use the gamepad but by trying him(it) on my project
I have the impression that the code doesn't works certainly because the system of Blizz ABS
takes the priority but I shall like that the player can have the possibility of playing either on the keyboard or on the gamepad:)


#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
# ** Glitchfinder's Gamepad Input Module          [RPG Maker XP] [RPG Maker VX]
#    Version 1.00
#------------------------------------------------------------------------------
#  This script helps scripters to use an XInput-compatible gamepad with their
#  games.
#==============================================================================
# * Version History
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   Version 1.00 ------------------------------------------------- (2010-08-20)
#     - Initial version
#     - Author: Glitchfinder
#==============================================================================
# * Instructions
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  Place this script above Main, and below the default scripts. (I realize this
#  is obvious to most, but some people don't get it.)
#
#  You must also place Input.dll into the game's main project folder, since
#  this script needs it to access the XInput functions it uses.
#
#  This module is automatically updated by the default Input module, which
#  means that the only time you need to call the update method is in a scene
#  that does not update the default Input module.
#
#  This module does not break the functionality of the default Input module.
#
#  To use this module to check a gamepad button, simply use one of the four
#  methods (press?(button[, index]), trigger?(button[, index]),
#  repeat?(button[, index]), or release?(button[, index])), where button is the
#  constant of the button you want to check. Button may also be used as
#  Gamepad::BUTTONNAME. For a list of acceptable button names, look below the
#  header, in the section that declares button constants. The methods use index
#  to determine which gamepad to check. If no index is given, they will check
#  gamepad 0. Index is a value from 0 to 3.
#
#  To use this module to check a gamepad trigger or joystick, simply use one of
#  the four methods (axis_press?(axis[, index]), axis_trigger?(axis[, index]),
#  axis_repeat?(axis[, index]), or axis_release?(axis[, index])), where axis is
#  the constant of the axis you want to check. Axis may also be used as
#  Gamepad::AXISNAME. For a list of acceptable axis names, look below the
#  header, in the section that declares axis constants. The methods use index
#  to determine which gamepad to check. If no index is given, they will check
#  gamepad 0. Index is a value from 0 to 3.
#
#  To use this module to check the value on a gamepad triger or joystick axis,
#  use one of the two methods (axis_value(axis[, index]),
#  real_axis_value(axis[, index])), where axis is the constant of the axis you
#  want to check. Axis may also be used as Gamepad::AXISNAME. For a list of
#  acceptable axis names, look below the header, in the section that declares
#  axis constants. The methods use index to determine which gamepad to check.
#  If no index is given, they will check gamepad 0. Index is a value from 0 to
#  3. The difference between these two methods is that real_axis_value() will
#  always return the current value, while axis_value will return 0 if the
#  axis falls within its dead zone.
#
#  To use this module to cause a gamepad to "rumble", or vibrate, use the
#  vibrate() method. Details for that are below, in the method list.
#==============================================================================
# * Method List
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  Gamepad.update
#    Updates gamepad input. Calls to this method are not necessary unless the
#    default Input module is not being updated.
#
#  Gamepad.press?(button[, index])
#    Determines whether the gamepad button determined by button is currently
#    being pressed. If the button is being pressed, returns true. If not,
#    returns false. Uses index to determine the gamepad to check, from 0 to 3.
#    The index defaults to 0.
#
#  Gamepad.trigger?(button[, index])
#    Determines whether the gamepad button determined by button is being
#    pressed again. "Pressed again" is seen as time having passed between the
#    button being not pressed and being pressed. If the button is being
#    pressed, returns true. If not, returns false. Uses index to determine the
#    gamepad to check, from 0 to 3. The index defaults to 0.
#
#  Gamepad.repeat?(button[, index])
#    Determines whether the gamepad button determined by button is being
#    pressed again. Unlike trigger?(), this takes into account the repeat input
#    of a button being held down continuously. If the button is being pressed,
#    returns true. If not, returns false. Uses index to determine the gamepad
#    to check, from 0 to 3. The index defaults to 0.
#
#  Gamepad.release?(button[, index])
#    Determines whether the gamepad button determined by button has just been
#    released. If the button has been released, returns true. If not, returns
#    false. Uses index to determine the gamepad to check, from 0 to 3. The
#    index defaults to 0.
#
#  Gamepad.axis_press?(axis[, index])
#    Determines whether the gamepad axis determined by axis is currently being
#    pressed. If the button is being pressed, returns true. If not, returns
#    false. Uses index to determine the gamepad to check, from 0 to 3. The
#    index defaults to 0.
#
#  Gamepad.axis_trigger?(axis[, index])
#    Determines whether the gamepad axis determined by axis is being pressed
#    again. "Pressed again" is seen as time having passed between the button
#    being not pressed and being pressed. If the button is being pressed,
#    returns true. If not, returns false. Uses index to determine the gamepad
#    to check, from 0 to 3. The index defaults to 0.
#
#  Gamepad.axis_repeat?(axis[, index])
#    Determines whether the gamepad axis determined by axis is being pressed
#    again. Unlike trigger?(), this takes into account the repeat input of a
#    button being held down continuously. If the button is being pressed,
#    returns true. If not, returns false. Uses index to determine the gamepad
#    to check, from 0 to 3. The index defaults to 0.
#
#  Gamepad.axis_release?(axis[, index])
#    Determines whether the gamepad axis determined by axis has just been
#    released. If the button has been released, returns true. If not, returns
#    false. Uses index to determine the gamepad to check, from 0 to 3. The
#    index defaults to 0.
#
#  Gamepad.axis_value(axis[, index])
#    Returns the current value of the gamepad axis determined by axis. The
#    gamepad checked is determined by index, from 0 to 3. The value for index
#    is 0 if none is provided. If the value for the axis falls within the dead
#    zone specified for that axis, then axis_value() will return 0.
#
#  Gamepad.real_axis_value(axis[, index])
#    Returns the current value of the gamepad axis determined by axis. The
#    gamepad checked is determined by index, from 0 to 3. The value for index
#    is 0 if none is provided. This method ignores the dead zone for the axis,
#    and will always return the current value.
#
#  Gamepad.vibrate(left_motor, right_motor, frames[, index])
#    Causes the motors to vibrate for the number of frames specified. The
#    values for left_motor and right_motor range from 0 to 65535, though the
#    motors themselves may differ in function, as they do in an Xbox 360
#    controller, resulting in a different "feel" depending on the motor you
#    select. Uses index to determine the gamepad to check, from 0 to 3. The
#    index defaults to 0.
#==============================================================================
# * Known Issues
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  This script currently has trouble with the vibrate method, which does not
#  allow you to set one motor independently of the other. This part of a
#  planned update sometime in the future.
#==============================================================================
# * Glitchfinder's Advice
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  This script is meant for people with a medium or advanced level of scripting
#  knowledge and ability, or for those using scripts that require this module.
#==============================================================================
# * Contact
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  Glitchfinder, the author of this script, may be contacted through his
#  website, found at http://www.glitchkey.com
#
#  You may also find Glitchfinder at http://www.hbgames.org
#==============================================================================
# * Usage
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#  This script may be used with the following terms and conditions:
#
#    1. This script is free to use in any noncommercial project. If you wish to
#       use this script in a commercial (paid) project, please contact
#       Glitchfinder at his website.
#    2. This script may only be hosted at the following domains:
#         http://www.glitchkey.com
#         http://www.hbgames.org
#    3. If you wish to host this script elsewhere, please contact Glitchfinder.
#    4. If you wish to translate this script, please contact Glitchfinder. He
#       will need the web address that you plan to host the script at, as well
#       as the language this script is being translated to.
#    5. This header must remain intact at all times.
#    6. Glitchfinder remains the sole owner of this code. He may modify or
#       revoke this license at any time, for any reason.
#    7. Any code derived from code within this script is owned by Glitchfinder,
#       and you must have his permission to publish, host, or distribute his
#       code.
#    8. This license applies to all code derived from the code within this
#       script.
#    9. If you use this script within your project, you must include visible
#       credit to Glitchfinder, within reason.
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

#==============================================================================
# ** Gamepad
#------------------------------------------------------------------------------
#  This module performs gamepad input processing
#==============================================================================

module Gamepad
  #--------------------------------------------------------------------------
  # * Declare Button Constants
  #--------------------------------------------------------------------------
  DPAD_UP        = 0  # Directional pad up button
  DPAD_DOWN      = 1  # Directional pad down button
  DPAD_LEFT      = 2  # Directional pad left button
  DPAD_RIGHT     = 3  # Directional pad right button
  START          = 4  # Start button
  BACK           = 5  # Back button
  LEFT_THUMB     = 6  # Left thumb button
  RIGHT_THUMB    = 7  # Right thumb button
  LEFT_SHOULDER  = 8  # Left shoulder button
  RIGHT_SHOULDER = 9  # Right shoulder button
  A              = 10 # A button
  B              = 11 # B button
  X              = 12 # X Button
  Y              = 13 # Y Button
  #--------------------------------------------------------------------------
  # * Declare Axis Constants
  #--------------------------------------------------------------------------
  LEFT_TRIGGER   = 0  # Left trigger axis       (0 to 255)
  RIGHT_TRIGGER  = 1  # Right trigger axis      (0 to 255)
  LX             = 2  # Left thumbstick x axis  (-32768 to 32767)
  LY             = 3  # Left thumbstick y axis  (-32768 to 32767)
  RX             = 4  # Right thumbstick x axis (-32768 to 32767)
  RY             = 5  # Right thumbstick y axis (-32768 to 32767)
  #--------------------------------------------------------------------------
  # * Declare Module Variables
  #--------------------------------------------------------------------------
  begin
    # Declare API calls
    @gamepadGetCapabilities = Win32API.new('Input.dll',
      'GamepadGetCapabilities', 'IIP', 'I')
    @gamepadGetDSoundAudioDeviceGuids = Win32API.new('Input.dll',
      'GamepadGetDSoundAudioDeviceGuids', 'IPP', 'I')
    @gamepadGetState = Win32API.new('Input.dll', 'GamepadGetState', 'IP', 'I')
    @gamepadSetState = Win32API.new('Input.dll', 'GamepadSetState', 'IP', 'I')
    # Declare blank structures
    @capabilities = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].pack('c2S2c2s4S2')
    @gamepad = [0, 0, 0, 0, 0, 0, 0].pack('Sc2s4')
    @state = [0, 0, 0, 0, 0, 0, 0, 0].pack('ISc2s4')
    @vibrate = [0, 0].pack('n2')
    @gamepadGetCapabilities.call(0, 0, @capabilities)
    @capabilities.unpack('C2S2C2n6')
    # Create blank button array
    @buttons = Array.new(14, false)
    # Create a blank axis array
    @axis = Array.new(6, false)
    values = Array.new(6, 0)
    zones = [30, 30, 7849, 7849, 8689, 8689]
    # Declare controller information storage
    @controllers = {}
    # Declare default controller information
    @controllers.default = {
      'Active' => false,                   # Controller active flag
      'Change ID' => 0,                    # Current state change ID
      'Press' => @buttons.clone,           # Flags for button press state
      'Trigger' => @buttons.clone,         # Flags for button trigger state
      'Repeat' => @buttons.clone,          # Flags for button repeat state
      'Release' => @buttons.clone,         # Flags for button release state
      'Repeat Timer' => Array.new(14, 0),  # Timer for button repeat state
      'Base Repeat' => 15,                 # Base time for repeat flag (frames)
      'Axes' => Array.new(6, 0),           # Axis values
      'Axis Dead Zones' => zones.clone,    # Dead zone for the axes
      'Axis Press' => @axis.clone,         # Flags for axis press state
      'Axis Trigger' => @axis.clone,       # Flags for axis trigger state
      'Axis Repeat' => @axis.clone,        # Flags for axis repeat state
      'Axis Release' => @axis.clone,       # Flags for axis release state
      'Axis Repeat Timer' => values.clone, # Timer for axis repeat state
      'Vibrate State' => [0, 0],           # Current vibrate state
      'Vibrate Timer' => 0,                # Current vibrate timer
      'Vibrate Repeat Timer' => 0,         # Current rumbe repeat timer
      'Vibrate Minimum Timer' => 0         # Min. time before changing vibrate
    }
    # Iterate through the total number of controllers allowed
    for i in 0..3
      # Add a new controller to the controller array
      @controllers[i] = @controllers.default.clone
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def self.update
    # Iterate through all controllers
    for i in 0..3
      # Set up a blank state structure
      state = @state
      # Detect the controller state
      success = @gamepadGetState.call(i, state)
      # If the state was successfully obtained
      if success == 1
        # Set the controller to active
        @controllers[i]['Active'] = true
        # Backup the previous button states
        controller = @controllers[i].clone
        # Reset the controller button states
        @controllers[i]['Press']        = @buttons.clone
        @controllers[i]['Trigger']      = @buttons.clone
        @controllers[i]['Repeat']       = @buttons.clone
        @controllers[i]['Release']      = @buttons.clone
        @controllers[i]['Axis Press']   = @axis.clone
        @controllers[i]['Axis Trigger'] = @axis.clone
        @controllers[i]['Axis Repeat']  = @axis.clone
        @controllers[i]['Axis Release'] = @axis.clone
        # Unpack the controller state
        state = state.unpack('ISC2s4')
        # If the controller state has changed
        if state[0] != @controllers[i]['Change ID']
          # Add the controller button states to the controller state
          @controllers[i]['Press'][0]  = (state[1] & 0x00000001 == 0x00000001)
          @controllers[i]['Press'][1]  = (state[1] & 0x00000002 == 0x00000002)
          @controllers[i]['Press'][2]  = (state[1] & 0x00000004 == 0x00000004)
          @controllers[i]['Press'][3]  = (state[1] & 0x00000008 == 0x00000008)
          @controllers[i]['Press'][4]  = (state[1] & 0x00000010 == 0x00000010)
          @controllers[i]['Press'][5]  = (state[1] & 0x00000020 == 0x00000020)
          @controllers[i]['Press'][6]  = (state[1] & 0x00000040 == 0x00000040)
          @controllers[i]['Press'][7]  = (state[1] & 0x00000080 == 0x00000080)
          @controllers[i]['Press'][8]  = (state[1] & 0x0100 == 0x0100)
          @controllers[i]['Press'][9]  = (state[1] & 0x0200 == 0x0200)
          @controllers[i]['Press'][10] = (state[1] & 0x1000 == 0x1000)
          @controllers[i]['Press'][11] = (state[1] & 0x2000 == 0x2000)
          @controllers[i]['Press'][12] = (state[1] & 0x4000 == 0x4000)
          @controllers[i]['Press'][13] = (state[1] & 0x8000 == 0x8000)
          # Add the controller trigger states to the current controller state
          @controllers[i]['Axes'][0]   = state[2]
          @controllers[i]['Axes'][1]   = state[3]
          # Add the controller thumb coords to the current controller state
          @controllers[i]['Axes'][2]   = state[4]
          @controllers[i]['Axes'][3]   = state[5]
          @controllers[i]['Axes'][4]   = state[6]
          @controllers[i]['Axes'][5]   = state[7]
        end
        # Iterate through the buttons
        for button in 0...@controllers[i]['Press'].size
          # If the button is pressed, and the repeat count is at 0
          if ((@controllers[i]['Press'][button] == true) &&
            (@controllers[i]['Repeat Timer'][button] <= 0))
            # Set the button to repeat
            @controllers[i]['Repeat'][button] = true
            # Get the base repeat time
            repeat_timer = @controllers[i]['Base Repeat']
            # Reset the repeat timer
            @controllers[i]['Repeat Timer'][button] = repeat_timer
          # If the repeat timer is above 0
          elsif @controllers[i]['Repeat Timer'][button] > 0
            # Cycle down the repeat timer
            @controllers[i]['Repeat Timer'][button] -= 1
          end
          # If the button is pressed, and it wasn't pressed previously
          if ((@controllers[i]['Press'][button] == true) &&
            (controller['Press'][button] == false))
            # Set the button to trigger
            @controllers[i]['Trigger'][button] = true
          # If the button is not pressed, and it was previously
          elsif ((@controllers[i]['Press'][button] == false) &&
            (controller['Press'][button] == true))
            # Set the button to release
            @controllers[i]['Release'][button] = true
          end
        end
        # Iterate through the buttons
        for axis in 0...@controllers[i]['Axes'].size
          # If the trigger is greater than the dead zone, set it to pressed
          if (@controllers[i]['Axes'][axis].abs >
            @controllers[i]['Axis Dead Zones'][axis])
            # Set the axis to pressed
            @controllers[i]['Axis Press'][axis] = true
          end
          # If the axis is pressed, and the repeat count is at 0
          if ((@controllers[i]['Axis Press'][axis] == true) &&
            (@controllers[i]['Axis Repeat Timer'][axis] <= 0))
            # Set the axis to repeat
            @controllers[i]['Axis Repeat'][axis] = true
            # Get the base repeat time
            repeat_timer = @controllers[i]['Base Repeat']
            # Reset the repeat timer
            @controllers[i]['Axis Repeat Timer'][axis] = repeat_timer
          # If the repeat timer is above 0
          elsif @controllers[i]['Axis Repeat Timer'][axis] > 0
            # Cycle down the repeat timer
            @controllers[i]['Axis Repeat Timer'][axis] -= 1
          end
          # If the axis is pressed, and it wasn't pressed previously
          if ((@controllers[i]['Axis Press'][axis] == true) &&
            (controller['Axis Press'][axis] == false))
            # Set the axis to trigger
            @controllers[i]['Axis Trigger'][axis] = true
          # If the axis is not pressed, and it was previously
          elsif ((@controllers[i]['Press'][axis] == false) &&
            (controller['Axis Press'][axis] == true))
            # Set the axis to release
            @controllers[i]['Axis Release'][axis] = true
          end
        end
        # If the controller is set to vibrate
        if @controllers[i]['Vibrate Timer'] > 0
          # If the vibrate repeat timer has reached 0
          if @controllers[i]['Vibrate Repeat Timer'] <= 0
            # Get the current vibration values
            left_motor = @controllers[i]['Vibrate State'][0] - 1
            right_motor = @controllers[i]['Vibrate State'][1] - 1
            # Correct the motor values
            left_motor = 0 if left_motor < 0
            right_motor = 0 if right_motor < 0
            # Create the vibration state structure
            vibrate = [left_motor, right_motor].pack('n2')
            # Reset the controller vibrate state
            @gamepadSetState.call(i, vibrate)
            # Pack the current vibrate state
            vibrate_state = @controllers[i]['Vibrate State'].pack('n2')
            # Set the vibrate state to the current controller vibrate state
            @gamepadSetState.call(i, vibrate_state)
            # Reset the vibrate repeat timer
            @controllers[i]['Vibrate Repeat Timer'] = Graphics.frame_rate
          # If the vibrate repeat timer is greater than 0
          else
            # Decrement the vibrate repeat timer
            @controllers[i]['Vibrate Repeat Timer'] -= 1
          end
          # Decrement the vibrate timer
          @controllers[i]['Vibrate Timer'] -= 1
        # If the vibrate timer is 0, and the vibrate state is still set
        elsif ((@controllers[i]['Vibrate Timer'] <= 0) &&
          (@controllers[i]['Vibrate State'] != [0, 0]))
          # Reset the vibrate state
          @controllers[i]['Vibrate State'] = [0, 0]
          # Set the vibrate repeat timer to 1/3 of a second
          @controllers[i]['Vibrate Repeat Timer'] = Graphics.frame_rate / 3
        # If the vibrate timer is 0 and the vibrate state is cleared
        elsif ((@controllers[i]['Vibrate Timer'] <= 0) &&
          (@controllers[i]['Vibrate State'] == [0, 0]))
          # If the vibrate repeat timer is running
          if @controllers[i]['Vibrate Repeat Timer'] >= 0
            # Decrement the vibrate repeat timer
            @controllers[i]['Vibrate Repeat Timer'] -= 1
          # If the timer has run out
          else
            # Reset the vibrate repeat timer
            @controllers[i]['Vibrate Repeat Timer'] = 0
            # Reset the controller vibrate state
            @gamepadSetState.call(i, @vibrate)
          end
        end
        # If the controller's minimum vibrate update timer is running
        if @controllers[i]['Vibrate Minimum Timer'] > 0
          # Decrement the timer
          @controllers[i]['Vibrate Minimum Timer'] -= 1
        end
      # If the controller is not connected, or the state could not be read
      elsif success == 2 || success == -1
        # Set the controller to inactive
        @controllers[i]['Active'] = false
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get Button Pressed State
  #     button : button number
  #     index  : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.press?(button, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return button pressed state
    return @controllers[index]['Press'][button]
  end
  #--------------------------------------------------------------------------
  # * Get Button Triggered State
  #     button : button number
  #     index  : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.trigger?(button, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return button triggered state
    return @controllers[index]['Trigger'][button]
  end
  #--------------------------------------------------------------------------
  # * Get Button Repeated State
  #     button : button number
  #     index  : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.repeat?(button, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return button repeated state
    return @controllers[index]['Repeat'][button]
  end
  #--------------------------------------------------------------------------
  # * Get Button Released State
  #     button : button number
  #     index  : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.release?(button, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return button released state
    return @controllers[index]['Release'][button]
  end
  #--------------------------------------------------------------------------
  # * Get Axis Pressed State
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.axis_press?(axis, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return axis pressed state
    return @controllers[index]['Axis Press'][axis]
  end
  #--------------------------------------------------------------------------
  # * Get Axis Triggered State
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.axis_trigger?(axis, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return axis triggered state
    return @controllers[index]['Axis Trigger'][axis]
  end
  #--------------------------------------------------------------------------
  # * Get Axis Repeated State
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.axis_repeat?(axis, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return axis repeated state
    return @controllers[index]['Axis Repeat'][axis]
  end
  #--------------------------------------------------------------------------
  # * Get Axis Released State
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.axis_release?(axis, index = 0)
    # Return false if the controller is inactive
    return false if @controllers[index]['Active'] == false
    # Return axis released state
    return @controllers[index]['Axis Release'][axis]
  end
  #--------------------------------------------------------------------------
  # * Get Axis Value
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.axis_value(axis, index = 0)
    # Set a temporary variable to the axis value
    value = self.real_axis_value(axis, index)
    # Return axis value
    return value unless value.abs < @controllers[index]['Axis Dead Zones'][axis]
    # Return 0 if the axis is within the dead zone
    return 0
  end
  #--------------------------------------------------------------------------
  # * Get Real Axis Value
  #     axis  : axis number
  #     index : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.real_axis_value(axis, index = 0)
    # Return the axis value
    return @controllers[index]['Axes'][axis]
  end
  #--------------------------------------------------------------------------
  # * Set Controller to Vibrate
  #     left_motor  : left motor value (0 to 65535)
  #     right_motor : right motor value (0 to 65535)
  #     frames      : number of frames to vibrate
  #     index       : controller number (0 to 3)
  #--------------------------------------------------------------------------
  def self.vibrate(left_motor, right_motor, frames, index = 0)
    # Return false if the vibrate has updated too recently
    return false if @controllers[index]['Vibrate Minimum Timer'] > 0
    # Set the controller vibrate timer to the number of frames
    @controllers[index]['Vibrate Timer'] = frames
    # Correct the motor values if out of range
    left_motor = 0 if left_motor < 0
    left_motor = 65535 if left_motor > 65535
    right_motor = 0 if right_motor < 0
    right_motor = 65535 if right_motor > 65535
    # Set the controller motor values
    @controllers[index]['Vibrate State'] = [left_motor.to_i, right_motor.to_i]
    # Set the minimum update timer
    @controllers[index]['Vibrate Minimum Timer'] = Graphics.frame_rate / 4
    # Return true if the vibrate was successfully set
    return true
  end
  #--------------------------------------------------------------------------
  # * Initialize Module
  #--------------------------------------------------------------------------
  begin
    # Force an initial update of the gamepad
    self.update
  end
end

#==============================================================================
# ** Input
#------------------------------------------------------------------------------
#  This module performs input processing
#==============================================================================

module Input
  # Add class data
  class << self
    #------------------------------------------------------------------------
    # * Alias Methods
    #------------------------------------------------------------------------
    # If the update method has not been aliased
    unless method_defined?(:glitch_gamepad_input_update)
      # Alias the update method
      alias glitch_gamepad_input_update update
    end
    #------------------------------------------------------------------------
    # * Frame Update
    #------------------------------------------------------------------------
    def update
      # Call original method
      glitch_gamepad_input_update
      # Update Gamepad module
      Gamepad.update
    end
  end
end


Link code :: http://www.hbgames.org/forums/viewtopic.php?t=73959

Thanks :D
5
Hello!

I need somebody or several people to create 22 monsters pulled by " Monster Hunter Frontier"
however, I would like that things take place in private, because I would want to have the resources only for me Lol :p
I know that it is not good not to share but I like keeping(guarding) the originality of my project...

Thanks..

EDITED *29/05/2015*

############################# REQUEST #############################

1.
Spoiler: ShowHide

2.
Spoiler: ShowHide

3.
Spoiler: ShowHide

4.
Spoiler: ShowHide

5.
Spoiler: ShowHide

6.
Spoiler: ShowHide

7.
Spoiler: ShowHide

8.
Spoiler: ShowHide

9.
Spoiler: ShowHide

10.
Spoiler: ShowHide

11.
Spoiler: ShowHide

12.
Spoiler: ShowHide

13.
Spoiler: ShowHide

14.
Spoiler: ShowHide

15.
Spoiler: ShowHide

16.
Spoiler: ShowHide

17.
Spoiler: ShowHide

18.
Spoiler: ShowHide

19.
Spoiler: ShowHide

20.
Spoiler: ShowHide

21.
Spoiler: ShowHide

22.
Spoiler: ShowHide


############################# EXEMPLE #############################

Example animation (flight to some monster):
Spoiler: ShowHide


Example animation (ground for all monsters):
Spoiler: ShowHide


############################## END ###############################

If you need more precision asks me ! :)
6
Hello!

Im looking some videos on youtube , I found someone who was able to do something interesting :

It using RMVX:


But im using RMXP and I use 100% of the Blizz ABS and Visual Equipement.. I would like to know if it is possible to do the same?
Thanks!
7
Hello!!

I want to know in RMX-OS how can save of the map.
exemply :

[map_id] + [x,y]
8
Hello!
I want to change my Scene_Menu that was created by a friend and myself,
This scene_menu has the possibility to have the vision of the map and events that run in background.

I have no idea how RMX-OS and Blizz-ABS is that work for this request... I wish it also runs in the background, menu actions will be carried out with the Arrows and moving system with keyboard letters for exemply: "W, A, S, D" and attack button is disabled at this time there ..

Thanks..
9
Hello!

I have problem! I do not understand why the automatic save system does not work .. It does not save the last position which was made .. Can you help me?
And I would take the opportunity to ask if it is possible that save in a precise position in a map ...?

Spoiler: ShowHide


Thanks!
10
Hello!

It is possible to use a Custom Resoluton in the full screen ??

Thanks!
11
Script Requests / Tab Chat in RMX-OS
November 29, 2014, 06:57:35 am
RMX-OS of Blizz is perfect and corresponds perfectly has my waitings however, I could point out that they miss some functions interesting
notably in chat system or I would like to put thumb-indexes ['Total '] [' Map '] ['Party '] [' Guild '] [' Private '] is what somebody will be
capable to make it?

Example (Netplay):


Thanks..
12
I created a stamina bar system but the problem is that an error :

Here is my code:

#-------------------------------------------------------------------------------
# SYSTEME DE STAMINA                                 Créer le : 28/11/2014
#-------------------------------------------------------------------------------
# Créer par : R5GAMER.
#-------------------------------------------------------------------------------
# Configuration :
#-------------------------------------------------------------------------------
module Config
 GRAPHICS = RPG::Cache.picture("Bar_Stamina")  #  Image de la barre.
 MAX_SPEED = 4.7    #  Vitesse Maximum.
 NORM_SPEED = 3.5   #  Vitesse Normal.
 STAMINA = true     #  Active la barre de stamina ou la désactive
 LOSE_STAMI = 3     #  Perdre la stamina.
 RECHARGE = 0.5     #  Recupération de la stamina.
 MIN_STAMI = 3      #  Stamina min. nescessaire pour utiliser le dash.
 MAX_STAMI = 500    #  Valeur max. de Stamina.
 BAR_STAMINA = [114,428]  #  Position de la barre de stamina.
 STAMI = 0  #  Init.
end

#===============================================================================
# Class :: Game Player
#===============================================================================
class Game_Player < Game_Character
 alias dead_config_run_initialize initialize
 alias dead_config_run_update update
 def initialize
   dead_config_run_initialize
   $stamina = Config::MAX_STAMI
 end
 
 #-----------------------------------------------------------------------------
 # Update
 #-----------------------------------------------------------------------------
 def update
   actor = $game_party.actors[0]
   if Config::STAMINA == true
     if Input.press?(Input::X)
       if $stamina >= Config::STAMI
         $stamina -= Config::LOSE_STAMI
       end
       if $stamina >= Config::MIN_STAMI
         @character_name = actor.character_name
         @move_speed = Config::MAX_SPEED
         distance = 2 ** Config::MAX_SPEED
       elsif $stamina < Config::MIN_STAMI
         @character_name = actor.character_name
         @move_speed = Config::NORM_SPEED
         distance = 2 ** Config::NORM_SPEED
         if $stamina < Config::MAX_STAMI
           $stamina += Config::RECHARGE
         end
       end
       else unless Input.press?(Input::X)
       @character_name = actor.character_name
       @move_speed = Config::NORM_SPEED
       distance = 2 ** Config::NORM_SPEED
       $stamina += Config::RECHARGE
     end
   end
   elsif Config::STAMINA == false
     if Input.press?(Input::X)
       $stamina -= Config::LOSE_STAMI
       @character_name = actor.character_name
       @move_speed = Config::MAX_SPEED
       distance = 2 ** Config::MAX_SPEED
     else
       @character_name = actor.character_name
       @move_speed = Config::NORM_SPEED
       distance = 2 ** Config::NORM_SPEED
       $stamina += Config::RECHARGE
     end
   end
   
   #---------------------------------------------------------------------------
   # efect_anim
   #---------------------------------------------------------------------------
   def efect_anim(actor)
     begin
       RPG::Cache.character(actor.character_name.to_s, actor.character_hue)
     rescue
       return false
     end
     return true
   end
   dead_config_run_update
 end
end

#===============================================================================
# Class :: Player Stamina
#===============================================================================
class Player_Stamina < Window_Base
 include Config
 def initialize
   super(0,0,480,620)
   self.contents = Bitmap.new(width - 32,height - 32)
   self.opacity = 0
   self.back_opacity = 0
   Graphics.update
   Graphics.transition
   refresh
 end
 
 #-----------------------------------------------------------------------------
 # Refresh
 #-----------------------------------------------------------------------------
 def refresh
   self.contents.clear
   if STAMINA == true
     stamp = GRAPHICS
     stampwidth = stamp.width * $stamina / MAX_STAMI
     stampheight = stamp.height
     stamp_rect = Rect.new(0,0,stampwidth,stampheight)
     self.contents.blt(BAR_STAMINA[0],BAR_STAMINA[1],stamp,stamp_rect)
   end
 end
end

#===============================================================================
# Class :: Player Stamina
#===============================================================================
class Scene_Map
 
 #-----------------------------------------------------------------------------
 # Main
 #-----------------------------------------------------------------------------
 alias stam_main main
 def main
   @Player_Stamina = Player_Stamina.new
   stam_main
   @Player_Stamina.dispose
 end
 
 #-----------------------------------------------------------------------------
 # Update
 #-----------------------------------------------------------------------------
 alias stam_update update
 def update
   stam_update
   if $andando == true
     @Player_Stamina.refresh if Graphics.frame_count % 2 == 0
   else  
     @Player_Stamina.refresh if Graphics.frame_count % 2 == 0
   end
 end
end


Thanks..
13
Script Requests / Scene_Menu in RMX-OS
November 21, 2014, 10:44:27 am
I'm using a Scene-Menu and i'd like it to avoid killing all the other scenes of the RMX-OS! I managed to incorporate it to the Scene_Map so everything is animated and the event launch. However, when I click on Echap to launch it, the Scene_Chat as well as the displacement of other players (client) doesn't work or doesn't appear.
14
Script Troubleshooting / Neko RPGXP + RMX-OS
November 21, 2014, 02:46:04 am
Hello everyone!!

I have this error:


15
Script Requests / I need info! [Resolved]
October 03, 2014, 10:06:49 pm
Hello, everyone!

In this script : http://forum.chaos-project.com/index.php/topic,13354.msg177482.html#msg177482

LiTTleDRAgo, said:
Quote
The script relies on Graphics.snap_to_bitmap method
So if you have some hud, that hud will embedded into screenshot as well


I will like, that does not display:
-> HUD (Switch to disable is 200)
-> Chat System (RMX-OS)
-> All Pictures

Thanks!
16
Hello Everyone !

Im use RMX-OS and Blizz-ABS but i have problems...

With RMX-OS ::
Spoiler: ShowHide

Spoiler: ShowHide


Without RMX-OS ::
Spoiler: ShowHide


Is possible to solve the problem?
Thanks..
17
Script Requests / Custom Item need you help...
August 27, 2014, 01:22:17 am
Hello! Everyone!

I come to you again, because I will need a system of item that will not use the system HotKeys, basically I would like us to use a specific key to the use of the object and another for the choice of the object ..
I tried various code modifiers and so on, to the point where I delete everything ... So, I did another but it is not operational ....

Spoiler: ShowHide


I also have another request ...
I would like the user to hold a "CTRL" for example ..
And "X" buttons (Previous) and "C" (Next) Object ..
Can also display two previous and two following?

Thanks.....
[P.S : If ever there is a problem of understanding I go edit my post ..]
18
Script Requests / On, the part for "Item"
August 20, 2014, 11:25:14 pm
Hi! Everyone!
Here! I would like if possible for to me  help make a piece of code on the item part in the hud on Blizz-ABS
Here! I found that to select an item, you had to go through a menu and select them directly to equip it then ..
I liked that the player does not go through all the menus but rather than a two button is accessible for following items and the other for the previous object.

Thank you! As always friends: D
19
Event System Troubleshooting / Problem with Event..
August 20, 2014, 12:29:43 pm
Hi! Everyone! Back to you again ^^
Here! I have several events in my map, except that it sure does not launch or launch it bad ... When I delete any event, the other works ... I tested on a different map, and it works j 'tried to assembled one by one and it works well except that when I add the other event as NPC's or other bug ...
I use RMX-OS and Blizz-ABS ....

Thanks...
20
Hello! People! :)

I need to understand for the function '/party'...
I create the system quest in event..
I explain : the player take a quest the function '/party' take all player in the map.
The other player take the quest and use 'y' for accept the quest or not..

Well i need to use '/party' all and '/y' and id.. in event..
Thanks! ! :)

P.S : But if you understood i create monster hunter like.. I use all ressource for monster hunter frontier and if the project is complety 20% i go to present in this forum! The project is for the moment perfectly ^^
21
I have a small problem when I add a loading image across the screen ..
We see the username of the client .. how to make the lower nickname has all the pictures ..?
22
Hello!

I read about on various issues related to No-Ip but I still have not figured out how to solve the problem ..

Here, the client code:
Spoiler: ShowHide

module RMXOS
 
 #============================================================================
 # module RMXOS::Options
 #----------------------------------------------------------------------------
 # Contains options used for the game that can be set up.
 #============================================================================

 module Options
   SERVERS = []
   SAVE_DATA = {}
   CREATION_DATA = {}
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # General
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   GAME_VERSION = 1.0
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # Server Connection Settings
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   SERVER_REFRESH = 400
   SERVER_TIMEOUT = 200
   SERVERS.push(['Débutant', 'goh.servegame.com', 54269])
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # Security
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   RESERVED_USERNAMES = ['admin', 'root', 'moderator', 'server', 'guild',
       'none']
   RESERVED_GUILDNAMES = ['admin', 'root', 'moderator', 'server', 'guild',
       'none']
   ENCRYPTION_SALT = 'XS'
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # Network
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   PING_TIMEOUT = 1
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # System
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   USERPASS_MIN_LENGTH = 3
   USERPASS_MAX_LENGTH = 16
   CHATINPUT_WIDTH = 300
   CHATBOX_WIDTH = 300
   CHATBOX_LINES = 7
   CHATINPUT_MAX_LENGTH = 100
   PM_MAX_LENGTH = 100
   GUILDNAME_MAX_LENGTH = 32
   CHAT_BUBBLES = false
   REMEMBER_LOGIN = true
   DISABLED_CHAT_COMMANDS = []
   AUTOSAVE_FREQUENCY = 30
   GUILD_NAME_SPRITES = true
   LEGACY_SAVE_METHOD = false
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # Exchange Data
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   EXCHANGE_VARIABLES = ['@character_name', '@x', '@y', '@direction',
       '@move_speed', '@walk_anime', '@step_anime', '@real_x', '@real_y',
       '@pattern']
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # Save Data
   # - see the documentation to learn how to set up which data is being saved
   #   by RMX-OS.
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # save container variable definitions
   SAVE_CONTAINERS = [
       '$game_system',
       '$game_switches',
       '$game_variables',
       '$game_self_switches',
       '$game_party',
       '$game_actors',
       '$game_map',
       '$game_player',
       'Graphics.frame_count'
   ]
   # general save data setup
   SAVE_DATA['Graphics.frame_count'] = []
   SAVE_DATA[Game_System] = ['@timer', '@timer_working', '@menu_disabled']
   SAVE_DATA[Game_Switches] = ['@data']
   SAVE_DATA[Game_Variables] = ['@data']
   SAVE_DATA[Game_SelfSwitches] = ['@data']
   SAVE_DATA[Game_Party] = ['@gold', '@steps', '@actors', '@items',
       '@weapons', '@armors']
   SAVE_DATA[Game_Actors] = ['@data']
   SAVE_DATA[Game_Map] = ['@map_id']
   SAVE_DATA[Game_Player] = ['@x', '@y', '@real_x', '@real_y',
       '@character_name', '@encounter_count']
   SAVE_DATA[Game_Actor] = ['@actor_id', '@name', '@character_name',
       '@character_hue', '@class_id', '@weapon_id', '@armor1_id',
       '@armor2_id', '@armor3_id', '@armor4_id', '@level', '@exp', '@skills',
       '@hp', '@sp', '@states', '@maxhp_plus', '@maxsp_plus', '@str_plus',
       '@dex_plus', '@agi_plus', '@int_plus']
   # for all classes that must have default arguments specified
   CREATION_DATA[Game_Actor] = '-1'
 
 end
 
end



Here, the server code:
Spoiler: ShowHide

NAME = 'Serveur_Débutant'
HOST = '192.168.0.39'
PORT = 54269
GAME_VERSION = 1.0

DEBUG_MODE = true
LOG_MESSAGES = true
LOG_ERRORS = true
LOG_ACTIONS = true

MAXIMUM_CONNECTIONS = 50
LOGIN_TIMEOUT = 120
AUTO_RESTART = true
RESTART_TIME = 5
USE_IP_BANNING = true
RUBY_PROMPT = true
EXTENDED_THREADING = true
OPTIMIZE_DATABASE_ON_STARTUP = false

SQL_HOSTNAME = '127.0.0.1'
SQL_USERNAME = 'root'
SQL_PASSWORD = ''
SQL_DATABASE = 'rmxosdb'

INBOX_SIZE = 20

EXTENSIONS = ["Connexion_Log", "ExtensionSkeleton", "Global_Switch.rb", "MsgDay", "Report_Player", "Restart", "SystemABS"
]



My all port is open :
Spoiler: ShowHide

192.168.0.39                             192.168.0.39
Protocole: UDP                           Protocole: TCP
WAN : 54269                              WAN: 54269
LAN : 54269                               LAN: 54269


The problem is that the client can not find the server ..
Thanks for the help..

P.S: I'm using RMX-OS Server on Windows Server 2008 R2
23
Hello!

I like the all option in the tchat, but...
I have liked some elements as it appears in another window of the same type as chat (So, from the right) who displays the names of players that are currently in the map.
Exemply :
Link For the script :
http://forum.chaos-project.com/index.php/topic,13074.0.html

Thanks! And sorry, for my bad english...
24
Script Requests / RMX-OS Without Connection Menu
July 01, 2014, 10:10:50 pm
Hello, everyone!
After several questions posed in the chat and on certain subjects!

I create a launcher with visual basic, i explain:

Client -> Start the launcher -> Login and password insert -> there it connects -> Select server -> and starts the RMXP (RMX-OS and Blizz Abs)
I had the idea kept, the login and password and the server selection on visual basic insert into a text file!
RPG MAKER read only the Login / Password / Server and connects without going through the menu line connection.

* I managed to read the file.
* ButaAfter I no see how to do it

I hope my English is understandable enough, I'm sorry if this is not the case ...
I hope you can help me! Thanks!

R5GAMER
25
Welcome! / R5GAMER -Presentation-
June 28, 2014, 10:49:52 pm
Hello! People!
I'm French! And i like you site! Because is surprising! I am currently on a project, i take has heart!
And hope you can help me!

Cordially, R5GAMER ;3)