设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1594|回复: 7
打印 上一主题 下一主题

有关战斗头像和血槽的问题!

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2008-8-24
帖子
77
跳转到指定楼层
1
发表于 2008-9-1 06:50:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
我用了战斗血条 1.8改版后,
进入战斗时,没有角色名字了啊,下面是脚本URL,大家帮忙看一下怎么改出来呀!
http://rpg.blue/web/htm/news137.htm


还有在战斗时,怎么加角色自定义的头像,不知道在哪个文件里修改,
应该怎么弄,有脚本吗?

谢谢了
此贴于 2008-9-2 11:15:04 被版主darkten提醒,请楼主看到后对本贴做出回应。
本贴由论坛斑竹darkten结贴,如楼主认为问题未解决,请重新将此贴编辑为“有事请教”,并回帖叙述疑点即可~ ^-^
闻一闻茶的香气哼一段旧时旋律

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2008-8-24
帖子
77
2
 楼主| 发表于 2008-9-1 07:00:26 | 只看该作者
还有下面的显示角色HP,SP的窗口能换的话,也告诉一下,
谢谢了
闻一闻茶的香气哼一段旧时旋律
回复 支持 反对

使用道具 举报

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
3
发表于 2008-9-1 07:25:23 | 只看该作者
搜索脚本里的draw_actor_name
把他的注释去掉...

头像 = 角色战斗图 配合 行走图战斗使用......
窗口 请去搜索 windowskin..

幻森里也回答你了...
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2008-8-24
帖子
77
4
 楼主| 发表于 2008-9-1 16:01:15 | 只看该作者
# ● 名前の描画
  #--------------------------------------------------------------------------
  alias xrxs_bp7_draw_actor_name draw_actor_name
  def draw_actor_name(actor, x, y)
    xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  end
  #--------------------------------------------------------------------------



应该怎么改啊,谢谢告诉我哦,看不出来啊


谢谢你二个论坛都帮忙呀,:)
闻一闻茶的香气哼一段旧时旋律
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2008-8-24
帖子
77
5
 楼主| 发表于 2008-9-2 04:14:09 | 只看该作者
有知道的告诉我一下了
谢谢
闻一闻茶的香气哼一段旧时旋律
回复 支持 反对

