Плохо! Плохо!:  0
Показано с 1 по 8 из 8

Тема: Отображение переменных на экране. Мини-пак [VXAce]

  1. #1
    Маститый Аватар для Yuryol
    Информация о пользователе
    Регистрация
    06.03.2014
    Адрес
    Красноярск
    Сообщений
    1,420
    Записей в дневнике
    44
    Репутация: 60 Добавить или отнять репутацию

    По умолчанию Отображение переменных на экране. Мини-пак [VXAce]

    Информация:
    Уже раз пять на вопрос о HUD посылал людей на светлую. Щас наконец дошли руки разместить здесь
    Как-то делал для своей игрушки HUD отображающий переменные, поразбирался в нужных для этого скриптах, вспомнил тему с худом для здоровья и комментарии Липтона, попробовал сделать свой ХУД но с переменными, в итоге забил и сделал на ивентах
    Чтобы труды не пропадали зря решил сделать мини-пак 3 скриптов ХУДа и туда же добавить ивентовый ХУД, вдруг кому надо.
    В каждом скрипте максимально подробно расписал что за что отвечает, для новичков будет полезно, я думаю.

    Авторы: Napoleon, Leon-S.K, Nicke.
    Переводчик: Yuryol
    Версия мейкера: VX ACE.
    Тип: HUD.

    Описание:
    Демо включает в себя:
    1) Доработанный HUD из скрипта боёвки R.E. Weapons System. Особенности:
    - очень подробные комментарии, объясняющие почти каждую строчку скрипта (спасибо Липтону):
    - возможность сделать его под себя: показать ХП глав.героя, показать полоску отображающую переменную, показать просто значение переменной или всё вместе
    - возможность включать его с помощью кнопки.

    2) Скрипт XS - Variable Hud для показа переменных с переводом. Особенности:
    - возможность отображать большое число переменных.
    - возможность включать/выключать его с помощью переключателя
    - Нельзя показать сначала одну переменную а потом другую. Только либо все переменные сразу,либо ни одну
    - В самом скрипте возможности включать его на кнопку НЕТ. В демке показал как это можно сделать с помощью общего события.

    3) Скрипт Nap | Var Display для показа переменных с переводом и небольшими моими комментариями. Особенности:
    - возможность отображать большое число переменных.
    - возможность включать/выключать его с помощью переключателя
    - Возможность показать сначала одну переменную а потом другую, а потом третью.
    - в самом скрипте возможности включать его на кнопку НЕТ. В демке показал как это можно сделать с помощью общего события. Также показал еще одно его достоинство в сравнении с предыдущим скриптом - можно назначит включение/отключение разных переменных на разные кнопки.

    4) ХУД на ивентах. Подойдет например для олдскульных аркадок для показа количества жизней. Для этого видел один скрипт, но он слишком уж громоздкий.

    Скриншоты:


    Скачать демку:
    https://yadi.sk/d/FBWGSHWbcEJXX

  2. #2
    Новичок Аватар для AON
    Информация о пользователе
    Регистрация
    16.06.2016
    Сообщений
    12
    Записей в дневнике
    4
    Репутация: -3 Добавить или отнять репутацию

    По умолчанию

    Ещё бы кто-нибудь бы покопался в скрипте Nap | Var Display и сделал возможность давать переменным индивидуальные координаты на экране. Было бы замечательно.
    Отсутствие аватара
    Человек явно в поиске. Он не открыт и, вероятно, не готов к большому количеству собеседников в социальных сетях. Ему не нужны ни высокая посещаемость его страницы, ни приглашения в сообщества или добавления в друзья. Дефицита в общении он не испытывает.

  3. #3
    Маститый Аватар для Alisa
    Информация о пользователе
    Регистрация
    29.08.2013
    Сообщений
    1,430
    Записей в дневнике
    8
    Репутация: 76 Добавить или отнять репутацию

    По умолчанию

    Юр, это не самый хороший скрипт на отображение переменных, я бы сказала меня этот скрипт подвёл и я от него отказалась.
    Вот хороший скрипт, который можно настроить на свой вкус:
    Код:
    =begin
    ================================================================================
     CDR - Show Variables 1.3
     -------------------------------------------------------------------------------
     Author: Ceodore
     Mail: ceodore@email.com
     https://ceodoremaker.wordpress.com
    
    ===============================Change log=======================================
      04/04/2013 - 1.3 release. Bug fixes and new stuff
      02/04/2013 - 1.2 release. Added font options.
      01/04/2013 - 1.1 release. Fixed a minor bug.
      01/04/2013 - 1.0 release.
      
    ===============================Description======================================
      This implementation is meant to provide a way display any number of variables 
      on the map.
    
    =================================License========================================
      You may freely use and modify this script as long as you do not change the
      original author information. If you use this on your game, include the author
      on the credits.
      
    ===================================Use==========================================
      Open a Script event command and follow the instructions:
      
      Before showing a variable you need to define it's options. To do it, type
      the command:
      
      sv_options(n,x,y,icon,color,dir,icon_pos, lzeros)
      Where n is the variable number and x and y are the value position on screen.
      The other are optional, but it's nice to define, you only need to do it once
      for each variable.
        
        icon -> The icon index
        color -> the color number
        dir -> the text direction, wich can be:
                    :ltr (left to right)
                    :rtl (Right)
                    :mid (center)
        icon_pos -> The icon position, can be :left or :right
        lzeros -> The number of leading zeroes
        
      show_variable(n)
      Shows a variable on screen as specified in sv_options()
      
      hide_variable(n)
      Hides the variable n if it's being displayed on screen.  
    
    ================================================================================
    =end
    module CDR_SV  
      # sub module containing default font options for the variable values
      module FONT
        NAME = ["Evolventa"]
        SIZE = 25
        BOLD = false
        ITALIC = false
        SHADOW = false
      end
    end
    #==============================================================================
    #  DataManager
    #==============================================================================
    SuperDataManager = DataManager.dup
    module DataManager
        #--------------------------------------------------------------------------
        # * intercept: clears the variable settings list
        #--------------------------------------------------------------------------
        def self.create_game_objects
          Window_Variables.clear
          SuperDataManager.create_game_objects
        end
    end
    #==============================================================================
    #  Game_Interpreter
    #==============================================================================
    class Game_Interpreter
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon=nil,color=1,dir=:ltr,icon_pos=:left, lzeros=0)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        case dir
          when :ltr
            text_direction = 0
          when :mid
            text_direction = 1
          when :rtl
            text_direction = 2
         end
        sv_window.sv_options(n,x,y,icon,color,text_direction,icon_pos,lzeros)
      end
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def show_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.show_variable(n)
      end  
      #--------------------------------------------------------------------------
      # * new method: hides a displayed variable
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.hide_variable(n)
      end
    end
    #==============================================================================
    #  SvOptions
    #==============================================================================
    class SvOptions
      attr_accessor :id
      attr_accessor :x
      attr_accessor :y
      attr_accessor :text_color
      attr_accessor :x
      attr_accessor :text_direction
      attr_accessor :icon_index
      attr_accessor :icon_position
      attr_accessor :lzeros
      attr_accessor :visible
      
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize(id,x,y,icon,color,dir,icon_pos,lzeros,visible)   
        @id = id    
        @x = x
        @y = y
        @text_color = color
        @text_direction = dir
        @icon_index = icon
        @icon_position = icon_pos
        @lzeros = lzeros
        @visible = visible    
      end
      #--------------------------------------------------------------------------
      # * new method: displays the variable on map screen
      #--------------------------------------------------------------------------
      def show
        @visible = true
      end
      #--------------------------------------------------------------------------
      # * new method: hides the variable from map screen
      #--------------------------------------------------------------------------
      def hide
        @visible = false
      end
    end
    #==============================================================================
    #  Window_Variables
    #==============================================================================
    class Window_Variables < Window_Base  
      @@items = {}
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, 0, window_width, window_height)    
        self.opacity = 0
        self.visible = true
        refresh
      end
      #--------------------------------------------------------------------------
      # * new method: window_width
      #--------------------------------------------------------------------------
      def window_width
        return Graphics.width
      end
      #--------------------------------------------------------------------------
      # * new method: window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height
      end
      #--------------------------------------------------------------------------
      # * new method: variable_width
      #--------------------------------------------------------------------------
      def variable_width
        return 160
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def refresh
        contents.clear    
        @@items.each{|k,vw| draw_item(vw) if vw.visible}
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def draw_item(item)
        icon_x = draw_item_icon(item) unless item.icon_index.nil?
        change_color(text_color(item.text_color))
        cdr_sv_font
        x_offset = item.icon_position == :left ? 28 : 0 
        text = $game_variables[item.id].to_s.rjust(item.lzeros, '0')    
        dir = item.text_direction
        draw_text(item.x+x_offset, item.y, variable_width, line_height, text, dir)
        reset_font_settings
        change_color(normal_color)
      end
      #--------------------------------------------------------------------------
      # * new method: draw_item_icon
      #--------------------------------------------------------------------------
      def draw_item_icon(item)
        case item.icon_position
          when :left
            icon_x = item.x
          when :right
            icon_x = item.x+variable_width
        end
        draw_icon(item.icon_index, icon_x, item.y)
        return icon_x
      end
      #--------------------------------------------------------------------------
      # * new method: sets the font options as specified on CDR_SV::FONT module
      #--------------------------------------------------------------------------
      def cdr_sv_font
        contents.font.name = CDR_SV::FONT::NAME
        contents.font.size = CDR_SV::FONT::SIZE
        contents.font.bold = CDR_SV::FONT::BOLD
        contents.font.italic = CDR_SV::FONT::ITALIC
        contents.font.shadow = CDR_SV::FONT::SHADOW
      end
      
      #--------------------------------------------------------------------------
      # * new method: resets the font settings as in default font
      #--------------------------------------------------------------------------
      def reset_font_settings
        contents.font.name = Font.default_name
        contents.font.size = Font.default_size
        contents.font.bold = Font.default_bold
        contents.font.italic = Font.default_italic
        contents.font.shadow = Font.default_shadow
      end
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon,color,dir,icon_pos, lzeros, visible = false)    
        if !@@items.has_key?(n)
          @@items[n] = SvOptions.new(n,x,y,icon,color,dir,icon_pos,lzeros,visible)
        else
          @@items[n].x = x      
          @@items[n].y = y
          @@items[n].icon_index = icon
          @@items[n].text_color = color
          @@items[n].text_direction = dir
          @@items[n].icon_position = icon_pos
          @@items[n].lzeros = lzeros
          @@items[n].visible = visible
        end
      end  
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def show_variable(n)  
        return if !@@items.has_key?(n)
        @@items[n].show
      end  
    
      #--------------------------------------------------------------------------
      # * new method: removes a specific variable_window
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return if !@@items.has_key?(n)
        @@items[n].hide
      end 
      
      #--------------------------------------------------------------------------
      # * new method: clears the variable options data
      #--------------------------------------------------------------------------
      def self.clear
        @@items = {}
      end 
    end
    #==============================================================================
    #  Scene_map
    #==============================================================================
    class Scene_Map < Scene_Base
      attr_accessor :variables_window
      alias cdr_sv_start start
      def start
        cdr_sv_start
        @variables_window = Window_Variables.new
      end
    
      #--------------------------------------------------------------------------
      # * alias: updates each variable_window
      #--------------------------------------------------------------------------
      alias cdr_sv_update update
      def update
        cdr_sv_update
        @variables_window.refresh
      end
    
    end

  4. #4
    Маститый Аватар для Yuryol
    Информация о пользователе
    Регистрация
    06.03.2014
    Адрес
    Красноярск
    Сообщений
    1,420
    Записей в дневнике
    44
    Репутация: 60 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Alisa Посмотреть сообщение
    Юр, это не самый хороший скрипт на отображение переменных, я бы сказала меня этот скрипт подвёл и я от него отказалась.
    Вот хороший скрипт, который можно настроить на свой вкус:
    Хотелось бы тогда узнать чем же он плох и как он подвел тебя

  5. #5
    Бывалый Аватар для Alexandr_7
    Информация о пользователе
    Регистрация
    09.08.2015
    Адрес
    пос Октяборьский
    Сообщений
    967
    Репутация: 13 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Alisa Посмотреть сообщение
    Юр, это не самый хороший скрипт на отображение переменных, я бы сказала меня этот скрипт подвёл и я от него отказалась.
    Вот хороший скрипт, который можно настроить на свой вкус:
    Код:
    =begin
    ================================================================================
     CDR - Show Variables 1.3
     -------------------------------------------------------------------------------
     Author: Ceodore
     Mail: ceodore@email.com
     https://ceodoremaker.wordpress.com
    
    ===============================Change log=======================================
      04/04/2013 - 1.3 release. Bug fixes and new stuff
      02/04/2013 - 1.2 release. Added font options.
      01/04/2013 - 1.1 release. Fixed a minor bug.
      01/04/2013 - 1.0 release.
      
    ===============================Description======================================
      This implementation is meant to provide a way display any number of variables 
      on the map.
    
    =================================License========================================
      You may freely use and modify this script as long as you do not change the
      original author information. If you use this on your game, include the author
      on the credits.
      
    ===================================Use==========================================
      Open a Script event command and follow the instructions:
      
      Before showing a variable you need to define it's options. To do it, type
      the command:
      
      sv_options(n,x,y,icon,color,dir,icon_pos, lzeros)
      Where n is the variable number and x and y are the value position on screen.
      The other are optional, but it's nice to define, you only need to do it once
      for each variable.
        
        icon -> The icon index
        color -> the color number
        dir -> the text direction, wich can be:
                    :ltr (left to right)
                    :rtl (Right)
                    :mid (center)
        icon_pos -> The icon position, can be :left or :right
        lzeros -> The number of leading zeroes
        
      show_variable(n)
      Shows a variable on screen as specified in sv_options()
      
      hide_variable(n)
      Hides the variable n if it's being displayed on screen.  
    
    ================================================================================
    =end
    module CDR_SV  
      # sub module containing default font options for the variable values
      module FONT
        NAME = ["Evolventa"]
        SIZE = 25
        BOLD = false
        ITALIC = false
        SHADOW = false
      end
    end
    #==============================================================================
    #  DataManager
    #==============================================================================
    SuperDataManager = DataManager.dup
    module DataManager
        #--------------------------------------------------------------------------
        # * intercept: clears the variable settings list
        #--------------------------------------------------------------------------
        def self.create_game_objects
          Window_Variables.clear
          SuperDataManager.create_game_objects
        end
    end
    #==============================================================================
    #  Game_Interpreter
    #==============================================================================
    class Game_Interpreter
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon=nil,color=1,dir=:ltr,icon_pos=:left, lzeros=0)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        case dir
          when :ltr
            text_direction = 0
          when :mid
            text_direction = 1
          when :rtl
            text_direction = 2
         end
        sv_window.sv_options(n,x,y,icon,color,text_direction,icon_pos,lzeros)
      end
      #--------------------------------------------------------------------------
      # * new method: displays a variable on map screen
      #--------------------------------------------------------------------------
      def show_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.show_variable(n)
      end  
      #--------------------------------------------------------------------------
      # * new method: hides a displayed variable
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return unless SceneManager.scene.is_a?(Scene_Map)
        sv_window = SceneManager.scene.variables_window
        sv_window.hide_variable(n)
      end
    end
    #==============================================================================
    #  SvOptions
    #==============================================================================
    class SvOptions
      attr_accessor :id
      attr_accessor :x
      attr_accessor :y
      attr_accessor :text_color
      attr_accessor :x
      attr_accessor :text_direction
      attr_accessor :icon_index
      attr_accessor :icon_position
      attr_accessor :lzeros
      attr_accessor :visible
      
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize(id,x,y,icon,color,dir,icon_pos,lzeros,visible)   
        @id = id    
        @x = x
        @y = y
        @text_color = color
        @text_direction = dir
        @icon_index = icon
        @icon_position = icon_pos
        @lzeros = lzeros
        @visible = visible    
      end
      #--------------------------------------------------------------------------
      # * new method: displays the variable on map screen
      #--------------------------------------------------------------------------
      def show
        @visible = true
      end
      #--------------------------------------------------------------------------
      # * new method: hides the variable from map screen
      #--------------------------------------------------------------------------
      def hide
        @visible = false
      end
    end
    #==============================================================================
    #  Window_Variables
    #==============================================================================
    class Window_Variables < Window_Base  
      @@items = {}
      #--------------------------------------------------------------------------
      # * new method: initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, 0, window_width, window_height)    
        self.opacity = 0
        self.visible = true
        refresh
      end
      #--------------------------------------------------------------------------
      # * new method: window_width
      #--------------------------------------------------------------------------
      def window_width
        return Graphics.width
      end
      #--------------------------------------------------------------------------
      # * new method: window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height
      end
      #--------------------------------------------------------------------------
      # * new method: variable_width
      #--------------------------------------------------------------------------
      def variable_width
        return 160
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def refresh
        contents.clear    
        @@items.each{|k,vw| draw_item(vw) if vw.visible}
      end
      #--------------------------------------------------------------------------
      # * new method: refresh
      #--------------------------------------------------------------------------
      def draw_item(item)
        icon_x = draw_item_icon(item) unless item.icon_index.nil?
        change_color(text_color(item.text_color))
        cdr_sv_font
        x_offset = item.icon_position == :left ? 28 : 0 
        text = $game_variables[item.id].to_s.rjust(item.lzeros, '0')    
        dir = item.text_direction
        draw_text(item.x+x_offset, item.y, variable_width, line_height, text, dir)
        reset_font_settings
        change_color(normal_color)
      end
      #--------------------------------------------------------------------------
      # * new method: draw_item_icon
      #--------------------------------------------------------------------------
      def draw_item_icon(item)
        case item.icon_position
          when :left
            icon_x = item.x
          when :right
            icon_x = item.x+variable_width
        end
        draw_icon(item.icon_index, icon_x, item.y)
        return icon_x
      end
      #--------------------------------------------------------------------------
      # * new method: sets the font options as specified on CDR_SV::FONT module
      #--------------------------------------------------------------------------
      def cdr_sv_font
        contents.font.name = CDR_SV::FONT::NAME
        contents.font.size = CDR_SV::FONT::SIZE
        contents.font.bold = CDR_SV::FONT::BOLD
        contents.font.italic = CDR_SV::FONT::ITALIC
        contents.font.shadow = CDR_SV::FONT::SHADOW
      end
      
      #--------------------------------------------------------------------------
      # * new method: resets the font settings as in default font
      #--------------------------------------------------------------------------
      def reset_font_settings
        contents.font.name = Font.default_name
        contents.font.size = Font.default_size
        contents.font.bold = Font.default_bold
        contents.font.italic = Font.default_italic
        contents.font.shadow = Font.default_shadow
      end
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def sv_options(n,x,y,icon,color,dir,icon_pos, lzeros, visible = false)    
        if !@@items.has_key?(n)
          @@items[n] = SvOptions.new(n,x,y,icon,color,dir,icon_pos,lzeros,visible)
        else
          @@items[n].x = x      
          @@items[n].y = y
          @@items[n].icon_index = icon
          @@items[n].text_color = color
          @@items[n].text_direction = dir
          @@items[n].icon_position = icon_pos
          @@items[n].lzeros = lzeros
          @@items[n].visible = visible
        end
      end  
      
      #--------------------------------------------------------------------------
      # * new method: adds a new variable_window
      #--------------------------------------------------------------------------
      def show_variable(n)  
        return if !@@items.has_key?(n)
        @@items[n].show
      end  
    
      #--------------------------------------------------------------------------
      # * new method: removes a specific variable_window
      #--------------------------------------------------------------------------
      def hide_variable(n)
        return if !@@items.has_key?(n)
        @@items[n].hide
      end 
      
      #--------------------------------------------------------------------------
      # * new method: clears the variable options data
      #--------------------------------------------------------------------------
      def self.clear
        @@items = {}
      end 
    end
    #==============================================================================
    #  Scene_map
    #==============================================================================
    class Scene_Map < Scene_Base
      attr_accessor :variables_window
      alias cdr_sv_start start
      def start
        cdr_sv_start
        @variables_window = Window_Variables.new
      end
    
      #--------------------------------------------------------------------------
      # * alias: updates each variable_window
      #--------------------------------------------------------------------------
      alias cdr_sv_update update
      def update
        cdr_sv_update
        @variables_window.refresh
      end
    
    end
    Можешь скинуть пример демку гдеэтот скрипт используется?
    Мой канал на Yotube: Канал Alexandr_5
    Если не говорю движок то это RPG Maker MZ Steam версия!

  6. #6
    Познающий Аватар для WhitePaper
    Информация о пользователе
    Регистрация
    02.12.2015
    Адрес
    Украина, Киев
    Сообщений
    251
    Записей в дневнике
    98
    Репутация: 32 Добавить или отнять репутацию

    По умолчанию

    Скрипт CDR - Show Variables вроде норм, но когда слишком много переменных, игра тормозит.
    В общем, вот патч, если кому-нибудь нужно.
    Код:
    =begin
    
    Patch for CDR - Show Variables (unofficial) 
    
    Fixes FPS drop.
    
    Author of the original script: Ceodore 
    (ceodore@email.com, https://ceodoremaker.wordpress.com)
    
    Author of the patch: WhitePaper
    
    You may freely use or modify this patch. Credit is not required.
    =end
    class Scene_Map < Scene_Base
      def update
        cdr_sv_update
      end
    end
    
    class Game_Interpreter
      alias wp_command_122 command_122
      def command_122
        wp_command_122
        if SceneManager.scene.is_a?(Scene_Map)
          SceneManager.scene.variables_window.refresh    
        end
      end
    end
    
    class Window_Variables < Window_Base  
      
      alias wp_show_variable show_variable
      def show_variable(n)  
        wp_show_variable(n)
        self.refresh
      end  
      
      alias wp_hide_variable hide_variable
      def hide_variable(n)
        wp_hide_variable(n)
        self.refresh
      end 
    
    end
    Последний раз редактировалось WhitePaper; 15.07.2020 в 13:25.

  7. #7
    Администратор Аватар для Пётр
    Информация о пользователе
    Регистрация
    24.04.2014
    Адрес
    Краснодар
    Сообщений
    3,949
    Записей в дневнике
    6
    Репутация: 132 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от WhitePaper Посмотреть сообщение
    Скрипт CDR - Show Variables вроде норм, но когда слишком много переменных, игра тормозит.
    В общем, вот патч, если кому-нибудь нужно.
    Код:
    =begin
    
    Patch for CDR - Show Variables (unofficial) 
    
    Fixes FPS drop.
    
    Author of the original script: Ceodore 
    (ceodore@email.com, https://ceodoremaker.wordpress.com)
    
    Author of the patch: WhitePaper
    
    You may freely use or modify this patch. Credit is not required.
    =end
    class Scene_Map < Scene_Base
      def update
        cdr_sv_update
      end
    end
    
    class Game_Interpreter
      alias wp_command_122 command_122
      def command_122
        wp_command_122
        SceneManager.scene.variables_window.refresh    
      end
    end
    
    class Window_Variables < Window_Base  
      
      alias wp_show_variable show_variable
      def show_variable(n)  
        wp_show_variable(n)
        self.refresh
      end  
      
      alias wp_hide_variable hide_variable
      def hide_variable(n)
        wp_hide_variable(n)
        self.refresh
      end 
    
    end
    Как-то не очень хорошо работает этот патч.
    Для начала начали тупить всего две переменные на экране, хотя раньше не тупили.
    А потом вот... Аккурат на кнопке Open save screen

  8. #8
    Познающий Аватар для WhitePaper
    Информация о пользователе
    Регистрация
    02.12.2015
    Адрес
    Украина, Киев
    Сообщений
    251
    Записей в дневнике
    98
    Репутация: 32 Добавить или отнять репутацию

    По умолчанию

    Странно, у меня на чистом проекте таких проблем не возникло. Две переменные на экране не тупят (по крайней мере, FPS остаётся примерно в таком же промежутке, как в оригинале), больше двух тоже более-менее. И ошибка не вылезает... Хотя должна. :\

    Вроде исправила, и, в теории, такой ошибки быть не должно.

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Отображение переменных на экране. Мини-пак [VXAce]