Longer skill description in menu and in battle?

Status
Not open for further replies.

Cuddlebuns

Veteran
Veteran
Joined
May 5, 2019
Messages
35
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Two short lines of text is asinine. I need a larger window to display skill descriptions in both the menu and during a battle.

Any help would be greatly appreciated!
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
This is not something you can do with events. Both those windows are created within their respective scene so you need a script that changes how those windows are initialized and how many lines they can display.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
Save this as plugin and add to your game.
Edit all variables to your likings.
Code:
Window_Help.prototype.initialize = function(numLines) {
    if (SceneManager.isSceneBattle()){
        /* This will create a window description the same as in Warcraft 3 */
        /* while you are in battle Assuming that game resolution is set to 1280x720 */
        var leftPos = 760;
        var UpperPos = 188;
        var WinXSize = 520;
        var WinYSize = 220;
      
        Window_Base.prototype.initialize.call(this, LeftPos, UpperPos, WinXSize, WinYSize);
        this._text = '';
    }
    else
        {
            /* default window */
            var leftPos = 0;
            var UpperPos = 0;
            var WinXSize = Graphics.boxWidth;
            var WinYSize = this.fittingHeight(numLines || 2);
      
            Window_Base.prototype.initialize.call(this, 0, 0, width, height);
            this._text = '';
        }
    };
It will look like this in Battle
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
Oh my! I didn't notice, but as far I know the difference is not that much.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Oh my! I didn't notice, but as far I know the difference is not that much.
Wrong, it is a big difference as it is a different language from that of Ace which uses Ruby. Therefore it will not work.

[move]RGSS3 Script Requests[/move]
 

Cuddlebuns

Veteran
Veteran
Joined
May 5, 2019
Messages
35
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Both those windows are created within their respective scene so you need a script that changes how those windows are initialized and how many lines they can display.
Would scripting this be particularly difficult to accomplish? I've seen Shiggy's extended item and weapon description script, but it does not appear to apply to skills, which is frustrating, to say the least.


Code:
class Scene_Item < Scene_ItemBase

  alias description_extension_start start
  def start
    description_extension_start
   
    create_description_window
  end

  def create_description_window
    @description_window = Window_Item_Description.new
    @description_window.z = 300
    @description_window.back_opacity = 255

    @description_window.hide
   
  end

  def unexpand
    @description_window.hide
    @item_window.activate
  end

  alias description_extension_create_item_window create_item_window
  def create_item_window
    description_extension_create_item_window
    @item_window.set_handler(:expand,     method(:on_item_expand))
  end

  def on_item_cancel
    if @description_window.visible
        @description_window.hide
        @item_window.activate
    else
      @item_window.unselect
      @category_window.activate
    end
  end

  def on_item_expand
     if @description_window.visible
        @description_window.hide
        @item_window.activate
    else
      @description_window.show
      @description_window.get_description(@item_window.item)
    end
  end

end

class Window_Item_Description < Window_Base

  def initialize
    super(0,0,Graphics.width,200) # <==== change window position and size
  end

  def get_description(item)
    contents.clear
    return unless item
    text = item.note.scan(/<\s*description\s*:\s*([^>]+)>/)
    if text[0]
      draw_text_ex( 0 , 0 , text[0][0])
    else
      draw_text_ex( 0 , 0 ,item.description)
    end
  end

end

class Window_ItemList < Window_Selectable

def process_handling
  return unless open? && active
    return process_ok       if ok_enabled?        && Input.trigger?(:C)
    return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
    return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
    return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  return process_description if Input.trigger?(:Z)  #<===== change which button to press to show window
end

def process_description
  call_handler(:expand)
end
end

Could something be appended or replaced in the script to allow for an additional window that displays longer skill descriptions?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Would scripting this be particularly difficult to accomplish?
It is quite easy to achieve actually. I would do it myself, but I am very busy lately and I am afraid that a long time will pass before I have time to do it.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,881
Messages
1,017,227
Members
137,607
Latest member
Maddo
Top