[RMXP] Adjusting Prussian Interface Engine Windows

Status
Not open for further replies.

Iapetos

Warper
Member
Joined
Jul 3, 2018
Messages
3
Reaction score
0
First Language
German
Primarily Uses
RMXP
Hey, friends.
This is my first post here, so please be patient if I do anything wrong.
Recently, I've fallen in love with Tigurus' Prussian Interface Engine, and everything is working smoothly.
However, I tend to write somewhat elaborate descriptions for items, equipment and skills,
and the default P.I.E. windows are way too crammed for me.
It should be a relatively easy manner to edit that, I believe, but I am a complete noob in working with scripts.
I've included some pictures to elucidate what exactly I want.

In the equip menu, I just don't get why the text window is so small yet there is so much blank space to put it.
I don't really need the accuracy, defense, resistance and variance stats on the item screen, so maybe
you could throw them out to enlargen the window?
On the skill scene, I don't really have an idea on how to improve it, except from maybe enlargening the menu
altogether.

I hope this will not take too much effort, and I really feel uncomfortable requesting such a thing.

Best wishes
~Iapetos
 

Attachments

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
Can you provide a link to the P.I.E. script that you're using? Also, are there any other scripts you're using? When designing a fix for one script it's important to know what other scripts you're using so that you don't accidentally create a conflict.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
Ok, I managed to get you two lines of description without changing too much by squeezing things together a bit. Just paste this script below the original PIE script and you should be good to go. One thing to note though is that having more than two lines will cause the text to overflow into other areas of the display instead of shrinking the text like it normally would.

Code:
#===============================================================================
# PIE Addon - Two Line Descriptions
# Author: Mobius XVI
# Version: 1.0
# Date: 29 Aug 2018
#===============================================================================
#
# Introduction:
#
#   The purpose of this script is to allow you to have two line descriptions
#   when using the Prussian Interface Engine
#
# Instructions:
#
#  - Place this script below the PIE script but above main
#
# Issues/Bugs/Possible Bugs:
#
#   - Having more than two lines will cause the text to overflow into other areas
#     of the display instead of shrinking the text like it normally would.
#
#  Credits/Thanks:
#    - Mobius XVI, author
#    - Tigurus, PIE author, original script:
#      http://www.gdunlimited.net/scripts/rpg-maker-xp/window-scripts/prussian-interface-engine-p-i-e
#
#  License
#
#    The MIT License (MIT)
#
#    Copyright (c) 2018 darmes
#
#     Permission is hereby granted, free of charge, to any person obtaining a copy
#     of this software and associated documentation files (the "Software"), to deal
#     in the Software without restriction, including without limitation the rights
#     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#     copies of the Software, and to permit persons to whom the Software is
#     furnished to do so, subject to the following conditions:
#
#     The above copyright notice and this permission notice shall be included in all
#     copies or substantial portions of the Software.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#     SOFTWARE.
#
#===============================================================================


class Window_Base
 
    def text_split(str, width)
      new_arr = []
      # Split str into words
      temp_arr = str.split
      temp_str = ""
      for word in temp_arr
          size = contents.text_size( temp_str + word + " ").width
          if size <= width
               # Rejoin words together
              temp_str.concat(word + " ")
          # When line length is useable, push to new_arr
          else
              new_arr.push(temp_str.strip)
              temp_str = word + " "
          end
      end
      # Push leftover string
      new_arr.push(temp_str.strip) unless temp_str == ""
      # Push phase info to info_array
      return new_arr
    end
   
    def draw_text_multi(x, y, width, height, text)
      #text_width = width / 6
      text_array = text_split(text, width)
      for i in 0...text_array.size
        line = text_array[i]
        self.contents.draw_text(x, (i * height) + y, width, height, line)
      end
    end
   
end

class Window_PIEITEMHelp < Window_Base
 
 
  # When the item is a weapon, the window will update according to this.
  def updateweapon
    # Clearing and setting the right font/size for the window.
    self.contents.clear
    self.contents.font.name = PIE::PIEDEFAULTFONT
    self.contents.font.size = PIE::PIEDEFAULTSIZE
    self.contents.font.color = normal_color
