【RMva脚本】基础脚本
(2017-09-11 14:59:54)
标签:
rmva脚本 |
分类: 脚本类 |
转自:66RPG 喵呜瞄5
#==============================================================================
# ■ 基础脚本
#------------------------------------------------------------------------------
# 请将基础脚本放在我的所有脚本之上。
#
# Tips: 什么是基础脚本?
#
#
这个基础脚本包含我自己的脚本中经常使用的一些【完全相同】的代码
#
虽然不能保证百分百兼容,但是基础脚本中所有的代码都能与大部分脚本和谐共处
#
相应的,如果基础脚本中的某些代码与其他脚本发生了冲突
#
只能证明,我脚本的【思路】和那个脚本【必定会发生冲突】
#
这种情况下,即使我将脚本改写成一个不需要基础脚本的版本,冲突仍然会发生
#
#==============================================================================
$m5script ||= {}; $m5script[:ScriptData] ||= {}
$m5script[:M5Base] = 20170304
#--------------------------------------------------------------------------
# ● 版本检查
#
# M5script.version(ver)
检查脚本版本是否高于指定版本
#--------------------------------------------------------------------------
module M5script
end
#--------------------------------------------------------------------------
# ● 读取备注、匹配文本
#
#
M5script::M5note.match_text(text, note[, option, &block])
# 匹配文本的基本指令
#
# text :
文本内容(String)
# note :
需要匹配的文字(String)
# option : 匹配文本的设置的哈希表
# :default
缺省值(nil)
# :value
待匹配文字是否包含内容(true)
# :list
是否返回全部匹配结果的数组(nil)
# &block :
成功匹配时执行的回调
#
#
M5script::M5note.map_note(map, note[, option, &block])
# 读取地图备注
#
#
M5script::M5note.event_note(map, id, note[, option,
&block])
#
读取活动事件页的第一条指令,如果为注释则进行匹配
#
#--------------------------------------------------------------------------
module M5script; module M5note; class << self
end; end; end
#--------------------------------------------------------------------------
# ● 读取物品备注
#--------------------------------------------------------------------------
class RPG::BaseItem
end
#--------------------------------------------------------------------------
# ● 与旧版基础脚本的兼容
#--------------------------------------------------------------------------
class << M5script
end
#--------------------------------------------------------------------------
# ● 精灵 Sprite_M5_Base / Sprite_M5
#--------------------------------------------------------------------------
class Sprite_M5_Base < Sprite
end
class Sprite_M5 < Sprite_M5_Base; end
#--------------------------------------------------------------------------
# ● 显示端口 Viewport_M5
#--------------------------------------------------------------------------
class Viewport_M5 < Viewport; end
#--------------------------------------------------------------------------
# ● 精灵组 Spriteset_M5
#--------------------------------------------------------------------------
class Spriteset_M5
end
#--------------------------------------------------------------------------
# ● 自动更新释放精灵以及显示端口
#--------------------------------------------------------------------------
class Scene_Base
end
#--------------------------------------------------------------------------
# ● 获取控制符的参数(这个方法会破坏原始数据)
#
#
m5_obtain_escape_param(text)
#--------------------------------------------------------------------------
class Window_Base
end
#--------------------------------------------------------------------------
# ● 字体大小调整
#
# include
M5script::M5_Window_FontSize
#
# m5_font_width
默认文字宽度
# m5_font_height
默认文字高度
# m5_font_size_change
调整文字大小
#--------------------------------------------------------------------------
module M5script; module M5_Window_FontSize
end;end
class Window_Base
end
#--------------------------------------------------------------------------
# ● M5script::Window_Cal
#
# 计算一段文字大小时使用的临时窗口
#
# cal_all_text_height(text)
计算总高度
# cal_all_text_width(text)
计算最大宽度
# calc_line_width(text)
计算单行宽度
# m5_contents
要描绘目标文字的contents
# line_height
设置每行文字的高度
#--------------------------------------------------------------------------
module M5script; class Window_Cal < Window_Base
end; end
#--------------------------------------------------------------------------
# ● 自动计算大小和位置并包含背景的信息显示窗口
#
# M5script::Window_Var
#
# cal
计算窗口大小使用的临时窗口,M5script::Window_Cal 的实例
# config
窗口设置的哈希表,使用了以下键值:
#
:X :X2 :Y
:Y2 :Z :BACK :SX :SY
#--------------------------------------------------------------------------
module M5script; class Window_Var < Window_Base
end; end
#--------------------------------------------------------------------------
# ● 生成TXT
#
#
M5script.creat_text(name,word,type)
#--------------------------------------------------------------------------
module M5script
end
#--------------------------------------------------------------------------
# ● 打开地址
#
#
M5script.open_url(addr)
#--------------------------------------------------------------------------
module M5script
end
#--------------------------------------------------------------------------
# ● 读取、写入Game.ini
#
# M5script::M5ini.get(key,
default_value[, section])
# M5script::M5ini.write(key,
value[, section])
#--------------------------------------------------------------------------
module M5script; module M5ini; class << self
end; end; end