查看: 3042|回复: 9

[已经解决] 1.半身像脚本有关 2.吸血装备有关 3.石化有关

[复制链接]
梦石
0
星屑
50
在线时间
62 小时
注册时间
2016-11-11
回帖
17
发表于 2017-1-30 16:54:36 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 SandFainy 于 2017-1-30 20:53 编辑

问题可能有点啰嗦。。但真心求解答QAQ
1.用了https://rpg.blue/forum.php?mod=viewthread&tid=379318 这个网址改过的脚本,让半身像显示在右边,怎么用到底(吐血)。
如果只用$target_face="Actor4_5"显示右边的,左边的为空,那么两个都不显示。如果左边有普通的脸图,右边半身像,那么只显示脸图。
没试过如果两边是不同的半身像是什么效果,但我试了半天发现只有左右两边显示同一个半身像的时候才两边都有显示。
还有能不能不要让图片每次都是~飘~着~进来的呢?普通的显示就好。
求解。
到底要怎么改才行。。。如果真的没办法,我就乖乖地画脸图去了。


2.模拟FF3的吸血剑,装备以后每次攻击都带吸血效果,凭基础设置好像没办法,请问要怎么办?


3.目前站里所有的石化脚本。。。全都挂了,请问谁有备份吗?

点评

啧~~~好好利用搜索功能,上面这些都是论坛都提烂了的问题  发表于 2017-1-31 02:41

老黄鸡

梦石
4
星屑
45714
在线时间
7951 小时
注册时间
2009-7-6
回帖
13338

MZ评测员RM创作大赛01组委会开拓者贵宾