#==============================================================================
#  Variables used in Weapon Help window
#==============================================================================
  # General
      x = 33
      y = 88
    item_id = $currenthighlighteditem.id
    item = $currenthighlighteditem.id
    item_name = $data_weapons[item_id].name
    item_desc = $data_weapons[item_id].description
    icon_name = $data_weapons[item_id].icon_name
  # Item Specifications
    item_atk = $data_weapons[item_id].atk.to_s
    item_pdef = $data_weapons[item_id].pdef.to_s
    item_mdef = $data_weapons[item_id].mdef.to_s
    item_str = $data_weapons[item_id].str_plus.to_s
    item_dex = $data_weapons[item_id].dex_plus.to_s
    item_agi = $data_weapons[item_id].agi_plus.to_s
    item_int = $data_weapons[item_id].int_plus.to_s
  # Item Elemental and Status Specifications
    # Elemental Attribute
    item_element = ""
    flag = false
    for i in $data_weapons[item_id].element_set
    if flag
      item_element += "/"
    end
    item_element += $data_system.elements[i]
    flag = true
    end
    if item_element == ""
      item_element = "None"
    end
    # Status Attribute
    item_status = ""
    flag = false
    for i in $data_weapons[item_id].plus_state_set
    if flag
      item_status += "/"
    end
    item_status += $data_states[i].name
    flag = true
    end
    if item_status == ""
      item_status = "None"
    end

#==============================================================================
#  Weapon Name and Icons Location
#==============================================================================
  # General
    self.contents.draw_text(33, 8, 256, 24, item_name)
    #self.contents.draw_text(0, 25, 300, 32, item_desc)
    draw_text_multi(0, 32, 288, 22, item_desc)
    bitmap = RPG::Cache.icon(icon_name)
    self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
  # Item Specifications
    self.contents.font.color = system_color
    self.contents.draw_text(x - 33, y - 14, 120, 24, $data_system.words.atk + ":", 2)
    self.contents.draw_text(x - 33, y + 14, 120, 24, $data_system.words.pdef + ":", 2)
    self.contents.draw_text(x - 33, y + 28, 120, 24, $data_system.words.mdef + ":", 2)
    self.contents.draw_text(x - 33, y + 42, 120, 24, $data_system.words.str + ":", 2)
    self.contents.draw_text(x - 33, y + 56, 120, 24, $data_system.words.dex + ":", 2)
    self.contents.draw_text(x - 33, y + 70, 120, 24, $data_system.words.agi + ":", 2)
    self.contents.draw_text(x - 33, y + 84, 120, 24, $data_system.words.int + ":", 2)
    self.contents.draw_text(x - 33, y + 112, 120, 24, "Elemental Attack:")
    self.contents.draw_text(x - 33, y + 112 + 20, 120, 24, "Status Attack:", 2)

#==============================================================================
#  Weapon Effect Location
#==============================================================================
    # Item Specifications
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94, y - 14, 64, 24, item_atk, 2)
    self.contents.draw_text(x + 94, y + 14, 64, 24, item_pdef, 2)
    self.contents.draw_text(x + 94, y + 28, 64, 24, item_mdef, 2)
    self.contents.draw_text(x + 94, y + 42, 64, 24, item_str, 2)  
    self.contents.draw_text(x + 94, y + 56, 64, 24, item_dex, 2)
    self.contents.draw_text(x + 94, y + 70, 64, 24, item_agi, 2)
    self.contents.draw_text(x + 94, y + 84, 64, 24, item_int, 2)
    self.contents.draw_text(x + 94, y + 112, 100, 24, item_element, 0)
    self.contents.draw_text(x + 94, y + 132, 100, 24, item_status, 0)  
  end

  # When the item is an armor, the window will update according to this.
  def updatearmor
    # Clearing and setting the right font/size for the window.
    self.contents.clear
    self.contents.font.name = PIE::PIEDEFAULTFONT
    self.contents.font.size = PIE::PIEDEFAULTSIZE
    self.contents.font.color = normal_color
    item_id = $currenthighlighteditem.id
    item = $currenthighlighteditem.id

