注册会员 登录
Project1 返回首页

喵呜喵5的树洞 https://rpg.blue/?291206 [收藏] [复制] [分享] [RSS]

日志

【停止更新】【脚本】视觉小说

热度 17已有 4796 次阅读2014-3-14 18:31 |个人分类:脚本| 小说

=========================================================================================

本脚本已经停止更新,之后将不会继续发布基于这个脚本的追加功能,不再接受任何关于本脚本BUG的修正。

=========================================================================================

(Via 彼岸花の咲く夜に 第一夜(07th Expansion

=begin
===============================================================================
  视觉小说 By喵呜喵5
===============================================================================

【说明】

  滚动文字变成视觉小说模式,支持对话中使用的转义字符“\.”、“\!”等  
  本质上不过是修改了默认的文字对话框,将其大小变为全屏幕罢了……
  
  使用的时候先用事件指令中的脚本输入“m5_novel”(不包含双引号),
  然后输入滚动文字  
  实际运行的时候就会以视觉小说的形式显示出来
  (暂停对话请使用转义字符“\!”)
  
=end
$m5script = {} if $m5script.nil?
$m5script["M5VisualNovel"] = true
module M5VisualNovel
#==============================================================================
# 设定部分
#==============================================================================
  
  X = 12
  # 显示位置的X坐标
  
  Y = 12  
  # 显示位置的Y坐标
  
end
#==============================================================================
# 脚本部分
#==============================================================================  
class Window_Message
  alias m5_20140416_update_placement update_placement
  def update_placement
    @position = $game_message.position
    if @position == 3
      self.width = Graphics.width
      self.height = Graphics.height
      create_contents
      self.x = 0
      self.y = 0
    else
      self.width = window_width
      self.height = window_height
      create_contents
      m5_20140416_update_placement
    end
  end
  alias m5_20140416_need_new_page? need_new_page?
  def need_new_page?(text, pos)
    if @position == 3
      return (pos[:y] + pos[:height] > (Graphics.height - standard_padding * 2)\
      && !text.empty?)
    else
      return m5_20140416_need_new_page?(text, pos)
    end    
  end
  alias m5_2014041602_new_page new_page
  def new_page(text, pos)
    m5_2014041602_new_page(text, pos)
    pos[:y] = M5VisualNovel::Y if @position == 3
  end
  alias m5_20140416_new_line_x new_line_x
  def new_line_x
    @position == 3 ? M5VisualNovel::X : m5_20140416_new_line_x    
  end
end
class Game_Interpreter
  def m5_novel
    index,list = @index,@list
    if list[index+1].code == 105
      list[index+1].code = 101
      list[index+1].parameters = ["",0,2,3]
      index += 2      
      while list[index].code == 405
        list[index].code = 401
        index += 1
      end      
    end
  end
end
4

鸡蛋

鲜花

刚表态过的朋友 (4 人)

发表评论 评论 (2 个评论)

回复 猩红之月 2014-11-2 21:08
此脚本的功能类似于有声小说吗?
回复 喵呜喵5 2014-11-3 07:18
猩红之月: 此脚本的功能类似于有声小说吗?
参考附带的图片

facelist doodle 涂鸦笔

您需要登录后才可以评论 登录 | 注册会员

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

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

GMT+8, 2024-5-3 07:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部