| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 33 |
| 经验 | |
| 最后登录 | 2025-11-26 |
| 在线时间 | 676 小时 |
- 梦石
- 0
- 星屑
- 3265
- 在线时间
- 676 小时
- 注册时间
- 2018-8-8
- 回帖
- 13
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 zxz0762@163.com 于 2021-9-8 11:35 编辑
VA区人气好像有点少,希望有大佬能帮忙。
单独运行其中一个脚本没问题,同时运行会卡图,FPS掉到4。
【高兼♂容】套装系统 class Game_Battler#Game_Actor
#--------------------------------------------------------------------------
# ● 实例变量
#--------------------------------------------------------------------------
attr_writer :equiprepeat # 重复的装备的数量
#--------------------------------------------------------------------------
# ○ 角色使用技能需要装备取得
#--------------------------------------------------------------------------
#p $game_actors[1].equiprepeat[装备ID]=>装备数量
def equiprepeat
@equiprepeat=[]
for i in @equips
if i.object!=nil
if i.object.is_a?(RPG::Weapon)
@equiprepeat.push([-i.object.id,@equips.select{|x|x.object.is_a?(RPG::Weapon)? x.object.id==i.object.id : nil}.size])
else
@equiprepeat.push([i.object.id,@equips.select{|x|x.object.is_a?(RPG::Armor)? x.object.id==i.object.id : nil}.size])
end
end
end
e=@equiprepeat.uniq;@equiprepeat={};e.each{|i|i[1]||=0;@equiprepeat[i[0]]=i[1]}
(-999..999).each{|i|@equiprepeat||=0}
return @equiprepeat
end
end
=begin
mhp 0 最大HP Maximum Hit Point mmp 1 最大MP Maximum Magic Point
atk 2 物理攻击 ATtacK power def 3 物理防御 DEFense power
mat 4 魔法攻击 Magic ATtack power mdf 5 魔法防御 Magic DeFense power
agi 6 敏 捷 值 AGIlity luk 7 幸 运 值 LUcK
=end
module Chd114 end
module Chd114::Equip#(武器ID为-1~-999,防具ID为1~999)
Suit={#套装类型={装备ID=>装备数量,装备ID=>装备数量}
1=>{64=>1,65=>1,66=>1},
2=>{63=>1,64=>1},
}
SuitEffect={#套装类型={部件数=>{属性ID=>属性效果,属性ID=>属性效果}}
1=>{2=>{0=>5.0},3=>{1=>5}},#5.0为基础能力的5倍,5为5
2=>{2=>{0=>505}},
}
end
(-999..999).each{|i|Chd114::Equip::Suit||={};Chd114::Equip::SuitEffect||={}}
class Game_Actor
alias_method :c4_suit, :param_plus
def param_plus(id)
old = c4_suit(id)
tt=0
Chd114::Equip::Suit.each{|k,v|
v.each{|k,v|
tt+=equiprepeat[k]
}
Chd114::Equip::SuitEffect[k].each{|k,v|
if tt>=k
v.each{|k,v|
if id==k
if v.to_s==v.to_i.to_s
old+=v
else
old+=((v+1)*100-100)*param_base(k)/100
end
end
}
end
}
}
old
end
end
碧轨地图信息#==============================================================================
# ■ 碧の軌跡っぽいステータス表示
# @version 0.13 12/01/07
# @author さば缶
#------------------------------------------------------------------------------
# マップ画面下にステータスが表示されます
#
# ■用意するもの
# Graphics\System の下に Actor_bg1 ~ Actor_bg3
# Graphics\Faces の下に 顔グラを50%に縮小したファイル "通常のファイル名_s"
# 例 Actor1.png → Actor1_s.png
# ※このファイルが存在しない場合、プログラムで縮小するため非常に荒くなります
#
#==============================================================================
module Saba
module KisekiStatus
# このスイッチがONの場合、ステータスを表示します
INVISIBLE_SWITCH = 211
# TPを表示する場合、true に設定します。
SHOW_TP = true
end
end
class Window_KisekiStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, Graphics.height-window_height+18, Graphics.width, window_height)
self.opacity = 0
self.visible = $game_switches[Saba::KisekiStatus::INVISIBLE_SWITCH]
refresh
end
def refresh
@last_hps = []
@last_mps = []
@last_tps = []
super
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
$game_party.battle_members.size
end
#--------------------------------------------------------------------------
# ● ウィンドウの高さを取得
#--------------------------------------------------------------------------
def window_height
item_height+32
end
#--------------------------------------------------------------------------
# ● 項目の高さを取得
#--------------------------------------------------------------------------
def item_height
52
end
#--------------------------------------------------------------------------
# ● 項目の幅を取得
#--------------------------------------------------------------------------
def item_width
return 70
end
#--------------------------------------------------------------------------
# ● 桁数の取得
#--------------------------------------------------------------------------
def col_max
return $game_party.battle_members.size
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.battle_members[index]
rect = item_rect(index)
bg_bitmap = Cache.system("Actor_bg1")
contents.blt(rect.x, rect.y, bg_bitmap, bg_bitmap.rect)
small_bitmap = Bitmap.new(48, 48)
begin
bitmap = Cache.face(actor.face_name + "_s")
rescue
end
if bitmap == nil
bitmap = Cache.face(actor.face_name)
face_rect = Rect.new(actor.face_index % 4 * 96, actor.face_index / 4 * 96, 96, 96)
small_bitmap.stretch_blt(Rect.new(0, 0, 48, 48), bitmap, face_rect)
else
small_bitmap.blt(0, 0, bitmap, Rect.new(actor.face_index % 4 * 48, actor.face_index / 4 * 48, 48, 48))
end
bitmap.dispose
clear_edge(small_bitmap)
contents.blt(rect.x+2, 2, small_bitmap, Rect.new(0, 0, 48, 48))
small_bitmap.dispose
if actor.dead?
bg_bitmap = Cache.system("Actor_bg1")
contents.blt(rect.x, rect.y, bg_bitmap, bg_bitmap.rect)
bg_bitmap = Cache.system("Actor_bg3")
else
bg_bitmap = Cache.system("Actor_bg2")
end
contents.blt(rect.x, rect.y, bg_bitmap, bg_bitmap.rect)
draw_gauge(rect.x + 47, rect.y+20, 50, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
draw_gauge(rect.x + 42, rect.y+24, 50, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
if Saba::KisekiStatus::SHOW_TP
draw_gauge(rect.x + 37, rect.y+28, 50, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
end
@last_hps.push(actor.hp_rate)
@last_mps.push(actor.mp_rate)
@last_tps.push(actor.tp_rate)
end
#--------------------------------------------------------------------------
# ● 顔画像の端を消します
#--------------------------------------------------------------------------
def clear_edge(bitmap)
22.times { |i|
bitmap.clear_rect(0, i, 22 - i, 1)
bitmap.clear_rect(26 + i, i, 22 - i, 1)
bitmap.clear_rect(0, i + 26, i, 1)
bitmap.clear_rect(48 - i, i + 26, i, 1)
}
end
#--------------------------------------------------------------------------
# ● ゲージの描画
# rate : 割合(1.0 で満タン)
# color1 : グラデーション 左端
# color2 : グラデーション 右端
#--------------------------------------------------------------------------
def draw_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x-2, gauge_y-1, width+4, 4, text_color(15))
contents.fill_rect(x-1, gauge_y-2, width+2, 6, text_color(15))
contents.fill_rect(x, gauge_y, width, 2, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, 2, color1, color2)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if $game_switches[Saba::KisekiStatus::INVISIBLE_SWITCH] == true &&
! $game_message.busy? && ! $game_message.visible
self.visible = true
else
self.visible = false
return
end
hps = []
mps = []
tps = []
for actor in $game_party.battle_members
hps.push(actor.hp_rate)
mps.push(actor.mp_rate)
tps.push(actor.tp_rate)
end
if @last_hps != hps || @last_mps != mps || @last_tps != tps
refresh
end
end
end
class Scene_Map
#--------------------------------------------------------------------------
# ● 全ウィンドウの作成
#--------------------------------------------------------------------------
alias saba_kiseki_status_create_all_windows create_all_windows
def create_all_windows
saba_kiseki_status_create_all_windows
@kiseki_status_window = Window_KisekiStatus.new
end
end |
|