Страница 73 из 147 ПерваяПервая ... 2363717273747583123 ... ПоследняяПоследняя
Показано с 721 по 730 из 1470

Тема: Помощь с скриптами (RGSS)

  1. #721
    Маститый Аватар для Bullet S.D.
    Информация о пользователе
    Регистрация
    27.01.2009
    Адрес
    Москва
    Сообщений
    1,360
    Записей в дневнике
    9
    Репутация: 74 Добавить или отнять репутацию

    По умолчанию

    Попробуй этот скрипт.
    Нужно будет вызвать нечто $map_parallax[8]=Parallax.new("Mountain", 0, 1,255,0)
    где Parallax.new("Имя панораммы", направление, скорость, прозрачность, оттенок)

    Спойлер Parallax Background - R2- Created by dubealex:
    Код:
    #===================================================
    # ■ Parallax Background - R2- Created by dubealex
    #     - Moving Panoramas & More -
    #===================================================
    # For more infos and update, visit:
    # rmxp.dubealex.com
    #
    # December 8, 2004
    #===================================================
    
    
    #===================================================
    # ▼ CLASS Create_Parallax_List Begins
    #===================================================
    class Create_Parallax_List
     
     def initialize
       
    =begin -----------------------------------------------------------------------------------------------------
         ■ Map Parallax Background Settings:
         ---------------------------------------------------------------------------------------------------------
         ▼ DEFAULT PARALLAX SETTING FOR EACH MAP:
         
         The following list of lines defines each default parallax settings for each map using a
         parallax background. The number between square brackets is the map ID. Example:
         $map_parallax[3] will refer to the parallax settings of your map ID #3. Just copy the line
         to add more settings to all the maps using parallax. The rest will be done automatically by
         the script when you load a map in the game. This way you don't have to set full of code in
         your teleport, and you can save/load a game and it will work perfectly, as the script now
         save the parallax settings in the save file. The parallax settings and syntax is the same as in
         previous release: Parallax.new("name", direction, speed, opacity, hue)
         Read the manual and play the demo for more info and details about how to manipulate
         your parallax within the game. (It's the same way as before, but now you use the right
         map ID, so you would do $map_parallax[1].fade_out(2) to fade the parallax of map ID#2.)
    =end #----------------------------------------------------------------------------------------------------
     #  $map_parallax[8]=Parallax.new("Mountain", 0, 1,255,0)
     #  $map_parallax[1]=Parallax.new("sky2", 6, 2,255,0)
     #  $map_parallax[2]=Parallax.new("hell1",4,2,255, 0)
       
    #--- ■ END OF SETTINGS-----------------------------------------------------------------------------  
    
     end
    end
    #===================================================
    # ▲ CLASS Create_Parallax_List  Ends
    #===================================================  
    
    
    #===================================================
    # ▼ CLASS Parallax Begins
    #===================================================
    class Parallax
    
     attr_accessor :name, :direction, :speed, :opacity, :hue, :fade
     
    def initialize(name, direction, speed, opacity, hue)
      @name=name
      @direction=direction
      @speed=speed
      @opacity=opacity
      @hue=hue
      @speed=speed
      @fade=fade
     
     if $parallax_active==true
      $parallax_move[3]=name
      $parallax_move[4]=hue
      $parallax = Sprite.new
      $parallax.bitmap = RPG::Cache.panorama(name, hue)
      $parallax.x = 0
      $parallax.y = 0
      $parallax.z = -500
      $parallax.opacity = opacity
       if direction != 0 and speed != 0
         case direction
           when 2, 8
             if speed > 60
               speed=60
             end  
           when 4, 6
             if speed > 40
               speed=40
             end
           end  
        move(direction, speed)
      end    
     end
    end
    
    #------------------------------------------------------------------------------------------------------
    
    def erase
      $parallax_active=false
      $map_parallax[$game_map.map_id]=nil
      $parallax_fade[0]=0
      $parallax_move[0]=0
      if $parallax.nil? == false :$parallax.dispose end
      if $parallax_dummy_l.nil? == false :$parallax_dummy_l.dispose end
      if $parallax_dummy_r.nil? == false :$parallax_dummy_r.dispose end
      if $parallax_dummy_d.nil? == false :$parallax_dummy_d.dispose end
      if $parallax_dummy_u.nil? == false :$parallax_dummy_u.dispose end
    end
     
    #------------------------------------------------------------------------------------------------------
    
    def fade_in(speed)
      if @speed == 0
         $parallax_direction=0
      end  
      $parallax_fade[0]=1
      $parallax_fade[1]=speed
    end
    
    #------------------------------------------------------------------------------------------------------
    
    def fade_out(speed)
      if @speed == 0
         $parallax_direction=0
      end
      $parallax_fade[0]=2
      $parallax_fade[1]=speed
    end
    
    #------------------------------------------------------------------------------------------------------
    
    def stop_fade
      $parallax_fade[0]=0
    end
    
    #------------------------------------------------------------------------------------------------------
    
    def fade_loop(speed)
       if @speed == 0
         $parallax_direction=0
       end
      $parallax_fade[0]=3
      $parallax_fade[1]=speed
      $parallax_fade[2]=1
    end
    
    #------------------------------------------------------------------------------------------------------
    
    def move(direction, speed)
      $parallax_direction=direction
      $parallax_move[0]=1
      $parallax_move[1]=speed
      $parallax_move[2]=0
    end
     
    end
    #===================================================
    # ▲ CLASS Parallax Ends
    #===================================================
    
    
    #===================================================
    # ▼ CLASS Scene_Map Additional Code Begins
    #===================================================
    class Scene_Map
    
    alias parallax_original_update update
    
    def update
    parallax_original_update
    case $parallax_fade[0]
       when 1 #Fade In
         case $parallax_direction
          when 0 #Not Moving
            unless $parallax.opacity == 255
              $parallax.opacity+=$parallax_fade[1]
               $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
              $parallax_fade[0]=0
            end
          when 2 #Moving down
            unless $parallax.opacity == 255
             $parallax.opacity+=$parallax_fade[1]
             $parallax_dummy_u.opacity+=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
          when 6 #Moving right
           unless $parallax.opacity == 255
            $parallax.opacity+=$parallax_fade[1]
            $parallax_dummy_l.opacity+=$parallax_fade[1]
            $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
           else
            $parallax_fade[0]=0
           end
          when 4 #Moving left
           unless $parallax.opacity == 255
            $parallax.opacity+=$parallax_fade[1]
            $parallax_dummy_r.opacity+=$parallax_fade[1]
            $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
           else
            $parallax_fade[0]=0
           end
          when 8 #Moving up
           unless $parallax.opacity == 255
            $parallax.opacity+=$parallax_fade[1]
            $parallax_dummy_d.opacity+=$parallax_fade[1]
            $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
           else
            $parallax_fade[0]=0
           end
          end
       when 2 #Fade Out
         case $parallax_direction
           when 0 #Not Moving
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
           when 2 #Moving down
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_u.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
           when 4 #Moving left
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_r.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
           when 6 #Moving right
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_l.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
           when 8 #Moving up
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_d.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[0]=0
            end
          end
      when 3 #Fade Loop
        case $parallax_direction
         when 0 #Not Moving
          case $parallax_fade[2] when 1 then
           unless $parallax.opacity == 255
            $parallax.opacity+=$parallax_fade[1]
            $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
           else
            $parallax_fade[2]=2
          end
        when 2
          unless $parallax.opacity == 0
            $parallax.opacity-=$parallax_fade[1]
            $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
          else
            $parallax_fade[2]=1
          end
        end
        when 2 #Moving down
           case $parallax_fade[2] when 1 then
            unless $parallax.opacity == 255
             $parallax.opacity+=$parallax_fade[1]
             $parallax_dummy_u.opacity+=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
             $parallax_fade[2]=2
            end
         when 2
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_u.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[2]=1
            end
         end
        when 8 #Moving up
          case $parallax_fade[2] when 1 then
            unless $parallax.opacity == 255
             $parallax.opacity+=$parallax_fade[1]
             $parallax_dummy_d.opacity+=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
             $parallax_fade[2]=2
            end
        when 2
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_d.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[2]=1
            end
        end
        when 6 #Moving right
          case $parallax_fade[2] when 1 then
            unless $parallax.opacity == 255
             $parallax.opacity+=$parallax_fade[1]
             $parallax_dummy_l.opacity+=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
             $parallax_fade[2]=2
            end
         when 2
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_l.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[2]=1
            end
        end
        when 4 #Moving left
          case $parallax_fade[2] when 1 then
            unless $parallax.opacity == 255
             $parallax.opacity+=$parallax_fade[1]
             $parallax_dummy_r.opacity+=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity+=$parallax_fade[1]
            else
             $parallax_fade[2]=2
            end
        when 2
            unless $parallax.opacity == 0
             $parallax.opacity-=$parallax_fade[1]
             $parallax_dummy_r.opacity-=$parallax_fade[1]
             $map_parallax[$game_map.map_id].opacity-=$parallax_fade[1]
            else
             $parallax_fade[2]=1
            end
         end
       end
     end
    
     
     case $parallax_move[0]
        when 1
        if $parallax_move[2]==0
          case $parallax_direction
          when 4
            $parallax_dummy_r = Sprite.new
            $parallax_dummy_r.bitmap = RPG::Cache.panorama($parallax_move[3], $parallax_move[4])
            $parallax_dummy_r.x = 640
            $parallax_dummy_r.y = 0
            $parallax_dummy_r.z = -500
            $parallax_dummy_r.opacity = $parallax.opacity
          when 6
            $parallax_dummy_l = Sprite.new
            $parallax_dummy_l.bitmap = RPG::Cache.panorama($parallax_move[3], $parallax_move[4])
            $parallax_dummy_l.x = -640
            $parallax_dummy_l.y = 0
            $parallax_dummy_l.z = -500
            $parallax_dummy_l.opacity = $parallax.opacity
          when 8
            $parallax_dummy_d = Sprite.new
            $parallax_dummy_d.bitmap = RPG::Cache.panorama($parallax_move[3], $parallax_move[4])
            $parallax_dummy_d.x = 0
            $parallax_dummy_d.y = 480
            $parallax_dummy_d.z = -500
            $parallax_dummy_d.opacity = $parallax.opacity
          when 2
            $parallax_dummy_u = Sprite.new
            $parallax_dummy_u.bitmap = RPG::Cache.panorama($parallax_move[3], $parallax_move[4])
            $parallax_dummy_u.x = 0
            $parallax_dummy_u.y = -480
            $parallax_dummy_u.z = -500
            $parallax_dummy_u.opacity = $parallax.opacity
          end
          $parallax_move[2]=1
        end    
         
        case $parallax_direction
        when 4
          $parallax_dummy_r.x-=$parallax_move[1]
          $parallax.x-=$parallax_move[1]  
           if $parallax_dummy_r.x==0
               $parallax.x=640
           end
            if $parallax.x==0
               $parallax_dummy_r.x=640
            end
        when 6
          $parallax_dummy_l.x+=$parallax_move[1]
          $parallax.x+=$parallax_move[1]  
          if $parallax.x==640
             $parallax.x=-640
          end
          if $parallax_dummy_l.x==640
             $parallax_dummy_l.x=-640
          end
        when 8
           $parallax_dummy_d.y-=$parallax_move[1]
           $parallax.y-=$parallax_move[1]
            if $parallax_dummy_d.y==0
               $parallax.y=480
            end
            if $parallax.y==0
               $parallax_dummy_d.y=480
            end
        when 2
          $parallax_dummy_u.y+=$parallax_move[1]
          $parallax.y+=$parallax_move[1]
            if $parallax_dummy_u.y==0
               $parallax.y=-480
            end
            if $parallax.y==0
               $parallax_dummy_u.y=-480
            end    
        end
      end  
    end
    
    end
    #===================================================
    # ▲ CLASS Scene_Map Additional Code Ends
    #===================================================
    
    
    #===================================================
    # ▼ CLASS Scene_Save Additional Code Begins
    #===================================================
    class Scene_Save < Scene_File
     
     alias parallax_original_write_save_data write_save_data
     
     def write_save_data(file)
       parallax_original_write_save_data(file)
       Marshal.dump($map_parallax, file)
     end
     
    end
    #===================================================
    # ▲ CLASS Scene_Save Additional Code Ends
    #===================================================
    
    
    #===================================================
    # ▼ CLASS Scene_Load Additional Code Begins
    #===================================================
    class Scene_Load < Scene_File
     
     alias parallax_original_read_save_data read_save_data
     
     def read_save_data(file)
       parallax_original_read_save_data(file)
       $map_parallax      = Marshal.load(file)
     end
     
    end
    #===================================================
    # ▲ CLASS Scene_Load Additional Code Ends
    #===================================================
    
    
    #===================================================
    # ▼ CLASS Scene_Title Additional Code Begins
    #===================================================
    class Scene_Title
        $map_parallax=[]
        $parallax_fade=[]
        $parallax_move=[]
        $parallax_direction=0
        $parallax_active=false
        Create_Parallax_List.new
    end
    #===================================================
    # ▲ CLASS Scene_Title Additional Code Ends
    #===================================================
    
    #===================================================
    # ▼ CLASS Spriteset_Map Additional Code Begins
    #===================================================
    class Spriteset_Map
     
     alias parallax_original_initialize initialize
     
     def initialize
       parallax_original_initialize
            $parallax_active=false
            $parallax_fade[0]=0
            $parallax_move[0]=0
            if $parallax.nil? == false :$parallax.dispose end
            if $parallax_dummy_l.nil? == false :$parallax_dummy_l.dispose end
            if $parallax_dummy_r.nil? == false :$parallax_dummy_r.dispose end
            if $parallax_dummy_d.nil? == false :$parallax_dummy_d.dispose end
            if $parallax_dummy_u.nil? == false :$parallax_dummy_u.dispose end
            if $map_parallax[$game_map.map_id] != nil
               name=$map_parallax[$game_map.map_id].name
               direction=$map_parallax[$game_map.map_id].direction
               speed=$map_parallax[$game_map.map_id].speed
               opacity=$map_parallax[$game_map.map_id].opacity
               hue=$map_parallax[$game_map.map_id].hue
               $parallax_active=true
               Parallax.new(name, direction, speed,opacity,hue)
           end  
      end
    end  
    #===================================================
    # ▲ CLASS Spriteset_Map Additional Code Ends
    #===================================================
    Спойлер Проекты Dark Rise INC.:

  2. #722
    Маститый Аватар для Antberg
    Информация о пользователе
    Регистрация
    14.04.2008
    Сообщений
    1,355
    Записей в дневнике
    3
    Репутация: 53 Добавить или отнять репутацию

    По умолчанию

    Ничего не выходит! Вставил "нечто" в команду "Script", и когда дело доходит до её исполнения, то игра вылетает с такой ошибкой -



    Похоже, как будто имя файла не совпадает, но я то точно знаю, что оно там правильное (причём пробовал как с расширением, так и без него). Или дело не в этом?

  3. #723
    Маститый Аватар для Bullet S.D.
    Информация о пользователе
    Регистрация
    27.01.2009
    Адрес
    Москва
    Сообщений
    1,360
    Записей в дневнике
    9
    Репутация: 74 Добавить или отнять репутацию

    По умолчанию

    А у тебя в $map_parallax[8], цифра "8" соответствует ID карты? Сейчас не могу потестить скрипт, вечером займусь

    У меня запуск выглядит так
    $parallax_active=true
    $map_parallax[8]=Parallax.new("Mountain", 0, 1,255,0)
    Спойлер Проекты Dark Rise INC.:

  4. #724
    Маститый Аватар для Элрик
    Информация о пользователе
    Регистрация
    09.09.2010
    Сообщений
    1,284
    Записей в дневнике
    47
    Репутация: 24 Добавить или отнять репутацию

    По умолчанию

    Хочу использовать Dual Wield -> Free Hands в своем проекте, который недавно начал. Как его использовать? Будет ли он конфликтовать с Barehand Script?

  5. #725
    Маститый Аватар для Antberg
    Информация о пользователе
    Регистрация
    14.04.2008
    Сообщений
    1,355
    Записей в дневнике
    3
    Репутация: 53 Добавить или отнять репутацию

    По умолчанию

    А у тебя в $map_parallax[8], цифра "8" соответствует ID карты? Сейчас не могу потестить скрипт, вечером займусь

    У меня запуск выглядит так
    $parallax_active=true
    $map_parallax[8]=Parallax.new("Mountain", 0, 1,255,0)
    Нет, это ничего не меняет. Если ID карты, это то, что написано в её свойствах, где например "ID:003" обозначено, то, я пробовал вставлять и 3, и 003, но всё равно так-же вылетало.

  6. #726
    Маститый Аватар для Antberg
    Информация о пользователе
    Регистрация
    14.04.2008
    Сообщений
    1,355
    Записей в дневнике
    3
    Репутация: 53 Добавить или отнять репутацию

    По умолчанию

    И так, проблема с движением панорам полностью решена благодаря использованию MOG Scrolling Panorama, за что ещё раз спасибо Bullet S.D.! -)

  7. #727
    Маститый Аватар для Bullet S.D.
    Информация о пользователе
    Регистрация
    27.01.2009
    Адрес
    Москва
    Сообщений
    1,360
    Записей в дневнике
    9
    Репутация: 74 Добавить или отнять репутацию

    По умолчанию

    Спойлер Проекты Dark Rise INC.:

  8. #728
    Познающий Аватар для 100500
    Информация о пользователе
    Регистрация
    22.05.2011
    Сообщений
    351
    Записей в дневнике
    15
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Здравствуйте, господа знатоки.
    Давненько я здесь не писал, но вот настал момент истины.
    Дело в том, что есть у меня один скрипт для RPG Maker VX. Называется он Story_title или как-то так, и предназначен для того, чтобы сделать карту титульником. Вот.

    Вопорос, собственно, вот в чём: можно ли сделать так, чтобы командное окно с курсором появлялось не сразу, а после заданной паузы?
    Вот скрипт:
    PHP код:
    #==============================================================================
    # ? Vixotic_Map Story_Title <VX>
    #------------------------------------------------------------------------------
    # Version 1
    # by Vixotic [vixotic@live.com]
    # Exclusive Script for http://rpgmakervx.net/
    #==============================================================================  
    module VIX
      
    #-----------------------
      # Map Story Location
      #----------------------
      
    MAP_ID 61
      MAP_X 
    7
      MAP_Y 
    8
      MEMBERS 
    = [] # Members when Map Story Start.
      # [] is No Member. [1,2,3] is Members ID 1-2-3 from Database
      
      #--------------------------
      # Title Window Properties
      #-------------------------
      
    TITLE_WINDOW_SKIN "" # Get Windowskin File from System Folder
      
    TITLE_WINDOW_X 40
      TITLE_WINDOW_Y 
    300
      TITLE_WINDOW_WIDTH 
    172
      TITLE_WINDOW_OPACITY 
    # 0 to 255
    end

    class Scene_Title Scene_Base
      def vix_title_window_setup
        $title_window
    .windowskin Cache.system(VIX::TITLE_WINDOW_SKIN)
        
    $title_window.VIX::TITLE_WINDOW_X
        $title_window
    .VIX::TITLE_WINDOW_Y
        $title_window
    .width VIX::TITLE_WINDOW_WIDTH
        $title_window
    .opacity VIX::TITLE_WINDOW_OPACITY
      end

      def start
        super
        load_database
        create_game_objects
        
    if $title_on == true
          $title_on 
    false
         command_new_game
        
    else
        
    $game_party.vix_setup_starting_member(VIX::MEMBERS)
        
    $game_map.setup(VIX::MAP_ID)
        
    $game_player.moveto(VIX::MAP_X,VIX::MAP_Y)
        
    $game_player.refresh
        $game_map
    .titlewin 1
        $scene 
    Scene_Map.new
        
    $title_window Window_Command.new(172, [Vocab::new_gameVocab::continue,  Vocab::shutdown])
        
    vix_title_window_setup
        $game_map
    .autoplay
        end
      end
      
      def command_new_game
        confirm_player_location
        $game_party
    .setup_starting_members
        $game_map
    .setup($data_system.start_map_id)
        
    $game_player.moveto($data_system.start_x$data_system.start_y)
        
    $game_player.refresh
        $scene 
    Scene_Map.new
        
    RPG::BGM.fade(1500)
        
    close_command_window
        Graphics
    .fadeout(60)
        
    Graphics.wait(40)
        
    Graphics.frame_count 0
        RPG
    ::BGM.stop
        $game_map
    .autoplay
      end
      
      def post_start
      end
      def terminate
      end
      def update
      end
      def pre_terminate
      end
      def perform_transition
      end
      def close_command_window
      end
      def perform_transition
      end
    end

    class Game_Map
      attr_accessor 
    :titlewin
      
      alias vix_map_update update
      def update
        vix_map_update
        $title_window
    .visible true if not $title_window.disposed? and $title_window.visible == false and @titlewin != 2
        
    if @titlewin == 1
        $title_window
    .update
        
    if Input.trigger?(Input::C) and not $game_message.visible
          
    case $title_window.index
          
          when 0 
    # New Game
           
    Sound.play_decision
           Graphics
    .fadeout(30)
           
    $title_window.dispose unless $title_window.disposed?
           @
    titlewin 2
           $title_on 
    true
           $scene 
    Scene_Title.new
          
          
    when 1 # Continue
           
    Sound.play_decision
           $scene 
    Scene_File.new(falsefalsetrue)
          
          
    when 2 # Shutdown
           
    Sound.play_decision
           $title_window
    .dispose unless $title_window.disposed?
           @
    titlewin 2
           RPG
    ::BGM.fade(800)
           
    RPG::BGS.fade(800)
           
    RPG::ME.fade(800)
           
    $scene nil
          end
        end
      end
    end
    end

    class Scene_Map
      alias vix_map_terminate terminate
      def terminate
        
    if $scene.is_a?(Scene_Battle)
          
    $title_window.visible false unless $title_window.disposed?
        
    end
        vix_map_terminate
      end
    end

    class Scene_File Scene_Base
      alias vix_read_data read_save_data
      def read_save_data
    (file)
        
    vix_read_data(file)
        
    $game_map.titlewin 2
        $title_window
    .dispose unless $title_window.disposed?
      
    end
    end

    class Game_Party
        def vix_setup_starting_member
    (charalist)
        @
    actors charalist
      end
    end 

  9. #729
    Маститый Аватар для Andrew
    Информация о пользователе
    Регистрация
    08.02.2011
    Адрес
    Беларусь, Витебск
    Сообщений
    1,049
    Записей в дневнике
    3
    Репутация: 30 Добавить или отнять репутацию

    По умолчанию

    может сработать:
    Код:
    $title_pause = 20 # пауза
    
    
    #==============================================================================
    # ? Vixotic_Map Story_Title <VX>
    #------------------------------------------------------------------------------
    # Version 1
    # by Vixotic [vixotic@live.com]
    # Exclusive Script for http://rpgmakervx.net/
    #==============================================================================  
    module VIX
      #-----------------------
      # Map Story Location
      #----------------------
      MAP_ID = 61
      MAP_X = 7
      MAP_Y = 8
      MEMBERS = [] # Members when Map Story Start.
      # [] is No Member. [1,2,3] is Members ID 1-2-3 from Database
      
      #--------------------------
      # Title Window Properties
      #-------------------------
      TITLE_WINDOW_SKIN = "" # Get Windowskin File from System Folder
      TITLE_WINDOW_X = 40
      TITLE_WINDOW_Y = 300
      TITLE_WINDOW_WIDTH = 172
      TITLE_WINDOW_OPACITY = 0 # 0 to 255
    end
    
    class Scene_Title < Scene_Base
      def vix_title_window_setup
        $title_window.windowskin = Cache.system(VIX::TITLE_WINDOW_SKIN)
        $title_window.x = VIX::TITLE_WINDOW_X
        $title_window.y = VIX::TITLE_WINDOW_Y
        $title_window.width = VIX::TITLE_WINDOW_WIDTH
        $title_window.opacity = VIX::TITLE_WINDOW_OPACITY
      end
    
      def start
        super
        load_database
        create_game_objects
        if $title_on == true
          $title_on = false
         command_new_game
        else
        $game_party.vix_setup_starting_member(VIX::MEMBERS)
        $game_map.setup(VIX::MAP_ID)
        $game_player.moveto(VIX::MAP_X,VIX::MAP_Y)
        $game_player.refresh
        $game_map.titlewin = 1
        $scene = Scene_Map.new
        $title_window = Window_Command.new(172, [Vocab::new_game, Vocab::continue,  Vocab::shutdown])
        vix_title_window_setup
        $game_map.autoplay
        end
      end
      
      def command_new_game
        confirm_player_location
        $game_party.setup_starting_members
        $game_map.setup($data_system.start_map_id)
        $game_player.moveto($data_system.start_x, $data_system.start_y)
        $game_player.refresh
        $scene = Scene_Map.new
        RPG::BGM.fade(1500)
        close_command_window
        Graphics.fadeout(60)
        Graphics.wait(40)
        Graphics.frame_count = 0
        RPG::BGM.stop
        $game_map.autoplay
      end
      
      def post_start
      end
      def terminate
      end
      def update    
      end
      def pre_terminate
      end
      def perform_transition
      end
      def close_command_window
      end
      def perform_transition
      end
    end
    
    class Game_Map
      attr_accessor :titlewin
      
      alias vix_map_update update
      def update
        vix_map_updat
        @a = @a + 1
        if @a == $title_pause
          $title_window.visible = true if not $title_window.disposed? and $title_window.visible == false and @titlewin != 2
        end
        if @titlewin == 1
        $title_window.update
        if Input.trigger?(Input::C) and not $game_message.visible
          case $title_window.index
          
          when 0 # New Game
           Sound.play_decision
           Graphics.fadeout(30)
           $title_window.dispose unless $title_window.disposed?
           @titlewin = 2
           $title_on = true
           $scene = Scene_Title.new
          
          when 1 # Continue
           Sound.play_decision
           $scene = Scene_File.new(false, false, true)
          
          when 2 # Shutdown
           Sound.play_decision
           $title_window.dispose unless $title_window.disposed?
           @titlewin = 2
           RPG::BGM.fade(800)
           RPG::BGS.fade(800)
           RPG::ME.fade(800)
           $scene = nil
          end
        end
      end
    end
    end
    
    class Scene_Map
      alias vix_map_terminate terminate
      def terminate
        if $scene.is_a?(Scene_Battle)
          $title_window.visible = false unless $title_window.disposed?
        end
        vix_map_terminate
      end
    end
    
    class Scene_File < Scene_Base
      alias vix_read_data read_save_data
      def read_save_data(file)
        vix_read_data(file)
        $game_map.titlewin = 2
        $title_window.dispose unless $title_window.disposed?
      end
    end
    
    class Game_Party
        def vix_setup_starting_member(charalist)
        @actors = charalist
      end
    end


  10. #730
    Маститый Аватар для Seibur
    Информация о пользователе
    Регистрация
    07.01.2012
    Адрес
    Изумрудный город
    Сообщений
    1,206
    Записей в дневнике
    3
    Репутация: 58 Добавить или отнять репутацию

    По умолчанию

    Здравствуйте!
    Я нашел скрипт,который позволяет добавить расу к персонажу,но не очень понимаю как его полностью использовать...
    Поможете?
    Вот сам скрипт:
    Спойлер CODE:
    Код:
    #==============================================================================#
    # ** IEX(Icy Engine Xelion) - Race System
    #------------------------------------------------------------------------------#
    # ** Created by    : IceDragon (http://www.rpgmakervx.net/)
    # ** Script-Status : Addon (Actors)
    # ** Script Type   : Actor Modifier
    # ** Date Created  : 11/05/2010
    # ** Date Modified : 11/05/2010
    # ** Requested By  : phropheus
    # ** Version       : 1.0
    #------------------------------------------------------------------------------#
    #==============================================================================#
    # ** INTRODUCTION
    #------------------------------------------------------------------------------#
    # This script adds a new feature to your game, called races. 
    # (@_@ I said something wrong didn't I...)
    # Anyway currently these races only affect stats, feel free to drop a line
    # of suggestion.
    #
    #------------------------------------------------------------------------------#
    #==============================================================================#
    # ** FEATURES
    #------------------------------------------------------------------------------#
    # V1.0
    #------------------------------------------------------------------------------#
    # Races can fully, alter base stats, and get stat bonuses on level up..  
    # Not much..
    #
    #------------------------------------------------------------------------------#
    #==============================================================================#
    # ** COMPATABLITIES
    #------------------------------------------------------------------------------#
    #  If you have YEM New Battle Stats, this script allows you to alter those stats
    #  as well..
    #
    #------------------------------------------------------------------------------#
    #==============================================================================#
    # ** CHANGE LOG
    #------------------------------------------------------------------------------#
    # 
    #  11/05/2010 - V1.0 Finished Script
    #
    #------------------------------------------------------------------------------#
    #==============================================================================#
    # ** KNOWN ISSUES
    #------------------------------------------------------------------------------#
    #  Non at the moment. 
    #
    #------------------------------------------------------------------------------#
    $imported = {} if $imported == nil
    $imported["IEX_Race_System"] = true
    #==============================================================================
    # ** IEX::RACE_SYSTEM
    #------------------------------------------------------------------------------
    #==============================================================================
    module IEX
      module RACE_SYSTEM
    #==============================================================================
    #                           Start Customization
    #------------------------------------------------------------------------------
    #==============================================================================
      #--------------------------------------------------------------------------#
      # * Races
      #--------------------------------------------------------------------------#
      # Define the races here, note use numbers on the left (They serve as Ids)
      # And a string on the right (Race's Name)
      # **Note Race 0 is the default
      #--------------------------------------------------------------------------#
        RACES = {
        # Race_Id => String
        0 => "", # Do not Remove
        1 => "Hume",
        2 => "Neko",
        3 => "Dragon",
        4 => "Elf"
        } # Do not Remove
      #--------------------------------------------------------------------------#
      # * Race Icons
      #--------------------------------------------------------------------------#
      # Race Id on the left and an IconIndex on the right
      # This is used in the status window
      # **Note Race 0 is the default
      #--------------------------------------------------------------------------#    
        RACE_ICONS = { 
        # Race_Id => Icon_Index
        0 => 0, # Do not Remove
        1 => 1,
        2 => 11,
        3 => 201,
        4 => 16,
        } # Do not Remove
        
      #--------------------------------------------------------------------------#
      # * Race Base Stat Modifier
      #--------------------------------------------------------------------------#
      # This is where you configure the Race Base Stat Mods
      # You can turn this feature off if you like..
      # **Note Race 0 is the default, therefore anything you edit for it
      # will affect actors who didn't have there race changed
      #--------------------------------------------------------------------------# 
        RACE_AFFECT_STATS = true
        RACE_BASE_STAT_RATE = 100
        
        RACE_BASE_STAT = {
       #Race_Id => [maxhp, maxmp, atk, def, spi, agi, dex, res]
          0 =>     [100,   100,   120, 100, 100, 100, 100, 100], # Do not Remove
          2 =>     [110,   110,   100, 80 , 110, 120, 100, 100],
          3 =>     [120,   110,   100, 120 , 110, 80, 100, 100],
          4 =>     [80,   150,   100, 80 , 130, 110, 150, 100],
        } # Do not Remove 
        
      #--------------------------------------------------------------------------#
      # * Race Bonus Level Up Stat Modifier
      #--------------------------------------------------------------------------#
      # This is where you configure the Race Bonus Stat Mods
      # You can turn this feature off if you like..
      # **Note Race 0 is the default, therefore anything you edit for it
      # will affect actors who didn't have there race changed
      #--------------------------------------------------------------------------# 
        RACE_LEVEL_UP_BONUS = true
        RACE_GROWTH_RATE = 100
        GROWTH_STAT_BONUS = {
        #Race_Id => [maxhp, maxmp, atk, def, spi, agi, dex, res]
          0 =>     [0   ,   0  ,   0  , 0  , 0  , 0  , 0  , 0  ], # Do not Remove
        } # Do not Remove
        
        RACE_STAT_RANDOM_BONUS = true
        GROWTH_STAT_BONUS_RAN = {
        #Race_Id => [maxhp, maxmp, atk, def, spi, agi, dex, res]
          0 =>     [0   ,   0  ,   0  , 0  , 0  , 0  , 0  , 0  ], # Do not Remove
        } # Do not Remove
        
      #--------------------------------------------------------------------------#
      # * Actor Starting Race 
      #--------------------------------------------------------------------------#
      # You can set the starting race of an actor here
      # **Note Actor 0 is the default, any race set to that, will be the default
      # for actors who aren't specified here.
      #--------------------------------------------------------------------------#
        ACTOR_STARTING_RACES = {
        # Actor_id => Race_Id
        0 => 0, # Do not Remove
        1 => 1,
        2 => 2,
        3 => 3,
        4 => 4,
        5 => 1,
        6 => 1,
        7 => 1,
        8 => 1,
        } # Do not Remove
    
      #--------------------------------------------------------------------------#
      # * Race Status Window Stuff
      #--------------------------------------------------------------------------#
      #--------------------------------------------------------------------------#
        DRAW_RACE = true
        #           x, y, width, height
        RACE_POS = [256, 0, 128, 24]
        
        RACE_FORMAT = "%1s : %2s"
        RACE_TEXT = "Race"
    #==============================================================================
    #                           End Customization
    #------------------------------------------------------------------------------
    #==============================================================================
      end
    end
    
    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #==============================================================================
    class Game_Actor < Game_Battler
      
      alias iex_races_ga_initialize initialize unless $@
      def initialize(*args)
        iex_races_ga_initialize(*args)
        setup_race
      end
      
      def setup_race
        if IEX::RACE_SYSTEM::ACTOR_STARTING_RACES.has_key?(@actor_id)
          @race_id = IEX::RACE_SYSTEM::ACTOR_STARTING_RACES[@actor_id]
        else
          @race_id = IEX::RACE_SYSTEM::ACTOR_STARTING_RACES[0]
        end 
      end
      
      #--------------------------------------------------------------------------#
      # * Alias - Base Stats
      #--------------------------------------------------------------------------#
      # Races can affect the base stats
      #--------------------------------------------------------------------------#
      alias iex_race_base_maxhp base_maxhp unless $@
      def base_maxhp
        bs = iex_race_base_maxhp
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[0]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      alias iex_race_base_maxmp base_maxmp unless $@
      def base_maxmp
        bs = iex_race_base_maxmp
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[1]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      alias iex_race_base_atk base_atk unless $@
      def base_atk
        bs = iex_race_base_atk
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[2]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      alias iex_race_base_def base_def unless $@
      def base_def
        bs = iex_race_base_def
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[3]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      alias iex_race_base_spi base_spi unless $@
      def base_spi
        bs = iex_race_base_spi
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[4]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      alias iex_race_base_agi base_agi unless $@
      def base_agi
        bs = iex_race_base_agi
        if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
          if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
          else
            racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
          end
          bs *= 100 + ((racarra[5]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
          bs /= 100.0
        end
        return Integer(bs)
      end
      
      if $imported["DEX Stat"]
        alias iex_race_base_dex base_dex unless $@
        def base_dex
          bs = iex_race_base_dex
          if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
            if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
              racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
            else
              racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
            end
            bs *= 100 + ((racarra[6]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
            bs /= 100.0
          end
          return Integer(bs)
        end
      end
    
      if $imported["RES Stat"]
        alias iex_race_base_res base_res unless $@
        def base_res
          bs = iex_race_base_res
          if IEX::RACE_SYSTEM::RACE_AFFECT_STATS
            if IEX::RACE_SYSTEM::RACE_BASE_STAT.has_key?(@race_id)
              racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[@race_id]
            else
              racarra = IEX::RACE_SYSTEM::RACE_BASE_STAT[0]
            end
            bs *= 100 + ((racarra[7]- 100) * IEX::RACE_SYSTEM::RACE_BASE_STAT_RATE / 100)
            bs /= 100.0
          end
          return Integer(bs)
        end
      end
      
      #--------------------------------------------------------------------------#
      # * Alias - Level Up
      #--------------------------------------------------------------------------#
      # Level doesn't really have much in it, so I added the stat Mods
      #--------------------------------------------------------------------------#
      alias iex_races_ga_level_up level_up unless $@
      def level_up(*args)
        race_rate = IEX::RACE_SYSTEM::RACE_GROWTH_RATE
        
        if IEX::RACE_SYSTEM::RACE_LEVEL_UP_BONUS
          if IEX::RACE_SYSTEM::GROWTH_STAT_BONUS.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::GROWTH_STAT_BONUS[@race_id]
            self.maxhp += (racarra[0] * race_rate) / 100
            self.maxmp += (racarra[1] * race_rate) / 100
            self.atk   += (racarra[2] * race_rate) / 100
            self.def   += (racarra[3] * race_rate) / 100
            self.spi   += (racarra[4] * race_rate) / 100
            self.agi   += (racarra[5] * race_rate) / 100
            if $imported["DEX Stat"]
              self.dex += (racarra[6] * race_rate) / 100
            end  
            if $imported["RES Stat"]  
              self.res += (racarra[7] * race_rate) / 100
            end  
          end
        end
        
        if IEX::RACE_SYSTEM::RACE_STAT_RANDOM_BONUS
          if IEX::RACE_SYSTEM::GROWTH_STAT_BONUS_RAN.has_key?(@race_id)
            racarra = IEX::RACE_SYSTEM::GROWTH_STAT_BONUS_RAN[@race_id]
            self.maxhp += (rand(racarra[0]) * race_rate) / 100 unless racarra[0] == 0
            self.maxmp += (rand(racarra[1]) * race_rate) / 100 unless racarra[1] == 0
            self.atk   += (rand(racarra[2]) * race_rate) / 100 unless racarra[2] == 0
            self.def   += (rand(racarra[3]) * race_rate) / 100 unless racarra[3] == 0
            self.spi   += (rand(racarra[4]) * race_rate) / 100 unless racarra[4] == 0
            self.agi   += (rand(racarra[5]) * race_rate) / 100 unless racarra[5] == 0
            if $imported["DEX Stat"]
              self.dex += (rand(racarra[6]) * race_rate) / 100 unless racarra[6] == 0
            end  
            if $imported["RES Stat"]  
              self.res += (rand(racarra[7]) * race_rate) / 100 unless racarra[7] == 0
            end 
          end
        end
        iex_races_ga_level_up(*args)
      end
      
      def race_name
        setup_race if @race_id == nil
        return IEX::RACE_SYSTEM::RACES[@race_id]
      end
      
    end
    
    #==============================================================================
    # ** Window_Base
    #------------------------------------------------------------------------------
    #==============================================================================
    class Window_Base 
      
      def draw_race(actor, x, y, width = 128, height = 24, align = 0)
        format = IEX::RACE_SYSTEM::RACE_FORMAT
        race_text = IEX::RACE_SYSTEM::RACE_TEXT
        race_text = sprintf(format, race_text, actor.race_name.to_s)
        self.contents.draw_text(x, y, width, height, race_text)
      end
      
    end  
      
    #==============================================================================
    # ** Window_Status
    #------------------------------------------------------------------------------
    #==============================================================================
    
    class Window_Status < Window_Base
      #--------------------------------------------------------------------------#
      # * Alias - Refresh
      #--------------------------------------------------------------------------#
      #--------------------------------------------------------------------------#
      alias iex_races_ws_refresh refresh unless $@
      def refresh(*args)
        iex_races_ws_refresh(*args)
        if IEX::RACE_SYSTEM::DRAW_RACE
          tx = IEX::RACE_SYSTEM::RACE_POS[0]
          ty = IEX::RACE_SYSTEM::RACE_POS[1]
          tw = IEX::RACE_SYSTEM::RACE_POS[2]
          th = IEX::RACE_SYSTEM::RACE_POS[3]
          draw_race(@actor, tx, ty, tw, th)
        end  
      end
      
    end

    Заранее СПАСИБО!
    Последний раз редактировалось Seibur; 16.06.2012 в 11:55.
    Прохлада и спокойствие мне вполне по душе

    Спойлер :

    き っ と 、 女 の 子 は お 砂 糖 と ス パ イ ス と 素 敵 な 何 か で で き て い る。

Страница 73 из 147 ПерваяПервая ... 2363717273747583123 ... ПоследняяПоследняя

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

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

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

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

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

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

Ваши права

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