使用道具 举报

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
6
发表于 2008-9-2 05:01:08 | 只看该作者
不好意思啊 我用的与你稍微有点不同,
下面这个脚本是我调好了的 有名字显示

  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  6. # by 桜雅 在土

  7. #==============================================================================
  8. # ■ Window_BattleStatus
  9. #==============================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :update_cp_only # CPメーターのみの更新
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   alias xrxs_bp7_initialize initialize
  19.   def initialize
  20.     # 初期化
  21.     @previous_hp = []
  22.     @previous_sp = []
  23.     # 呼び戻す
  24.     xrxs_bp7_initialize
  25.     # ↓Full-Viewの場合は下二行の # を消してください。
  26.     #self.opacity = 0
  27.     #self.back_opacity = 0
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● リフレッシュ
  31.   #--------------------------------------------------------------------------
  32.   alias xrxs_bp7_refresh refresh
  33.   def refresh
  34.     # CPメーターの更新のみ の場合
  35.     if @update_cp_only
  36.       xrxs_bp7_refresh
  37.       return
  38.     end
  39.     # 変更するものがない場合、飛ばす
  40.     @item_max = $game_party.actors.size
  41.     bool = false
  42.     for i in 0...@item_max
  43.       actor = $game_party.actors[i]
  44.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  45.         bool = true
  46.       end
  47.     end
  48.     return if bool == false
  49.     # 描写を開始
  50.     self.contents.clear
  51.     for i in 0...@item_max
  52.       actor = $game_party.actors[i]
  53.       actor_x = i * 160 + 21
  54.       # 歩行キャラグラフィックの描写
  55.       draw_actor_graphic(actor, actor_x - 9, 116)
  56.       # HP/SPメーターの描写
  57.       draw_actor_hp_meter_line(actor, actor_x, 52, 96, 12)
  58.       draw_actor_sp_meter_line(actor, actor_x, 84, 96, 12)
  59.       # HP数値の描写
  60.       self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  61.       self.contents.font.color = Color.new(0,0,0,192)
  62.       self.contents.draw_text(actor_x, 40, 96, 24, actor.hp.to_s, 2)
  63.       self.contents.font.color = actor.hp == 0 ? knockout_color :
  64.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  65.       self.contents.draw_text(actor_x-2, 38, 96, 24, actor.hp.to_s, 2)
  66.       # SP数値の描写
  67.       self.contents.font.color = Color.new(0,0,0,192)
  68.       self.contents.draw_text(actor_x, 72, 96, 24, actor.sp.to_s, 2)
  69.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  70.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  71.       self.contents.draw_text(actor_x-2, 70, 96, 24, actor.sp.to_s, 2)
  72.       # 用語「HP」と用語「SP」の描写
  73.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  74.       self.contents.font.color = Color.new(0,0,0,192)
  75.       self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  76.       self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  77.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  78.       self.contents.draw_text(actor_x, 30, 196, 24, $data_system.words.hp)
  79.       self.contents.draw_text(actor_x, 62, 196, 24, $data_system.words.sp)
  80.       # ステートの描写
  81.       draw_actor_state(actor, actor_x, 100)
  82.       #==================================================
  83.       #名字的描绘
  84.       draw_actor_name(actor, actor_x , 5)
  85.       #==================================================
  86.       # 値を更新
  87.       @previous_hp[i] = actor.hp
  88.       @previous_hp[i] = actor.hp
  89.     end
  90.   end
  91. end
  92. #==============================================================================
  93. # ■ Window_Base
  94. #==============================================================================
  95. class Window_Base < Window
  96.   #--------------------------------------------------------------------------
  97.   # ● HPメーター の描画
  98.   #--------------------------------------------------------------------------
  99.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  100.     w = width * actor.hp / [actor.maxhp,1].max
  101.     hp_color_1 = Color.new(255, 0, 0, 192)
  102.     hp_color_2 = Color.new(255, 255, 0, 192)
  103.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  104.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  105.     x -= 1
  106.     y += (height/4).floor
  107.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  108.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  109.     x -= 1
  110.     y += (height/4).ceil
  111.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  112.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  113.     x -= 1
  114.     y += (height/4).ceil
  115.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  116.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● SPメーター の描画
  120.   #--------------------------------------------------------------------------
  121.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  122.     w = width * actor.sp / [actor.maxsp,1].max
  123.     hp_color_1 = Color.new( 0, 0, 255, 192)
  124.     hp_color_2 = Color.new( 0, 255, 255, 192)
  125.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  126.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  127.     x -= 1
  128.     y += (height/4).floor
  129.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  130.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  131.     x -= 1
  132.     y += (height/4).ceil
  133.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  134.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  135.     x -= 1
  136.     y += (height/4).ceil
  137.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  138.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  139.   end
  140.   #--------------------------------------------------------------------------
  141.   # ● 名前の描画
  142.   #--------------------------------------------------------------------------
  143.   alias xrxs_bp7_draw_actor_name draw_actor_name
  144.   def draw_actor_name(actor, x, y)
  145.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● ステートの描画
  149.   #--------------------------------------------------------------------------
  150.   alias xrxs_bp7_draw_actor_state draw_actor_state
  151.   def draw_actor_state(actor, x, y, width = 120)
  152.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  153.   end
  154.   #--------------------------------------------------------------------------
  155.   # ● HP の描画
  156.   #--------------------------------------------------------------------------
  157.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  158.   def draw_actor_hp(actor, x, y, width = 144)
  159.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● SP の描画
  163.   #--------------------------------------------------------------------------
  164.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  165.   def draw_actor_sp(actor, x, y, width = 144)
  166.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  167.   end
  168. end
  169. #==============================================================================
  170. # ■ Scene_Battle
  171. #==============================================================================
  172. class Scene_Battle
  173.   #--------------------------------------------------------------------------
  174.   # ● フレーム更新
  175.   #--------------------------------------------------------------------------
  176.   alias xrxs_bp7_update update
  177.   def update
  178.     xrxs_bp7_update
  179.     # メッセージウィンドウ表示中の場合
  180.     if $game_temp.message_window_showing
  181.       @status_window.update_cp_only = true      
  182.     else
  183.       @status_window.update_cp_only = false
  184.     end
  185.   end
  186. end
  187. #==============================================================================
  188. # ◇ 外部ライブラリ
  189. #==============================================================================
  190. class Window_Base
  191.   #--------------------------------------------------------------------------
  192.   # ● ライン描画 軽量版 by 桜雅 在土
  193.   #--------------------------------------------------------------------------
  194.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  195.     # 描写距離の計算。大きめに直角時の長さ。
  196.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  197.     # 描写開始
  198.     for i in 1..distance
  199.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  200.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  201.       self.contents.set_pixel(x, y, start_color)
  202.     end
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● ライン描画 by 桜雅 在土
  206.   #--------------------------------------------------------------------------
  207.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  208.     # 描写距離の計算。大きめに直角時の長さ。
  209.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  210.     # 描写開始
  211.     if end_color == start_color
  212.       for i in 1..distance
  213.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  214.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  215.         if width == 1
  216.           self.contents.set_pixel(x, y, start_color)
  217.         else
  218.           self.contents.fill_rect(x, y, width, width, start_color)
  219.         end
  220.       end
  221.     else
  222.       for i in 1..distance
  223.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  224.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  225.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  226.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  227.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  228.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  229.         if width == 1
  230.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  231.         else
  232.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  233.         end
  234.       end
  235.     end
  236.   end
  237. end


  238. #==============================================================================
  239. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  240. #==============================================================================
复制代码

其实之是在刷新处添加了一个东西而已
      #名字的描绘
      draw_actor_name(actor, actor_x , 5)
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2008-8-24
帖子
77
7
 楼主| 发表于 2008-9-2 05:17:29 | 只看该作者
呵呵,,,
殲滅天使·玲{/qiang}
送分!!!


谢谢你拉!!!
闻一闻茶的香气哼一段旧时旋律
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
922
在线时间
12 小时
注册时间
2009-10-7
帖子
1
8
发表于 2009-10-8 00:10:53 | 只看该作者
有冲突啊 ···
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-28 12:53

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表