#==============================================================================
#  Variables used in Armor Help window
#==============================================================================
  # General
      x = 33
      y = 88
    item_id = $currenthighlighteditem.id
    item = $currenthighlighteditem.id
    item_name = $data_armors[item_id].name
    item_desc = $data_armors[item_id].description
    icon_name = $data_armors[item_id].icon_name
  # Item Specifications
    item_pdef = $data_armors[item_id].pdef.to_s
    item_mdef = $data_armors[item_id].mdef.to_s
    item_eva = $data_armors[item_id].eva.to_s
    item_str = $data_armors[item_id].str_plus.to_s
    item_dex = $data_armors[item_id].dex_plus.to_s
    item_agi = $data_armors[item_id].agi_plus.to_s
    item_int = $data_armors[item_id].int_plus.to_s
  # Item Elemental and Status Specifications
    # Elemental Attribute
    item_element = ""
    flag = false
    for i in $data_armors[item_id].guard_element_set
    if flag
      item_element += "/"
    end
    item_element += $data_system.elements[i]
    flag = true
    end
    if item_element == ""
      item_element = "None"
    end
    # Status Attribute
    item_status = ""
    flag = false
    for i in $data_armors[item_id].guard_state_set
    if flag
      item_status += "/"
    end
    item_status += $data_states[i].name
    flag = true
    end
    if item_status == ""
      item_status = "None"
    end

#==============================================================================
#  Armor Name and Icons Location
#==============================================================================
  # General
    self.contents.draw_text(33, 8, 256, 24, item_name)
    #self.contents.draw_text(0, 25, 300, 32, item_desc)
    draw_text_multi(0, 32, 288, 22, item_desc)
   
    bitmap = RPG::Cache.icon(icon_name)
    self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
  # Item Specifications
    self.contents.font.color = system_color
    self.contents.draw_text(x - 33, y - 14, 120, 24, $data_system.words.pdef + ":", 2)
    self.contents.draw_text(x - 33, y + 14, 120, 24, $data_system.words.mdef + ":", 2)
    self.contents.draw_text(x - 33, y + 28, 120, 24, "Evasion:", 2)
    self.contents.draw_text(x - 33, y + 42, 120, 24, $data_system.words.str + ":", 2)
    self.contents.draw_text(x - 33, y + 56, 120, 24, $data_system.words.dex + ":", 2)
    self.contents.draw_text(x - 33, y + 70, 120, 24, $data_system.words.agi + ":", 2)
    self.contents.draw_text(x - 33, y + 84, 120, 24, $data_system.words.int + ":", 2)
    self.contents.draw_text(x - 33, y + 112, 125, 24, "Elemental Defense:")
    self.contents.draw_text(x - 33, y + 112 + 20, 120, 24, "Status Defense:", 2)

#==============================================================================
#  Armor Effect Location
#==============================================================================
    # Item Specifications
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94, y - 14, 64, 24, item_pdef, 2)
    self.contents.draw_text(x + 94, y + 14, 64, 24, item_mdef, 2)
    self.contents.draw_text(x + 94, y + 28, 64, 24, item_eva, 2)
    self.contents.draw_text(x + 94, y + 42, 64, 24, item_str, 2)  
    self.contents.draw_text(x + 94, y + 56, 64, 24, item_dex, 2)
    self.contents.draw_text(x + 94, y + 70, 64, 24, item_agi, 2)
    self.contents.draw_text(x + 94, y + 84, 64, 24, item_int, 2)
    self.contents.draw_text(x + 94, y + 112, 100, 24, item_element, 0)
    self.contents.draw_text(x + 94, y + 132, 100, 24, item_status, 0)  
  end
 
  # When the item is an item, the window will update according to this.
  def updateitem
    # Clearing and setting the right font/size for the window.
    self.contents.clear
    self.contents.font.name = PIE::PIEDEFAULTFONT
    self.contents.font.size = PIE::PIEDEFAULTSIZE
    self.contents.font.color = normal_color
     