发表于 2017-1-30 23:11:26 | 显示全部楼层
1.
脚本改
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 半身像对话框 by LBQ
  4. #------------------------------------------------------------------------------
  5. #  一个简单的半身像对话框罢了= =
  6. #------------------------------------------------------------------------------
  7. # ■ 用法一览
  8. #     1:如何将半身像应用到游戏中?
  9. #       ——如果想要把一个脸图替换成半身像,则需要找到这个脸图的编号,比如说拉尔
  10. #           夫,就是Actor1的编号0,之后去在Graphics/Busts这个文件夹里面拷贝一个
  11. #           叫做Actor1_0的图像,这个图像会被当做半身像替换原有图像。
  12. #==============================================================================
  13. # 2013.8.25 => 修复存档不能Bug (感谢小刀
  14. #==============================================================================
  15. $imported ||= {}
  16. $imported[:LBQ_Bust]=true

  17. $right_flag = false
  18. $target_face = ""

  19. module LBQ
  20.   module Bust
  21.     FOLDER="Busts"
  22.     SUB1=[/【/,    "\\{\\c[6]-- "]
  23.     SUB2=[/】/,    " --\\c[0]\\}"]

  24.     TEXT_FOR_NEXT="[next]"
  25.     TEXT_FOR_END ="[end]"

  26.     INDENT=255 #半身像的缩进
  27.   end
  28. end

  29. module Cache
  30.   def self.busts(filename)
  31.     load_bitmap("Graphics/#{LBQ::Bust::FOLDER}/", filename)
  32.   end
  33. end



  34. class Sprite_Bust < Sprite_Base
  35.   attr_accessor   :bust_graphics
  36.   attr_accessor   :status

  37.   def initialize(vp=nil)
  38.     super(vp)
  39.     @bust_graphics=nil
  40.     @status=:nothing
  41.     @right_flag = false
  42.   end

  43.   def slide_in
  44.     @status=:sliding_in
  45.   end

  46.   def slide_out
  47.     @status=:sliding_out
  48.     if $game_temp.do_not_slide_out
  49.       @status=:slided_out
  50.       set_pos
  51.     end
  52.   end

  53.   def set_pos(slide_in=true)
  54.     if @right_flag
  55.       self.x = Graphics.width
  56.     else
  57.       self.x = -self.bitmap.width
  58.     end
  59.     self.y=Graphics.height-self.bitmap.height
  60.     unless slide_in
  61.       if @right_flag
  62.         self.x = Graphics.width - self.bitmap.width
  63.       else
  64.         self.x = 0
  65.       end
  66.     end
  67.   end

  68.   def set_right
  69.     @right_flag = true
  70.   end

  71.   def set_graphics(bust_graphics)
  72.     self.bitmap=Cache.busts(bust_graphics)
  73.   end



  74.   def update
  75.     super
  76.     case @status
  77.     when :nothing
  78.       # Do Nothing
  79.     when :sliding_in
  80.       #Slide In
  81.       if @right_flag
  82.         self.x = Graphics.width - self.bitmap.width
  83.         @status=:slided_in
  84.       else
  85.         self.x=0
  86.         @status=:slided_in
  87.       end

  88.     when :sliding_out
  89.       if @right_flag
  90.         self.x = Graphics.width
  91.         @status=:slided_out
  92.       else
  93.         self.x=-self.bitmap.width
  94.         @status=:slided_out
  95.       end
  96.       #Slide Out
  97.     when :slided_in
  98.       #Slided in
  99.     when :slided_out
  100.       #Sliede out
  101.     end
  102.   end


  103. end


  104. class Game_Temp
  105.   attr_accessor   :bust_name
  106.   attr_accessor   :bust
  107.   attr_accessor   :tarface
  108.   attr_accessor   :have_bust
  109.   attr_accessor   :do_not_slide_out

  110.   alias lbq_bust_shot_game_message_init initialize
  111.   def initialize
  112.     lbq_bust_shot_game_message_init
  113.     @bust_name=""
  114.     @bust=nil
  115.     @have_bust=false
  116.     @do_not_slide_out=false
  117.   end




  118. end

  119. class Game_Message
  120.    #--------------------------------------------------------------------------
  121.   # ● 添加内容
  122.   #--------------------------------------------------------------------------
  123.   def add(text)
  124.     new_text=text.gsub(LBQ::Bust::SUB1[0],LBQ::Bust::SUB1[1])
  125.     new_text2=new_text.gsub(LBQ::Bust::SUB2[0],LBQ::Bust::SUB2[1])
  126.     if new_text2.include? LBQ::Bust::TEXT_FOR_NEXT
  127.       new_text2.delete!(LBQ::Bust::TEXT_FOR_NEXT)
  128.       $game_temp.do_not_slide_out=true
  129.     end

  130.     if new_text2.include? LBQ::Bust::TEXT_FOR_END
  131.       new_text2.delete!(LBQ::Bust::TEXT_FOR_END)
  132.       $game_temp.do_not_slide_out=false
  133.     end
  134.     @texts.push(new_text2)
  135.   end
  136. end


  137. class Game_Interpreter
  138.   alias lbq_bust_shot_command_101 command_101
  139.   #--------------------------------------------------------------------------
  140.   # ● 显示文字
  141.   #--------------------------------------------------------------------------
  142.   def command_101
  143.     $game_temp.bust=nil
  144.       unless @params[0].empty?
  145.         if File.exist?("Graphics/#{LBQ::Bust::FOLDER}/#{@params[0]}_#{@params[1]}.png")
  146.           $game_temp.have_bust=true
  147.         else
  148.           $game_temp.have_bust=false
  149.           $game_temp.bust_name=""
  150.         end
  151.       end

  152.     unless @params[3] == 2
  153.       $game_temp.have_bust=false
  154.     end

  155.     if $game_temp.have_bust
  156.       $game_temp.bust_name="#{@params[0]}_#{@params[1]}"
  157.       $game_temp.bust=nil
  158.       $game_temp.bust=Sprite_Bust.new
  159.       $game_temp.bust.set_graphics($game_temp.bust_name)
  160.       $game_temp.bust.z=99999

  161.       if $target_face != ""
  162.         if File.exist?("Graphics/#{LBQ::Bust::FOLDER}/#{$target_face}.png")
  163.           $game_temp.tarface = Sprite_Bust.new
  164.           $game_temp.tarface.bitmap = Cache.busts($target_face)
  165.           $game_temp.tarface.z=99999
  166.         end
  167.       end

  168.       unless $game_temp.do_not_slide_out
  169.         $game_temp.bust.set_right if $right_flag
  170.         $game_temp.bust.set_pos
  171.         $game_temp.bust.slide_in
  172.         if $target_face != ""
  173.           $game_temp.tarface.set_right unless $right_flag
  174.           $game_temp.tarface.set_pos
  175.           $game_temp.tarface.slide_in
  176.         end
  177.       else
  178.         $game_temp.bust.set_right if $right_flag
  179.         $game_temp.bust.set_pos(false)
  180.         $game_temp.bust.slide_in
  181.         if $target_face != ""
  182.           $game_temp.tarface.set_right unless $right_flag
  183.           $game_temp.tarface.set_pos(false)
  184.           $game_temp.tarface.slide_in
  185.         end
  186.       end
  187.     end

  188.     lbq_bust_shot_command_101
  189.     if $game_temp.have_bust
  190.         $game_temp.bust.slide_out
  191.         Fiber.yield until $game_temp.bust.status==:slided_out
  192.         if $target_face != ""
  193.           $game_temp.tarface.slide_out
  194.           Fiber.yield until $game_temp.tarface.status==:slided_out
  195.         end
  196.     end
  197.     $game_temp.have_bust=false
  198.     $game_temp.bust_name=""

  199.   end


  200.   alias lbq_bust_int_update update
  201.   def update
  202.     lbq_bust_int_update
  203.     $game_temp.bust.update unless $game_temp.bust.nil?
  204.     if $target_face != ""
  205.       $game_temp.tarface.update unless $game_temp.tarface.nil?
  206.     end
  207.   end

  208. end


  209. class Window_Message
  210.   #--------------------------------------------------------------------------
  211.   # ● 获取换行位置
  212.   #--------------------------------------------------------------------------
  213.   def new_line_x
  214.     # 如果有头像
  215.     unless $game_message.face_name.empty?
  216.       value=112
  217.       value=LBQ::Bust::INDENT unless $game_temp.bust_name.empty?
  218.     # 木有
  219.     else
  220.       value=0
  221.     end
  222.     return value
  223.   end
  224. end


  225. class Window_Message
  226.   #--------------------------------------------------------------------------
  227.   # ● 翻页处理
  228.   #--------------------------------------------------------------------------
  229.   def new_page(text, pos)
  230.     contents.clear
  231.     draw_face($game_message.face_name, $game_message.face_index, 0, 0) if $game_temp.bust_name.empty?
  232.     reset_font_settings
  233.     if $right_flag && $target_face==""
  234.       pos[:x] = 0
  235.       pos[:new_x] = 0
  236.     else
  237.       pos[:x] = LBQ::Bust::INDENT  
  238.       pos[:new_x] = LBQ::Bust::INDENT
  239.     end
  240.     pos[:y] = 0
  241.     pos[:height] = calc_line_height(text)
  242.     clear_flags
  243.   end
  244. end
