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

Project1

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

[已经解决] RMXP中无法显示伤害值,完全摊手

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
2 小时
注册时间
2011-8-31
帖子
6
跳转到指定楼层
1
发表于 2011-8-31 18:58:00 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv2.观梦者

梦石
0
星屑
865
在线时间
128 小时
注册时间
2011-8-20
帖子
42
2
发表于 2011-8-31 19:03:14 | 只看该作者
本帖最后由 萨绯罗斯 于 2011-8-31 19:05 编辑

“找不到文件:graphics/pictures/damage”……
表示你的素材丢了
下面的脚本插入到Main的上面:
  1. #==============================================================================
  2. begin
  3.   result = Graphics::Transition.nil?
  4. rescue
  5.   result = true
  6. end

  7. if result
  8.   
  9.   $need_file_bitmap = []
  10.   if FileTest.exist?("log_bitmap.txt")
  11.     f = File.open("./log_bitmap.txt","r")
  12.     $need_file_bitmap = f.read.split(/\n/)
  13.     f.close
  14.   end

  15.   module Graphics
  16.     Transition = method("transition")
  17.     def self.transition(*arg)
  18.       begin
  19.         Transition.call(*arg)
  20.       rescue Errno::ENOENT
  21.         ary=[*arg]
  22.         filename=ary[1]
  23.         unless $need_file_bitmap.include?(filename)
  24.           $need_file_bitmap.push(filename)
  25.           f = File.open("./log_bitmap.txt","a")
  26.           f.write(filename + "\n")
  27.           f.close
  28.         end
  29.         Transition.call(ary[0])
  30.       end
  31.     end
  32.   end

  33.   class Bitmap < Object
  34.     alias ini_Fx initialize
  35.             
  36.     def initialize(*args)
  37.       begin
  38.         ini_Fx(*args)
  39.         return
  40.       rescue Errno::ENOENT
  41.         filename=[*args][0]
  42.         unless $need_file_bitmap.include?(filename)
  43.           $need_file_bitmap.push(filename)
  44.           f = File.open("./log_bitmap.txt","a")
  45.           f.write(filename + "\n")
  46.           f.close
  47.         end
  48.         ini_Fx(32,32)
  49.       end
  50.     end
  51.   end

  52.   $need_file_audio = []
  53.   if FileTest.exist?("log_audio.txt")
  54.     f = File.open("./log_audio.txt","r")
  55.     $need_file_audio = f.read.split(/\n/)
  56.     f.close
  57.   end
  58.   
  59.   module Audio
  60.     Me_play = method("me_play")
  61.     def self.me_play(*arg)
  62.       begin
  63.         Me_play.call(*arg)
  64.       rescue Errno::ENOENT
  65.         filename=[*arg][0]
  66.         unless $need_file_audio.include?(filename)
  67.           $need_file_audio.push(filename)
  68.           f = File.open("./log_audio.txt","a")
  69.           f.write(filename + "\n")
  70.           f.close
  71.         end
  72.         me_stop
  73.       end
  74.     end
  75.     Bgm_play = method("bgm_play")
  76.     def self.bgm_play(*arg)
  77.       begin
  78.         Bgm_play.call(*arg)
  79.       rescue Errno::ENOENT
  80.         filename=[*arg][0]
  81.         unless $need_file_audio.include?(filename)
  82.           $need_file_audio.push(filename)
  83.           f = File.open("./log_audio.txt","a")
  84.           f.write(filename + "\n")
  85.           f.close
  86.         end
  87.         bgm_stop
  88.       end
  89.     end
  90.     Se_play = method("se_play")
  91.     def self.se_play(*arg)
  92.       begin
  93.         Se_play.call(*arg)
  94.       rescue Errno::ENOENT
  95.         filename=[*arg][0]
  96.         unless $need_file_audio.include?(filename)
  97.           $need_file_audio.push(filename)
  98.           f = File.open("./log_audio.txt","a")
  99.           f.write(filename + "\n")
  100.           f.close
  101.         end
  102.         se_stop
  103.       end
  104.     end
  105.     Bgs_play = method("bgs_play")
  106.     def self.bgs_play(*arg)
  107.       begin
  108.         Bgs_play.call(*arg)
  109.       rescue Errno::ENOENT
  110.         filename=[*arg][0]
  111.         unless $need_file_audio.include?(filename)
  112.           $need_file_audio.push(filename)
  113.           f = File.open("./log_audio.txt","a")
  114.           f.write(filename + "\n")
  115.           f.close
  116.         end
  117.         bgs_stop
  118.       end
  119.     end
  120.   end
  121. end
复制代码
回复

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
2 小时
注册时间
2011-8-31
帖子
6
3
 楼主| 发表于 2011-8-31 19:29:58 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
270
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

4
发表于 2011-8-31 19:36:43 | 只看该作者
伤害值是直接用draw_text生成的
graphics/pictures/damage
这货根本就不是默认系统应该存在的东西啊!
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
2 小时
注册时间
2011-8-31
帖子
6
5
 楼主| 发表于 2011-8-31 19:40:21 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
270
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

6
发表于 2011-8-31 20:00:51 | 只看该作者
路过的阿幽酱 发表于 2011-8-31 19:40
如料。他在你出乎预料的时候存在了……【OPL】

由此可见……总的来说……还是重新覆盖安装一边RMXP吧~用站里提供的那个~
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
865
在线时间
128 小时
注册时间
2011-8-20
帖子
42
7
发表于 2011-8-31 20:29:06 | 只看该作者
我明白了~~~
把下面的图片放到你的工程\Graphics\Pictures\下




回复

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
2 小时
注册时间
2011-8-31
帖子
6
8
 楼主| 发表于 2011-8-31 21:01:28 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-23 00:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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