Jump to content
Rpg²S Forum

DonDante

Utenti
  • Posts

    464
  • Joined

  • Last visited

Posts posted by DonDante

  1. Ho letto in un Topic che le formule per le abilità possono richiamare diversi effetti.

    Seguendo questa logica, posso creare un abilità che assorba PV in percentuale ai danni inflitti?

    "Assorbi PV" li fa assorbire al 100% ma mi pare troppo.

    Es. Infliggo 300 danni, recupero 30 PV.

    Che formula devo usare?

    Grazie.

  2. Come ho scritto prima gli obiettivi sono indipendenti dai salvataggi, quindi nullla vieta una volta finito il gioco di farti quell'oretta di gioco per recuperarlo.

    La guida strategica per il completamento del 100% del gioco arriverà, probabilmente acquistabile su Amazon per pochi euri.

    Lo dicevo io che sei un genio!

    Uno splendido modo per racimolare due monete senza dover vendere il proprio gioco. Se vuoi la guida, la paghi.

    Respect. :sisi:

  3. Stavo cercando di creare una piccola area verde in un centro abitato, circondata da una staccionata che dividesse il verde dalla strada.

    Il problema è che le staccionate dell' Autotile sono "decentrate" e non mi permettono di fare un bel lavoro...

    Ad essere chiari questa è un immagine di esempio:

    http://img11.imageshack.us/img11/115/immaginergs.jpg

    Come potete vedere, mentre la parte a sinistra rimane in mezzo al verde, anzichè delimitarlo, la parte a destra fa il lavoro opposto, lasciando una parte di marciapiede all'interno della staccionata.

    Anche la parte in basso non è ben delineata.

     

    La domanda è: Essendo un Autotile non so bene come modificarlo per fare in modo che le staccionate stiano più sul bordo... Avete per caso qualche idea? Voi come mappate le staccionate?

     

  4. Sinceramente, ho sempre visto un po male chi presenta un gioco linkando a siti esterni.
    Non per cattiveria, sia chiaro, ma credo che se si vuole presentare qualcosa si può almeno fare lo sforzo di esporlo per bene.

    se poi c'è anche un blog apposito, si può mettere il link in calce per "maggiori informazioni"...

    Detto questo, magari commenterò il lavoro quando sarà un po più maturo e ci sarà qualcosa di più da commentare.

  5. Nb. La versione con prezzo va in conflitto con il Core di Yanfly.

    Nello specifico:

     

    Script 'Yanfly core' line 780: NoMethodError occured

     

    undefinied method 'group' for "Prezzo :":string

     

     

    Ah si, questo è lo script in questione :

     

     

    #==============================================================================
    # 
    # ▼ Yanfly Engine Ace - Ace Core Engine v1.09
    # -- Last Updated: 2012.02.19
    # -- Level: Easy, Normal
    # -- Requires: n/a
    # 
    #==============================================================================
    
    $imported = {} if $imported.nil?
    $imported["YEA-CoreEngine"] = true
    
    #==============================================================================
    # ▼ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # 2012.02.19 - Bug Fixed: Parallax updating works properly with looping maps.
    # 2012.02.10 - Bug Fixed: Forced actions no longer cancel out other actions
    #              that have been queued up for later.
    # 2012.01.08 - Font resets no longer reset bold and italic to off, but instead
    #              to whatever default you've set.
    # 2011.12.26 - New Bugfix: When using substitute, allies will no longer take
    #              place of low HP allies for friendly skills.
    # 2011.12.20 - New Bugfix: Force Action no longer cancels out an actor's queue.
    #              Credits to Yami for finding and making the fix for!
    #              Switch added for those who want removed forced action battlers.
    # 2011.12.15 - Updated for better menu gauge appearance.
    # 2011.12.10 - Bug Fixed: Right and bottom sides of the map would show
    #              the left and top sides of the map.
    #            - Bug Fixed: Viewport sizes didn't refresh from smaller maps.
    # 2011.12.07 - New Bugfix: Dual weapon normal attacks will now play both
    #              animations without one animation interrupting the other.
    # 2011.12.04 - Updated certain GUI extensions for increased screen size.
    #            - More efficient digit grouping method credits to TDS.
    # 2011.12.01 - Started Script and Finished.
    # 
    #==============================================================================
    # ▼ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This is the core engine for Yanfly Engine Ace, made for RPG Maker VX Ace.
    # This script provides various changes made to the main engine including bug
    # fixes and GUI upgrades.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Animation Overlay
    # -----------------------------------------------------------------------------
    # - It's the same bug from VX. When an all-screen animation is played against a
    # group of enemies, the animation bitmap is actually made multiple times, thus
    # causing a pretty extreme overlay when there are a lot of enemies on screen.
    # This fix will cause the animation to play only once.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Animation Interruption
    # -----------------------------------------------------------------------------
    # - A new bug. When a character dual wields and attacks a single target, if an
    # animation lasts too long, it will interrupt and/or halt the next animation
    # from occurring. This script will cause the first animation to finish playing
    # and then continue forth.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Battle Turn Order Fix
    # -----------------------------------------------------------------------------
    # - Same bug from VX. For those who use the default battle system, once a
    # turn's started, the action order for the turn becomes set and unchanged for
    # the remainder of that turn. Any changes to a battler's AGI will not be
    # altered at all even if the battler were to receive an AGI buff or debuff.
    # This fix will cause the speed to be updated properly upon each action.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Forced Action Fix
    # -----------------------------------------------------------------------------
    # - A new bug. When a battler is forced to perform an action, the battler's
    # queued action is removed and the battler loses its place in battle. This
    # fix will resume queue after a forced action.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Gauge Overlap Fix
    # -----------------------------------------------------------------------------
    # - Same bug from VX. When some values exceed certain amounts, gauges can
    # overextend past the width they were originally designed to fit in. This fix
    # will prevent any overextending from gauges.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Held L and R Menu Scrolling
    # -----------------------------------------------------------------------------
    # - Before in VX, you can scroll through menus by holding down L and R buttons
    # (Q and W on the keyboard) to scroll through menus quickly. This fix will
    # re-enable the ability to scroll through menus in such a fashion. Disable it
    # in the module if you wish to.
    # 
    # -----------------------------------------------------------------------------
    # Bug Fix: Substitute Healing
    # -----------------------------------------------------------------------------
    # If an actor has the substitute (cover) flag on them, they will attempt to
    # take the place of low HP allies when they're the target of attack. However,
    # this is also the case for friendly skills such as heal. This script will fix
    # it where if a battler targets an ally, no substitutes will take place.
    # 
    # -----------------------------------------------------------------------------
    # New Feature: Screen Resolution Size
    # -----------------------------------------------------------------------------
    # - The screen can now be resized from 544x416 with ease and still support maps
    # that are smaller than 544x416. Maps smaller than 544x416 will be centered on
    # the screen without having sprites jumping all over the place.
    # 
    # -----------------------------------------------------------------------------
    # New Feature: Adjust Animation Speed
    # -----------------------------------------------------------------------------
    # - RPG Maker VX Ace plays animations at a rate of 15 FPS by default. Speed up
    # the animations by changing a simple constant in the module.
    # 
    # -----------------------------------------------------------------------------
    # New Feature: GUI Modifications
    # -----------------------------------------------------------------------------
    # - There are quite a lot of different modifications you can do to the GUI.
    # This includes placing outlines around your gauges, changing the colours of 
    # each individual font aspect, and more. Also, you can change the default font
    # setting for your games here.
    # 
    # -----------------------------------------------------------------------------
    # New Feature: Numeric Digit Grouping
    # -----------------------------------------------------------------------------
    # This will change various scenes to display numbers in groups where they are
    # separated by a comma every three digits. Thus, a number like 1234567 will
    # show up as 1,234,567. This allows for players to read numbers quicker.
    # 
    # And that's all for the bug fixes and features!
    # 
    #==============================================================================
    # ▼ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
    # 
    #==============================================================================
    # ▼ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjusting.
    # 
    #==============================================================================
    
    module YEA
      module CORE
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Screen Resolution Size -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # RPG Maker VX Ace has the option of having larger width and height for
        # your games. Resizing the width and height will have these changes:
        # 
        #              Default   Resized   Min Tiles Default   Min Tiles New
        #    Width       544       640           17                 20
        #    Height      416       480           13                 15
        # 
        # * Note: Maximum width is 640 while maximum height is 480.
        #         Minimum width is 110 while maximum height is 10.
        #         These are limitations set by RPG Maker VX Ace's engine.
        # 
        # By selecting resize, all of the default menus will have their windows
        # adjusted, but scripts provided by non-Yanfly Engine sources may or may
        # not adjust themselves properly.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        RESIZE_WIDTH  = 544
        RESIZE_HEIGHT = 416
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Adjust Animation Speed -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # By default, the animation speed played in battles operates at 15 FPS
        # (frames per second). For those who would like to speed it up, change this
        # constant to one of these values:
        #   RATE   Speed
        #     4      15 fps
        #     3      20 fps
        #     2      30 fps
        #     1      60 fps
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        ANIMATION_RATE = 3
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Digit Grouping -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Setting this to true will cause numbers to be grouped together when they
        # are larger than a thousand. For example, 12345 will appear as 12,345.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        GROUP_DIGITS = true
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Font Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Adjust the default font settings for your game here. The various settings
        # will be explained below.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        FONT_NAME = ["Monotype Corsiva", "Palatino Linotype", "Arial", "Courier"]
        # This adjusts the fonts used for your game. If the font at the start of
        # the array doesn't exist on the player's computer, it'll use the next one.
        FONT_SIZE = 24       # Adjusts font size. Default: 24
        FONT_BOLD = false   # Makes font bold. Default: false
        FONT_ITALIC = true  # Makes font italic. Default: false
        FONT_SHADOW = true  # Gives font a shadow. Default: false
        FONT_OUTLINE = false  # Gives font an outline. Default: true
        FONT_COLOUR = Color.new(255, 155, 55, 255)   # Default: 255, 255, 255, 255
        FONT_OUTLINE_COLOUR = Color.new(0, 0, 0, 255) # Default:   0,   0,   0, 128
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Forced Action Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # For those who would like to allow the game to remove a forced action
        # battler from the queue list, use the switch below. If you don't want to
        # use this option, set the switch ID to 0.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        FORCED_ACTION_REMOVE_SWITCH = 0
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Gauge Appearance Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # You can modify the way your gauges appear in the game. If you wish for
        # them to have an outline, it's possible. You can also adjust the height
        # of the gauges, too.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        GAUGE_OUTLINE = true
        GAUGE_HEIGHT = 12
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Held L and R Menu Scrolling -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # VX gave the ability to scroll through menus quickly through holding the
        # L and R buttons (Q and W on the keyboard). VX Ace disabled it. Now, you
        # can re-enable the ability to scroll faster by setting this constant to
        # true. To disable it, set this constant to false.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        QUICK_SCROLLING = true
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - System Text Colours -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Sometimes the system text colours are boring as just orange for HP, blue
        # for MP, and green for TP. Change the values here. Each number corresponds
        # to the colour index of the Window.png skin found in Graphics\System.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        COLOURS ={
        # :text       => ID
          :normal     => 0,   # Default:  0
          :system     => 16,   # Default: 16
          :crisis     => 17,   # Default: 17
          :knockout   => 18,   # Default: 18
          :gauge_back => 19,   # Default: 19
          :hp_gauge1  => 20,   # Default: 20
          :hp_gauge2  => 21,   # Default: 21
          :mp_gauge1  => 22,   # Default: 22
          :mp_gauge2  => 23,   # Default: 23
          :mp_cost    => 23,   # Default: 23
          :power_up   => 24,   # Default: 24
          :power_down => 25,   # Default: 25
          :tp_gauge1  => 28,   # Default: 28
          :tp_gauge2  => 29,   # Default: 29
          :tp_cost    => 29,   # Default: 29
        } # Do not remove this.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - System Text Options -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Here, you can adjust the transparency used for disabled items, the %
        # needed for HP and MP to enter "crisis" mode.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        TRANSPARENCY = 160   # Adjusts transparency of disabled items. Default: 160
        HP_CRISIS = 0.25     # When HP is considered critical. Default: 0.25
        MP_CRISIS = 0.25     # When MP is considered critical. Default: 0.25
        ITEM_AMOUNT = "×%s"  # The prefix used for item amounts.
        
      end # CORE
    end # YEA
    
    #==============================================================================
    # ▼ Editting anything past this point may potentially result in causing
    # computer damage, incontinence, explosion of user's head, coma, death, and/or
    # halitosis so edit at your own risk.
    #==============================================================================
    
    Graphics.resize_screen(YEA::CORE::RESIZE_WIDTH, YEA::CORE::RESIZE_HEIGHT)
    Font.default_name = YEA::CORE::FONT_NAME
    Font.default_size = YEA::CORE::FONT_SIZE
    Font.default_bold = YEA::CORE::FONT_BOLD
    Font.default_italic = YEA::CORE::FONT_ITALIC
    Font.default_shadow = YEA::CORE::FONT_SHADOW
    Font.default_outline = YEA::CORE::FONT_OUTLINE
    Font.default_color = YEA::CORE::FONT_COLOUR
    Font.default_out_color = YEA::CORE::FONT_OUTLINE_COLOUR
    
    #==============================================================================
    # ■ Numeric
    #==============================================================================
    
    class Numeric  
      
      #--------------------------------------------------------------------------
      # new method: group_digits
      #--------------------------------------------------------------------------
      def group
        return self.to_s unless YEA::CORE::GROUP_DIGITS
        self.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
      end
      
    end # Numeric
    
    #==============================================================================
    # ■ Switch
    #==============================================================================
    
    module Switch
      
      #--------------------------------------------------------------------------
      # self.forced_action_remove
      #--------------------------------------------------------------------------
      def self.forced_action_remove
        return false if YEA::CORE::FORCED_ACTION_REMOVE_SWITCH <= 0
        return $game_switches[YEA::CORE::FORCED_ACTION_REMOVE_SWITCH]
      end
      
    end # Switch
    
    #==============================================================================
    # ■ BattleManager
    #==============================================================================
    
    module BattleManager
      
      #--------------------------------------------------------------------------
      # overwrite method: turn_start
      #--------------------------------------------------------------------------
      def self.turn_start
        @phase = :turn
        clear_actor
        $game_troop.increase_turn
        @performed_battlers = []
        make_action_orders
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: next_subject
      #--------------------------------------------------------------------------
      def self.next_subject
        @performed_battlers = [] if @performed_battlers.nil?
        loop do
          @action_battlers -= @performed_battlers
          battler = @action_battlers.shift
          return nil unless battler
          next unless battler.index && battler.alive?
          @performed_battlers.push(battler)
          return battler
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: force_action
      #--------------------------------------------------------------------------
      def self.force_action(battler)
        @action_forced = [] if @action_forced == nil
        @action_forced.push(battler)
        return unless Switch.forced_action_remove
        @action_battlers.delete(battler)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: action_forced?
      #--------------------------------------------------------------------------
      def self.action_forced?
        @action_forced != nil
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: action_forced_battler
      #--------------------------------------------------------------------------
      def self.action_forced_battler
        @action_forced.shift
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: clear_action_force
      #--------------------------------------------------------------------------
      def self.clear_action_force
        @action_forced = nil if @action_forced.empty?
      end
      
    end # BattleManager
    
    #==============================================================================
    # ■ Game_Battler
    #==============================================================================
    
    class Game_Battler < Game_BattlerBase
      
      #--------------------------------------------------------------------------
      # public instance variables
      #--------------------------------------------------------------------------
      attr_accessor :pseudo_ani_id
      
      #--------------------------------------------------------------------------
      # alias method: clear_sprite_effects
      #--------------------------------------------------------------------------
      alias game_battler_clear_sprite_effects_ace clear_sprite_effects
      def clear_sprite_effects
        game_battler_clear_sprite_effects_ace
        @pseudo_ani_id = 0
      end
      
      #--------------------------------------------------------------------------
      # alias method: force_action
      #--------------------------------------------------------------------------
      alias game_battler_force_action_ace force_action
      def force_action(skill_id, target_index)
        clone_current_actions
        game_battler_force_action_ace(skill_id, target_index)
      end
      
      #--------------------------------------------------------------------------
      # new method: clone_current_actions
      #--------------------------------------------------------------------------
      def clone_current_actions
        @cloned_actions = @actions.dup
      end
      
      #--------------------------------------------------------------------------
      # new method: restore_cloned_actions
      #--------------------------------------------------------------------------
      def restore_cloned_actions
        return if @cloned_actions.nil?
        @actions = @cloned_actions.dup
        @cloned_actions = nil
      end
      
      #--------------------------------------------------------------------------
      # alias method: on_action_end
      #--------------------------------------------------------------------------
      alias game_battler_on_action_end_ace on_action_end
      def on_action_end
        game_battler_on_action_end_ace
        restore_cloned_actions
      end
      
      #--------------------------------------------------------------------------
      # alias method: on_battle_end
      #--------------------------------------------------------------------------
      alias game_battler_on_battle_end_ace on_battle_end
      def on_battle_end
        game_battler_on_battle_end_ace
        @cloned_actions = nil
      end
      
    end # Game_Battler
    
    #==============================================================================
    # ■ Game_Troop
    #==============================================================================
    
    class Game_Troop < Game_Unit
      
      #--------------------------------------------------------------------------
      # overwrite method: setup
      #--------------------------------------------------------------------------
      def setup(troop_id)
        clear
        @troop_id = troop_id
        @enemies = []
        troop.members.each do |member|
          next unless $data_enemies[member.enemy_id]
          enemy = Game_Enemy.new(@enemies.size, member.enemy_id)
          enemy.hide if member.hidden
          enemy.screen_x = member.x + (Graphics.width - 544)/2
          enemy.screen_y = member.y + (Graphics.height - 416)
          @enemies.push(enemy)
        end
        init_screen_tone
        make_unique_names
      end
      
    end # Game_Troop
    
    #==============================================================================
    # ■ Game_Map
    #==============================================================================
    
    class Game_Map
      
      #--------------------------------------------------------------------------
      # overwrite method: scroll_down
      #--------------------------------------------------------------------------
      def scroll_down(distance)
        if loop_vertical?
          @display_y += distance
          @display_y %= @map.height * 256
          @parallax_y += distance if @parallax_loop_y
        else
          last_y = @display_y
          dh = Graphics.height > height * 32 ? height : screen_tile_y
          @display_y = [@display_y + distance, height - dh].min
          @parallax_y += @display_y - last_y
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: scroll_right
      #--------------------------------------------------------------------------
      def scroll_right(distance)
        if loop_horizontal?
          @display_x += distance
          @display_x %= @map.width * 256
          @parallax_x += distance if @parallax_loop_x
        else
          last_x = @display_x
          dw = Graphics.width > width * 32 ? width : screen_tile_x
          @display_x = [@display_x + distance, width - dw].min
          @parallax_x += @display_x - last_x
        end
      end
      
    end # Game_Map
    
    #==============================================================================
    # ■ Game_Event
    #==============================================================================
    
    class Game_Event < Game_Character
      
      #--------------------------------------------------------------------------
      # overwrite method: near_the_screen?
      #--------------------------------------------------------------------------
      def near_the_screen?(dx = nil, dy = nil)
        dx = [Graphics.width, $game_map.width * 256].min/32 - 5 if dx.nil?
        dy = [Graphics.height, $game_map.height * 256].min/32 - 5 if dy.nil?
        ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
        ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
        ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
      end
      
    end # Game_Event
    
    #==============================================================================
    # ■ Sprite_Base
    #==============================================================================
    
    class Sprite_Base < Sprite
      
      #--------------------------------------------------------------------------
      # overwrite method: set_animation_rate
      #--------------------------------------------------------------------------
      def set_animation_rate
        @ani_rate = YEA::CORE::ANIMATION_RATE
      end
      
      #--------------------------------------------------------------------------
      # new method: start_pseudo_animation
      #--------------------------------------------------------------------------
      def start_pseudo_animation(animation, mirror = false)
        dispose_animation
        @animation = animation
        return if @animation.nil?
        @ani_mirror = mirror
        set_animation_rate
        @ani_duration = @animation.frame_max * @ani_rate + 1
        @ani_sprites = []
      end
      
    end # Sprite_Base
    
    #==============================================================================
    # ■ Sprite_Battler
    #==============================================================================
    
    class Sprite_Battler < Sprite_Base
      
      #--------------------------------------------------------------------------
      # alias method: setup_new_animation
      #--------------------------------------------------------------------------
      alias sprite_battler_setup_new_animation_ace setup_new_animation
      def setup_new_animation
        sprite_battler_setup_new_animation_ace
        return if @battler.nil?
        return if @battler.pseudo_ani_id.nil?
        return if @battler.pseudo_ani_id <= 0
        animation = $data_animations[@battler.pseudo_ani_id]
        mirror = @battler.animation_mirror
        start_pseudo_animation(animation, mirror)
        @battler.pseudo_ani_id = 0
      end
      
    end # Sprite_Battler
    
    #==============================================================================
    # ■ Spriteset_Map
    #==============================================================================
    
    class Spriteset_Map
      
      #--------------------------------------------------------------------------
      # overwrite method: create_viewports
      #--------------------------------------------------------------------------
      def create_viewports
        if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal?
          dx = (Graphics.width - $game_map.width * 32) / 2
        else
          dx = 0
        end
        dw = [Graphics.width, $game_map.width * 32].min
        dw = Graphics.width if $game_map.loop_horizontal?
        if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical?
          dy = (Graphics.height - $game_map.height * 32) / 2
        else
          dy = 0
        end
        dh = [Graphics.height, $game_map.height * 32].min
        dh = Graphics.height if $game_map.loop_vertical?
        @viewport1 = Viewport.new(dx, dy, dw, dh)
        @viewport2 = Viewport.new(dx, dy, dw, dh)
        @viewport3 = Viewport.new(dx, dy, dw, dh)
        @viewport2.z = 50
        @viewport3.z = 100
      end
      
      #--------------------------------------------------------------------------
      # new method: update_viewport_sizes
      #--------------------------------------------------------------------------
      def update_viewport_sizes
        if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal?
          dx = (Graphics.width - $game_map.width * 32) / 2
        else
          dx = 0
        end
        dw = [Graphics.width, $game_map.width * 32].min
        dw = Graphics.width if $game_map.loop_horizontal?
        if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical?
          dy = (Graphics.height - $game_map.height * 32) / 2
        else
          dy = 0
        end
        dh = [Graphics.height, $game_map.height * 32].min
        dh = Graphics.height if $game_map.loop_vertical?
        rect = Rect.new(dx, dy, dw, dh)
        for viewport in [@viewport1, @viewport2, @viewport3]
          viewport.rect = rect
        end
      end
      
    end # Spriteset_Map
    
    #==============================================================================
    # ■ Window_Base
    #==============================================================================
    
    class Window_Base < Window
      
      #--------------------------------------------------------------------------
      # overwrite method: reset_font_settings
      #--------------------------------------------------------------------------
      def reset_font_settings
        change_color(normal_color)
        contents.font.size = Font.default_size
        contents.font.bold = Font.default_bold
        contents.font.italic = Font.default_italic
        contents.font.out_color = Font.default_out_color
      end
      
      #--------------------------------------------------------------------------
      # overwrite methods: color
      #--------------------------------------------------------------------------
      def normal_color;      text_color(YEA::CORE::COLOURS[:normal]);      end;
      def system_color;      text_color(YEA::CORE::COLOURS[:system]);      end;
      def crisis_color;      text_color(YEA::CORE::COLOURS[:crisis]);      end;
      def knockout_color;    text_color(YEA::CORE::COLOURS[:knockout]);    end;
      def gauge_back_color;  text_color(YEA::CORE::COLOURS[:gauge_back]);  end;
      def hp_gauge_color1;   text_color(YEA::CORE::COLOURS[:hp_gauge1]);   end;
      def hp_gauge_color2;   text_color(YEA::CORE::COLOURS[:hp_gauge2]);   end;
      def mp_gauge_color1;   text_color(YEA::CORE::COLOURS[:mp_gauge1]);   end;
      def mp_gauge_color2;   text_color(YEA::CORE::COLOURS[:mp_gauge2]);   end;
      def mp_cost_color;     text_color(YEA::CORE::COLOURS[:mp_cost]);     end;
      def power_up_color;    text_color(YEA::CORE::COLOURS[:power_up]);    end;
      def power_down_color;  text_color(YEA::CORE::COLOURS[:power_down]);  end;
      def tp_gauge_color1;   text_color(YEA::CORE::COLOURS[:tp_gauge1]);   end;
      def tp_gauge_color2;   text_color(YEA::CORE::COLOURS[:tp_gauge2]);   end;
      def tp_cost_color;     text_color(YEA::CORE::COLOURS[:tp_cost]);     end;
      
      #--------------------------------------------------------------------------
      # overwrite method: translucent_alpha
      #--------------------------------------------------------------------------
      def translucent_alpha
        return YEA::CORE::TRANSPARENCY
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: hp_color
      #--------------------------------------------------------------------------
      def hp_color(actor)
        return knockout_color if actor.hp == 0
        return crisis_color if actor.hp < actor.mhp * YEA::CORE::HP_CRISIS
        return normal_color
      end
      #--------------------------------------------------------------------------
      # overwrite method: mp_color
      #--------------------------------------------------------------------------
      def mp_color(actor)
        return crisis_color if actor.mp < actor.mmp * YEA::CORE::MP_CRISIS
        return normal_color
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_gauge
      #--------------------------------------------------------------------------
      def draw_gauge(dx, dy, dw, rate, color1, color2)
        dw -= 2 if YEA::CORE::GAUGE_OUTLINE
        fill_w = [(dw * rate).to_i, dw].min
        gauge_h = YEA::CORE::GAUGE_HEIGHT
        gauge_y = dy + line_height - 2 - gauge_h
        if YEA::CORE::GAUGE_OUTLINE
          outline_colour = gauge_back_color
          outline_colour.alpha = translucent_alpha
          contents.fill_rect(dx, gauge_y-1, dw+2, gauge_h+2, outline_colour)
          dx += 1
        end
        contents.fill_rect(dx, gauge_y, dw, gauge_h, gauge_back_color)
        contents.gradient_fill_rect(dx, gauge_y, fill_w, gauge_h, color1, color2)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_actor_level
      #--------------------------------------------------------------------------
      def draw_actor_level(actor, dx, dy)
        change_color(system_color)
        draw_text(dx, dy, 32, line_height, Vocab::level_a)
        change_color(normal_color)
        draw_text(dx + 32, dy, 24, line_height, actor.level.group, 2)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_current_and_max_values
      #--------------------------------------------------------------------------
      def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2)
        total = current.group + "/" + max.group
        if dw < text_size(total).width + text_size(Vocab.hp).width
          change_color(color1)
          draw_text(dx, dy, dw, line_height, current.group, 2)
        else
          xr = dx + text_size(Vocab.hp).width
          dw -= text_size(Vocab.hp).width
          change_color(color2)
          text = "/" + max.group
          draw_text(xr, dy, dw, line_height, text, 2)
          dw -= text_size(text).width
          change_color(color1)
          draw_text(xr, dy, dw, line_height, current.group, 2)
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_actor_tp
      #--------------------------------------------------------------------------
      def draw_actor_tp(actor, x, y, width = 124)
        draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
        change_color(system_color)
        draw_text(x, y, 30, line_height, Vocab::tp_a)
        change_color(tp_color(actor))
        draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i.group, 2)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_actor_param
      #--------------------------------------------------------------------------
      def draw_actor_param(actor, x, y, param_id)
        change_color(system_color)
        draw_text(x, y, 120, line_height, Vocab::param(param_id))
        change_color(normal_color)
        draw_text(x + 120, y, 36, line_height, actor.param(param_id).group, 2)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_currency_value
      #--------------------------------------------------------------------------
      def draw_currency_value(value, unit, x, y, width)
        cx = text_size(unit).width
        change_color(normal_color)
        draw_text(x, y, width - cx - 2, line_height, value.group, 2)
        change_color(system_color)
        draw_text(x, y, width, line_height, unit, 2)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_actor_simple_status
      #--------------------------------------------------------------------------
      def draw_actor_simple_status(actor, dx, dy)
        draw_actor_name(actor, dx, dy)
        draw_actor_level(actor, dx, dy + line_height * 1)
        draw_actor_icons(actor, dx, dy + line_height * 2)
        dw = contents.width - dx - 124
        draw_actor_class(actor, dx + 120, dy, dw)
        draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
        draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
      end
      
    end # Window_Base
    
    #==============================================================================
    # ■ Window_Selectable
    #==============================================================================
    
    class Window_Selectable < Window_Base
      
      #--------------------------------------------------------------------------
      # overwrite method: process_cursor_move
      #--------------------------------------------------------------------------
      if YEA::CORE::QUICK_SCROLLING
      def process_cursor_move
        return unless cursor_movable?
        last_index = @index
        cursor_down (Input.trigger?(:DOWN))  if Input.repeat?(:DOWN)
        cursor_up   (Input.trigger?(:UP))    if Input.repeat?(:UP)
        cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
        cursor_left (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
        cursor_pagedown   if !handle?(:pagedown) && Input.repeat?(:R)
        cursor_pageup     if !handle?(:pageup)   && Input.repeat?(:L)
        Sound.play_cursor if @index != last_index
      end
      end # YEA::CORE::QUICK_SCROLLING
      
    end # Window_Selectable
    
    #==============================================================================
    # ■ Window_ItemList
    #==============================================================================
    
    class Window_ItemList < Window_Selectable
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        item = @data[index]
        return if item.nil?
        rect = item_rect(index)
        rect.width -= 4
        draw_item_name(item, rect.x, rect.y, enable?(item), rect.width - 24)
        draw_item_number(rect, item)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_item_number
      #--------------------------------------------------------------------------
      def draw_item_number(rect, item)
        text = sprintf(YEA::CORE::ITEM_AMOUNT, $game_party.item_number(item).group)
        draw_text(rect, text, 2)
      end
      
    end # Window_ItemList
    
    #==============================================================================
    # ■ Window_SkillList
    #==============================================================================
    
    class Window_SkillList < Window_Selectable
      
      #--------------------------------------------------------------------------
      # draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        skill = @data[index]
        return if skill.nil?
        rect = item_rect(index)
        rect.width -= 4
        draw_item_name(skill, rect.x, rect.y, enable?(skill), rect.width - 24)
        draw_skill_cost(rect, skill)
      end
      
    end # Window_SkillList
    
    #==============================================================================
    # ■ Window_Status
    #==============================================================================
    
    class Window_Status < Window_Selectable
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_exp_info
      #--------------------------------------------------------------------------
      def draw_exp_info(x, y)
        s1 = @actor.max_level? ? "-------" : @actor.exp
        s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
        s_next = sprintf(Vocab::ExpNext, Vocab::level)
        change_color(system_color)
        draw_text(x, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
        draw_text(x, y + line_height * 2, 180, line_height, s_next)
        change_color(normal_color)
        s1 = s1.group if s1.is_a?(Integer)
        s2 = s2.group if s2.is_a?(Integer)
        draw_text(x, y + line_height * 1, 180, line_height, s1, 2)
        draw_text(x, y + line_height * 3, 180, line_height, s2, 2)
      end
      
    end # Window_Status
    
    #==============================================================================
    # ■ Window_ShopBuy
    #==============================================================================
    
    class Window_ShopBuy < Window_Selectable
      
      #--------------------------------------------------------------------------
      # overwrite method: draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        item = @data[index]
        rect = item_rect(index)
        draw_item_name(item, rect.x, rect.y, enable?(item))
        rect.width -= 4
        draw_text(rect, price(item).group, 2)
      end
      
    end # Window_ShopBuy
    
    #==============================================================================
    # ■ Scene_Map
    #==============================================================================
    
    class Scene_Map < Scene_Base
      
      #--------------------------------------------------------------------------
      # alias method: post_transfer
      #--------------------------------------------------------------------------
      alias scene_map_post_transfer_ace post_transfer
      def post_transfer
        @spriteset.update_viewport_sizes
        scene_map_post_transfer_ace
      end
      
    end # Scene_Map
    
    #==============================================================================
    # ■ Scene_Battle
    #==============================================================================
    
    class Scene_Battle < Scene_Base
      
      #--------------------------------------------------------------------------
      # alias method: check_substitute
      #--------------------------------------------------------------------------
      alias scene_battle_check_substitute_ace check_substitute
      def check_substitute(target, item)
        return false if @subject.actor? == target.actor?
        return scene_battle_check_substitute_ace(target, item)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: process_forced_action
      #--------------------------------------------------------------------------
      def process_forced_action
        while BattleManager.action_forced?
          last_subject = @subject
          @subject = BattleManager.action_forced_battler
          process_action
          @subject = last_subject
          BattleManager.clear_action_force
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: show_attack_animation
      #--------------------------------------------------------------------------
      def show_attack_animation(targets)
        if @subject.actor?
          show_normal_animation(targets, @subject.atk_animation_id1, false)
          wait_for_animation
          show_normal_animation(targets, @subject.atk_animation_id2, true)
        else
          Sound.play_enemy_attack
          abs_wait_short
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: show_normal_animation
      #--------------------------------------------------------------------------
      def show_normal_animation(targets, animation_id, mirror = false)
        animation = $data_animations[animation_id]
        return if animation.nil?
        ani_check = false
        targets.each do |target|
          if ani_check && target.animation_id <= 0
            target.pseudo_ani_id = animation_id
          else
            target.animation_id = animation_id
          end
          target.animation_mirror = mirror
          abs_wait_short unless animation.to_screen?
          ani_check = true if animation.to_screen?
        end
        abs_wait_short if animation.to_screen?
      end
      
    end # Scene_Battle
    
    #==============================================================================
    # 
    # ▼ End of File
    # 
    #==============================================================================
    

     

     

     

  6. Poffarre... Io pure sono un vecchietto della leva di Seraph.

    Che cosa brutta il tempo che avanza...

     

    Comunque sia benvenuto! E vedi di non sfogare la tua irascibilità sul forum

    (Mi han mandato a quel paese una volta e sono ancora tutto traumatizzato...)

  7. Salve a tutti!

    Stavo usando questo script, che è un bestiario...

     

     

    #==============================================================================
    # VX Bestiary by VitorJ (http://vjrgss.blogspot.com/)
    #------------------------------------------------------------------------------
    # Adiciona um sistema de bestiario, onde tem a lista de monstro, drops
    # status, xp e etc...
    #------------------------------------------------------------------------------
    # Uso comercial e não comercial permitido com os devidos credito.
    #Comandos----------------------------------------------------------------------
    # Para definir o level do monstro, na caixa de note do mesmo coloque:
    # <E_Level = X>
    # Onde X é o level do monstro.
    # Para abrir o bestiario use o comando chamar script em um evento:
    # SceneManager.call(Scene_Bestiary)
    #==============================================================================
    module VJBEST
      Rank = []
      Rank_Color = []
      #
      No_Name = "?????"       #Nome que aparecera caso não tenha matado o monstro ainda
      No_Param = "????"       #Parametros que apareceram caso não tenha matado o monstro
      Count = "Completamento"     #Texto que ficara ao lado da % de monstros
      Round = 0               #Quantas casas depois da virgula ira mostrar?
      Kill_Count = "Kills"    #Texto que mostrara o numero de x que matou o monstro.
      Encounter = "Encounters" #Texto que mostrara o numero de x que encontou o monstro.
      Rank_N = "Sconfitti"      #Texto de ranking do heroi
      NK_Battler = "shadow"  #Nome do battler que ira aparece caso não tenha matado o monstro.
      #Nome do item: caso o monstro não drop, se ainda não tiver descoberto
      No_Item = ["------","??????"]
      #Cor do texto Icone que ficara no fim do nome de um monstro recem descoberto
      #New_Icon = [X,cor]
      #Onde x é o index do icone e a cor deve ser no formato: Color.new(r,g,b).
      New_Icon = [99,Color.new(255,200,0)]
      #Para editar o rank do heroi
      #Rank[X] = ["Rank",cor]
      #Onde X é a porcentagem de progresso e "Rank" é o rank do heroi entre aspas
      #E a cor deve ser no formato: Color.new(r,g,b).
      Rank[0] = ["Rank E",Color.new(170,255,255)]
      Rank[25] = ["Rank D",Color.new(100,255,180)]
      Rank[50] = ["Rank C",Color.new(100,170,200)]
      Rank[75] = ["Rank B",Color.new(70,255,100)]
      Rank[100] = ["Rank A",Color.new(255,200,0)]
      
      #Nome dos atributos
      Attr_Name = ["PV","MP","Atk","Def","M.Atk","M.Def","Agl","For"]
      Elements = "Debolezze"      #Texto de Elementos (fraqueza/força)
      Detail = "Dettagli"         #Texto de detalhes
      Exp = "Exp"                 #Texto de experiencia
      Kill_R = "Vittime"            #Texto de porcentagem de vezes que matou
      Damage = "Natura"             #Texto onde mostrara o tipo de dano
      
    end
    class Window_Bestiary_Enemies < Window_Command
      def initialize
        super(0, 0)
        update_placement
      end
      def window_width
        return 216
      end
      def window_height
        Graphics.height-52
      end
      def update_placement
        self.x = 0
        self.y = 52
      end
      def make_command_list
        @number = []
        for i in 1...$data_enemies.size
          id = "00"+i.to_s if i < 9
          id = "0"+i.to_s if i < 99 and i >= 10
          id = i.to_s if i >= 100
          @number.push(id)
          enabled = $game_party.enemy_killed?(i)
          text = VJBEST::No_Name
          text = $data_enemies[i].name if enabled
          add_command(text,:ok,enabled)
        end
      end
      def item_rect(index)
        rect = Rect.new
        rect.width = item_width-38
        rect.height = item_height
        rect.x = index % col_max * (item_width + spacing) + 38
        rect.y = index / col_max * item_height
        rect
      end
      def item_rect_for_text(index)
        rect = item_rect(index)
        rect.x += 4
        rect.width -= 8
        rect
      end
      def draw_item(index)
        if $game_party.new_monster[index+1]
          change_color(VJBEST::New_Icon[1])
        else
          change_color(normal_color, command_enabled?(index))
        end
        rect = item_rect_for_text(index)
        rect.width += 12
        draw_text(rect, command_name(index), alignment)
        ix = contents.width-24
        draw_icon(VJBEST::New_Icon[0], ix, rect.y) if $game_party.new_monster[index+1]
        change_color(normal_color)
        rect.x = 0
        rect.width = 32
        draw_text(rect, @number[index], 2)
      end
      def index=(index)
        @index = index
        update_cursor
        $game_party.new_monster[index+1] = false if $game_party.new_monster[index+1]
      end
    end
    class Window_Enemy_Status < Window_Base
      include VJBEST
      def initialize
        super(216, 0, window_width,window_height)
        @enemy = $data_enemies[0]
        refresh
      end
      def window_width
        return Graphics.width-216
      end
      def window_height
        return Graphics.height-52
      end
      def set_enemy=(id)
        return unless @enemy != $data_enemies[id]
        @enemy = $data_enemies[id]
        refresh
      end
      def refresh
        contents.clear
        @battler.dispose if @battler
        return unless @enemy
        @old_enemy = @enemy
        viewport = Viewport.new
        viewport.z = self.z + 1
        if $game_party.enemy_killed?(@enemy.id)
          battler = @enemy.battler_name
          b_hue = @enemy.battler_hue
          params = @enemy.params
          name = @enemy.name
          i_name = []
          for i in 0..2
            item = @enemy.drop_items[i]
            item = item_object(item.kind,item.data_id)
            if item.nil?
              i_name.push(VJBEST::No_Item[0])
            else
              i_name.push(item.name)
            end
          end
        else
          params = []
          8.times {|i| params[i] = VJBEST::No_Param }
          name = VJBEST::No_Name
          battler = VJBEST::NK_Battler
          b_hue = 0
          i_name = [VJBEST::No_Item[1],VJBEST::No_Item[1],VJBEST::No_Item[1]]
        end
        box_size = (contents.width/2)
        
        @battler = Sprite.new(viewport)
        @battler.bitmap = Cache.battler(battler, b_hue)
        @battler.ox = @battler.width/2
        @battler.x = self.x + contents.width - (box_size/2)
        @battler.zoom_x -= 0.05 until (@battler.width*@battler.zoom_x) <= box_size
        @battler.zoom_y -= 0.05 until (@battler.height*@battler.zoom_y) <= box_size-8
        @battler.oy = (@battler.height*@battler.zoom_y)/2
        @battler.y = (box_size/2)+12
        @battler.visible = self.visible
        draw_box(contents.width-(box_size+32), 0, (box_size+32), (box_size+32)) 
        change_color(system_color)
        
        
        
        draw_box((contents.width-box_size)-32, box_size+32, box_size+32, line_height) 
        draw_text((contents.width-box_size)-32, box_size+32, box_size+32, line_height, name,1)
        for i in 0..7
          y = 10+(line_height*i)
          x = 0
          param = params[i]
          param_name = VJBEST::Attr_Name[i]
          change_color(normal_color)
          nbox_size = box_size-31
          draw_box(x, y, nbox_size, line_height) 
          draw_text(x+2, y, nbox_size, line_height, param_name,0)
          size = contents.text_size(param).width + 5
          contents.fill_rect((nbox_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
          change_color(system_color)
          draw_text(x, y, nbox_size, line_height, param,2)
        end
        
        y = box_size+60
        x = 0
        param = $game_party.kill_count(@enemy.id)
        param_name = VJBEST::Kill_Count
        change_color(normal_color)
        draw_box(x, y, box_size, line_height) 
        draw_text(x+2, y, box_size, line_height, param_name,0)
        size = contents.text_size("000").width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(text_color(6))
        draw_text(x, y, box_size, line_height, param,2)
    
        y = box_size+60
        x = box_size-1
        param = $game_party.encounter_count(@enemy.id)
        param_name = VJBEST::Encounter
        change_color(normal_color)
        draw_box(x, y, box_size+1, line_height) 
        draw_text(x+2, y, box_size, line_height, param_name,0)
        size = contents.text_size("000").width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(text_color(14))
        draw_text(x, y, box_size, line_height, param,2)
        change_color(system_color)    
        for i in 0..2
          y = 240+(line_height*i)
          x = 0
          param_name = i_name[i]
          nbox_size = contents.width
          draw_box(x, y, nbox_size, line_height) 
          draw_text(x+2, y, nbox_size, line_height, param_name,0)
        end
      end
      def item_object(kind, data_id)
        return $data_items  [data_id] if kind == 1
        return $data_weapons[data_id] if kind == 2
        return $data_armors [data_id] if kind == 3
        return nil
      end
      def draw_box(x,y,width,height)
        height += 1
        contents.fill_rect(x, y, width, height, Color.new(255,255,255,100)) 
        contents.fill_rect(x+1, y+1, width-2, height-2, Color.new(0,0,0,100)) 
      end
      def dispose
        @battler.dispose if @battler
        contents.dispose unless disposed?
        super
      end
      def visible=(vis)
        super
        @battler.visible = vis if @battler
      end
    end
    class Window_Enemy_StatusC < Window_Base
      include VJBEST
      def initialize
        super(216, 0, window_width,window_height)
        @enemy = $data_enemies[1]
        refresh
      end
      def window_width
        return Graphics.width-216
      end
      def window_height
        return Graphics.height-52
      end
      def set_enemy=(id)
        return unless @enemy != $data_enemies[id]
        @enemy = $data_enemies[id]
        refresh
      end
      def refresh
        contents.clear
        return unless @enemy
        change_color(system_color)
        draw_box(0,0,contents.width,line_height)
        draw_text(2, y, contents.width, line_height, VJBEST::Detail,1)
        
        box_size = contents.width/2
        y = line_height*1
        x = 0
        change_color(normal_color)
        draw_box(x,y,box_size,line_height)
        draw_text(x+2, y, box_size, line_height, VJBEST::Exp,0)
        exp = No_Param
        exp = @enemy.exp if $game_party.enemy_killed?(@enemy.id)
        size = contents.text_size(exp).width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(system_color)
        draw_text(x+2, y, box_size-2, line_height, exp ,2)
        
        y = line_height*1
        x = box_size
        change_color(normal_color)
        draw_box(x,y,box_size,line_height)
        draw_text(x+2, y, box_size, line_height, Vocab::level_a,0)
        text = "??" 
        text = get_level(@enemy) if $game_party.enemy_killed?(@enemy.id)
        size = contents.text_size(text).width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(system_color)
        draw_text(x+2, y, box_size-2, line_height, text ,2)
    
        y = line_height*2
        x = 0#box_size
        change_color(normal_color)
        draw_box(x,y,box_size,line_height)
        draw_text(x+2, y, box_size, line_height, Vocab::currency_unit,0)
        text = No_Param 
        text = @enemy.gold if $game_party.enemy_killed?(@enemy.id)
        size = contents.text_size(text).width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(system_color)
        draw_text(x+2, y, box_size-2, line_height, text ,2)
    
        y = line_height*2
        x = box_size
        change_color(normal_color)
        draw_box(x,y,box_size,line_height)
        draw_text(x+2, y, box_size, line_height, VJBEST::Kill_R,0)
        text = "???"
        text = get_kill_ratio(@enemy) + "%" if $game_party.enemy_killed?(@enemy.id)
        size = contents.text_size(text).width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(system_color)
        draw_text(x+2, y, box_size-2, line_height, text ,2)
    
        
        y = line_height*4 + 6
        x = 0
        draw_box(x,y,contents.width,line_height)
        draw_text(x+2, y, contents.width, line_height, VJBEST::Elements,1)
        
        y = line_height*5 + 6
        x = 0
        draw_box(x,y,box_size,line_height)
        change_color(normal_color)
        draw_text(x+2, y, box_size, line_height, VJBEST::Damage,0)
        val = No_Param
        val = get_damage(@enemy) if $game_party.enemy_killed?(@enemy.id)
        size = contents.text_size(val).width + 5
        contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
        change_color(system_color)
        draw_text(x+2, y, box_size-2, line_height, val ,2)
        
        elements = get_element(@enemy)
        y = line_height*7 + 6
        for i in 1...$data_system.elements.size-1
          col = (i-1) % 2
          x = box_size*col
          draw_box(x,y,box_size,line_height)
          change_color(normal_color)
          draw_text(x+2, y, box_size, line_height, $data_system.elements[i],0)
          val = "???"
          val = (elements[i]*100).round(0).to_s + "%" if $game_party.enemy_killed?(@enemy.id)
          change_color(system_color)
          size = contents.text_size(val).width + 5
          contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100)) 
          draw_text(x+2, y, box_size-2, line_height, val ,2)
          y += line_height if col == 1
        end
      end
      def get_damage(enemy)
        dam = $data_system.elements[1]
        enemy.features.each do |feat|
          if feat.code == 31
            dam = $data_system.elements[feat.data_id]
          end
        end
        return dam
      end
      def get_element(enemy)
        element = []
        for i in 1...$data_system.elements.size-1 
          element[i] = 1.0
          enemy.features.each do |feat|
            if feat.code == 11
              element[i] = feat.value if feat.data_id == i
            end
          end
        end
        return element
      end
      def get_level(enemy)
        level = 1
        note = enemy.note.split("\r\n")
        note.each do |i|
          if i =~ /<E_Level = (\d+)>/
            level = $1.to_i
          end
        end
        return level
      end
      def get_kill_ratio(enemy)
        enc = $game_party.encounter_count(enemy.id)
        kic = $game_party.kill_count(enemy.id)
        ratio = kic.fdiv(enc) * 100
        return 0.to_s if ratio.nan? or ratio.infinite?
        return ratio.round(0).to_s
      end
      def draw_box(x,y,width,height)
        height += 1
        contents.fill_rect(x, y, width, height, Color.new(255,255,255,100)) 
        contents.fill_rect(x+1, y+1, width-2, height-2, Color.new(0,0,0,100)) 
      end
    end
    class Window_Best_Count < Window_Base
      def initialize
        super(0, 0, window_width,window_height)
        refresh
      end
      def window_width
        return 216
      end
      def window_height
        return 52
      end
      def refresh
        contents.clear
        draw_text(0, 0, contents.width, line_height, VJBEST::Count,0)
        text = $game_party.enemy_count.to_s+"%"
        draw_text(0, 0, contents.width, line_height, text,2)
      end
    end
    class Window_Best_Rank < Window_Base
      def initialize
        super(216, Graphics.height-52, window_width,window_height)
        refresh
      end
      def window_width
        return Graphics.width-216
      end
      def window_height
        return 52
      end
      def refresh
        contents.clear
        draw_text(0, 0, contents.width, line_height, VJBEST::Rank_N,0)
        rank = $game_party.get_rank
        change_color(rank[1])
        draw_text(0, 0, contents.width, line_height, rank[0],2)
      end
    end
    class Scene_Bestiary < Scene_MenuBase
      def start
        super
        create_command_window
        create_enemy_status
        create_enemy_status_c
        create_enemy_count
        create_rank
      end
      def create_background
        super
        @background_sprite.tone.set(0, 0, 0, 128)
      end
      def create_command_window
        @command_window = Window_Bestiary_Enemies.new
        @command_window.set_handler(:ok,   method(:change_status))
        @command_window.set_handler(:cancel,   method(:return_scene))
      end
      def create_enemy_status
        @enemy_status = Window_Enemy_Status.new
      end
      def create_enemy_status_c
        @enemy_status_c = Window_Enemy_StatusC.new
        @enemy_status_c.visible = false
      end
      def create_enemy_count
        @enemy_count = Window_Best_Count.new
      end
      def create_rank
        @rank = Window_Best_Rank.new
      end
      def update
        update_basic
        @enemy_status.set_enemy = @command_window.index+1
        @enemy_status_c.set_enemy = @command_window.index+1
      end
      def change_status
        @enemy_status.visible = !@enemy_status.visible
        @enemy_status_c.visible = !@enemy_status_c.visible
        @command_window.activate
      end
    end
    class Game_Party < Game_Unit
      attr_accessor    :new_monster
      alias vjbest_gp_ini initialize
      def initialize
        @killed_enemies = []
        @kill_count = []
        @en_encounter = []
        @new_monster = []
        vjbest_gp_ini
      end
      def enemy_killed?(i)
        return true if @killed_enemies[i] == true
        return false
      end
      def get_rank
        rank_list = VJBEST::Rank
        rrank = rank_list[0]
        rank_list.each do |rank|
          if !rank.nil?
            pr = rank_list.index(rank)
            if pr <= enemy_count
              rrank = rank
            end
          end
        end
        return rrank
      end
      def kill_count(i)
        kc = @kill_count[i]
        kc = 0 if kc.nil?
        return kc
      end
      def encounter_count(i)
        ee = @en_encounter[i]
        ee = 0 if ee.nil?
        return ee
      end
      def encounter_enemy(i)
        @en_encounter[i] = 0 if @en_encounter[i].nil?
        @en_encounter[i] += 1
      end
      def kill_enemy(i)
        @new_monster[i] = true if @new_monster[i] != false
        @kill_count[i] = 0 if @kill_count[i].nil?
        @kill_count[i] += 1
        @killed_enemies[i] = true
      end
      def enemy_count
        ke = @killed_enemies.compact.size
        ke = 0 if ke < 0
        es = $data_enemies.size
        calc = ke.fdiv(es) * 100
        return calc.round(VJBEST::Round)
      end
    end
    
    class << BattleManager
      alias vjbest_bm_set setup
      def setup(troop_id, can_escape = true, can_lose = false)
        vjbest_bm_set(troop_id, can_escape, can_lose)
        $game_troop.members.each {|enemy| $game_party.encounter_enemy(enemy.enemy_id)}
      end
      alias vjbest_bm_be battle_end
      def battle_end(result)
        $game_troop.dead_members.each {|enemy| $game_party.kill_enemy(enemy.enemy_id)}
        vjbest_bm_be(result)
      end
    
    #==============================================================================
    # ■ Scene Menu
    #==============================================================================
    class Scene_Menu < Scene_MenuBase
      
     #------------------------------------------------------------------------------
     # ● Create Command Windows
     #------------------------------------------------------------------------------       
       def create_command_window
           mog_bestiary_create_command_window
           @command_window.set_handler(:bestiary,     method(:command_bestiary))
       end
       
     #------------------------------------------------------------------------------
     # ● Monster Book
     #------------------------------------------------------------------------------        
       def Bestiary
           SceneManager.call(Scene_Bestiary)
       end
     
    end   
    
    end
    

     

     

     

     

    Ora: quello che non riesco a capire è:

    siccome uno dei nemici del mio gioco, anzichè combattere, quando lo incontriamo cede del denaro per poi scappare, come posso aggiungere questo mostro al Bestiario?

    C'è la possibilità di farlo dallo script?

     

  8. Ottimi consigli e proveederò a sistemare il tutto...

    Anche se il blocco di alberi centrale è impostato per non rientrare mai tutto in una schermata.

    In pratica, ingame avrai sempre un "limite" di alberi su uno o l'altro lato a fare da bordostrada.

    Purtroppo però i limiti quadrettosi delle RTP è un limite che mi viene imposto... :(

  9. In effetti lo stile è particolare, ma non brutto anzi. L'albero azzurro da un tocco molto fantasy al tutto...

    L'unica cosa scurirei un po la parte rocciosa, è fin troppo "brillante".

    Potresti riprendere proprio il marrone dell'albero di cui sopra...

  10. Ottimo lavoro, lo cercavano in molti!

    se proprio vuoi aggiungere qualcosa potresti aggiungere un costo di assemblaggio, da impostare nel caso volessimo

    far gestire il crafting a degli NPC, oppure un limite del tipo: Per creare la Lancia Superiore della Scimmia Zoppa devi essere almeno

    al livello 12.

    Ma già così è un lavorone!

  11. Buongiorno a tutti.

    Nel mio progetto avevo pensato di inserire, in alcune missioni secondarie, dei combattenti "Guest Star", che combatteranno con noi solo in quella missione e che agiranno in maniera autonoma, aggiungendo la caratteristica "Battaglia Automatica"

    La domanda è: esiste un modo per impostare una strategia, come con i nemici?

  12. Volevo avere un vostro parere su una mappa del mio progetto...

    (Ok, me la voglio tirare un po perchè mi piace il risultato finale... :sisi: )

     

    Consigli, suggerimenti e pareri sono ben graditi!

    Ps.: La protagonista (la donnina blu) si vede in più screen perchè ho dovuto fare un collage di schermate...

     

    Et voilà!

    http://img545.imageshack.us/img545/5767/screenshotmro.png

×
×
  • Create New...