复制代码


这个脚本原本就是把脸图的文件名作为立绘使用,你先确认这个脚本修改前的使用方法。
上面的脚本由楼主给出链接里面的脚本再次改写,立绘立即显示。

2.
http://taroxd.github.io/rgss/

阅读说明后查找「吸血」


3.
石化和眩晕有区别吗- -

点评

没猜错的话,石化状态中的对象被打一下就死?  发表于 2017-1-31 13:03

评分

参与人数 2星屑 +6 梦石 +1 收起 理由
RaidenInfinity + 1 认可答案
Mr.Jin + 6

查看全部评分

RGDirect - DirectX驱动的RGSS,点我了解.
(排满,暂停)RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复

使用道具 举报

梦石
0
星屑
50
在线时间
62 小时
注册时间
2016-11-11
回帖
17
 楼主| 发表于 2017-1-31 16:30:08 | 显示全部楼层

1.嗯,主要问题是想知道怎么让半身像显示在右边和一左一右,没改过的脚本会用但是只能显示在左边
2.谢谢!
3.(我记得大概是这样的)石化时不会被攻击,全员都进入石化状态会判定为gameover,除非用道具或者技能否则状态不能解除
回复

使用道具 举报

唯一的信徒

梦石
0
星屑
1697
在线时间
1359 小时
注册时间
2013-1-29
回帖
1537
发表于 2017-1-31 21:26:12 | 显示全部楼层
本帖最后由 LBQ 于 2017-1-31 21:27 编辑

