广场
工具/教程/素材
超评测活动结果
第29届极短篇游戏制作比赛
优秀游戏推荐
非官方运行时(20250730)
登录
RPGMaker工具集[20250416]
基础教程
授权素材推广
优秀原创游戏区
精品推荐贴
【RGD】DirectX驱动的RMVA
RGSS3 - runtime by Lanza
【RGM】RGModern - RMXP新runtime
【URGE】兼容 XP/VX/Ace 三系通用跨平台游戏引擎
Project1
»
广场
›
技术讨论
›
RPG Maker XP 讨论区
›
请教对话框里加字体的东西~
返回列表
发新帖
查看:
2318
|
回复:
2
[已经解决]
请教对话框里加字体的东西~
[复制链接]
naibo456
naibo456
当前离线
赞
0
VIP
好人卡
积分
1
经验
最后登录
2016-12-31
在线时间
48 小时
写轮眼
梦石
0
星屑
50
在线时间
48 小时
注册时间
2010-8-26
回帖
50
发消息
发表于 2011-8-4 19:43:39
|
显示全部楼层
|
阅读模式
加入我们,或者,欢迎回来。
您需要
登录
才可以下载或查看,没有账号?
注册会员
×
本帖最后由 naibo456 于 2011-8-4 19:46 编辑
我想在66RPG的对话框加强脚本里加一个修改字体的脚本,比如f[1]就是楷体什么的,两个脚本我弄到了,可惜不能同时使用,望各位大侠给看看,把修改字体的脚本加到对话框脚本里,万分感谢~~~~~
附:66RPG的对话框加强脚本
#——说明
#默认为一个字一个字的方式,如果需要一次全部显示,
#请在游戏中使用脚本:$game_system.typing = true
#默认对话字没有声音,如果需要声音,
#请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
#我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音
# 其他在对话中可以使用的功能:
#
[1]:显示1号角色的姓名
#
ame[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名
# p[1]:对话框出现在1号事件的上方
# p[0]:主人公上方出现对话框
#——————————————————使用p功能后可以自动调整对话框大小
# \:显示""这个符号
# c[1-8]:更改颜色
# g:显示金钱窗口
# a[SE文件名]:对话的时候播放SE
# s[1-19]:更改弹字的速度
# . :停顿一刹那(1、2帧)
# | :停顿片刻(20帧)
# > :文字不用打字方式
# < :文字使用打字方式
# ! :等待玩家按回车再继续
# ~ :文字直接消失
# I :下一行从这个位置开始
# o[123]:文字透明度改为123,模拟将死之人(汗)
# h[12]:改用12号字
# [50]:空50象素
# K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效
# L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
# R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”
# Lk:清除左边的图像
# Rk:清除右边的图像
#==============================================================================
# ■ Window_Message
#------------------------------------------------------------------------------
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化状态
#--------------------------------------------------------------------------
def initialize
super(80, 304, 480, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
self.z = 9998
@fade_in = false
@fade_out = false
@contents_showing = false
@cursor_width = 0
self.active = false
self.index = -1
if $game_system.soundname_on_speak == nil then
$game_system.soundname_on_speak = ""
end
@opacity_text_buf = Bitmap.new(32, 32)
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
terminate_message
$game_temp.message_window_showing = false
if @input_number_window != nil
@input_number_window.dispose
end
super
end
#--------------------------------------------------------------------------
# ● 处理信息结束
#--------------------------------------------------------------------------
def terminate_message
self.active = false
self.pause = false
self.index = -1
self.contents.clear
# 清除显示中标志
@contents_showing = false
# 呼叫信息调用
if $game_temp.message_proc != nil
$game_temp.message_proc.call
end
# 清除文章、选择项、输入数值的相关变量
$game_temp.message_text = nil
$game_temp.message_proc = nil
$game_temp.choice_start = 99
$game_temp.choice_max = 0
$game_temp.choice_cancel_type = 0
$game_temp.choice_proc = nil
$game_temp.num_input_start = 99
$game_temp.num_input_variable_id = 0
$game_temp.num_input_digits_max = 0
# 开放金钱窗口
if @gold_window != nil
@gold_window.dispose
@gold_window = nil
end
if @name_window_frame != nil
@name_window_frame.dispose
@name_window_frame = nil
end
if @name_window_text != nil
@name_window_text.dispose
@name_window_text = nil
end
if @right_picture != nil and @right_keep == true
@right_picture.dispose
end
if @left_picture != nil and @left_keep == true
@left_picture.dispose
end
end
def refresh
# 初期化
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = Font.default_size
@x = @y = @max_x = @max_y = @indent = @lines = 0
@left_keep = @right_keep = false
@face_indent = 0
@opacity = 255
@cursor_width = 0
@write_speed = 0
@write_wait = 0
@mid_stop = false
@face_file = nil
@popchar = -2
if $game_temp.choice_start == 0
@x = 8
end
if $game_temp.message_text != nil
@now_text = $game_temp.message_text
#——头像设置
if (/\[Ff][(.+?)]/.match(@now_text))!=nil then
@face_file = $1 + ".png"
@x = @face_indent = 128
if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
@now_text.gsub!(/\[Ff][(.*?)]/) { "" }
end
#——左半身像设置
if (/\[Ll][(.+?)]/.match(@now_text))!=nil then
@face = "66rpg_" + $1 + "_h.png"
if $加密 == true
if @left_picture != nil
@left_picture.dispose
end
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
@now_text.gsub!(/\[Ll][(.*?)]/) { "" }
else
if FileTest.exist?("Graphics/battlers/#{@face}")
if @left_picture != nil
@left_picture.dispose
end
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
@now_text.gsub!(/\[Ll][(.*?)]/) { "" }
end
end
end
#——右半身像设置
if (/\[Rr][(.+?)]/.match(@now_text))!=nil then
@face = "66rpg_" + $1 + "_h.png"
if $加密 == true
if @right_picture != nil
@right_picture.dispose
end
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
@now_text.gsub!(/\[Rr][(.*?)]/) { "" }
else
if FileTest.exist?("Graphics/battlers/#{@face}")
if @right_picture != nil
@right_picture.dispose
end
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
@now_text.gsub!(/\[Rr][(.*?)]/) { "" }
end
end
end
if (/\[Rr]k/.match(@now_text)) != nil
@right_keep = true
@now_text.sub!(/\[Rr]k/) { "" }
end
if (/\[Ll]k/.match(@now_text)) != nil
@left_keep = true
@now_text.sub!(/\[Ll]k/) { "" }
end
# 显示人物姓名
name_window_set = false
if (/\[Nn]ame[(.+?)]/.match(@now_text)) != nil
name_window_set = true
name_text = $1
@now_text.sub!(/\[Nn]ame[(.*?)]/) { "" }
end
# 文字位置的判定
if (/\[Pp][([-1,0-9]+)]/.match(@now_text))!=nil then
@popchar = $1.to_i
if @popchar == -1
@x = @indent = 48
@y = 4
end
@now_text.gsub!(/\[Pp][([-1,0-9]+)]/) { "" }
end
# 开始
begin
last_text = @now_text.clone
@now_text.gsub!(/\[Vv][([IiWwAaSs]?)([0-9]+)]/) { convart_value($1, $2.to_i) }
end until @now_text == last_text
@now_text.gsub!(/\[Nn][([0-9]+)]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
@now_text.gsub!(/\\/) { "