#==============================================================================
#  Variables used in Item Help window
#==============================================================================
    # General
    x = 33
    y = 88
    item_id = $currenthighlighteditem.id
    item = $currenthighlighteditem.id
    getitem_scope = $data_items[item_id].scope
    getitem_occasion = $data_items[item_id].occasion
    item_name = $data_items[item_id].name
    item_desc = $data_items[item_id].description
    icon_name = $data_items[item_id].icon_name
    # Item Specifications
    item_para = $data_items[item_id].parameter_type
    item_parp = $data_items[item_id].parameter_points.to_s
    item_hpr = $data_items[item_id].recover_hp_rate.to_s
    item_hpt = $data_items[item_id].recover_hp.to_s
    item_spr = $data_items[item_id].recover_sp_rate.to_s
    item_spt = $data_items[item_id].recover_sp.to_s
    item_acc = $data_items[item_id].hit.to_s
    item_pdf = $data_items[item_id].pdef_f.to_s
    item_mdf = $data_items[item_id].mdef_f.to_s
    item_var = $data_items[item_id].variance.to_s

    # Item Parameter Specifications
    # tells what effects the item parameter is
    case item_para
      when 0  ; item_para = "None"
      when 1  ; item_para = "Max HP"
      when 2  ; item_para = "Max SP"
      when 3  ; item_para = "Strength"
      when 4  ; item_para = "Dexterity"
      when 5  ; item_para = "Agility"
      when 6  ; item_para = "Intelligence"
    end  
     
    # Item Elemental and Status Specifications
    # Elemental Attribute
    item_element = ""
    flag = false
    for i in $data_items[item_id].element_set
    if flag
      item_element += "/"
    end
    item_element += $data_system.elements[i]
    flag = true
    end
    if item_element == ""
      item_element = "None"
    end
     
    # Status Attribute
    item_status = ""
    flag = false
    for i in $data_items[item_id].plus_state_set
    if flag
      item_status += "/"
    end
    item_status += $data_states[i].name
    flag = true
    end
    if item_status == ""
      item_status = "None"
    end
     
    # Status Removal
    item_minstatus = ""
    flag = false
    for i in $data_items[item_id].minus_state_set
    if flag
      item_minstatus += "/"
    end
    item_minstatus += $data_states[i].name
    flag = true
    end
    if item_minstatus == ""
      item_minstatus = "None"
    end
     
    # Misc. Specifications
      # Item Scope
    case getitem_scope
      when 0; getitem_scope = "Nobody"
      when 1; getitem_scope = "One Enemy"
      when 2; getitem_scope = "All Enemies"
      when 3; getitem_scope = "One Ally"
      when 4; getitem_scope = "All Allies"
      when 5; getitem_scope = "One Dead Ally"
      when 6; getitem_scope = "All Dead Allies"
      when 7; getitem_scope = "User of the Skill"
    end
     
      # Item Occasion
    case getitem_occasion
      when 0; getitem_occasion = "Menu + Battle"
      when 1; getitem_occasion = "Only in Battle"
      when 2; getitem_occasion = "Only in Menu"
      when 3; getitem_occasion = "Not Useable"
    end
   
#==============================================================================
#  Item Name and Icons Location
#==============================================================================
    # General
    self.contents.draw_text(33, 8, 256, 24, item_name)
    #self.contents.draw_text(0, 25, 300, 32, item_desc)
    draw_text_multi(0, 32, 288, 22, item_desc)
    bitmap = RPG::Cache.icon(icon_name)
    self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
   
    # Item Specifications
    self.contents.font.color = system_color
    self.contents.draw_text(x - 33, y - 14, 120, 24, "Effects On:", 2)
    self.contents.draw_text(x - 33, y, 120, 24, "Recover(HP):", 2)
    self.contents.draw_text(x - 33, y + 14, 120, 24, "Recover (SP):", 2)
    self.contents.draw_text(x - 33, y + 28, 120, 24, "Accuracy:", 2)
    self.contents.draw_text(x - 33, y + 56, 120, 24, $data_system.words.pdef+ ":", 2)
    self.contents.draw_text(x - 33, y + 70, 120, 24, $data_system.words.mdef + ":", 2)
    self.contents.draw_text(x - 33, y + 84, 120, 24, "Variance:", 2)
    self.contents.draw_text(x - 33, y + 112, 120, 24, "Elemental Attack:")
    self.contents.draw_text(x - 33, y + 112 + 20, 120, 24, "Status Attack:", 2)
    self.contents.draw_text(x - 33, y + 112 + 40, 120, 24, "Status Removal:", 2)
    self.contents.draw_text(x - 33, y + 134 + 45, 120, 24, "Type:", 2)
    self.contents.draw_text(x - 33, y + 134 + 65, 120, 24, "Occasion:", 2)