没有怎么实测
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 不会被攻击状态 以及 全员中 GameOver 状态 【石化】 by LBQ
  4. #------------------------------------------------------------------------------
  5. #  对应状态备注为 <石化> 或者 <Petrified>
  6. #==============================================================================
  7. =begin
  8. This is free and unencumbered software released into the public domain.

  9. Anyone is free to copy, modify, publish, use, compile, sell, or
  10. distribute this software, either in source code form or as a compiled
  11. binary, for any purpose, commercial or non-commercial, and by any
  12. means.

  13. In jurisdictions that recognize copyright laws, the author or authors
  14. of this software dedicate any and all copyright interest in the
  15. software to the public domain. We make this dedication for the benefit
  16. of the public at large and to the detriment of our heirs and
  17. successors. We intend this dedication to be an overt act of
  18. relinquishment in perpetuity of all present and future rights to this
  19. software under copyright law.

  20. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  23. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  24. OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  25. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  26. OTHER DEALINGS IN THE SOFTWARE.

  27. For more information, please refer to <http://unlicense.org/>
  28. =end

  29. class Game_Battler
  30.   def reified_states
  31.     return @states.map{|it| $data_states[it]}
  32.   end
  33.   
  34.   def state_petrified?
  35.     reified_states.find{|it|
  36.       it.note.include?("<石化>") || it.note.include?("<Petrified>")
  37.     }
  38.   end
  39. end

  40. class Game_Party
  41.   # Overwrite
  42.   alias lbq_petrify_alive_members alive_members
  43.   def alive_members
  44.     lbq_petrify_alive_members.select {|it| ! it.state_petrified?}
  45.   end
  46. end
复制代码


应该只写了 1. 不能被攻击, 2. 全员中会 GameOver,剩下的功能默认应该有

评分

参与人数 1星屑 +100 收起 理由
RaidenInfinity + 100 嘛,赛糖

查看全部评分

『我只是一个正在潜心修炼的渣乐师罢了』
Dear Time\(^o^)/~


假如上面的图片挂了的话麻烦各位去发个帖 @ 一下 orzFly 让他修复 deartime
回复

使用道具 举报

梦石
0
星屑
50
在线时间
62 小时
注册时间
2016-11-11
回帖
17
 楼主| 发表于 2017-2-2 19:07:53 | 显示全部楼层

诶,请问要怎么用呢?

点评

LBQ
(竟然忘了写说明了)石化状态备注加 <石化>  发表于 2017-2-2 23:46
回复

使用道具 举报

梦石
0
星屑
50
在线时间
62 小时
注册时间
2016-11-11
回帖
17
 楼主| 发表于 2017-2-6 20:18:07 | 显示全部楼层

(抱歉回迟了)测试了一下,发现没反应{:2_257:}不过也很感谢XD打算放弃石化效果了(还有。。系统不让评分

点评

LBQ
(感觉应该是不应该的,确定测试了 1. 不会被攻击 2. 全员中会团灭吗 …? 没有行动没有包含在功能内,其他战斗系统也有可能被覆盖… 大概吧)  发表于 2017-2-7 03:25
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部