赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1890 |
最后登录 | 2016-3-9 |
在线时间 | 59 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 59 小时
- 注册时间
- 2013-1-11
- 帖子
- 24
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 ilovejel 于 2013-2-10 10:58 编辑
#******************************************************************************
#
# * 状态窗口
#
# --------------------------------------------------------------------------
# バージョン : 1.0.1
# 対 応 : RPGツクールVX Ace : RGSS3
# 制 作 者 : CACAO
# == 概 要 ==
#
# : 这是默认的状态。
#
# --------------------------------------------------------------------------
# == 注意事項 ==
#
# ※ 该脚本的操作、Custom Menu Base 是必要的。
# ※ 横1列のみの場合は左右に、それ以外は上下のみスクロールします。
#
#
#******************************************************************************
#==============================================================================
# ◆ 設定項目
#==============================================================================
module CAO::CM::Status
#--------------------------------------------------------------------------
# ◇ 窗的位置·尺寸
#--------------------------------------------------------------------------
WINDOW_X = 160 # x座標
WINDOW_Y = 0 # y座標
WINDOW_W = 480 # 横幅
WINDOW_H = 480 # 縦幅
#--------------------------------------------------------------------------
# ◇ 1角色的尺寸
#--------------------------------------------------------------------------
ITEM_W = 455
ITEM_H = 455
#--------------------------------------------------------------------------
# ◇ 横排列项目数量
#--------------------------------------------------------------------------
COLUMN_MAX = 1
#--------------------------------------------------------------------------
# ◇ 表示項目設定
#--------------------------------------------------------------------------
ITEM_PARAMS = []
ITEM_PARAMS << [:bust, 2, 2,]
ITEM_PARAMS << [:fill, 2, 2, 94, 94, 128, '!actor.battle_member?']
ITEM_PARAMS << [:name, 10, 10]
ITEM_PARAMS << [:nick, 10, 50]
ITEM_PARAMS << [:level, 10, 90]
ITEM_PARAMS << [:hp, 10,130]
ITEM_PARAMS << [:mp, 10,170]
ITEM_PARAMS << [:exp, 10,210, width = 124]
ITEM_PARAMS << [:param, 10,250, param_id = 7, width = 124]
ITEM_PARAMS << [:text, 10,290, text = "\\C[16]好人值\\C[0] \\V[12]"]
ITEM_PARAMS << [:text, 10,330, text = "\\C[16]所持金\\C[0] \\$G"]
ITEM_PARAMS << [:state, 10,370, 124]
#--------------------------------------------------------------------------
# ◇ 戦闘メンバーのみ表示
#--------------------------------------------------------------------------
::CAO::CM::BATTLER_ONLY = false
#--------------------------------------------------------------------------
# ◇ ウィンドウの可視状態
#--------------------------------------------------------------------------
VISIBLE_BACKWINDOW = true
end
#/////////////////////////////////////////////////////////////////////////////#
# #
# 下記のスクリプトを変更する必要はありません。 #
# #
#/////////////////////////////////////////////////////////////////////////////#
class Window_MenuStatus
include CAO::CM::Status
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(x, y)
super(WINDOW_X, WINDOW_Y, window_width, window_height)
self.opacity = VISIBLE_BACKWINDOW ? 255 : 0
@canvas = CAO::CM::Canvas.new(self)
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ○ 横に項目が並ぶときの空白の幅を取得
#--------------------------------------------------------------------------
def spacing
return 0
end
#--------------------------------------------------------------------------
# ○ ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
WINDOW_W
end
#--------------------------------------------------------------------------
# ○ ウィンドウ高さの取得
#--------------------------------------------------------------------------
def window_height
WINDOW_H
end
#--------------------------------------------------------------------------
# ○ ウィンドウ内容の幅を計算
#--------------------------------------------------------------------------
def contents_width
(item_width + spacing) * col_max - spacing
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 桁数の取得
#--------------------------------------------------------------------------
def col_max
return COLUMN_MAX
end
#--------------------------------------------------------------------------
# ○ 項目の幅を取得
#--------------------------------------------------------------------------
def item_width
ITEM_W
end
#--------------------------------------------------------------------------
# ○ 項目の高さを取得
#--------------------------------------------------------------------------
def item_height
ITEM_H
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
draw_item_background(index)
actor = $game_party.members[index]
rect = item_rect(index)
@canvas.draw_actor_items(actor, rect.x, rect.y, ITEM_PARAMS)
end
#--------------------------------------------------------------------------
# ● カーソルを下に移動
#--------------------------------------------------------------------------
def cursor_down(wrap = false)
if index < item_max - col_max || (wrap && col_max == 1)
select((index + col_max) % item_max)
elsif col_max != 1 && index < (item_max.to_f/col_max).ceil*col_max-col_max
select(item_max - 1)
end
end
end
class Scene_Menu
#--------------------------------------------------------------------------
# ● ステータスウィンドウの作成
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(0, 0)
end
#--------------------------------------------------------------------------
# ● ステータスウィンドウの更新
#--------------------------------------------------------------------------
def update_status_window
@status_window.unselect unless @status_window.active
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
alias _cao_cm_status_check_refresh_window check_refresh_window
def check_refresh_window(command)
_cao_cm_status_check_refresh_window(command)
@status_window.refresh if command.refresh.include?(:status)
end
end
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :in_menu # メニュー中フラグ
#--------------------------------------------------------------------------
# ●
#--------------------------------------------------------------------------
def in_menu
return true if SceneManager.scene_is?(Scene_Menu)
return SceneManager.instance_variable_get(:@stack).any? do |obj|
obj.is_a?(Scene_Menu)
end
end
#--------------------------------------------------------------------------
# ○ メンバーの取得
#--------------------------------------------------------------------------
def members
return battle_members if in_battle
return battle_members if CAO::CM::BATTLER_ONLY && in_menu
return all_members
end
end
class Scene_ItemBase < Scene_MenuBase
#--------------------------------------------------------------------------
# ○ サブウィンドウの表示
#--------------------------------------------------------------------------
def show_sub_window(window)
window.x = (Graphics.width - window.width) / 2
window.y = (Graphics.height - window.height) / 2
window.z = @viewport.z# + 1
@last_viewport_color = @viewport.color.dup
@viewport.color.set(16, 16, 16, 128)
window.show.activate
end
#--------------------------------------------------------------------------
# ○ サブウィンドウの非表示
#--------------------------------------------------------------------------
def hide_sub_window(window)
@viewport.color.set(@last_viewport_color) if @last_viewport_color
window.hide.deactivate
activate_item_window
end
end
= =上面的好人值要怎么设置增减,拜求各位好人指点,我完全不懂了,顺便祝各位好人蛇年吉祥,万事如意 |
|