SFrame
Sex Demon
- Joined
- Aug 27, 2011
- Messages
- 296
- Reputation score
- 121
Re: Succubus Rhapsodia
I've searched the entire script.rxdata, and it doesn't have anything of the sort "m" == "\m". Also searched "\m", and the only "\m" I found not commented out was in Window_BattleLog. It's some business with c or text, which is used in c == "\m".
The fact that Strange's suggestion with commenting out the "return" worked to prevent the "m" from disappearing from the text has at least hinted that the problem isn't in Window_BattleLog. I'm guessing some slicing business over in メッセージ表示フルグレードアップX or Window_Message. I'll do another sweep once my head's cooled off (warm day in SF).
p.s. as for the "/m" business, I'm guessing you took that from the c = text.slice!(/./m). Here's some context (you can Ctrl+F for it, it's around halfway if you're scrolling):
Maybe check if "m" == "\m" in Ruby? (Is it "/m" or "\m" you are comparing? You use both in your post: one in the code example and one later on...
I haven't used Ruby at all, but I know that there are usually multiple ways to compare items in programming language, and they don't always give the same result. Maybe you need to use "===" instead of "=="? I also see mention of "equal?" and "eql?" options for Ruby mentioned online. Maybe one of these will work the way you want it too...
I've searched the entire script.rxdata, and it doesn't have anything of the sort "m" == "\m". Also searched "\m", and the only "\m" I found not commented out was in Window_BattleLog. It's some business with c or text, which is used in c == "\m".
The fact that Strange's suggestion with commenting out the "return" worked to prevent the "m" from disappearing from the text has at least hinted that the problem isn't in Window_BattleLog. I'm guessing some slicing business over in メッセージ表示フルグレードアップX or Window_Message. I'll do another sweep once my head's cooled off (warm day in SF).
p.s. as for the "/m" business, I'm guessing you took that from the c = text.slice!(/./m). Here's some context (you can Ctrl+F for it, it's around halfway if you're scrolling):
Code:
def refresh
text = $game_temp.battle_log_text
#p $game_temp.battle_log_text
=begin
# ログ矯正
if ["\q\q","\q\w\q","\q\m\q","\q\y\q"].include?($game_temp.battle_back_log)
$game_temp.battle_back_log += "CLEAR"
$game_temp.battle_back_log.gsub!("\qCLEAR","")
elsif $game_temp.battle_back_log == "\n"
$game_temp.battle_back_log = ""
end
=end
=begin
# マニュアルモードは末尾に\qをつける
if $game_system.system_read_mode == 0
text += "CHECK"
if text.match("\w\qCHECK")
text.gsub!("CHECK","")
else
text.gsub!("CHECK","\w\q")
end
end
=end
=begin
# ログ矯正
if ["\n","\q"].include?(text)
$game_temp.battle_log_text = ""
return
end
=end
# キープ中なら最後に取得した座標を読み込み
if @keep_flag == true
x = @last_x
y = @last_y
@keep_flag = false
else
# キープしてない時は座標をクリア
x = y = 0
# バックログに改行指定を追加
$game_temp.battle_back_log += "\n"
end
# 制御文字処理
begin
last_text = text.clone
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end until text == last_text
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
# 便宜上、"\\\\" を "\000" に変換
text.gsub!(/\\\\/) { "\000" }
# "\\C" を "\001" に、"\\G" を "\002" に変換
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Gg]/) { "\002" }
# c に 1 文字を取得 (文字が取得できなくなるまでループ)
while ((c = text.slice!(/./m)) != nil)
# \\ の場合
if c == "\000"
# 本来の文字に戻す
c = "\\"
end
# \C[n] の場合
if c == "\001"
# 文字色を変更
text.sub!(/\[([0-9]+)\]/, "")
color = $1.to_i
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
# 次の文字へ
next
end
if c == "\H"
heart = RPG::Cache.picture("heart")
self.contents.blt(x + 6 , 24 * y + 10, heart, Rect.new(0, 0, 16, 16))
x += 16
# 次の文字へ
next
end
# ウェイト文字(長時間)の場合
if c == "\w"
# ウェイトを入れる
case $game_system.ms_skip_mode
when 3 #手動送りモード
@wait_count = 1
when 2 #デバッグモード
@wait_count = 3
when 1 #快速モード
@wait_count = 4
else
@wait_count = ($game_system.battle_speed_time(1) * 3)
end
$game_temp.battle_log_wait_flag = true
# 今の座標を維持して返す
@keep_flag = true
@last_x = x
@last_y = y
return
end
# ウェイト文字(短時間)の場合
if c == "\m"
# ウェイトを入れる
case $game_system.ms_skip_mode
when 3 #手動送りモード
@wait_count = 1
when 2 #デバッグモード
@wait_count = 1
when 1 #快速モード
@wait_count = 2
else
@wait_count = $game_system.battle_speed_time(1)
end
$game_temp.battle_log_wait_flag = true
# 今の座標を維持して返す
@keep_flag = true
@last_x = x
@last_y = y
return
end
Last edited: