赞 | 0 |
VIP | 7 |
好人卡 | 0 |
积分 | 1 |
经验 | 3983 |
最后登录 | 2013-2-27 |
在线时间 | 72 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 72 小时
- 注册时间
- 2010-10-18
- 帖子
- 104
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
先放下效果截图
不使用背景图
使用背景图
用到了KGC的两个脚本
拡張ステータス画面(VX専用)
ビットマップ拡張(XP/VX共用)
不过已经经过修改
只简化保留我的脚本会调用到的部份
其实KGC本身的status扩张就够用了
只是应该有人和我一样想使用别的status脚本
又想使用KGC的脚本
那个属性、状态耐性图真的不错看
所以就视自己需要带走吧
使用和设定法大多设定在脚本中了- module Miluko
- #设定资料以角色在数据库中的编号为主 例如拉尔夫在数据库中是1号角色
- #那么1就代表是拉尔夫的资料 2就是吴莉嘉 依此类推
- #若是下面任一list中无该角色的资料 就不会显示
- #例如拉尔夫的BIRTHDAY未设定 则窗口就不会显示拉尔夫的生日
- NAME = {
- 1 => "拉尔夫",
- }
- RACE = {
- 1 => "人类",
- }
- AGE = {
- 1 => "21",
- }
- BIRTHDAY = {
- }
- INTEREST = {
- 1 => "打怪",
- }
- LIKE = {
- 1 => "装备",
- }
- HATE = {
- 1 => "重来",
- }
- #STORY一行大约9字 再多有可能会盖到人物图 不过可视人物图宽度自行调整字数
- #最多四行 避免盖到属性和状态抗性图
- #以\n为分行符号
- STORY = {
- 1 => "目标是成为有史以来最\n伟大的勇者,让後世的\n吟游诗人都传唱他的事\n迹。",
- }
-
- #人物图可自行设定位置
- #人物图档命名规则为"角色脸图名称+角色於脸图中的index"
- #例如使用脸图 Actor1 的0号脸(也就是拉尔夫的脸图)
- #半身图档的命名就要为Actor1_0
- PIC_X = 350
- PIC_Y = 50
-
- #窗口的大标名称
- TITLE_NAME = "人物背景资料"
- #设定字体的大小 预设为18
- DATA_FONT_SIZE = 18
- #设定想使用的字型
- DATA_FONT_NAME = "SimHei"
- #设定文字颜色
- COLOR = Color.new(255,120,255) #大标题"人物背景资料"的颜色
- COLOR1 = Color.new(120,120,255) #name、race等小标题颜色
- COLOR2 = Color.new(255,255,255) #内文颜色
-
- #设定是否使用背景图片 预设为一般视窗 不使用背景图
- # 0:不使用 1:使用
- USE_BG_PIC = 0
- #当USE_BG_PIC设为1时 会自Graphics/Pictures中取出档名为BG_PIC的图做为背景图
- BG_PIC = "MenuBack"
- end
- class Window_Back_Data < Window_Base
- def initialize(actor)
- super(0,0,544,416)
- @actor = actor
- refresh
- end
-
- def refresh
- self.contents.font.name = Miluko::DATA_FONT_NAME
- self.contents.font.color = Miluko::COLOR
- self.contents.draw_text(0,-10,Miluko::TITLE_NAME.size*11,70,Miluko::TITLE_NAME)
- self.contents.font.name = Miluko::DATA_FONT_NAME
- temp_y = 50
- draw_actor_name(@actor,0,temp_y)
- i = 0
- if Miluko::RACE[@actor.id] != nil
- draw_actor_race(@actor,120,temp_y)
- i+=1
- end
- if Miluko::STORY[@actor.id] != nil
- draw_actor_story(@actor,130,temp_y+i*20)
- end
- i = 1
- if Miluko::NAME[@actor.id] != nil
- draw_actor_age(@actor,10,temp_y+i*20)
- i += 1
- end
- if Miluko::BIRTHDAY[@actor.id] != nil
- draw_actor_birth(@actor,temp_y+i*20)
- i += 1
- end
- if Miluko::LIKE[@actor.id] != nil
- draw_actor_like(@actor,10,temp_y+i*20)
- i += 1
- end
- if Miluko::HATE[@actor.id] != nil
- draw_actor_hate(@actor,0,temp_y+i*20)
- i += 1
- end
- if Miluko::INTEREST[@actor.id] != nil
- draw_actor_interest(@actor,10,temp_y+i*20)
- i += 1
- end
- end
-
- def draw_actor_name(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 100, WLH, "Name ")
- name_text = Miluko::NAME[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+50, y, 200, WLH, name_text)
- end
-
- def draw_actor_race(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 100, WLH, "Race ")
- race_text = Miluko::RACE[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+50, y, 200, WLH, race_text)
- end
-
- def draw_actor_age(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 80, WLH, "Age ")
- age_text = Miluko::AGE[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+50, y, 200, WLH, age_text)
- end
-
- def draw_actor_birth(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 120, WLH, "Birth ")
- birth_text = Miluko::BIRTHDAY[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+60, y, 200, WLH, birth_text)
- end
-
- def draw_actor_interest(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 120, WLH, "Interest ")
- interest_text = Miluko::INTEREST[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+80, y, 200, WLH, interest_text)
- end
-
- def draw_actor_like(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 80, WLH, "Like ")
- like_text = Miluko::LIKE[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+50, y, 200, WLH, like_text)
- end
-
- def draw_actor_hate(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 80, WLH, "Hate ")
- hate_text = Miluko::HATE[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- self.contents.draw_text(x+50, y, 200, WLH, hate_text)
- end
-
- def draw_actor_story(actor,x,y)
- self.contents.font.color = Miluko::COLOR1
- self.contents.font.size = Miluko::DATA_FONT_SIZE
- self.contents.draw_text(x, y, 115, WLH, "Other ")
- story_text = Miluko::STORY[@actor.id]
- self.contents.font.color = Miluko::COLOR2
- temp_text = [""]
- temp_text = story_text.split(/\n/)
- for i in 0..temp_text.size
- self.contents.draw_text(x+20, y+Miluko::DATA_FONT_SIZE+Miluko::DATA_FONT_SIZE*i, temp_text[i].to_s.size * Miluko::DATA_FONT_SIZE, WLH, temp_text[i])
- end
- end
- end
- class Scene_Status < Scene_Base
- def update
- update_menu_background
- @status_window.update
- if Input.trigger?(Input::B)
- Sound.play_cancel
- return_scene
- elsif Input.trigger?(Input::R)
- Sound.play_cursor
- next_actor
- elsif Input.trigger?(Input::L)
- Sound.play_cursor
- prev_actor
- elsif Input.trigger?(Input::C)
- Sound.play_cursor
- $scene = Scene_Back_Data.new(@actor_index)
- end
- super
- end
- end
- #--------------------------------------------------------------------------
- #Scene_Back_Data
- #--------------------------------------------------------------------------
- class Scene_Back_Data < Scene_Base
-
- def initialize(actor_index = 0)
- @actor_index = actor_index
- end
-
- def main
- start
- perform_transition
- Input.update
- loop do
- Graphics.update
- Input.update
- update
- break if $scene != self
- end
- Graphics.update
- pre_terminate
- Graphics.freeze
- terminate
- end
-
- def start
- @actor_data = $game_party.members[@actor_index]
- if Miluko::USE_BG_PIC
- @data_back = Sprite.new
- @data_back.bitmap = Cache.picture(Miluko::BG_PIC)
- @data_back.opacity = 0
- end
- @data_window = Window_Back_Data.new(@actor_data)
- @data_window.x = -500
- @data_window.contents_opacity = 0
- @data_window.opacity = 0
- @detail_window = Window_StatusDetail.new(@actor_data)
- @detail_window.y = 652
- @detail_window.opacity = 0
- @detail_window.contents_opacity = 0
- allbody_text = "#{@actor_data.face_name}_#{@actor_data.face_index}"
- @allbody_pic = Sprite.new
- @allbody_pic.bitmap = Cache.picture(allbody_text)
- @allbody_pic.x = Miluko::PIC_X+500
- @allbody_pic.y += Miluko::PIC_Y
- @allbody_pic.z = 800
- @allbody_pic.opacity = 0
- end
-
- def perform_transition
- Graphics.transition(0)
- end
-
- def pre_terminate
- for i in 0..25
- @allbody_pic.x -= 20
- @allbody_pic.opacity -= 15
- @data_window.x += 20
- @data_window.contents_opacity -= 15
- @data_window.opacity -= 15 if Miluko::USE_BG_PIC == 0
- @data_back.opacity -= 15 if Miluko::USE_BG_PIC == 1
- @detail_window.y += 20
- @detail_window.contents_opacity -= 15
- @detail_window.refresh
- Graphics.update
- end
- end
-
- def terminate
- if Miluko::USE_BG_PIC
- @data_back.dispose
- end
- @data_window.dispose
- @allbody_pic.dispose
- @detail_window.dispose
- end
-
- def return_scene
- $scene = Scene_Status.new(@actor_index)
- end
-
- def next_actor
- @actor_index += 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Back_Data.new(@actor_index)
- end
-
- def prev_actor
- @actor_index += $game_party.members.size - 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Back_Data.new(@actor_index)
- end
-
- def update
- @allbody_pic.opacity += 10
- @data_window.contents_opacity += 10
- @detail_window.contents_opacity += 10
- @data_window.opacity += 10 if Miluko::USE_BG_PIC == 0
- @data_back.opacity += 10 if Miluko::USE_BG_PIC == 1
- if @detail_window.y > 152
- @detail_window.y -= 20
- @detail_window.refresh
- elsif @detail_window.y <= 152
- @detail_window.y = 152
- @detail_window.refresh
- @detail_window.contents_opacity = 255
- end
- if @data_window.x <0
- @data_window.x +=20
- elsif @data_window.x >=0
- @data_window.x = 0
- @data_window.contents_opacity = 255
- @data_window.opacity = 255 if Miluko::USE_BG_PIC == 0
- end
- if @allbody_pic.x > Miluko::PIC_X
- @allbody_pic.x -=20
- elsif @allbody_pic.x <= Miluko::PIC_X
- @allbody_pic.x = Miluko::PIC_X
- @allbody_pic.opacity = 255
- end
- @data_window.update
- if @detail_window.y == 152
- @detail_window.update
- end
- if Input.trigger?(Input::B)
- Sound.play_cancel
- return_scene
- elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
- Sound.play_cursor
- next_actor
- elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
- Sound.play_cursor
- prev_actor
- end
- super
- end
- end
复制代码 修改过的KGC扩张STATUS脚本
- module KGC
- module ExtendedStatusScene
- # ◆ 属性耐性の表記方法
- # 0 .. 数値
- # 1 .. チャート
- # 2 .. チャート&数値 (:resist はチャートのみ)
- # 1, 2 は ≪ビットマップ拡張≫ が必要。
- RESIST_STYLE = 1
- # ◆ 耐性の数値
- # 0 .. 属性: 100 で通常、99 以下は軽減 (マイナスは吸収)、101 以上は弱点
- # ステート: 付加成功率 (かかりやすさ)
- # 1 .. 属性: 0 で通常、プラスは軽減 (101 以上は吸収)、マイナスは弱点
- # ステート: 付加回避率 (かかりにくさ)
- RESIST_NUM_STYLE = 0
- # ◆ チャート色
- CHART_LINE_COLOR = Color.new(128, 255, 128) # ライン色
- CHART_BASE_COLOR = Color.new(128, 192, 255) # ベース色
- CHART_FLASH_COLOR = Color.new(128, 255, 128) # フラッシュ色
- # ◆ チャートをなめらかにする
- # true : 高品質、低速
- # false : 低品質、高速
- CHART_HIGHQUALITY = true
- # ~ 以下の項目は ≪モンスター図鑑≫ と互換性があります。 ~
- # ~ ≪モンスター図鑑≫ 側の設定をコピーしても構いません。~
- # ◆ 属性耐性を調べる範囲
- # 耐性を調べる属性の ID を配列に格納。
- # .. や ... を使用した範囲指定も可能。
- ELEMENT_RANGE = [1..16]
- # ◆ 属性のアイコン
- # 各属性に対応するアイコンの番号を指定。
- # 配列の添字が属性 ID に対応。
- # (最初が属性 ID: 0 に対応、あとは ID: 1, 2, 3, ... の順)
- ELEMENT_ICON = [0, # ID: 0 はダミー (未使用)
- 50, 1, 4, 14, 24, 12, 189, 136, # ID: 1 ~ 8
- 104, 105, 106, 107, 108, 109, 110, 111, # ID: 9 ~ 16
- ] # ← これは消さないこと!
- $data_states = load_data("Data/States.rvdata")
- $data_system = load_data("Data/System.rvdata")
- # ◆ ステート耐性を調べる範囲
- # 耐性を調べるステートの ID を配列に格納。
- # 記述方法は ELEMENT_RANGE と同様。
- STATE_RANGE = [1...$data_states.size]
- end
- end
- $imported = {} if $imported == nil
- $imported["ExtendedStatusScene"] = true
- module KGC::ExtendedStatusScene
- module_function
- #--------------------------------------------------------------------------
- # ○ Range と Integer の配列を Integer の配列に変換 (重複要素は排除)
- #--------------------------------------------------------------------------
- def convert_integer_array(array, type = nil)
- result = []
- array.each { |i|
- case i
- when Range
- result |= i.to_a
- when Integer
- result |= [i]
- end
- }
- case type
- when :element
- result.delete_if { |x| x >= $data_system.elements.size }
- when :state
- result.delete_if { |x|
- x >= $data_states.size ||
- $data_states[x].nonresistance ||
- $data_states[x].priority == 0
- }
- end
- return result
- end
- # チェックする属性リスト
- CHECK_ELEMENT_LIST = convert_integer_array(ELEMENT_RANGE, :element)
- # チェックするステートリスト
- CHECK_STATE_LIST = convert_integer_array(STATE_RANGE, :state)
- # 耐性表記方法
- case RESIST_STYLE
- when 0
- RESIST_STYLE_SYMBOL = :num
- when 1
- RESIST_STYLE_SYMBOL = :chart
- else
- RESIST_STYLE_SYMBOL = :both
- end
- end
- class Window_StatusDetail < Window_Base
- #--------------------------------------------------------------------------
- # ○ 公開インスタンス変数
- #--------------------------------------------------------------------------
- #~ attr_reader :category
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # actor : アクター
- #--------------------------------------------------------------------------
- def initialize(actor)
- y = WLH * 5 + 32
- super(0, y, Graphics.width, Graphics.height - y)
- create_chart_sprite
- @actor = actor
- @duration = 0
- self.z = 1000
- refresh
- end
- #--------------------------------------------------------------------------
- # ○ レーダーチャートスプライト作成
- #--------------------------------------------------------------------------
- def create_chart_sprite
- @element_chart_sprite = Sprite_Base.new
- @element_chart_sprite.bitmap = Bitmap.new(height - 32, height - 32)
- @element_chart_sprite.ox = @element_chart_sprite.width / 2
- @element_chart_sprite.oy = @element_chart_sprite.height / 2
- @element_chart_sprite.blend_type = 1
- @element_chart_sprite.opacity = 0
- @element_chart_sprite.visible = false
- @state_chart_sprite = Sprite_Base.new
- @state_chart_sprite.bitmap = Bitmap.new(height - 32, height - 32)
- @state_chart_sprite.ox = @state_chart_sprite.width / 2
- @state_chart_sprite.oy = @state_chart_sprite.height / 2
- @state_chart_sprite.blend_type = 1
- @state_chart_sprite.opacity = 0
- @state_chart_sprite.visible = false
- end
- #--------------------------------------------------------------------------
- # ● 破棄
- #--------------------------------------------------------------------------
- def dispose
- @element_chart_sprite.bitmap.dispose
- @element_chart_sprite.dispose
- @state_chart_sprite.bitmap.dispose
- @state_chart_sprite.dispose
- super
- end
- #--------------------------------------------------------------------------
- # ○ Z 座標設定
- #--------------------------------------------------------------------------
- def z=(value)
- super(value)
- @element_chart_sprite.z = z + 1 if @element_chart_sprite != nil
- @state_chart_sprite.z = z + 1 if @state_chart_sprite != nil
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- @element_chart_sprite.visible = true
- @state_chart_sprite.visible = true
- self.contents.clear
- draw_resistance
- Graphics.frame_reset
- end
- #--------------------------------------------------------------------------
- # ○ 耐性描画
- #--------------------------------------------------------------------------
- def draw_resistance
- case KGC::ExtendedStatusScene::RESIST_STYLE
- when 0
- type = :num
- else
- type = :chart
- end
- x = 0
- x = draw_element_resistance(x, WLH, type)
- x = draw_state_resistance(x, WLH, type)
- end
- #--------------------------------------------------------------------------
- # ○ 属性耐性描画
- # x, y : 描画先 X, Y
- # type : 表示形式 (:num, :chart, :both)
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_element_resistance(x, y, type)
- if KGC::ExtendedStatusScene::CHART_HIGHQUALITY
- Bitmap.smoothing_mode = TRGSSX::SM_ANTIALIAS
- end
- if [:chart, :both].include?(type) && $imported["BitmapExtension"]
- x = draw_element_resistance_chart(x, y)
- @element_chart_sprite.visible = true
- end
- if [:num, :both].include?(type)
- x = draw_element_resistance_num(x, y)
- end
- Bitmap.smoothing_mode = TRGSSX::SM_DEFAULT
- return x
- end
- #--------------------------------------------------------------------------
- # ○ 属性耐性描画 (チャート)
- # x, y : 描画先 X, Y
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_element_resistance_chart(x, y)
- r = (contents.height - y - 56) / 2
- cx = x + r + 28
- cy = y + r + 28
- pw = (Bitmap.smoothing_mode == TRGSSX::SM_ANTIALIAS ? 2 : 1)
- elements = KGC::ExtendedStatusScene::CHECK_ELEMENT_LIST
- draw_chart_line(cx, cy, r, elements.size, 3, pw)
- # チャート
- points = []
- elements.each_with_index { |e, i|
- n = @actor.element_rate(e)
- n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
- n = [[n, -100].max, 200].min
- dr = r * (n + 100) / 100 / 3
- rad = Math::PI * (360.0 * i / elements.size - 90.0) / 180.0
- dx = cx + Integer(dr * Math.cos(-rad))
- dy = cy + Integer(dr * Math.sin(rad))
- points << [dx, dy]
- dx = cx + Integer((r + 14) * Math.cos(-rad)) - 12
- dy = cy + Integer((r + 14) * Math.sin(rad)) - 12
- draw_icon(KGC::ExtendedStatusScene::ELEMENT_ICON[e], dx, dy)
- }
- draw_chart(cx, cy, r, points, pw)
- draw_chart_flash(@element_chart_sprite, x, y, r, points, pw)
- return (x + cx + r + 42)
- end
- #--------------------------------------------------------------------------
- # ○ 属性耐性描画 (数値)
- # x, y : 描画先 X, Y
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_element_resistance_num(x, y)
- origin_y = y
- contents.font.color = normal_color
- KGC::ExtendedStatusScene::CHECK_ELEMENT_LIST.each { |i|
- if y + WLH > contents.height
- x += 84
- y = origin_y
- end
- draw_icon(KGC::ExtendedStatusScene::ELEMENT_ICON[i], x, y)
- n = @actor.element_rate(i)
- n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
- rate = sprintf("%4d%%", n)
- contents.draw_text(x + 24, y, 52, WLH, rate, 2)
- y += WLH
- }
- return (x + 96)
- end
- #--------------------------------------------------------------------------
- # ○ ステート耐性描画
- # x, y : 描画先 X, Y
- # type : 表示形式 (:num, :chart, :both)
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_state_resistance(x, y, type)
- if KGC::ExtendedStatusScene::CHART_HIGHQUALITY
- Bitmap.smoothing_mode = TRGSSX::SM_ANTIALIAS
- end
- if [:chart, :both].include?(type) && $imported["BitmapExtension"]
- x = draw_state_resistance_chart(x, y)
- @state_chart_sprite.visible = true
- end
- if [:num, :both].include?(type)
- x = draw_state_resistance_num(x, y)
- end
- Bitmap.smoothing_mode = TRGSSX::SM_DEFAULT
- return x
- end
- #--------------------------------------------------------------------------
- # ○ ステート耐性描画 (チャート)
- # x, y : 描画先 X, Y
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_state_resistance_chart(x, y)
- r = (contents.height - y - 56) / 2
- cx = x + r + 28
- cy = y + r + 28
- pw = (Bitmap.smoothing_mode == TRGSSX::SM_ANTIALIAS ? 2 : 1)
- states = KGC::ExtendedStatusScene::CHECK_STATE_LIST
- draw_chart_line(cx, cy, r, states.size, 2, pw)
- # チャート
- points = []
- states.each_with_index { |s, i|
- state = $data_states[s]
- n = @actor.state_probability(s)
- n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
- dr = r * n / 100
- rad = Math::PI * (360.0 * i / states.size - 90.0) / 180.0
- dx = cx + Integer(dr * Math.cos(-rad))
- dy = cy + Integer(dr * Math.sin(rad))
- points << [dx, dy]
- dx = cx + Integer((r + 14) * Math.cos(-rad)) - 12
- dy = cy + Integer((r + 14) * Math.sin(rad)) - 12
- draw_icon(state.icon_index, dx, dy)
- }
- draw_chart(cx, cy, r, points, pw)
- draw_chart_flash(@state_chart_sprite, x, y, r, points, pw)
- return (x + cx + r + 42)
- end
- #--------------------------------------------------------------------------
- # ○ ステート耐性描画 (数値)
- # x, y : 描画先 X, Y
- # 描画終了時の X 座標を返す。
- #--------------------------------------------------------------------------
- def draw_state_resistance_num(x, y)
- origin_y = y
- contents.font.color = normal_color
- KGC::ExtendedStatusScene::CHECK_STATE_LIST.each { |i|
- state = $data_states[i]
- if y + WLH > contents.height
- x += 76
- y = origin_y
- end
- draw_icon(state.icon_index, x, y)
- n = @actor.state_probability(i)
- n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
- rate = sprintf("%3d%%", n)
- contents.draw_text(x + 24, y, 44, WLH, rate, 2)
- y += WLH
- }
- return x
- end
- #--------------------------------------------------------------------------
- # ○ チャートライン描画
- # cx, cy : 中心 X, Y
- # r : 半径
- # n : 頂点数
- # breaks : 空間数
- # pw : ペン幅
- #--------------------------------------------------------------------------
- def draw_chart_line(cx, cy, r, n, breaks, pw)
- color = KGC::ExtendedStatusScene::CHART_BASE_COLOR.clone
- contents.draw_regular_polygon(cx, cy, r, n, color, pw)
- color.alpha = color.alpha * 5 / 8
- contents.draw_spoke(cx, cy, r, n, color, pw)
- (1..breaks).each { |i|
- contents.draw_regular_polygon(cx, cy, r * i / breaks, n, color, pw)
- }
- end
- #--------------------------------------------------------------------------
- # ○ チャート描画
- # cx, cy : 中心 X, Y
- # r : 半径
- # points : 頂点リスト
- # pw : ペン幅
- #--------------------------------------------------------------------------
- def draw_chart(cx, cy, r, points, pw)
- contents.draw_polygon(points, KGC::ExtendedStatusScene::CHART_LINE_COLOR, 2)
- end
- #--------------------------------------------------------------------------
- # ○ チャートフラッシュ描画
- # sprite : チャートスプライト
- # x, y : 基準 X, Y
- # r : 半径
- # points : 頂点リスト
- # pw : ペン幅
- #--------------------------------------------------------------------------
- def draw_chart_flash(sprite, x, y, r, points, pw)
- points = points.clone
- points.each { |pt| pt[0] -= x }
- cx = x + r + 28
- cy = y + r + 28
- color = KGC::ExtendedStatusScene::CHART_FLASH_COLOR
- sprite.bitmap.clear
- sprite.bitmap.fill_polygon(points, Color.new(0, 0, 0, 0), color)
- sprite.ox = cx - x
- sprite.oy = cy
- sprite.x = self.x + cx + 16
- sprite.y = self.y + cy + 16
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- super
- update_chart
- end
- #--------------------------------------------------------------------------
- # ○ チャート更新
- #--------------------------------------------------------------------------
- def update_chart
- return if @element_chart_sprite == nil
- @element_chart_sprite.update
- @state_chart_sprite.update
- zoom = opacity = 0
- case @duration
- when 0..11
- zoom = @duration / 11.0
- opacity = 255
- when 12..27
- zoom = 1
- opacity = (27 - @duration) * 16
- end
- @element_chart_sprite.zoom_x = @element_chart_sprite.zoom_y = zoom
- @element_chart_sprite.opacity = opacity
- @state_chart_sprite.zoom_x = @state_chart_sprite.zoom_y = zoom
- @state_chart_sprite.opacity = opacity
- @duration = (@duration + 1) % Graphics.frame_rate
- end
- end
复制代码 第三个脚本是和上面要并用的Bitmap扩张 脚本
直接到KGC载即可 传送门
另外使用此脚本的话还需抓TRGSS.sll 同样上面连过去往下拉後就会看到载点
载下来後 脚本中的请记得修改成0 (我的设定是0 可视自己脚本状况决定是否设为其他值)- 背景资料栏呼叫方法
- 先由菜单进到人物状态栏
- 进到状态栏後再按一次Z键即会迈到背景资料栏(RMVX称呼为C键 SPACE、ENTER也都是C键)
- 左右切换角色 取消键回到主菜单
- 通过脚本直接调用的方法:$scene = Scene_Back_Data.new(@actor_index)
- @actor_index为角色在队伍中的序号 第一位为0 第二位为1 依此类推
复制代码 此脚本绝对还有很多改进空间(汗 若是全资料都放上 小空间塞这么多字也真难为这窗口了)
不过大致上也只是调调座标罢了
可以自行修改一下调到自己需要的位置
虽然有想仿下大作游戏 不过暂时先这样吧~(倒)
工程
Project1.rar
(550.21 KB, 下载次数: 699)
|
评分
-
查看全部评分
|