#==============================================================================
#  Item Effect Location
#==============================================================================
   
    # Item Specifications
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94, y - 14, 64, 24, item_para, 2)
    self.contents.draw_text(x + 94 + 70, y - 14, 64, 24, " - ")
    self.contents.draw_text(x + 94 + 88, y - 14, 64, 24, item_parp + " Points")

    if $data_items[item_id].recover_hp_rate <= 0
      self.contents.font.color = Color.new(255, 128, 128, 255)
    elsif $data_items[item_id].recover_hp_rate >= 0
      self.contents.font.color = Color.new(128, 255, 128, 255)
    end
    self.contents.draw_text(x + 94, y, 64, 24, item_hpr + "%", 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94 + 70, y, 64, 24, " - ")
    if $data_items[item_id].recover_hp <= 0
      self.contents.font.color = Color.new(255, 128, 128, 255)
    elsif $data_items[item_id].recover_hp >= 0
      self.contents.font.color = Color.new(128, 255, 128, 255)
    end
    self.contents.draw_text(x + 94 + 88, y, 64, 24, item_hpt)
    self.contents.font.color = normal_color
    if $data_items[item_id].recover_sp_rate <= 0
      self.contents.font.color = Color.new(255, 128, 128, 255)
    elsif $data_items[item_id].recover_sp_rate >= 0
      self.contents.font.color = Color.new(128, 255, 128, 255)
    end
    self.contents.draw_text(x + 94, y + 14, 64, 24, item_spr + "%", 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94 + 70, y + 14, 64, 24, " - ")
    if $data_items[item_id].recover_sp <= 0
      self.contents.font.color = Color.new(255, 128, 128, 255)
    elsif $data_items[item_id].recover_sp >= 0
      self.contents.font.color = Color.new(128, 255, 128, 255)
    end
    self.contents.draw_text(x + 94 + 88, y + 14, 64, 24, item_spt)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94, y + 28, 64, 24, item_acc + "%", 2)
    self.contents.draw_text(x + 94, y + 56, 64, 24, item_pdf, 2)
    self.contents.draw_text(x + 94, y + 70, 64, 24, item_mdf, 2)
    self.contents.draw_text(x + 94, y + 84, 64, 24, item_var, 2)
    self.contents.draw_text(x + 94, y + 112, 420, 24, " " + item_element)
    self.contents.font.color = Color.new(255, 128, 128, 255)
    self.contents.draw_text(x + 94, y + 112 + 20, 420, 24, " " + item_status)
    self.contents.font.color = Color.new(128, 255, 128, 255)
    self.contents.draw_text(x + 94, y + 112 + 40, 420, 24, " " + item_minstatus)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 94, y + 134 + 45, 100, 24, getitem_scope, 2)
    self.contents.draw_text(x + 94, y + 134 + 65, 100, 24, getitem_occasion, 2)
    self.contents.font.color = system_color
  end
 
end

class Window_PIESKILLHelp < Window_Base

  def update(help_text)
    self.contents.clear
    self.contents.font.name = PIE::PIEDEFAULTFONT
    self.contents.font.size = PIE::PIEDEFAULTSIZE
    # The default Database description of the items
    #self.contents.draw_text(0, 25, 300, 32, help_text)
    draw_text_multi(0, 32, 288, 22, help_text)
   
