Project1
标题:
状态窗口如何添加角色的战斗图??
[打印本页]
作者:
id人格分裂症
时间:
2008-11-10 22:57
标题:
状态窗口如何添加角色的战斗图??
在状态窗口的右下角添加相应角色的战斗图,战斗图的右下角对齐状态窗口的右下角。并且长和宽为原图大小的1/2 [LINE]1,#dddddd[/LINE]
此贴于 2008-11-11 13:29:20 被版主darkten提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
此贴于 2008-11-12 15:04:53 被版主darkten提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
天圣的马甲
时间:
2008-11-10 23:15
http://rpg.blue/web/htm/news124.htm
http://rpg.blue/web/htm/news125.htm
下载来学。 [LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
cinderelmini
时间:
2008-11-11 00:00
用以下脚本替换“window_status”全部内容。
谨记,半身图应改名为:角色战斗图+“_h”。
至于位置就自己调整吧,还有就是状态界面会在周边减少一些像素,简单地说就像是在这个界面加上一个黑色的框。
#=============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# 显示状态画面、完全规格的状态窗口。
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
testname = @actor.battler_name+"_h.png"
if $加密 == true
bitmap=Bitmap.new("Graphics/battlers/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
self.contents.font.size = 18
self.contents.font.color = text_color(6)
draw_actor_name(@actor, 300, 0)
self.contents.font.color = text_color(0)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 300, 32)
draw_actor_state(@actor, 480, 32)
draw_actor_hp(@actor, 300, 64, 150)
draw_actor_sp(@actor, 300, 96, 150)
draw_actor_exp_state(@actor, 300, 128, 150)
draw_actor_parameter_state(@actor, 480, 66, 0)
draw_actor_parameter_state(@actor, 480, 98, 1)
draw_actor_parameter_state(@actor, 480, 130, 2)
draw_actor_parameter_state(@actor, 320, 162, 3)
draw_actor_parameter_state(@actor, 320, 194, 4)
draw_actor_parameter_state(@actor, 480, 162, 5)
draw_actor_parameter_state(@actor, 480, 194, 6)
self.contents.font.color = system_color
self.contents.draw_text(300, 260, 96, 32, "身上装备")
draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
draw_item_name($data_armors[@actor.armor1_id], 460, 300)
draw_item_name($data_armors[@actor.armor2_id], 300, 340)
draw_item_name($data_armors[@actor.armor3_id], 460, 340)
draw_item_name($data_armors[@actor.armor4_id], 300, 380)
else
if FileTest.exist?("Graphics/battlers/#{testname}")
bitmap=Bitmap.new("Graphics/battlers/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
self.contents.font.size = 18
self.contents.font.color = text_color(6)
draw_actor_name(@actor, 300, 0)
self.contents.font.color = text_color(0)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 300, 32)
draw_actor_state(@actor, 480, 32)
draw_actor_hp(@actor, 300, 64, 150)
draw_actor_sp(@actor, 300, 96, 150)
draw_actor_exp_state(@actor, 300, 128, 150)
draw_actor_parameter_state(@actor, 480, 66, 0)
draw_actor_parameter_state(@actor, 480, 98, 1)
draw_actor_parameter_state(@actor, 480, 130, 2)
draw_actor_parameter_state(@actor, 320, 162, 3)
draw_actor_parameter_state(@actor, 320, 194, 4)
draw_actor_parameter_state(@actor, 480, 162, 5)
draw_actor_parameter_state(@actor, 480, 194, 6)
self.contents.font.color = system_color
self.contents.draw_text(300, 260, 96, 32, "身上装备")
draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
draw_item_name($data_armors[@actor.armor1_id], 460, 300)
draw_item_name($data_armors[@actor.armor2_id], 300, 340)
draw_item_name($data_armors[@actor.armor3_id], 460, 340)
draw_item_name($data_armors[@actor.armor4_id], 300, 380)
else
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "装备")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
end
end
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1