じ☆ve冰风 发表于 6 天前

Improve Custom Status Window

Improved Custom Status Window v1.1​

Author: Flixbeat​

Introduction

So I decided to name this script as Improved Custom Status Window, yes.. just another status window with a twist. 

Objective of this script

The main objective of this script is to allow the game creator to modify the terms that are being displayed on the screen without worrying about the terms that are indicated in the Terms database, it also allows you to change the colors of some texts and the hp/mp gauge as well. There are also new added stats to display, the EVA(Evasion), CRI(Critical Rate), HTR(Hit Rate). It also allows you to write a short biography for the actors.

Compatibility Issues
None so far

Installation
Copy the whole script and paste it above ▼ Main Process and be sure that you have the new IconSet.png place it in 'System' Folder if you will do it locally, overwrite the file.

IconSet

http://imageshack.us/a/img20/9314/iconsetb.png

Features

1) Texts for displaying name,class,stats,etc... can be changed.
2) Colors of some texts, hp/mp gauge, divider can be changed.
3) Character sprite is also displayed
4) New added stat to display EVA(Evation), CRI(Critical Rate), HTR(Hit Rate).
5) Stats, experince info has icons.
6) Ability to create a short biography for an actor.
7) Status window has been divided into 3 parts for a more organized looks.
I) Name,class,exp info,character sprite,character face
II) Status and Equipments
III) Short Biography
8) Doesn't rely on terms indicated in the database, CREATE IT ON YOUR OWN 
 

Release & Updates


Updates:
- July 26: Changed bio array to hash (v1.1)

> 1st Release: July 24



Screenshot



http://64.19.142.12/s13.postimg.org/ynv78ahyv/Untitled.jpg

Script v1.1