#==============================================================================
#  Variables used in Skill Help window
#==============================================================================
    # General
    x = 33
    y = 88
    skill_id = $currenthighlightedskill.id  
    skill = $currenthighlightedskill
    getskill_scope = $data_skills[skill_id].scope
    getskill_occasion = $data_skills[skill_id].occasion
   
    # Skill Name
    skill_name = $data_skills[skill_id].name
   
    # Skill Specifications
    skill_spc = $data_skills[skill_id].sp_cost.to_s
    skill_atk = $data_skills[skill_id].atk_f.to_s
    skill_eva = $data_skills[skill_id].eva_f.to_s
    skill_pwr = $data_skills[skill_id].power.to_s
    skill_str = $data_skills[skill_id].str_f.to_s
    skill_dex = $data_skills[skill_id].dex_f.to_s
    skill_agi = $data_skills[skill_id].agi_f.to_s
    skill_int = $data_skills[skill_id].int_f.to_s
    skill_acc = $data_skills[skill_id].hit.to_s
    skill_pdf = $data_skills[skill_id].pdef_f.to_s
    skill_mdf = $data_skills[skill_id].mdef_f.to_s
    skill_var = $data_skills[skill_id].variance.to_s
   
    # Skill Elemental and Status Specifications
    # Skill Element
    skill_element = ""
    flag = false
    for i in $data_skills[skill_id].element_set
      if flag
        skill_element += "/"
      end
      skill_element += $data_system.elements[i]
      flag = true
    end
    if skill_element == ""
      skill_element = "None"
    end
   
    # Status Attribute
    skill_status = ""
    flag = false
    for i in $data_skills[skill_id].plus_state_set
      if flag
        skill_status += "/"
      end
      skill_status += $data_states[i].name
      flag = true
    end
    if skill_status == ""
      skill_status = "None"
    end
   
    # Status Removal
    skill_minstatus = ""
    flag = false
    for i in $data_skills[skill_id].minus_state_set
      if flag
        skill_minstatus += "/"
      end
      skill_minstatus += $data_states[i].name
      flag = true
    end
    if skill_minstatus == ""
      skill_minstatus = "None"
    end
   
    # Misc. Specifications
      # Skill Scope
    case getskill_scope
      when 0; getskill_scope = "Nobody"
      when 1; getskill_scope = "One Enemy"
      when 2; getskill_scope = "All Enemies"
      when 3; getskill_scope = "One Ally"
      when 4; getskill_scope = "All Allies"
      when 5; getskill_scope = "One Dead Ally"
      when 6; getskill_scope = "All Dead Allies"
      when 7; getskill_scope = "User of the Skill"
    end
     
      # Item Occasion
    case getskill_occasion
      when 0; getskill_occasion = "Menu + Battle"
      when 1; getskill_occasion = "Only in Battle"
      when 2; getskill_occasion = "Only in Menu"
      when 3; getskill_occasion = "Not Useable"
    end
   
#==============================================================================
#  Skill Name and Icons Location
#==============================================================================

    # Skill Name
    self.contents.draw_text(33, 8, 256, 24, skill_name)
   
    # Skill Icon
    bitmap = RPG::Cache.icon($data_skills[skill_id].icon_name)
    self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
   
    # Skill Specifications
    self.contents.font.size = PIE::PIEDEFAULTSIZE - 2 # Reduces fontsize
    self.contents.font.color = Color.new(255, 255, 0, 255)
    self.contents.draw_text(x - 33, y, 256, 24, $data_system.words.atk)
    self.contents.draw_text(x -33, y - 14, 256, 24, $data_system.words.sp + " Costs")
    self.contents.font.color = system_color
    self.contents.draw_text(x - 33, y + 28, 256, 24, $data_system.words.str)
    self.contents.draw_text(x - 33, y + 42, 256, 24, $data_system.words.dex)
    self.contents.draw_text(x - 33, y + 56, 256, 24, $data_system.words.agi)
    self.contents.draw_text(x - 33, y + 70, 256, 24, $data_system.words.int)
    self.contents.font.color = Color.new(255, 255, 255, 128)
    if $data_skills[skill_id].power >= 0
      self.contents.draw_text(x - 33 , y + 130, 256, 24, "Power")
    elsif $data_skills[skill_id].power <= 0
      self.contents.draw_text(x - 33 , y + 130, 256, 24, "Heal Power")
    end
    self.contents.draw_text(x - 33, y + 144, 256, 24, "Accuracy")
    self.contents.draw_text(x - 33, y + 158, 256, 24, "Variance")
    self.contents.font.color = system_color
    self.contents.draw_text(x - 33, y + 84, 256, 24, $data_system.words.pdef)
    self.contents.draw_text(x - 33, y + 98, 256, 24, $data_system.words.mdef)
    self.contents.draw_text(x + 140, y + 23, 256, 24, "Elemental Attack:")
    self.contents.draw_text(x + 140, y + 23 + 32, 256, 24, "Status Attack:")
    self.contents.draw_text(x + 140, y + 23 + 32 + 32, 256, 24, "Status Removal:")
    self.contents.font.color = system_color
    self.contents.draw_text(0 - 33, y + 158 + 24 , 100, 24, "Type:", 2)
    self.contents.draw_text(0 - 33, y + 158 + 40, 100, 24, "Occasion:", 2)
 
