Страница 22 из 643 ПерваяПервая ... 1220212223243272122522 ... ПоследняяПоследняя
Показано с 211 по 220 из 6423

Тема: Общие вопросы

  1. #211

    По умолчанию

    Цитата Сообщение от Desperate Egoist Посмотреть сообщение
    Возник вопрос, можно ли чем-нибудь открыть файлы из папки Data?
    Ну например http://code.google.com/p/rxdataeditor/
    Только вот зачем?

  2. #212

    По умолчанию

    Нашел скрипт, он как сказать несколько неофициален , и никаких описаний к нему нет, так этот скрипт пользуется файлами даты, которые лежат в папке либрари, хочу посмотреть, что в них написано, чтобы писать самому

  3. #213

    По умолчанию

    При включении программы, он закрывается с ошибкой >_<, да и откроет ли эта прога RPGVX Data?

  4. #214

    По умолчанию

    Сейчас скачал и у меня тоже не запускается, а как-то давно помнится ей открывал... А насчёт vx не уверен, кажется они почти идентичны. Можно попробовать скачать Ruby и запустить исходник. Но я не уверен в успехе, так что точно ничего, увы, не могу посоветовать.

  5. #215

    По умолчанию

    Хм, а самому как-нибудь написать можно?

  6. #216
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,081
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Блокнотом пробывал? некоторые скрипты только расширение меняют.

  7. #217

    По умолчанию

    Цитата Сообщение от Desperate Egoist Посмотреть сообщение
    Хм, а самому как-нибудь написать можно?
    Скрипт для открытия этих файлов? Как-то можно через метод Marshal.load.

  8. #218
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,081
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Ты лучше выложи.

  9. #219

    По умолчанию

    Скрипта у меня нет, есть решение. Сам я с этим не работал, поэтому озвучивать что и как не берусь. Но простой гуглопоиск по запросу "rxdata Marshal.load" даёт результаты с примерами.

  10. #220

    По умолчанию

    Вообщем вот скрипт:
    Код:
    #==============================================================================
    # Vampyr Library
    #==============================================================================
    
    LibraryCategories = ["Documents"]
    
    LibraryIcons = [149]
    
    #------------------------------------------------------------------------------
    Vampyr_Kernel.register("Vampyr Library", 1.0, "09/01/2009")
    #------------------------------------------------------------------------------
    class Vampyr_Library
      
      attr_reader (:files, :categories, :documents, :icons)
      
      def initialize
        @categories = LibraryCategories
        @icons = LibraryIcons
        @files = {}
        @documents = {}
        @categories.each { |i| @documents[i] = [] }
        load_files
      end
      
      def enable(category, file)
        return if @documents[category].include?(file)
        @documents[category] << file
      end
      
      def load_files
         for i in @categories
          for j in Dir.entries("Library/#{i}")
            next if j == "." or j == ".."
            data = File.read("Library/#{i}/#{j}").unpack("u").to_s.split("\n")
            @files[data[0]] = data[1, data.size].collect { |x| x + "\n" }.to_s
          end
        end
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Window_LibraryMenu < Window_Base
      
      def initialize
        super(192, 0, 352, 416)
        @index1 = @index2 = 0
        refresh
      end
      
      def update(index1, index2)
        return if index1 == @index1 and index2 == @index2
        @index1 = index1
        @index2 = index2
        refresh
      end
      
      def refresh
        @contents_y = 0
        self.contents.clear
        lib = $game_library.documents[$game_library.categories[@index1]][@index2]
        return if lib.nil?
        @text = $game_library.files[lib].split("\n")
        for i in 0...@text.size
          self.contents.draw_text(0, (WLH*i)+@contents_y, contents.width, WLH, "#{format_text(i)}", 1)
        end
      end
      
      def format_text(i)
        @text[i].gsub!(/\[img](.*?)\[\/img\]/) {
        bitmap = Cache.picture($1.to_s)
        self.contents.blt((contents.width-bitmap.width)/2, (WLH*i)+WLH, bitmap, bitmap.rect)
        @contents_y = (bitmap.height+WLH)
        @text[i].gsub!(/\[img](.*?)\[\/img\]/, "") }
        return @text[i].gsub("\r\n", "")
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Window_LibraryCommand < Window_Selectable
      
      attr_accessor :library_index
      
      def initialize
        super(0, 56, 192, 360)
        @library_index = 0
        @commands = []
        refresh
        self.index = 0
      end
      
      def refresh
        self.contents.clear
        @commands.clear
        for i in $game_library.documents[$game_library.categories[@library_index]]
          @commands.push(i)
        end
        @item_max = @commands.size
        for i in 0...@item_max
          draw_item(i)
        end
      end
      
      def draw_item(index, enabled = true)
        rect = item_rect(index)
        rect.x += 20
        rect.width -= 8
        self.contents.clear_rect(rect)
        self.contents.font.color = normal_color
        self.contents.font.color.alpha = enabled ? 255 : 128
        self.contents.draw_text(rect, @commands[index])
        draw_icon($game_library.icons[@library_index], -4, 24*index)
      end
      
      def draw_icon(icon_index, x, y, enabled = true)
        bitmap = Cache.system("Iconset")
        rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
        self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Window_VampyrIndex < Window_Base
      
      def initialize
        super(0, 0, 192, 56)
      end
      
      def update(index)
        self.contents.clear
        left = $game_library.categories.size > 1 ? "« " : ""
        right = $game_library.categories.size > 1 ? " »" : ""
        self.contents.draw_text(contents.rect, "#{left}#{$game_library.categories[index]}#{right}", 1)
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Scene_VampyrLibrary < Scene_Base
      
      def initialize(from_menu=false)
        @from_menu = from_menu
      end
      
      def start
        super
        create_cbmenu_bg
        @library_index = Window_VampyrIndex.new
        @library_menu = Window_LibraryMenu.new
        @library_command = Window_LibraryCommand.new
      end
      
      def update
        super
        update_cbmenu_bg
        @library_command.update
        @library_index.update(@library_command.library_index)
        @library_menu.update(@library_command.library_index, @library_command.index)
        if Input.trigger?(Input::B)
          Sound.play_cancel
          @from_menu ? $scene = Scene_Menu.new(4) : $scene = Scene_Map.new
        elsif Input.trigger?(Input::RIGHT)
          return unless @library_command.library_index < $game_library.categories.size-1
          Sound.play_decision
          @library_command.index = 0
          @library_command.library_index += 1    
          @library_command.refresh
        elsif Input.trigger?(Input::LEFT)
          return unless @library_command.library_index > 0
          Sound.play_decision
          @library_command.index = 0
          @library_command.library_index -= 1
          @library_command.refresh
        end
      end
      
      def terminate
        super
        dispose_cbmenu_bg
        @library_menu.dispose
        @library_command.dispose
        @library_index.dispose
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Scene_Title < Scene_Base
      
      alias vampyr_library_stitle_create_game_objects create_game_objects
      
      def create_game_objects
        vampyr_library_stitle_create_game_objects
        $game_library = Vampyr_Library.new
      end
      
    end
    
    #------------------------------------------------------------------------------
    class Scene_File < Scene_Base
      
      alias vampyr_library_sfile_write_save_data write_save_data
      alias vampyr_library_sfile_read_save_data read_save_data
      
      def write_save_data(file)
        vampyr_library_sfile_write_save_data(file)
        Marshal.dump($game_library, file)
      end
      
      def read_save_data(file)
        vampyr_library_sfile_read_save_data(file)
        $game_library = Marshal.load(file)
      end
      
    end
    
    #------------------------------------------------------------------------------
    if $TEST
      dirs = []
      for i in Dir.entries("Library/")
        next if i == "." or i == ".."
        dirs << i
      end
      for i in dirs
        for j in Dir.entries("Library/#{i}")
          next unless j.include?(".txt")
          data = File.read("Library/#{i}/#{j}")
          a = data.split(//)
          b = "u"*(a.size)
          c = a.pack(b)
          file = File.new("Library/#{i}/#{j.gsub(".txt", ".rvdata")}", "wb")
          file.write(c)
          file.close
          File.delete("Library/#{i}/#{j}")
        end
      end
    end
    Файл нужен вот этот
    Вот скрин как это выглядит в игре, все что в правой колонке пишется в скрипте, если я правильно понял...

Страница 22 из 643 ПерваяПервая ... 1220212223243272122522 ... ПоследняяПоследняя

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

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

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

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

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

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

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Общие вопросы