Spoiler# ----------------------------------------------------------------------------# This script is only exclusive for RPG MAKER VX## Script: Improved Custom Status Window v1.1 (Plug and Play)# Author: Flixbeat## Description: An improved window status that allow the game creator to# customize the terms displayed on the window status.## Compatibility issues: none so far## Installation: Copy the whole script and paste it above ▼ Main Process# and be sure that you have the new IconSet.png place it in 'System' Folder# if you will do it localy, overwrite the file.## Features:# 1) Texts for displaying name,class,stats,etc... can be changed.# 2) Colors of some texts, hp/mp gauge, divider can be changed.# 3) Character sprite is also displayed# 4) New added stat to display EVA(Evation), CRI(Critical Rate), HTR(Hit Rate).# 5) Stats, experince info has icons.# 6) Ability to create a short biography for an actor.# 7) Status window has been divided into 3 parts for a more organized looks.#    I) Name,class,exp info,character sprite,character face#    II) Status and Equipments#    III) Short Biography# 8) Doesn't rely on terms indicated in the database, CREATE IT ON YOUR OWN ## Release:# 1st Release: July 24## Updates:# July 26: Changed bio array to hash# ----------------------------------------------------------------------------# ----------------------------------------------------------------------------# * Start customization point# ----------------------------------------------------------------------------module Text    LEVEL_TEXT = "Level" # LevelNAME_TEXT = "Name" # NameCLASS_TEXT = "Job" # JobHP_TEXT = "HP" # HPMP_TEXT = "MP" # MPCURRENT_EXP_TEXT = "Current Exp" # Current ExpTO_NEXT_LVL_EXP_TEXT = "To Next Level" # To Next LevelATK_TEXT = "ATK" # AttackDEF_TEXT = "DEF" # DefenceAGI_TEXT = "AGI" # AgilitySPI_TEXT = "INT" # IntelligenceEVA_TEXT = "EVA" # Evation RateCRI_TEXT = "CRI" # Critacal RateHIT_TEXT = "HTR" # Hit Rate    STATS_TEXT = "Stats" # Stats TextEQ_TEXT = "Equipment" # Equipment Text    BIO_TEXT = "Short Bio" # Biography Textend# You can add more information for the other actors# Note that you should write a short info here, a long bio would# result out of bouds info.# syntax : actor_id => biomodule Bio    INFO = {    1=> "An idiot who loves nothing but to eat and slack around.",2=> "She loves eating apples, but she won't able to poop it out.",3=> "A prideful creature like H_S, HE KNOWS EVERYTHING!",4=> "She may look cute and nice, but she's doesn't take a bath. (eeww!)",}   end# This is the icon section.module Icons    ATK_ICON = 2 # 2 (Default - Sword)DEF_ICON = 52 # 52 (Default - Shield)AGI_ICON = 48 # 48 (Default - Boots)SPI_ICON = 21 # 21 (Default - Staff)EVA_ICON = 374 # 374 (Default - Dashing)CRI_ICON = 361 # 361 (Default - Blow)HIT_ICON = 489 # 489 (Default - Sword Impact)    CUR_EXP_ICON = 62 # 62 (Default - Ribbon)TO_NEXT_LVL_ICON = 63 # 63 (Default - Ribbon going right)end# Defining colors are in RGB(Red, Green, Blue) format# The higher the value, the higher the intensity of the color# Parameters (Red,Green,Blue)# * Basic Colors# (255,255,255) - White# (0,0,0) - Black# (255,0,0) - Red# (0,255,0) - Green# (0,0,255) - Blue# Got it? Good
module Colors# Parameter : Color.new(R,G,    # This will gradient fill the gauge by the color specified# GC = Gauge ColorHP_GC1 = Color.new(155,0,0)HP_GC2 = Color.new(255,0,0)MP_GC1 = Color.new(0,0,155)MP_GC2 = Color.new(0,0,255)    # Upper Divider Color (Horizontal)DIV1_COLOR = Color.new(255,255,255)# Middle Divider Color (Vertical)DIV2_COLOR = Color.new(255,255,255)# Lower Divider Color (Horizontal)DIV3_COLOR= Color.new(255,255,255)# Stats text colorSTATS_TEXT_COLOR = Color.new(255,255,0)# Equipment text colorEQ_TEXT_COLOR = Color.new(255,255,0)# Biography text colorBIO_TEXT_COLOR = Color.new(255,255,0)end# ----------------------------------------------------------------------------# * End of customization point# ----------------------------------------------------------------------------class Window_Status < Window_Basedef initialize(actor_index)    @actor = actor_index   super(0, 0, 544, 416)   self.draw_actor_info   end   def draw_gauge(actor_id,type)    @hp = actor_id.hp    @mp = actor_id.mp    @max_hp = actor_id.base_maxhp    @max_mp = actor_id.base_maxmp      if @hp == 1 then @hp = 2 end    hp_gauge_width = 220 * @hp / @max_hp    mp_gauge_width = 220 * @mp / @max_mp      hp_gauge = Bitmap.new(hp_gauge_width.to_i,20)    mp_gauge = Bitmap.new(mp_gauge_width.to_i,20)    hp_gauge_rect = Rect.new(0,0,hp_gauge.width,hp_gauge.height)    mp_gauge_rect = Rect.new(0,0,mp_gauge.width,mp_gauge.height)    if type == "hp"      color1 = Colors::HP_GC1      color2 = Colors::HP_GC2    elsif type == "mp"      color1 = Colors::MP_GC1      color2 = Colors::MP_GC2    end    hp_gauge.gradient_fill_rect(hp_gauge_rect,color1,color2)    mp_gauge.gradient_fill_rect(mp_gauge_rect,color1,color2)    if type == "hp"      self.contents.blt(300,55,hp_gauge,hp_gauge_rect,255)    elsif type == "mp"      self.contents.blt(300,78,mp_gauge,mp_gauge_rect,255)    endend       def draw_divider(div)    if div == "horizontal"      divider = Bitmap.new(542,2)      divider_rect = Rect.new(0,0,divider.width,divider.height)      divider.fill_rect(divider_rect,Colors:
IV1_COLOR)      self.contents.blt(1,110,divider,divider_rect,255)    elsif div == "vertical"      divider = Bitmap.new(2,190)      divider_rect = Rect.new(0,0,divider.width,divider.height)      divider.fill_rect(divider_rect,Colors:
IV2_COLOR)      self.contents.blt(150,127,divider,divider_rect,255)    elsif div == "horz_bottom"      divider = Bitmap.new(542,2)      divider_rect = Rect.new(0,0,divider.width,divider.height)      divider.fill_rect(divider_rect,Colors:
IV3_COLOR)      self.contents.blt(1,330,divider,divider_rect,255)    endenddef draw_item_icon_and_name(actor_index,x,y)    for i in 0..4      item = actor_index.equips      if item == nil      # kill the prideful creature      else         self.draw_icon(item.icon_index, x, y, enabled = true)      self.contents.draw_text(x+30,y,self.width,WLH,item.name)      end      y+=24   end       end    def draw_bio(actor_index)    self.contents.draw_text(5,360,self.width,WLH,Bio::INFO)end    def draw_actor_info      # ------------------------------------------------------------------------    # * CHARACTER INFO    # ------------------------------------------------------------------------      self.contents.clear    self.draw_face(@actor.face_name, @actor.face_index, 0, 0, size = 96)    self.draw_character(@actor.character_name,@actor.character_index,124,35)    self.contents.draw_text(148,5,self.width,WLH,Text::LEVEL_TEXT+": "+@actor.level.to_s)    self.draw_actor_state(@actor, 148, 29, width = 96)    self.contents.draw_text(115,51,self.width,WLH,Text::NAME_TEXT+": "+@actor.name)    self.contents.draw_text(115,75,self.width,WLH,Text::CLASS_TEXT+": "+@actor.class.name)    self.draw_gauge(@actor,"hp")    self.draw_gauge(@actor,"mp")    self.contents.draw_text(300,52,self.width,WLH, Text::HP_TEXT + ": " +    @actor.hp.to_s + " / " +    @actor.base_maxhp.to_s)    self.contents.draw_text(300,50+WLH,self.width,WLH, Text::MP_TEXT + ": " +    @actor.mp.to_s + " / " +    @actor.base_maxmp.to_s)      # ------------------------------------------------------------------------    # * EXPERIENCE INFO    # ------------------------------------------------------------------------      self.draw_icon(Icons::CUR_EXP_ICON,300,0)    self.draw_icon(Icons::TO_NEXT_LVL_ICON,300,26)      self.contents.draw_text(324,0,self.width,WLH,Text::CURRENT_EXP_TEXT+": "+@actor.exp_s.to_s)    self.contents.draw_text(324,26,self.width,WLH,Text::TO_NEXT_LVL_EXP_TEXT+": "+@actor.next_rest_exp_s.to_s)            self.draw_divider("horizontal")            # ------------------------------------------------------------------------    # * STATUS    # ------------------------------------------------------------------------      self.contents.font.color = Colors::STATS_TEXT_COLOR    self.contents.draw_text(5,120,self.width,WLH,Text::STATS_TEXT)    self.contents.font.color = normal_color      self.draw_icon(Icons::ATK_ICON,5,150)    self.contents.draw_text(35,150,self.width,WLH,Text::ATK_TEXT+": "+@actor.base_atk.to_s)      self.draw_icon(Icons:
EF_ICON,5,174)    self.contents.draw_text(35,174,self.width,WLH,Text:
EF_TEXT+": "+@actor.base_def.to_s)      self.draw_icon(Icons::AGI_ICON,5,198)    self.contents.draw_text(35,198,self.width,WLH,Text::AGI_TEXT+": "+@actor.base_agi.to_s)      self.draw_icon(Icons::SPI_ICON,5,222)    self.contents.draw_text(35,222,self.width,WLH,Text::SPI_TEXT+": "+@actor.base_spi.to_s)      self.draw_icon(Icons::EVA_ICON,5,246)    self.contents.draw_text(35,246,self.width,WLH,Text::EVA_TEXT+": "+@actor.agi.to_s)    self.draw_icon(Icons::CRI_ICON,5,270)    self.contents.draw_text(35,270,self.width,WLH,Text::CRI_TEXT+": "+@actor.cri.to_s)    self.draw_icon(Icons::HIT_ICON,5,294)    self.contents.draw_text(35,294,self.width,WLH,Text::HIT_TEXT+": "+@actor.hit.to_s)      self.draw_divider("vertical")      # ------------------------------------------------------------------------    # * EQUIPMENT    # ------------------------------------------------------------------------      self.contents.font.color = Colors::EQ_TEXT_COLOR    self.contents.draw_text(170,120,self.width,WLH,Text::EQ_TEXT)    self.contents.font.color = normal_color    self.draw_item_icon_and_name(@actor,170,150)      self.draw_divider("horz_bottom")            # ------------------------------------------------------------------------    # * BIO    # ------------------------------------------------------------------------      self.contents.font.color = Colors::BIO_TEXT_COLOR    self.contents.draw_text(5,336,self.width,WLH,Text::BIO_TEXT)    self.contents.font.color = normal_color      self.draw_bio(@actor.id)      end   end





If you find some bugs or incompatibility issues, you can just pm me or just add a reply on this thread. 


本贴来自国际rpgmaker官方论坛作者:flixbeat处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/improve-custom-status-window.16120/
页: [1]
查看完整版本: Improve Custom Status Window