Project1

标题: RMXP中无法显示伤害值,完全摊手 [打印本页]

作者: 路过的阿幽酱    时间: 2011-8-31 18:58
提示: 作者被禁止或删除 内容自动屏蔽
作者: 萨绯罗斯    时间: 2011-8-31 19:03
本帖最后由 萨绯罗斯 于 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
复制代码

作者: 路过的阿幽酱    时间: 2011-8-31 19:29
提示: 作者被禁止或删除 内容自动屏蔽
作者: 亿万星辰    时间: 2011-8-31 19:36
伤害值是直接用draw_text生成的
graphics/pictures/damage
这货根本就不是默认系统应该存在的东西啊!
作者: 路过的阿幽酱    时间: 2011-8-31 19:40
提示: 作者被禁止或删除 内容自动屏蔽
作者: 亿万星辰    时间: 2011-8-31 20:00
路过的阿幽酱 发表于 2011-8-31 19:40
如料。他在你出乎预料的时候存在了……【OPL】

由此可见……总的来说……还是重新覆盖安装一边RMXP吧~用站里提供的那个~
作者: 萨绯罗斯    时间: 2011-8-31 20:29
我明白了~~~
把下面的图片放到你的工程\Graphics\Pictures\下





作者: 路过的阿幽酱    时间: 2011-8-31 21:01
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1