KModsYea ACE

KModsYea ACE

by Kyonides


I DO HATE to modify other people's scripts so don't expect me to do this often.​

Introduction

Too tired to explain it to the sole multi-tails forumer that might ever use it. The forumer already knows what's it is all about.

The Script Mod

Ruby:
# * KModsYea ACE * #
#   by Kyonides
#   Date: 2023-07-09

# Visible Stats Modifications for Yanfly Engine Ace Scripts
# - Item Menu, Shop Options, Party System, Equip Engine

module KModsYea
  module Params
    SHOW_STATS = [:atk, :def, :agi]
    STATS = [:hp, :mp, :atk, :def, :mat, :mdf, :agi, :luk]
    extend self
    attr_reader :show_params
    def process_params
      show_stats = [:hp, :mp] + SHOW_STATS
      @show_params = show_stats.map{|sym| STATS.index(sym) }
    end
    process_params
  end
end

class Window_ItemStatus
  def draw_item_stats
    return if @item.class == RPG::Item
    dx = 96
    dy = 0
    dw = (contents.width - 96) / 2
    show_params = KModsYea::Params.show_params
    8.times do |i|
      next unless show_params.include?(i)
      draw_equip_param(i, dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
end

class Window_ShopData
  def draw_item_stats
    return if @item.class == RPG::Item
    dx = 96
    dy = 0
    dw = (contents.width - 96) / 2
    show_params = KModsYea::Params.show_params
    8.times do |i|
      next unless show_params.include?(i)
      draw_equip_param(i, dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
end

class Window_PartyStatus
  def get_param(stat)
    case stat
    when :atk
      [Vocab::param(2), @temp_actor.atk.group]
    when :def
      [Vocab::param(3), @temp_actor.def.group]
    when :mat
      [Vocab::param(4), @temp_actor.mat.group]
    when :mdf
      [Vocab::param(5), @temp_actor.mdf.group]
    when :agi
      [Vocab::param(6), @temp_actor.agi.group]
    when :luk
      [Vocab::param(7), @temp_actor.luk.group]
    else
      []
    end
  end

  def draw_actor_parameters(actor, dx, dy)
    dw = contents.width/2 - 4
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.font.size = YEA::PARTY::STAT_FONT_SIZE
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    cx = 4
    @temp_actor = actor
    for stat in KModsYea::Params::SHOW_STATS
      param, value = get_param(stat)
      next unless param
      contents.fill_rect(rect, colour)
      change_color(system_color)
      draw_text(rect.x + cx, rect.y, rect.width-cx*2, line_height, param, 0)
      change_color(normal_color)
      draw_text(rect.x + cx, rect.y, rect.width-cx*2, line_height, value, 2)
      rect.y += line_height
    end
    @temp_actor = nil
    reset_font_settings
  end
end

class Window_EquipStatus
  def refresh
    contents.clear
    stats = KModsYea::Params.show_params
    stats.each_with_index {|param, n| draw_item(0, line_height * n, param) }
  end
end

Terms & Conditions

Free for use in any game.
I just modified other people's code and added a minium of original code so credits are optional here.
Not taking mod requests.
That's it!
Small Update​

Due to the not very anonymous report of some forumer with multiple tails regarding a missing feature in the EquipStatus window, I have revisited my code and updated it to make sure it will only displayed the desired stats and nothing else.

Original thread: https://forums.rpgmakerweb.com/threads/kmodsyea-ace.158996/