Project1
标题:
关于多种buff/debuff的状态显示
[打印本页]
作者:
woyaozhuce
时间:
2012-6-16 20:02
标题:
关于多种buff/debuff的状态显示
‘‘──woyaozhuce于2012-6-16 20:03补充以下内容:
角色和敌人能显示很多的状态,不限制只显示优先级的状态。
{:5_159:}
’’ dsu_plus_rewardpost_czw
作者:
明特·布兰马修
时间:
2012-6-16 20:05
在战斗中还是在平常?
这里有个脚本拿去参考参考
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# 多重状态 Ver. 1.1 by Claimh
#------------------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# 生成状态文字
#--------------------------------------------------------------------------
def make_battler_state_text_over3(battler, width, need_normal)
brackets_width = self.contents.text_size("[]").width
text = ""
text0 = ""
ret_text = ["",""]
for i in battler.states
if $data_states[i].rating >= 1
if text == ""
text = $data_states[i].name
else
new_text = text + "/" + $data_states[i].name
text_width = self.contents.text_size(new_text).width
if text_width > width - brackets_width
text0 = new_text
text = ""
new_text = ""
text_width = 0
else
text = new_text
end
end
end
end
if text == "" and text0 == ""
ret_text = ["[正常]", ""]
elsif text0 == ""
ret_text[0] = "[" + text + "]"
ret_text[1] = ""
else
ret_text[0] = "[" + text0 + "]"
if text != ""
ret_text[1] = "[" + text + "]"
else
ret_text[1] = ""
end
end
return ret_text
end
#--------------------------------------------------------------------------
# 描绘角色状态
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text_over3(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
if text[1] == ""
self.contents.draw_text(x-5, y, width+5, 32, text[0])
else
self.contents.font.size = 20
self.contents.draw_text(x-5, y - 15 , width+5, 32, text[0])
self.contents.draw_text(x-5, y + 8, width+5, 32, text[1])
end
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
作者:
kangxi0109
时间:
2012-6-16 20:50
图标式显示状态:
搜狗浏览器截图(5).jpg
(193.81 KB, 下载次数: 0)
下载附件
保存到相册
2012-6-16 20:50 上传
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# 图标显示状态 v1.1
# By 叶子
# 9-30-2007 v1.1
#==============================================================================
# 脚本功能:
# 实现战斗中和菜单中用图标显示状态,代替原来的文字显示。
# 默认最多同时显示5个状态
#------------------------------------------------------------------------------
# 设置方法:
# 一个状态对应的图标文件名为“状态的图片名字”
# 例如眩晕状态,那么它的图标就是“Status\眩晕.png”或“Status\眩晕.jpg”
# 如果找不到对应的文件,会报错 ◎_◎
#==============================================================================
ICON_STATE_IDS = [1,5,8]
# 要20到50号状态带图标:ICON_STATE_IDS = 20..50
ICON_STATE_IDS = 1..134
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# 游戏中全部窗口的超级类。
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● 描绘状态
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标的宽
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
state_size = 0
for state in actor.states
# 图标数量超出宽度就中断循环
if state_size >= width / 15 #跟图标显示的数量有关,数值越大显示越少
break
end
# 此状态不带图标就跳过
if !ICON_STATE_IDS.include?(state)
next
end
bitmap = Bitmap.new("Graphics/Status/" + $data_states[state].name + ".png")
if actor.states_turn[state] >= $data_states[state].hold_turn/2
opacity = 255
else
opacity = 100
end
# 这里的图标大小默认是24x24,要改就改下面那个Rect.new(0, 0, 24, 24)
self.contents.blt(x +28 * state_size , y , bitmap, Rect.new(0, 0, 24, 36), opacity)
state_size += 1
end
end
end
#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
# 特技及物品的说明、角色的状态显示的窗口。
#==============================================================================
#放在 窗口·帮助窗口 之后。
class Window_Help < Window_Base
#--------------------------------------------------------------------------
# ● 设置敌人
# enemy : 要显示名字和状态的敌人
#--------------------------------------------------------------------------
def set_enemy(enemy)
@text = ""
# 描绘敌人名字
set_text(enemy.name, 1)
# 描绘状态图标
state_size = 0
for state in enemy.states
# 图标数量超出宽度就中断循环
if state_size >= 240
break
end
# 此状态不带图标就跳过
if !ICON_STATE_IDS.include?(state)
next
end
bitmap = Bitmap.new("Graphics/Status/" + $data_states[state].name + ".png")
if enemy.states_turn[state] >= $data_states[state].hold_turn/2
opacity = 255
else
opacity = 100
end
self.contents.blt(70 + 24 * state_size, 0, bitmap, Rect.new(0, 3, 24, 36), opacity)
state_size += 1
end
end
end
class Game_Battler
attr_reader :states_turn # 声明状态剩余回合
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
# 欢迎访问www.66RPG.com
# 梦想世界,在你手中
#==============================================================================
复制代码
作者:
woyaozhuce
时间:
2012-6-16 20:59
战斗中的。
‘‘──woyaozhuce于2012-6-16 21:01补充以下内容:
能看一下你的装备栏界面么,10装备栏的排列。
’’
‘‘──woyaozhuce于2012-6-16 21:04补充以下内容:
主属性怎么突破99呀。
’’
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1