じ☆ve冰风 发表于 2026-8-3 08:59:21

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
      
    when :def
      
    when :mat
      
    when :mdf
      
    when :agi
      
    when :luk
      
    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!


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