Project1
标题:
如何取消游戏的技能、血量、魔法、级别、装备等内容
[打印本页]
作者:
KIDS
时间:
2011-3-27 16:30
提示:
作者被禁止或删除 内容自动屏蔽
作者:
scrap
时间:
2011-3-27 17:45
提示:
作者被禁止或删除 内容自动屏蔽
作者:
wzhjii0
时间:
2011-3-27 19:14
如果你纯粹是想要删了几个项的话,看到Scene_Menu里面的26行,有S1-S7,删了前面几个
作者:
3202972
时间:
2011-3-27 19:58
提示:
作者被禁止或删除 内容自动屏蔽
作者:
猪衰衰
时间:
2011-3-27 21:29
血量、魔法、级别的话把Window_Base删几行就行了,
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_state(actor, x, y + WLH * 2)
end
end
#--------------------------------------------------------------------------
# ● 更新光标
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # 无光标
self.cursor_rect.empty
elsif @index < @item_max # 一般
self.cursor_rect.set(0, @index * 96, contents.width, 96)
elsif @index >= 100 # 使用本身
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else # 全体
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end
复制代码
作者:
猪衰衰马甲
时间:
2011-3-27 21:35
接5L,还有一个忘发了.
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# 游戏中全部窗口的超级类。
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● 常量
#--------------------------------------------------------------------------
WLH = 24 # 窗口行高(Window Line Height)
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
# width : 窗口宽度
# height : 窗口高度
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super()
self.windowskin = Cache.system("Window")
self.x = x
self.y = y
self.width = width
self.height = height
self.z = 100
self.back_opacity = 200
self.openness = 255
create_contents
@opening = false
@closing = false
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
self.contents.dispose
super
end
#--------------------------------------------------------------------------
# ● 生成窗口内容
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
self.contents = Bitmap.new(width - 32, height - 32)
end
#--------------------------------------------------------------------------
# ● 更新画面
#--------------------------------------------------------------------------
def update
super
if @opening
self.openness += 48
@opening = false if self.openness == 255
elsif @closing
self.openness -= 48
@closing = false if self.openness == 0
end
end
#--------------------------------------------------------------------------
# ● 打开窗口
#--------------------------------------------------------------------------
def open
@opening = true if self.openness < 255
@closing = false
end
#--------------------------------------------------------------------------
# ● 关闭窗口
#--------------------------------------------------------------------------
def close
@closing = true if self.openness > 0
@opening = false
end
#--------------------------------------------------------------------------
# ● 获取文字颜色
# n : 文字颜色色号(0-31)
#--------------------------------------------------------------------------
def text_color(n)
x = 64 + (n % 8) * 8
y = 96 + (n / 8) * 8
return windowskin.get_pixel(x, y)
end
#--------------------------------------------------------------------------
# ● 获取一般文字颜色
#--------------------------------------------------------------------------
def normal_color
return text_color(0)
end
#--------------------------------------------------------------------------
# ● 获取系统文字颜色
#--------------------------------------------------------------------------
def system_color
return text_color(16)
end
#--------------------------------------------------------------------------
# ● 获取危机文字颜色
#--------------------------------------------------------------------------
def crisis_color
return text_color(17)
end
#--------------------------------------------------------------------------
# ● 获取战斗不能文字颜色
#--------------------------------------------------------------------------
def knockout_color
return text_color(18)
end
#--------------------------------------------------------------------------
# ● 获取变量条背景颜色
#--------------------------------------------------------------------------
def gauge_back_color
return text_color(19)
end
#--------------------------------------------------------------------------
# ● 获取装备画面能力值上升颜色
#--------------------------------------------------------------------------
def power_up_color
return text_color(24)
end
#--------------------------------------------------------------------------
# ● 获取装备画面能力值下降颜色
#--------------------------------------------------------------------------
def power_down_color
return text_color(25)
end
#--------------------------------------------------------------------------
# ● 会制图标
# icon_index : 图标号
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# enabled : 有效化标志,为 false 时则图标半透明化。
#--------------------------------------------------------------------------
def draw_icon(icon_index, x, y, enabled = true)
bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
end
#--------------------------------------------------------------------------
# ● 绘制头像
# face_name : 头像文件名
# face_index : 头像号码
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# size : 显示大小
#--------------------------------------------------------------------------
def draw_face(face_name, face_index, x, y, size = 96)
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2
rect.width = size
rect.height = size
self.contents.blt(x, y, bitmap, rect)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 绘制行走图
# character_name : 行走图文件名
# character_index : 行走图号码
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_character(character_name, character_index, x, y)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 绘制角色行走图
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y)
draw_character(actor.character_name, actor.character_index, x, y)
end
#--------------------------------------------------------------------------
# ● 绘制角色头像
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# size : 绘制大小
#--------------------------------------------------------------------------
def draw_actor_face(actor, x, y, size = 96)
draw_face(actor.face_name, actor.face_index, x, y, size)
end
#--------------------------------------------------------------------------
# ● 绘制角色名称
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.draw_text(x, y, 108, WLH, actor.name)
end
#--------------------------------------------------------------------------
# ● 绘制角色职业
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 108, WLH, actor.class.name)
end
#--------------------------------------------------------------------------
# ● 绘制角色状态
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标宽度
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 96)
count = 0
for state in actor.states
draw_icon(state.icon_index, x + 24 * count, y)
count += 1
break if (24 * count > width - 24)
end
end
#--------------------------------------------------------------------------
# ● 绘制角色能力值
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# type : 能力值类型(0-3)
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
when 1
parameter_name = Vocab::def
parameter_value = actor.def
when 2
parameter_name = Vocab::spi
parameter_value = actor.spi
when 3
parameter_name = Vocab::agi
parameter_value = actor.agi
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
end
#--------------------------------------------------------------------------
# ● 绘制物品
# item : 物品(技能、武器、防具也合用)
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# enabled : 有效化标志,为 false 时则物品半透明化。
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
#--------------------------------------------------------------------------
# ● 绘制金钱单位
# value : 数目
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标宽度
#--------------------------------------------------------------------------
def draw_currency_value(value, x, y, width)
cx = contents.text_size(Vocab::gold).width
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2)
end
end
复制代码
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# 显示状态画面、完全规格的状态窗口。
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 544, 416)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 128, 0)
draw_actor_face(@actor, 8, 32)
draw_basic_info(128, 32)
draw_parameters(32, 160)
draw_exp_info(288, 32)
draw_equipments(288, 160)
end
#--------------------------------------------------------------------------
# ● 绘制基础资料
# x : 绘制点 X 座标
# y : 绘制点 Y 座标
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_state(@actor, x, y + WLH * 1)
end
#--------------------------------------------------------------------------
# ● 绘制能力值
# x : 绘制点 X 座标
# y : 绘制点 Y 座标
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
end
#--------------------------------------------------------------------------
# ● 绘制经验值
# x : 绘制点 X 座标
# y : 绘制点 Y 座标
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2)
self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 2)
end
#--------------------------------------------------------------------------
# ● 绘制装备
# x : 绘制点 X 座标
# y : 绘制点 Y 座标
#--------------------------------------------------------------------------
def draw_equipments(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
for i in 0..4
draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
end
end
end
复制代码
作者:
KIDS
时间:
2011-3-29 13:07
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1