#==============================================================================
#  Skill Effect Location
#==============================================================================
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 41, y, 64, 24, skill_atk, 2)
    self.contents.draw_text(x + 41, y - 14, 64, 24, skill_spc, 2)
    self.contents.draw_text(x + 41, y + 28, 64, 24, skill_str, 2)
    self.contents.draw_text(x + 41, y + 42, 64, 24, skill_dex, 2)
    self.contents.draw_text(x + 41, y + 56, 64, 24, skill_agi, 2)
    self.contents.draw_text(x + 41, y + 70, 64, 24, skill_int, 2)
    if $data_skills[skill_id].power >= 0
      self.contents.draw_text(x - 33 + 74, y + 130, 64, 24, skill_pwr, 2)
    elsif $data_skills[skill_id].power <= 0
      skill_pwr = $data_skills[skill_id].power * -1
      self.contents.font.color = Color.new(128, 255, 128, 255)
      self.contents.draw_text(x - 33 + 74, y + 130, 64, 24, skill_pwr.to_s, 2)
      self.contents.font.color = normal_color
    end
    self.contents.draw_text(x - 33 + 74, y + 144, 64, 24, skill_acc, 2)
    self.contents.draw_text(x - 33 + 74, y + 158, 64, 24, skill_var, 2)
    self.contents.draw_text(x + 41, y + 84, 64, 24, skill_pdf, 2)
    self.contents.draw_text(x + 41, y + 98, 64, 24, skill_mdf, 2)
    self.contents.draw_text(x + 140, y + 37, 420, 24, " " + skill_element, 0)
    self.contents.font.color = Color.new(255, 128, 128, 255)
    self.contents.draw_text(x + 140, y + 37 + 32, 420, 24, " " + skill_status, 0)
    self.contents.font.color = Color.new(128, 255, 128, 255)
    self.contents.draw_text(x + 140, y + 37 + 64, 420, 24, " " + skill_minstatus, 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(0 + 116, y + 158 + 24, 250, 24, getskill_scope, 0)
    self.contents.draw_text(0 + 116 ,y + 158 + 40, 250, 24, getskill_occasion, 0)
    # Resets font size.
    self.contents.font.size = PIE::PIEDEFAULTSIZE
  end

end


class Window_PIEHelp < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 320, 341)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #  text  : text string displayed in window
  #  align : alignment (0..flush left, 1..center, 2..flush right)
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    # If at least one part of text and alignment differ from last time
    if text != @text or align != @align
      # Redraw text
      self.contents.clear
      self.contents.font.name = PIE::PIEDEFAULTFONT
      self.contents.font.size = PIE::PIEDEFAULTSIZE
      self.contents.font.color = normal_color
      #self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
      draw_text_multi(4, 0, self.width - 40, 22, text)
      @text = text
      @align = align
      @actor = nil
    end
    self.visible = true
  end
 
end
 

Iapetos

Warper
Member
Joined
Jul 3, 2018
Messages
3
Reaction score
0
First Language
German
Primarily Uses
RMXP
This exactly what I was hoping for, thank you a thousand times. :)
I was a bit shocked when I saw the amount of code - and then again when I realised how quickly you came up with a perfect solution.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
Well it's a large amount because the original code isn't easy to change by using "aliasing" which is how most scripters would normally do something like this. So, a lot of the code is just copy/pasted from the original. I also wrote a multi-line text thing for my own quest script (a long time ago) so I was able to reuse that to achieve what you wanted.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,377
Reaction score
8,536
First Language
English
Primarily Uses
RMMV

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top