Scene Combine [to remove Category Window for Items]

Discussion in 'RGSSx Script Support' started by tale, Jul 9, 2019.

Thread Status:
Not open for further replies.
  1. tale

    tale Volunteer Veteran

    Messages:
    379
    Likes Received:
    580
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    1. I'm using mjshi's Non-Combat Menu with efeberk's Scene Combine script
    - In Non-Combat Menu script, I did change line 239: SceneManager.call(Scene_Item) to SceneManager.call(Scene_Combine)

    2. I did correct the crash from Scene Combine by replacing that line with this. [mentioned by Rikifive]
    https://www.rpgmakercentral.com/topic/20235-scene-combine/?page=2&tab=comments#comment-288834

    3. Is there a way to remove category window while keeping Combine function intact?

    [​IMG]

    - After confirming with Combine, goes straight to selecting an item- not through category window.

    Edit: I'm looking for an edit that overwrites/ remove Scene Combine 'item category window'

    Almost there with using Sixth's method.
    Code:
    class Scene_Combine < Scene_ItemBase
    
    def create_category_window
    # Removed!
    end
    
    def create_item_window
    x = 0
    y = @help_window.height
    w = Graphics.width
    h = Graphics.height - y
    @item_window = Window_ItemList.new(x,y,w,h)
    @item_window.set_handler(:ok, method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:on_item_cancel))
    @item_window.help_window = @help_window # Marked line 1! o.o
    @item_window.category = :item # Marked line 2! - Can be :key_item if needed.
    @item_window.viewport = @viewport
    @item_window.activate
    @item_window.select_last
    @description.refresh(@item_window.item) if @description
    end
    
    def on_item_cancel
    return_scene
    end
    
    end

    Unfortunately, this causes an issue with Scene_Combine script by confirming combine.
     
    Last edited: Jul 9, 2019
    #1
  2. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,513
    Likes Received:
    324
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    Code:
    class Scene_Combine < Scene_ItemBase
    
      def create_category_window
      # Removed!
      end
    
      def create_item_window
        x = 0
        y = @help_window.height + @options_window.height
        w = Graphics.width
        h = Graphics.height - y
        @item_window = Window_ItemListe.new(x,y,w,h)
        @item_window.set_handler(:ok, method(:on_item_ok))
        @item_window.set_handler(:cancel, method(:on_item_cancel))
        @item_window.help_window = @help_window # Marked line 1! o.o
        @item_window.category = :item # Marked line 2! - Can be :key_item if needed.
        @item_window.viewport = @viewport
        @item_window.activate
        @item_window.select_last
        @description.refresh(@item_window.item) if @description
        @item_window.deactivate.unselect
      end
    
      def on_item_cancel
        return_scene
      end
     
      def combine_ok
        @item_window.combining = true
        @combine = true
        @options_window.deactivate.unselect
        @item_window.activate.select(0)
      end
     
      def use_ok
        @item_window.combining = false
        @options_window.deactivate.unselect
        @item_window.activate.select(0)
      end
    
    end
    Code:
    class Scene_Combine < Scene_ItemBase
    
      def create_category_window
      # Removed!
      end
    
      def create_options_window
      # Removed!
      end
    
      def create_item_window
        x = 0
        y = @help_window.height
        w = Graphics.width
        h = Graphics.height - y
        @item_window = Window_ItemListe.new(x,y,w,h)
        @item_window.set_handler(:ok, method(:on_item_ok))
        @item_window.set_handler(:cancel, method(:on_item_cancel))
        @item_window.help_window = @help_window # Marked line 1! o.o
        @item_window.category = :item # Marked line 2! - Can be :key_item if needed.
        @item_window.viewport = @viewport
        @description.refresh(@item_window.item) if @description
        combine_ok
      end
    
      def on_item_cancel
        return_scene
      end
     
      def combine_ok
        @item_window.combining = true
        @combine = true
        @item_window.activate.select(0)
      end
     
      def use_ok
        @item_window.combining = false
        @item_window.activate.select(0)
      end
    
    end
     
    Last edited: Jul 10, 2019
    #2
    tale likes this.
  3. tale

    tale Volunteer Veteran

    Messages:
    379
    Likes Received:
    580
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    @Roninator2 Thank you! with option combine screen is exactly what I'm looking for.
     
    #3
  4. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,623
    Likes Received:
    11,613
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #4
Thread Status:
Not open for further replies.

Share This Page