Hi anyone who is actually reading this!
There is a payment... (See Bottom)
Request:
To use "Catergories" of monsters in my Beastiary...
Here is my bestiary script:
(Sorry Admins, I'm a newb and don't know how to use spoiler tags... Sorry...)
EDIT- I learnt it...
(Hey! I said sorry already... I'm only 12... )
Anyhoo...
What I want...
I would like it so that it displays catergory 1 at the top and catergory 999 at the bottom, regardless of what order they are in in the database... Displaying the catergory name at the top... (Underlined and italic if possible...)
Like this:
Humans
Lakur Soldier
Saladon
General Soloman
I want it set out in this way...
THIS:
MONSTER_CAT
1 = [2,3,5,9,17]
Thanks...
OH! And as a reward there is an AMAZING BATTLER OF A HELL MONSTER!!! It isn't RTP but works perfectly with it...
There is a payment... (See Bottom)
Request:
To use "Catergories" of monsters in my Beastiary...
Here is my bestiary script:
(Sorry Admins, I'm a newb and don't know how to use spoiler tags... Sorry...)
EDIT- I learnt it...
#é”物図鑑
#
#エãƒãƒŸãƒ¼ã®éé‡æƒ…å ±ã¯ã€æˆ¦é—˜çµ‚了時(経験値ãªã©ã‚’ç²å¾—ã™ã‚‹æ‰€)ã§è¿½åŠ ã•ã‚Œã¾ã™ã€‚
#よã£ã¦ã€æ•µã‹ã‚‰é€ƒã’ãŸå ´åˆã‚„è² ã‘イベントã§ã®æˆ¦é—˜æ•—北ãªã©ã§ã¯
#図鑑ã«ç™»éŒ²ã•ã‚Œã¾ã›ã‚“。
#ã“ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’変ãˆãŸã„å ´åˆã¯å„自書ãæ›ãˆã¦ä¸‹ã•ã„。
#(class Scene_Battle ã® start_phase5 ã§è¿½åŠ ã—ã¦ã¾ã™ã€‚)
#
#ã¾ãŸã€æ‰€ã€…「アナライズã€ã¨ã„ã†å˜èªžãŒã‚ã‚Šã¾ã™ãŒã€
#ç¾åœ¨ã€ã“ã®é”物辞典ã ã‘ã§ã¯æ©Ÿèƒ½ã—ã¦ãŠã‚Šã¾ã›ã‚“。(自ゲームã§ã®å残)
#Window_MonsterBook_Info ã® DROP_ITEM_NEED_ANALYZE ㌠true ã«ãªã£ã¦ã„ã‚‹ã¨
#ドãƒãƒƒãƒ—アイテムãŒè¡¨ç¤ºã•ã‚Œãªããªã‚Šã¾ã™ã®ã§ã€é€šå¸¸ã¯ false ã«ã—ã¦ãŠã„ã¦ä¸‹ã•ã„。
#
#注æ„
#ã“ã®ã¾ã¾ä½¿ã†ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒˆãƒ«ãƒ¼ãƒ—ã®1番ã«
#何もè¨å®šã—ã¦ã„ãªã„ã¨ã€ã‚¨ãƒ©ãƒ¼åãã¾ã™ã€‚
#対処ç–ã¨ã—ã¦ã¯
#1.ç´ ç›´ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒˆãƒ«ãƒ¼ãƒ—ã®1番ã«ä½•ã§ã‚‚ã„ã„ã‹ã‚‰è¨å®šã™ã‚‹ã€‚
#2.Game_Enemy_Book 㮠「super(1, 0)#ダミー〠ã®å·¦å´ã®æ•°å—ã®éƒ¨åˆ†ã‚’
# å˜åœ¨ã™ã‚‹ãƒˆãƒ«ãƒ¼ãƒ—IDã«æ›¸ãæ›ãˆã‚‹ã€‚
#ã®ã©ã¡ã‚‰ã‹ã«ãªã‚Šã¾ã™ã€‚
#
#2005.2.6 機能追åŠ
#図鑑完æˆåº¦ã®è¡¨ç¤ºæ©Ÿèƒ½ã‚’追åŠ
#SHOW_COMPLETE_TYPE ã§è¨å®šã§ãã¾ã™ã€‚
#イベントコマンドã®ã€Œã‚¹ã‚¯ãƒªãƒ—トã€ã§
#$game_party.enemy_book_max ã§å›³é‘‘ã®ç·é”物数(最大数)
#$game_party.enemy_book_now ã§å›³é‘‘ã®ç¾åœ¨ç™»éŒ²æ•°(ç¾åœ¨æ•°)
#$game_party.complete_percentage ã§å›³é‘‘ã®å®ŒæˆçŽ‡(å°æ•°ç‚¹åˆ‡æ¨ã¦)
#ã‚’å–å¾—ã§ãã¾ã™ã€‚
#
#2005.2.17
#complete_percentageã®ãƒ¡ã‚½ãƒƒãƒ‰åã‚’
#enemy_book_complete_percentageã«å¤‰æ›´(ä»–ã®å›³é‘‘ã¨åŒºåˆ¥ã§ãるよã†ã«)
#イベントコマンドã®ã€Œã‚¹ã‚¯ãƒªãƒ—トã€ã§æœ€å¤§æ•°ç‰ã®å–å¾—ã‚’çŸç¸®ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚
#enemy_book_max ã§å›³é‘‘ã®ç·é”物数(最大数)
#enemy_book_now ã§å›³é‘‘ã®ç¾åœ¨ç™»éŒ²æ•°(ç¾åœ¨æ•°)
#enemy_book_compã§å›³é‘‘ã®å®ŒæˆçŽ‡(å°æ•°ç‚¹åˆ‡æ¨ã¦)
#
#2005.2.18 ãƒã‚°ä¿®æ£
#complete_percentageã®ãƒ¡ã‚½ãƒƒãƒ‰åã‚’
#enemy_book_complete_percentageã«å¤‰æ›´ã—ãŸã®ã«
#complete_percentageã£ã¦å‘¼ã³å‡ºã—ã¦ã¾ã—ãŸã€‚(å˜ãªã‚‹æ›¸ãæ›ãˆæ¼ã‚Œã§ã™ã)
#
#2005.7.4 機能追åŠ
#コメント機能ã«å¯¾å¿œã€‚
#全体的ã«è‰²ã€…ã„ã˜ã‚Šã¾ã—ãŸã€‚
#
#2005.7.4 ãƒã‚°ä¿®æ£
#ç´°ã‹ã„ãƒã‚°ã‚’ä¿®æ£ã€‚
module Enemy_Book_Config
#ドãƒãƒƒãƒ—アイテム表示ã«ã‚¢ãƒŠãƒ©ã‚¤ã‚ºãŒå¿…è¦ã‹ã©ã†ã‹
DROP_ITEM_NEED_ANALYZE = true
#回é¿ä¿®æ£ã®åå‰
EVA_NAME = "Evasion"
#図鑑完æˆçŽ‡ã®è¡¨ç¤ºæ–¹æ³•
#0:表示ãªã— 1:ç¾åœ¨æ•°/最大数 2:%表示 3:両方
SHOW_COMPLETE_TYPE = 3
#コメント機能を使ã†ã‹ã©ã†ã‹(è¦ãƒ»ã‚³ãƒ¡ãƒ³ãƒˆè¿½åŠ スクリプト導入)
COMMENT_SYSTEM = true
end
class Game_Temp
attr_accessor :enemy_book_data
alias temp_enemy_book_data_initialize initialize
def initialize
temp_enemy_book_data_initialize
@enemy_book_data = Data_MonsterBook.new
end
end
class Game_Party
attr_accessor :enemy_info # 出会ã£ãŸæ•µæƒ…å ±(図鑑用)
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
alias book_info_initialize initialize
def initialize
book_info_initialize
@enemy_info = {}
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼æƒ…å ±ã®è¿½åŠ (図鑑用)
# type : 通常éé‡ã‹ã‚¢ãƒŠãƒ©ã‚¤ã‚ºã‹ 0:通常 1:アナライズ -1:æƒ…å ±å‰Šé™¤
# 0:ç„¡éé‡ 1:éé‡æ¸ˆ 2:アナライズ済
#--------------------------------------------------------------------------
def add_enemy_info(enemy_id, type = 0)
case type
when 0
if @enemy_info[enemy_id] == 2
return false
end
@enemy_info[enemy_id] = 1
when 1
@enemy_info[enemy_id] = 2
when -1
@enemy_info[enemy_id] = 0
end
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®æœ€å¤§ç™»éŒ²æ•°ã‚’å–å¾—
#--------------------------------------------------------------------------
def enemy_book_max
return $game_temp.enemy_book_data.id_data.size - 1
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®ç¾åœ¨ç™»éŒ²æ•°ã‚’å–å¾—
#--------------------------------------------------------------------------
def enemy_book_now
now_enemy_info = @enemy_info.keys
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
no_add = $game_temp.enemy_book_data.no_add_element
new_enemy_info = []
for i in now_enemy_info
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
new_enemy_info.push(enemy.id)
end
return new_enemy_info.size
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®å®ŒæˆçŽ‡ã‚’å–å¾—
end
class Interpreter
def enemy_book_max
return $game_party.enemy_book_max
end
def enemy_book_now
return $game_party.enemy_book_now
end
def enemy_book_comp
return $game_party.enemy_book_complete_percentage
end
end
class Scene_Battle
alias add_enemy_info_start_phase5 start_phase5
def start_phase5
for enemy in $game_troop.enemies
# エãƒãƒŸãƒ¼ãŒéš れ状態ã§ãªã„å ´åˆ
unless enemy.hidden
# 敵éé‡æƒ…å ±è¿½åŠ
$game_party.add_enemy_info(enemy.id, 0)
end
end
add_enemy_info_start_phase5
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®æˆ¦é—˜å¾Œç²å¾—アイテムã®æç”»
#--------------------------------------------------------------------------
def draw_enemy_drop_item(enemy, x, y)
self.contents.font.color = normal_color
treasures = []
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
# ç¾çŠ¶ã§ã¯ã¨ã‚Šã‚ãˆãš1ã¤ã®ã¿æç”»
if treasures.size > 0
item = treasures[0]
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
name = treasures[0].name
else
self.contents.font.color = disabled_color
name = "No Item"
end
self.contents.draw_text(x+28, y, 212, 32, name)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®å›³é‘‘IDã®æç”»
#--------------------------------------------------------------------------
def draw_enemy_book_id(enemy, x, y)
self.contents.font.color = normal_color
id = $game_temp.enemy_book_data.id_data.index(enemy.id)
self.contents.draw_text(x, y, 32, 32, id.to_s)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®åå‰ã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_name(enemy, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 152, 32, enemy.name)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®æç”»(アナライズ)
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_graphic(enemy, x, y, opacity = 255)
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
x = x + (cw / 2 - x) if cw / 2 > x
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®ç²å¾—EXPã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_exp(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®ç²å¾—GOLDã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_gold(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, $data_system.words.gold)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2)
end
end
class Game_Enemy_Book < Game_Enemy
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(enemy_id)
super(1, 0)#ダミー
@enemy_id = enemy_id
enemy = $data_enemies[@enemy_id]
@battler_name = enemy.battler_name
@battler_hue = enemy.battler_hue
@hp = maxhp
@sp = maxsp
end
end
class Data_MonsterBook
attr_reader :id_data
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
@id_data = enemy_book_id_set
end
#--------------------------------------------------------------------------
# ◠図鑑用登録無視属性å–å¾—
#--------------------------------------------------------------------------
def no_add_element
no_add = 0
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
for i in 1...$data_system.elements.size
if $data_system.elements =~ /図鑑登録無効/
no_add = i
break
end
end
return no_add
end
#--------------------------------------------------------------------------
# ◠図鑑用敵IDè¨å®š
#--------------------------------------------------------------------------
def enemy_book_id_set
data = [0]
no_add = no_add_element
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
for i in 1...$data_enemies.size
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
data.push(enemy.id)
end
return data
end
end
class Window_MonsterBook < Window_Selectable
attr_reader :data
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(index=0)
super(0, 64, 640, 416)
@column_max = 2
@book_data = $game_temp.enemy_book_data
@data = @book_data.id_data.dup
@data.shift
#@data.sort!
@item_max = @data.size
self.index = 0
refresh if @item_max > 0
end
#--------------------------------------------------------------------------
# â— éé‡ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—
#--------------------------------------------------------------------------
def data_set
data = $game_party.enemy_info.keys
data.sort!
newdata = []
for i in data
next if $game_party.enemy_info == 0
# 図鑑登録無視を考慮
if book_id(i) != nil
newdata.push(i)
end
end
return newdata
end
#--------------------------------------------------------------------------
# ◠表示許å¯å–å¾—
#--------------------------------------------------------------------------
def show?(id)
if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil
return false
else
return true
end
end
#--------------------------------------------------------------------------
# ◠図鑑用IDå–å¾—
#--------------------------------------------------------------------------
def book_id(id)
return @book_data.index(id)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼å–å¾—
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, row_max * 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
#é …ç›®æ•°ãŒ 0 ã§ãªã‘ã‚Œã°ãƒ“ットマップを作æˆã—ã€å…¨é …目をæç”»
if @item_max > 0
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# â— é …ç›®ã®æç”»
# index : é …ç›®ç•ªå·
#--------------------------------------------------------------------------
def draw_item(index)
enemy = $data_enemies[@data[index]]
return if enemy == nil
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
draw_enemy_book_id(enemy, x, y)
if show?(enemy.id)
self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 28+16, y, 212, 32, "ï¼ï¼ï¼ï¼ï¼", 0)
return
end
if analyze?(@data[index])
self.contents.font.color = text_color(3)
self.contents.draw_text(x + 256, y, 24, 32, "済", 2)
end
end
#--------------------------------------------------------------------------
# ◠アナライズ済ã‹ã©ã†ã‹
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end
class Window_MonsterBook_Info < Window_Base
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(0, 0+64, 640, 480-64)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh(enemy_id)
self.contents.clear
self.contents.font.size = 22
enemy = Game_Enemy_Book.new(enemy_id)
draw_enemy_graphic(enemy, 96, 240+48+64, 200)
draw_enemy_book_id(enemy, 4, 0)
draw_enemy_name(enemy, 48, 0)
draw_actor_hp(enemy, 288, 0)
draw_actor_sp(enemy, 288+160, 0)
draw_actor_parameter(enemy, 288 , 32, 0)
self.contents.font.color = system_color
self.contents.draw_text(288+160, 32, 120, 32, Enemy_Book_Config::EVA_NAME)
self.contents.font.color = normal_color
self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2)
draw_actor_parameter(enemy, 288 , 64, 3)
draw_actor_parameter(enemy, 288+160, 64, 4)
draw_actor_parameter(enemy, 288 , 96, 5)
draw_actor_parameter(enemy, 288+160, 96, 6)
draw_actor_parameter(enemy, 288 , 128, 1)
draw_actor_parameter(enemy, 288+160, 128, 2)
draw_enemy_exp(enemy, 288, 160)
draw_enemy_gold(enemy, 288+160, 160)
if analyze?(enemy.id) or !Enemy_Book_Config::DROP_ITEM_NEED_ANALYZE
self.contents.draw_text(288, 192, 96, 32, "Drop Item")
draw_enemy_drop_item(enemy, 288+96+4, 192)
self.contents.font.color = normal_color
#draw_element_guard(enemy, 320-32, 160-16+96)
end
end
#--------------------------------------------------------------------------
# ◠アナライズ済ã‹ã©ã†ã‹
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end
class Scene_MonsterBook
#--------------------------------------------------------------------------
# ◠メイン処ç†
#--------------------------------------------------------------------------
def main
$game_temp.enemy_book_data = Data_MonsterBook.new
# ウィンドウを作æˆ
@title_window = Window_Base.new(0, 0, 640, 64)
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
@title_window.contents.draw_text(4, 0, 320, 32, "Monster Information", 0)
@main_window = Window_MonsterBook.new
@main_window.active = true
# ã‚¤ãƒ³ãƒ•ã‚©ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ä½œæˆ (ä¸å¯è¦–・éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«è¨å®š)
@info_window = Window_MonsterBook_Info.new
@info_window.z = 110
@info_window.visible = false
@info_window.active = false
@visible_index = 0
if Enemy_Book_Config::COMMENT_SYSTEM
# ã‚³ãƒ¡ãƒ³ãƒˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ä½œæˆ (ä¸å¯è¦–・éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«è¨å®š)
@comment_window = Window_Monster_Book_Comment.new
@comment_window.z = 120
@comment_window.visible = false
@comment_on = false # コメントフラグ
end
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画é¢ã‚’æ›´æ–°
Graphics.update
# å…¥åŠ›æƒ…å ±ã‚’æ›´æ–°
Input.update
# フレーム更新
update
# ç”»é¢ãŒåˆ‡ã‚Šæ›¿ã‚ã£ãŸã‚‰ãƒ«ãƒ¼ãƒ—ã‚’ä¸æ–
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@main_window.dispose
@info_window.dispose
@title_window.dispose
@comment_window.dispose if @comment_window != nil
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@main_window.update
@info_window.update
if @info_window.active
update_info
return
end
# メインウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ: update_target を呼ã¶
if @main_window.active
update_main
return
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メインウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
#--------------------------------------------------------------------------
def update_main
# B ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::B)
# ã‚ャンセル SE ã‚’æ¼”å¥
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
# C ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::C)
if @main_window.item == nil or @main_window.show?(@main_window.item) == false
# ブザー SE ã‚’æ¼”å¥
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
@main_window.active = false
@info_window.active = true
@info_window.visible = true
@visible_index = @main_window.index
@info_window.refresh(@main_window.item)
if @comment_window != nil
@comment_window.refresh(@main_window.item)
if @comment_on
@comment_window.visible = true
else
@comment_window.visible = false
end
end
return
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (インフォウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
#--------------------------------------------------------------------------
def update_info
# B ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::B)
# ã‚ャンセル SE ã‚’æ¼”å¥
$game_system.se_play($data_system.cancel_se)
@main_window.active = true
@info_window.active = false
@info_window.visible = false
@comment_window.visible = false if @comment_window != nil
return
end
# C ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::C)
if @comment_window != nil
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
if @comment_on
@comment_on = false
@comment_window.visible = false
else
@comment_on = true
@comment_window.visible = true
end
return
end
end
if Input.trigger?(Input::L)
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != 0
@visible_index -= 1
else
@visible_index = @main_window.data.size - 1
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
if Input.trigger?(Input::R)
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != @main_window.data.size - 1
@visible_index += 1
else
@visible_index = 0
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
end
end
=begin
THIS IS THE COMMENTS FUNCTION!!! THIS IS WHAT I EDIT!!!
=end
# å›³é‘‘ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½è¿½åŠ (基本)
#
# 図鑑ã«ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½ã‚’使ã„ã™ã‚‹ã®ã«å¿…é ˆã§ã™ã€‚
#
# 2005.9.19
# ウィンドウã®ä¸é€æ˜Žåº¦ã€ãƒ•ã‚©ãƒ³ãƒˆã¨æ–‡å—色を指定å¯èƒ½ã«ã€‚
class Window_Book_Comment < Window_Base
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
self.opacity = self.window_opa
self.contents.font.name = self.font_name
self.contents.font.color = self.font_color
end
#--------------------------------------------------------------------------
# â— æ–‡å—列変æ›
#--------------------------------------------------------------------------
def transfer(str)
text = str.clone
# 制御文å—処ç†
begin
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end
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" }
# ä¸é€æ˜Žåº¦
text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" }
# æ–‡å—サイズ
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" }
# ルビ
text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" }
# ピクãƒãƒ£è¡¨ç¤º
text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" }
# ãƒãƒˆãƒ©ãƒ¼è¡¨ç¤º
text.gsub!(/\\[Bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" }
# ã‚ャラグラフィック表示
text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" }
return text
end
#--------------------------------------------------------------------------
# ◠変æ›ã—ãŸæ–‡å—列をæç”»
#--------------------------------------------------------------------------
def draw_ex_text(ox, oy, str, align=0)
text = str.clone
x = 0
y = 0
# 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
# \G ã®å ´åˆ
if c == "\002"
# 所æŒã‚´ãƒ¼ãƒ«ãƒ‰ã«å¤‰æ›
c = $game_party.gold.to_s
# æ–‡å—ã‚’æç”»
self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size(c).width, 32, c)
# x ã«æç”»ã—ãŸæ–‡å—ã®å¹…ã‚’åŠ ç®—
x += self.contents.text_size(c).width
# 次ã®æ–‡å—ã¸
next
end
# \O ã®å ´åˆ
if c == "\200"
text.sub!(/\[([0-9]+)\]/, "")
opacity = $1.to_i
temp = self.contents.font.color
self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity)
# 次ã®æ–‡å—ã¸
next
end
# \H ã®å ´åˆ
if c == "\201"
text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
# 次ã®æ–‡å—ã¸
next
end
# \R ã®å ´åˆ
if c == "\202"
text.sub!(/\[(.+?),(.+?)\]/, "")
x += ruby_set(ox+x,oy+(y*32),$1,$2)
# 次ã®æ–‡å—ã¸
next
end
# \Pic ã®å ´åˆ
if c == "\250"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "")
ope = self.contents.font.color.alpha
set_picture($1.to_i, $2.to_i, $3, ope)
# 次ã®æ–‡å—ã¸
next
end
# \Bat ã®å ´åˆ
if c == "\251"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope)
# 次ã®æ–‡å—ã¸
next
end
# \Cha ã®å ´åˆ
if c == "\252"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope)
# 次ã®æ–‡å—ã¸
next
end
# 改行文å—ã®å ´åˆ
if c == "\n"
# y ã« 1 ã‚’åŠ ç®—
y += 1
x = 0
# 次ã®æ–‡å—ã¸
next
end
# æ–‡å—ã‚’æç”»
self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c)
# x ã«æç”»ã—ãŸæ–‡å—ã®å¹…ã‚’åŠ ç®—
x += self.contents.text_size(c).width
end
end
#--------------------------------------------------------------------------
# ◠ルビæç”»
#--------------------------------------------------------------------------
def ruby_set(x,y,str,ruby)
text_w = self.contents.text_size(str).width
text_h = self.contents.text_size(str).height
f_size_back = self.contents.font.size
ruby_size = 10
self.contents.font.size = ruby_size
ruby_w = self.contents.text_size(ruby).width
self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1)
self.contents.font.size = f_size_back
self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str)
return text_w
end
#--------------------------------------------------------------------------
# ◠ピクãƒãƒ£ãƒ¼æç”»
#--------------------------------------------------------------------------
def set_picture(x, y, filename, opacity=255)
bitmap = RPG::Cache.picture(filename)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ©ãƒ¼æç”»
#--------------------------------------------------------------------------
def set_battler(x, y, filename, hue, opacity=255)
bitmap =RPG::Cache.battler(filename, hue)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# â— ã‚ャラクターæç”»
#--------------------------------------------------------------------------
def set_character(x, y, filename, hue, dir, pat, opacity=255)
bitmap = RPG::Cache.character(filename, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
cy = ch * (dir / 2 - 1)
cx = cw * (pat - 1)
src_rect = Rect.new(cx, cy, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
def window_opa
end
def font_name
end
def font_color
end
end
=begin
THIS IS WHAT I ACTUALLY EDIT!!! INDIVIDUAL COMMENTS...
=end
# å›³é‘‘ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½è¿½åŠ (é”物図鑑)
#
# コメントã«ã¯å†’険日記ã¨åŒæ§˜ã®åˆ¶å¾¡æ–‡å—ãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚
# 詳ã—ãã¯å†’険日記ã®æ–¹ã‚’ã”覧下ã•ã„。
#
# 2005.9.19
# ウィンドウã®ä¸é€æ˜Žåº¦ã€ãƒ•ã‚©ãƒ³ãƒˆã¨æ–‡å—色を指定å¯èƒ½ã«ã€‚
module MoMo_M_Book_Comment
# コメントウィンドウã®æ¨ªå¹…
C_WINDOW_WIDTH = 640
# コメントウィンドウã®ç¸¦å¹…
C_WINDOW_HEIGHT = 480
# コメントウィンドウã®X座標
C_WINDOW_X = 0
# コメントウィンドウã®Y座標
C_WINDOW_Y = 0
# コメントウィンドウã®ä¸é€æ˜Žåº¦
C_WINDOW_OPA = 255
# 使用ã™ã‚‹ãƒ•ã‚©ãƒ³ãƒˆå(å¸Œæœ›é †ã«é…列ã«è¿½åŠ ã—ã¦ãã ã•ã„)
C_WINDOW_FONT_NAME = ["Tahoma"]
# 使用ã™ã‚‹æ–‡å—色
# Color.new(赤ã®å€¤, ç·‘ã®å€¤, é’ã®å€¤, ä¸é€æ˜Žåº¦) ※0~255ã¾ã§
C_WINDOW_FONT_COLOR = Color.new(255, 255, 255, 255)
end
class Window_Monster_Book_Comment < Window_Book_Comment
def initialize
x = MoMo_M_Book_Comment::C_WINDOW_X
y = MoMo_M_Book_Comment::C_WINDOW_Y
width = MoMo_M_Book_Comment::C_WINDOW_WIDTH
height = MoMo_M_Book_Comment::C_WINDOW_HEIGHT
super(x, y, width, height)
end
def draw_comment(id)
self.contents.clear
comment = get_comment(id)
draw_ex_text(0, 0, transfer(comment))
end
def get_comment(id)
return comment_set[0] if comment_set[id] == nil
return comment_set[id]
end
def comment_set
return MoMo_M_Book_Comment::M_BOOK_COMMENT
end
def refresh(id)
draw_comment(id)
end
def window_opa
return MoMo_M_Book_Comment::C_WINDOW_OPA
end
def font_name
return MoMo_M_Book_Comment::C_WINDOW_FONT_NAME
end
def font_color
return MoMo_M_Book_Comment::C_WINDOW_FONT_COLOR
end
end
module MoMo_M_Book_Comment
str = []
# str[エãƒãƒŸãƒ¼ID]
str[0] = <<-EOS #デフォ(コメント未è¨å®šæ™‚用ã€é€šå¸¸ã¯ä½¿ç”¨ã—ãªã„)
コメントãªï½žã—ï¼
EOS
str[11] = <<-EOS #Aqua
Aqua:
A fiend on Dunhil Beach, recently forced onto the land
because of a territory squabble with a nearby Krakken.
It is a powerful foe compared with its competition around
Dunhil Beach, and usually at the top of the food chain, until
the Krakken came along. It is capable of being a strong
predator, but would usually eat small fish and the like, but
when it was forced onto the land, it began to develop a taste
for human flesh, starting with passing merchants, and moving
its way up, until starting to consume hunters and the like...
Dunhil Beach:
A small beach on the island of Yeltzern, this is usually a quiet
place with not much going on, until the recent territory
squabble with the Aqua and the Krakken, two fiends which
would normally be found nearer the Tibean Coast...
EOS
str[1] = <<-EOS #Goblin
Goblin:
These mischevious creatures are always causing annoyance
to the citizens of Dunhil. They are usually green, but special
breeds have various tones of colour, probably showing the
different levels of the pecking order, with the Goblin Elder
at the top. This one wields two daggers and is relatively
low in the pecking order. Even though these goblins know
no states or provinces, they still attack anything they
consider to be in there territory, making these a common
target for hunters...
Goblin Scimitar:
Once in every 1000 years, a Goblin genius is born, this
weapon in particular was developed by one of these
geniuses. It is curved so that it can slide over the top of
shields and hack away at the person behind. The genius
who developed this weapon was later tried, and found
guilty of being too clever and put to death...
EOS
str[2] = <<-EOS #Goblin Archer
Goblin Archer:
A more respected member of the pecking order, it is
skilled in the use of the bow. They are still a far way
down from The Elder, but are more respected than their
sword-wielding cousins...
Goblin Bow:
Curved and elegant, the Goblin Bow is a fine example
of rare Goblin inginuity. It isn't as good as most human
craft, but is still plausable in todays weapons market, even
if for a very low price. Again, the Goblin genius that designed
this weapon was sentenced to death by The Elder, this time
for being too smart... The poor goblin wrote his appeal in
his own blood, but was rejected because the Goblin Elder
was too busy looking at shiny rocks in the side of a cliff...
EOS
str[3] = <<-EOS
Basilisk:
A venomous fiend that inhabbits parts of Dunhil Canyons.
It is very agile and almost top of the food chain in that
area. The myth about these creatures eating men whole
is complete rubbish. They prefer to poison their victims
first, and then to eat their victims whole...
Antidotes:
A cure for the Basilisks venom had puzzled scientists
for many centuries. Until one day, when a scientist by
the name of Anne Dotte invented a cure by chance when
playing around with a flask of crushed Yaneor Leaf, a bag
of flour, and some stale, melted cheese. She originally
called her cure 'Anne Dotte', but it was later changed to
'Antidote'...
EOS
str[4] = <<-EOS
Cockatrice:
A bird similar to a chicken in appearance that roams
across many places on the island of Yeltzern. It is many
times faster and more violent than its tasty counter-part
and has a habbit of attacking passing merchants for items
of food. This one has not yet matured, but if it had, it
would be a much harder bird to catch indeed...
Cockatrice Feather:
Should you encounter one of these on your way, then
you should count yourself extremely lucky as these are
very hard to get hold of, since the birds move so very
fast. Some hunters eat raw cockatrice with the feathers
on, but it would be more advisable to actually sell the
feathers, as some people do, trying to pass them off for
Pheonix Feathers instead. So buyers beware!
EOS
str[5] = <<-EOS
Sand Scorpion:
One of the few creatures which can inhabbit the
intense heat and severe lack of water in Kalenn Desert.
This creature is more regarded as a pest, than a fiend of
Dalicia, but it has been known to attack unprepared
merchants and the like...
Sandy Knife:
A buttter knife that, because of being buried underneath the
sands of Kalenn Desert, has gained the extraordinary
power to command small sandstorms. This power thought
to be from a magician's staff that got buried under the sand
and released all of its magical energy into the sands turning
the butter knife into a most powerful weapon. It is strongly
adivised that if someone should find this weapon then
you should leave it alone, since this weapon could be
leathal if in the wrong hands...
EOS
str[6] = <<-EOS
Sand Wolf:
A dangerous type of wolf found in the unforgiving Kalenn
Desert. It is a fast, agile and hungry predator and most
certainly top the food chain in Kalenn Desert. But even they
cannot survive the sheer intensity of the heat at midday,
so they must rest under one of the few palm trees that
struggles to grow there. Even though you can sneak past
the wolves, be warned! The wolves have exceptionally good
hearing and anything that enters their territory does not
usually come out alive...
Kalenn Desert:
A barren wasteland that gaps the road from Dunhil to Lakur.
It inhabbits many a fiend and you should make sure that you
are fully prepared when entering the desert. Even though
the wolves and scorpions are frequent killers, the no.1 spot
is taken by the extreme and major lack of water...
EOS
str[7] = <<-EOS
Sewer Rat:
A verminous pest that over-ran the Yanua waterways
about 100 years ago. It is believed that they were
brought to the sewers by a Dunhil Sabbotage Unit
whence they were released into the sewers to cause
panic and disquiet. They are very agile and hard to hit
but don't have a great defence. Even though they are more
of a nuiscence than a fiend, they can still attack the
unwary traveller...
Yanua Waterways:
EOS
M_BOOK_COMMENT = str
end
#
#エãƒãƒŸãƒ¼ã®éé‡æƒ…å ±ã¯ã€æˆ¦é—˜çµ‚了時(経験値ãªã©ã‚’ç²å¾—ã™ã‚‹æ‰€)ã§è¿½åŠ ã•ã‚Œã¾ã™ã€‚
#よã£ã¦ã€æ•µã‹ã‚‰é€ƒã’ãŸå ´åˆã‚„è² ã‘イベントã§ã®æˆ¦é—˜æ•—北ãªã©ã§ã¯
#図鑑ã«ç™»éŒ²ã•ã‚Œã¾ã›ã‚“。
#ã“ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’変ãˆãŸã„å ´åˆã¯å„自書ãæ›ãˆã¦ä¸‹ã•ã„。
#(class Scene_Battle ã® start_phase5 ã§è¿½åŠ ã—ã¦ã¾ã™ã€‚)
#
#ã¾ãŸã€æ‰€ã€…「アナライズã€ã¨ã„ã†å˜èªžãŒã‚ã‚Šã¾ã™ãŒã€
#ç¾åœ¨ã€ã“ã®é”物辞典ã ã‘ã§ã¯æ©Ÿèƒ½ã—ã¦ãŠã‚Šã¾ã›ã‚“。(自ゲームã§ã®å残)
#Window_MonsterBook_Info ã® DROP_ITEM_NEED_ANALYZE ㌠true ã«ãªã£ã¦ã„ã‚‹ã¨
#ドãƒãƒƒãƒ—アイテムãŒè¡¨ç¤ºã•ã‚Œãªããªã‚Šã¾ã™ã®ã§ã€é€šå¸¸ã¯ false ã«ã—ã¦ãŠã„ã¦ä¸‹ã•ã„。
#
#注æ„
#ã“ã®ã¾ã¾ä½¿ã†ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒˆãƒ«ãƒ¼ãƒ—ã®1番ã«
#何もè¨å®šã—ã¦ã„ãªã„ã¨ã€ã‚¨ãƒ©ãƒ¼åãã¾ã™ã€‚
#対処ç–ã¨ã—ã¦ã¯
#1.ç´ ç›´ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒˆãƒ«ãƒ¼ãƒ—ã®1番ã«ä½•ã§ã‚‚ã„ã„ã‹ã‚‰è¨å®šã™ã‚‹ã€‚
#2.Game_Enemy_Book 㮠「super(1, 0)#ダミー〠ã®å·¦å´ã®æ•°å—ã®éƒ¨åˆ†ã‚’
# å˜åœ¨ã™ã‚‹ãƒˆãƒ«ãƒ¼ãƒ—IDã«æ›¸ãæ›ãˆã‚‹ã€‚
#ã®ã©ã¡ã‚‰ã‹ã«ãªã‚Šã¾ã™ã€‚
#
#2005.2.6 機能追åŠ
#図鑑完æˆåº¦ã®è¡¨ç¤ºæ©Ÿèƒ½ã‚’追åŠ
#SHOW_COMPLETE_TYPE ã§è¨å®šã§ãã¾ã™ã€‚
#イベントコマンドã®ã€Œã‚¹ã‚¯ãƒªãƒ—トã€ã§
#$game_party.enemy_book_max ã§å›³é‘‘ã®ç·é”物数(最大数)
#$game_party.enemy_book_now ã§å›³é‘‘ã®ç¾åœ¨ç™»éŒ²æ•°(ç¾åœ¨æ•°)
#$game_party.complete_percentage ã§å›³é‘‘ã®å®ŒæˆçŽ‡(å°æ•°ç‚¹åˆ‡æ¨ã¦)
#ã‚’å–å¾—ã§ãã¾ã™ã€‚
#
#2005.2.17
#complete_percentageã®ãƒ¡ã‚½ãƒƒãƒ‰åã‚’
#enemy_book_complete_percentageã«å¤‰æ›´(ä»–ã®å›³é‘‘ã¨åŒºåˆ¥ã§ãるよã†ã«)
#イベントコマンドã®ã€Œã‚¹ã‚¯ãƒªãƒ—トã€ã§æœ€å¤§æ•°ç‰ã®å–å¾—ã‚’çŸç¸®ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚
#enemy_book_max ã§å›³é‘‘ã®ç·é”物数(最大数)
#enemy_book_now ã§å›³é‘‘ã®ç¾åœ¨ç™»éŒ²æ•°(ç¾åœ¨æ•°)
#enemy_book_compã§å›³é‘‘ã®å®ŒæˆçŽ‡(å°æ•°ç‚¹åˆ‡æ¨ã¦)
#
#2005.2.18 ãƒã‚°ä¿®æ£
#complete_percentageã®ãƒ¡ã‚½ãƒƒãƒ‰åã‚’
#enemy_book_complete_percentageã«å¤‰æ›´ã—ãŸã®ã«
#complete_percentageã£ã¦å‘¼ã³å‡ºã—ã¦ã¾ã—ãŸã€‚(å˜ãªã‚‹æ›¸ãæ›ãˆæ¼ã‚Œã§ã™ã)
#
#2005.7.4 機能追åŠ
#コメント機能ã«å¯¾å¿œã€‚
#全体的ã«è‰²ã€…ã„ã˜ã‚Šã¾ã—ãŸã€‚
#
#2005.7.4 ãƒã‚°ä¿®æ£
#ç´°ã‹ã„ãƒã‚°ã‚’ä¿®æ£ã€‚
module Enemy_Book_Config
#ドãƒãƒƒãƒ—アイテム表示ã«ã‚¢ãƒŠãƒ©ã‚¤ã‚ºãŒå¿…è¦ã‹ã©ã†ã‹
DROP_ITEM_NEED_ANALYZE = true
#回é¿ä¿®æ£ã®åå‰
EVA_NAME = "Evasion"
#図鑑完æˆçŽ‡ã®è¡¨ç¤ºæ–¹æ³•
#0:表示ãªã— 1:ç¾åœ¨æ•°/最大数 2:%表示 3:両方
SHOW_COMPLETE_TYPE = 3
#コメント機能を使ã†ã‹ã©ã†ã‹(è¦ãƒ»ã‚³ãƒ¡ãƒ³ãƒˆè¿½åŠ スクリプト導入)
COMMENT_SYSTEM = true
end
class Game_Temp
attr_accessor :enemy_book_data
alias temp_enemy_book_data_initialize initialize
def initialize
temp_enemy_book_data_initialize
@enemy_book_data = Data_MonsterBook.new
end
end
class Game_Party
attr_accessor :enemy_info # 出会ã£ãŸæ•µæƒ…å ±(図鑑用)
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
alias book_info_initialize initialize
def initialize
book_info_initialize
@enemy_info = {}
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼æƒ…å ±ã®è¿½åŠ (図鑑用)
# type : 通常éé‡ã‹ã‚¢ãƒŠãƒ©ã‚¤ã‚ºã‹ 0:通常 1:アナライズ -1:æƒ…å ±å‰Šé™¤
# 0:ç„¡éé‡ 1:éé‡æ¸ˆ 2:アナライズ済
#--------------------------------------------------------------------------
def add_enemy_info(enemy_id, type = 0)
case type
when 0
if @enemy_info[enemy_id] == 2
return false
end
@enemy_info[enemy_id] = 1
when 1
@enemy_info[enemy_id] = 2
when -1
@enemy_info[enemy_id] = 0
end
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®æœ€å¤§ç™»éŒ²æ•°ã‚’å–å¾—
#--------------------------------------------------------------------------
def enemy_book_max
return $game_temp.enemy_book_data.id_data.size - 1
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®ç¾åœ¨ç™»éŒ²æ•°ã‚’å–å¾—
#--------------------------------------------------------------------------
def enemy_book_now
now_enemy_info = @enemy_info.keys
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
no_add = $game_temp.enemy_book_data.no_add_element
new_enemy_info = []
for i in now_enemy_info
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
new_enemy_info.push(enemy.id)
end
return new_enemy_info.size
end
#--------------------------------------------------------------------------
# â— é”物図鑑ã®å®ŒæˆçŽ‡ã‚’å–å¾—
end
class Interpreter
def enemy_book_max
return $game_party.enemy_book_max
end
def enemy_book_now
return $game_party.enemy_book_now
end
def enemy_book_comp
return $game_party.enemy_book_complete_percentage
end
end
class Scene_Battle
alias add_enemy_info_start_phase5 start_phase5
def start_phase5
for enemy in $game_troop.enemies
# エãƒãƒŸãƒ¼ãŒéš れ状態ã§ãªã„å ´åˆ
unless enemy.hidden
# 敵éé‡æƒ…å ±è¿½åŠ
$game_party.add_enemy_info(enemy.id, 0)
end
end
add_enemy_info_start_phase5
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®æˆ¦é—˜å¾Œç²å¾—アイテムã®æç”»
#--------------------------------------------------------------------------
def draw_enemy_drop_item(enemy, x, y)
self.contents.font.color = normal_color
treasures = []
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
# ç¾çŠ¶ã§ã¯ã¨ã‚Šã‚ãˆãš1ã¤ã®ã¿æç”»
if treasures.size > 0
item = treasures[0]
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
name = treasures[0].name
else
self.contents.font.color = disabled_color
name = "No Item"
end
self.contents.draw_text(x+28, y, 212, 32, name)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®å›³é‘‘IDã®æç”»
#--------------------------------------------------------------------------
def draw_enemy_book_id(enemy, x, y)
self.contents.font.color = normal_color
id = $game_temp.enemy_book_data.id_data.index(enemy.id)
self.contents.draw_text(x, y, 32, 32, id.to_s)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®åå‰ã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_name(enemy, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 152, 32, enemy.name)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®æç”»(アナライズ)
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_graphic(enemy, x, y, opacity = 255)
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
x = x + (cw / 2 - x) if cw / 2 > x
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®ç²å¾—EXPã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_exp(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼ã®ç²å¾—GOLDã®æç”»
# enemy : エãƒãƒŸãƒ¼
# x : æ画先 X 座標
# y : æ画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_gold(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, $data_system.words.gold)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2)
end
end
class Game_Enemy_Book < Game_Enemy
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(enemy_id)
super(1, 0)#ダミー
@enemy_id = enemy_id
enemy = $data_enemies[@enemy_id]
@battler_name = enemy.battler_name
@battler_hue = enemy.battler_hue
@hp = maxhp
@sp = maxsp
end
end
class Data_MonsterBook
attr_reader :id_data
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
@id_data = enemy_book_id_set
end
#--------------------------------------------------------------------------
# ◠図鑑用登録無視属性å–å¾—
#--------------------------------------------------------------------------
def no_add_element
no_add = 0
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
for i in 1...$data_system.elements.size
if $data_system.elements =~ /図鑑登録無効/
no_add = i
break
end
end
return no_add
end
#--------------------------------------------------------------------------
# ◠図鑑用敵IDè¨å®š
#--------------------------------------------------------------------------
def enemy_book_id_set
data = [0]
no_add = no_add_element
# 登録無視ã®å±žæ€§IDã‚’å–å¾—
for i in 1...$data_enemies.size
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
data.push(enemy.id)
end
return data
end
end
class Window_MonsterBook < Window_Selectable
attr_reader :data
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(index=0)
super(0, 64, 640, 416)
@column_max = 2
@book_data = $game_temp.enemy_book_data
@data = @book_data.id_data.dup
@data.shift
#@data.sort!
@item_max = @data.size
self.index = 0
refresh if @item_max > 0
end
#--------------------------------------------------------------------------
# â— éé‡ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—
#--------------------------------------------------------------------------
def data_set
data = $game_party.enemy_info.keys
data.sort!
newdata = []
for i in data
next if $game_party.enemy_info == 0
# 図鑑登録無視を考慮
if book_id(i) != nil
newdata.push(i)
end
end
return newdata
end
#--------------------------------------------------------------------------
# ◠表示許å¯å–å¾—
#--------------------------------------------------------------------------
def show?(id)
if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil
return false
else
return true
end
end
#--------------------------------------------------------------------------
# ◠図鑑用IDå–å¾—
#--------------------------------------------------------------------------
def book_id(id)
return @book_data.index(id)
end
#--------------------------------------------------------------------------
# ◠エãƒãƒŸãƒ¼å–å¾—
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, row_max * 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
#é …ç›®æ•°ãŒ 0 ã§ãªã‘ã‚Œã°ãƒ“ットマップを作æˆã—ã€å…¨é …目をæç”»
if @item_max > 0
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# â— é …ç›®ã®æç”»
# index : é …ç›®ç•ªå·
#--------------------------------------------------------------------------
def draw_item(index)
enemy = $data_enemies[@data[index]]
return if enemy == nil
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
draw_enemy_book_id(enemy, x, y)
if show?(enemy.id)
self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 28+16, y, 212, 32, "ï¼ï¼ï¼ï¼ï¼", 0)
return
end
if analyze?(@data[index])
self.contents.font.color = text_color(3)
self.contents.draw_text(x + 256, y, 24, 32, "済", 2)
end
end
#--------------------------------------------------------------------------
# ◠アナライズ済ã‹ã©ã†ã‹
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end
class Window_MonsterBook_Info < Window_Base
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(0, 0+64, 640, 480-64)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh(enemy_id)
self.contents.clear
self.contents.font.size = 22
enemy = Game_Enemy_Book.new(enemy_id)
draw_enemy_graphic(enemy, 96, 240+48+64, 200)
draw_enemy_book_id(enemy, 4, 0)
draw_enemy_name(enemy, 48, 0)
draw_actor_hp(enemy, 288, 0)
draw_actor_sp(enemy, 288+160, 0)
draw_actor_parameter(enemy, 288 , 32, 0)
self.contents.font.color = system_color
self.contents.draw_text(288+160, 32, 120, 32, Enemy_Book_Config::EVA_NAME)
self.contents.font.color = normal_color
self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2)
draw_actor_parameter(enemy, 288 , 64, 3)
draw_actor_parameter(enemy, 288+160, 64, 4)
draw_actor_parameter(enemy, 288 , 96, 5)
draw_actor_parameter(enemy, 288+160, 96, 6)
draw_actor_parameter(enemy, 288 , 128, 1)
draw_actor_parameter(enemy, 288+160, 128, 2)
draw_enemy_exp(enemy, 288, 160)
draw_enemy_gold(enemy, 288+160, 160)
if analyze?(enemy.id) or !Enemy_Book_Config::DROP_ITEM_NEED_ANALYZE
self.contents.draw_text(288, 192, 96, 32, "Drop Item")
draw_enemy_drop_item(enemy, 288+96+4, 192)
self.contents.font.color = normal_color
#draw_element_guard(enemy, 320-32, 160-16+96)
end
end
#--------------------------------------------------------------------------
# ◠アナライズ済ã‹ã©ã†ã‹
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end
class Scene_MonsterBook
#--------------------------------------------------------------------------
# ◠メイン処ç†
#--------------------------------------------------------------------------
def main
$game_temp.enemy_book_data = Data_MonsterBook.new
# ウィンドウを作æˆ
@title_window = Window_Base.new(0, 0, 640, 64)
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
@title_window.contents.draw_text(4, 0, 320, 32, "Monster Information", 0)
@main_window = Window_MonsterBook.new
@main_window.active = true
# ã‚¤ãƒ³ãƒ•ã‚©ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ä½œæˆ (ä¸å¯è¦–・éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«è¨å®š)
@info_window = Window_MonsterBook_Info.new
@info_window.z = 110
@info_window.visible = false
@info_window.active = false
@visible_index = 0
if Enemy_Book_Config::COMMENT_SYSTEM
# ã‚³ãƒ¡ãƒ³ãƒˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ä½œæˆ (ä¸å¯è¦–・éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«è¨å®š)
@comment_window = Window_Monster_Book_Comment.new
@comment_window.z = 120
@comment_window.visible = false
@comment_on = false # コメントフラグ
end
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画é¢ã‚’æ›´æ–°
Graphics.update
# å…¥åŠ›æƒ…å ±ã‚’æ›´æ–°
Input.update
# フレーム更新
update
# ç”»é¢ãŒåˆ‡ã‚Šæ›¿ã‚ã£ãŸã‚‰ãƒ«ãƒ¼ãƒ—ã‚’ä¸æ–
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@main_window.dispose
@info_window.dispose
@title_window.dispose
@comment_window.dispose if @comment_window != nil
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@main_window.update
@info_window.update
if @info_window.active
update_info
return
end
# メインウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ: update_target を呼ã¶
if @main_window.active
update_main
return
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メインウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
#--------------------------------------------------------------------------
def update_main
# B ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::B)
# ã‚ャンセル SE ã‚’æ¼”å¥
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
# C ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::C)
if @main_window.item == nil or @main_window.show?(@main_window.item) == false
# ブザー SE ã‚’æ¼”å¥
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
@main_window.active = false
@info_window.active = true
@info_window.visible = true
@visible_index = @main_window.index
@info_window.refresh(@main_window.item)
if @comment_window != nil
@comment_window.refresh(@main_window.item)
if @comment_on
@comment_window.visible = true
else
@comment_window.visible = false
end
end
return
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (インフォウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
#--------------------------------------------------------------------------
def update_info
# B ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::B)
# ã‚ャンセル SE ã‚’æ¼”å¥
$game_system.se_play($data_system.cancel_se)
@main_window.active = true
@info_window.active = false
@info_window.visible = false
@comment_window.visible = false if @comment_window != nil
return
end
# C ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.trigger?(Input::C)
if @comment_window != nil
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
if @comment_on
@comment_on = false
@comment_window.visible = false
else
@comment_on = true
@comment_window.visible = true
end
return
end
end
if Input.trigger?(Input::L)
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != 0
@visible_index -= 1
else
@visible_index = @main_window.data.size - 1
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
if Input.trigger?(Input::R)
# 決定 SE ã‚’æ¼”å¥
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != @main_window.data.size - 1
@visible_index += 1
else
@visible_index = 0
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
end
end
=begin
THIS IS THE COMMENTS FUNCTION!!! THIS IS WHAT I EDIT!!!
=end
# å›³é‘‘ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½è¿½åŠ (基本)
#
# 図鑑ã«ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½ã‚’使ã„ã™ã‚‹ã®ã«å¿…é ˆã§ã™ã€‚
#
# 2005.9.19
# ウィンドウã®ä¸é€æ˜Žåº¦ã€ãƒ•ã‚©ãƒ³ãƒˆã¨æ–‡å—色を指定å¯èƒ½ã«ã€‚
class Window_Book_Comment < Window_Base
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
self.opacity = self.window_opa
self.contents.font.name = self.font_name
self.contents.font.color = self.font_color
end
#--------------------------------------------------------------------------
# â— æ–‡å—列変æ›
#--------------------------------------------------------------------------
def transfer(str)
text = str.clone
# 制御文å—処ç†
begin
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end
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" }
# ä¸é€æ˜Žåº¦
text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" }
# æ–‡å—サイズ
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" }
# ルビ
text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" }
# ピクãƒãƒ£è¡¨ç¤º
text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" }
# ãƒãƒˆãƒ©ãƒ¼è¡¨ç¤º
text.gsub!(/\\[Bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" }
# ã‚ャラグラフィック表示
text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" }
return text
end
#--------------------------------------------------------------------------
# ◠変æ›ã—ãŸæ–‡å—列をæç”»
#--------------------------------------------------------------------------
def draw_ex_text(ox, oy, str, align=0)
text = str.clone
x = 0
y = 0
# 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
# \G ã®å ´åˆ
if c == "\002"
# 所æŒã‚´ãƒ¼ãƒ«ãƒ‰ã«å¤‰æ›
c = $game_party.gold.to_s
# æ–‡å—ã‚’æç”»
self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size(c).width, 32, c)
# x ã«æç”»ã—ãŸæ–‡å—ã®å¹…ã‚’åŠ ç®—
x += self.contents.text_size(c).width
# 次ã®æ–‡å—ã¸
next
end
# \O ã®å ´åˆ
if c == "\200"
text.sub!(/\[([0-9]+)\]/, "")
opacity = $1.to_i
temp = self.contents.font.color
self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity)
# 次ã®æ–‡å—ã¸
next
end
# \H ã®å ´åˆ
if c == "\201"
text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
# 次ã®æ–‡å—ã¸
next
end
# \R ã®å ´åˆ
if c == "\202"
text.sub!(/\[(.+?),(.+?)\]/, "")
x += ruby_set(ox+x,oy+(y*32),$1,$2)
# 次ã®æ–‡å—ã¸
next
end
# \Pic ã®å ´åˆ
if c == "\250"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "")
ope = self.contents.font.color.alpha
set_picture($1.to_i, $2.to_i, $3, ope)
# 次ã®æ–‡å—ã¸
next
end
# \Bat ã®å ´åˆ
if c == "\251"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope)
# 次ã®æ–‡å—ã¸
next
end
# \Cha ã®å ´åˆ
if c == "\252"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope)
# 次ã®æ–‡å—ã¸
next
end
# 改行文å—ã®å ´åˆ
if c == "\n"
# y ã« 1 ã‚’åŠ ç®—
y += 1
x = 0
# 次ã®æ–‡å—ã¸
next
end
# æ–‡å—ã‚’æç”»
self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c)
# x ã«æç”»ã—ãŸæ–‡å—ã®å¹…ã‚’åŠ ç®—
x += self.contents.text_size(c).width
end
end
#--------------------------------------------------------------------------
# ◠ルビæç”»
#--------------------------------------------------------------------------
def ruby_set(x,y,str,ruby)
text_w = self.contents.text_size(str).width
text_h = self.contents.text_size(str).height
f_size_back = self.contents.font.size
ruby_size = 10
self.contents.font.size = ruby_size
ruby_w = self.contents.text_size(ruby).width
self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1)
self.contents.font.size = f_size_back
self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str)
return text_w
end
#--------------------------------------------------------------------------
# ◠ピクãƒãƒ£ãƒ¼æç”»
#--------------------------------------------------------------------------
def set_picture(x, y, filename, opacity=255)
bitmap = RPG::Cache.picture(filename)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ©ãƒ¼æç”»
#--------------------------------------------------------------------------
def set_battler(x, y, filename, hue, opacity=255)
bitmap =RPG::Cache.battler(filename, hue)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# â— ã‚ャラクターæç”»
#--------------------------------------------------------------------------
def set_character(x, y, filename, hue, dir, pat, opacity=255)
bitmap = RPG::Cache.character(filename, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
cy = ch * (dir / 2 - 1)
cx = cw * (pat - 1)
src_rect = Rect.new(cx, cy, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
def window_opa
end
def font_name
end
def font_color
end
end
=begin
THIS IS WHAT I ACTUALLY EDIT!!! INDIVIDUAL COMMENTS...
=end
# å›³é‘‘ã‚³ãƒ¡ãƒ³ãƒˆæ©Ÿèƒ½è¿½åŠ (é”物図鑑)
#
# コメントã«ã¯å†’険日記ã¨åŒæ§˜ã®åˆ¶å¾¡æ–‡å—ãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚
# 詳ã—ãã¯å†’険日記ã®æ–¹ã‚’ã”覧下ã•ã„。
#
# 2005.9.19
# ウィンドウã®ä¸é€æ˜Žåº¦ã€ãƒ•ã‚©ãƒ³ãƒˆã¨æ–‡å—色を指定å¯èƒ½ã«ã€‚
module MoMo_M_Book_Comment
# コメントウィンドウã®æ¨ªå¹…
C_WINDOW_WIDTH = 640
# コメントウィンドウã®ç¸¦å¹…
C_WINDOW_HEIGHT = 480
# コメントウィンドウã®X座標
C_WINDOW_X = 0
# コメントウィンドウã®Y座標
C_WINDOW_Y = 0
# コメントウィンドウã®ä¸é€æ˜Žåº¦
C_WINDOW_OPA = 255
# 使用ã™ã‚‹ãƒ•ã‚©ãƒ³ãƒˆå(å¸Œæœ›é †ã«é…列ã«è¿½åŠ ã—ã¦ãã ã•ã„)
C_WINDOW_FONT_NAME = ["Tahoma"]
# 使用ã™ã‚‹æ–‡å—色
# Color.new(赤ã®å€¤, ç·‘ã®å€¤, é’ã®å€¤, ä¸é€æ˜Žåº¦) ※0~255ã¾ã§
C_WINDOW_FONT_COLOR = Color.new(255, 255, 255, 255)
end
class Window_Monster_Book_Comment < Window_Book_Comment
def initialize
x = MoMo_M_Book_Comment::C_WINDOW_X
y = MoMo_M_Book_Comment::C_WINDOW_Y
width = MoMo_M_Book_Comment::C_WINDOW_WIDTH
height = MoMo_M_Book_Comment::C_WINDOW_HEIGHT
super(x, y, width, height)
end
def draw_comment(id)
self.contents.clear
comment = get_comment(id)
draw_ex_text(0, 0, transfer(comment))
end
def get_comment(id)
return comment_set[0] if comment_set[id] == nil
return comment_set[id]
end
def comment_set
return MoMo_M_Book_Comment::M_BOOK_COMMENT
end
def refresh(id)
draw_comment(id)
end
def window_opa
return MoMo_M_Book_Comment::C_WINDOW_OPA
end
def font_name
return MoMo_M_Book_Comment::C_WINDOW_FONT_NAME
end
def font_color
return MoMo_M_Book_Comment::C_WINDOW_FONT_COLOR
end
end
module MoMo_M_Book_Comment
str = []
# str[エãƒãƒŸãƒ¼ID]
str[0] = <<-EOS #デフォ(コメント未è¨å®šæ™‚用ã€é€šå¸¸ã¯ä½¿ç”¨ã—ãªã„)
コメントãªï½žã—ï¼
EOS
str[11] = <<-EOS #Aqua
Aqua:
A fiend on Dunhil Beach, recently forced onto the land
because of a territory squabble with a nearby Krakken.
It is a powerful foe compared with its competition around
Dunhil Beach, and usually at the top of the food chain, until
the Krakken came along. It is capable of being a strong
predator, but would usually eat small fish and the like, but
when it was forced onto the land, it began to develop a taste
for human flesh, starting with passing merchants, and moving
its way up, until starting to consume hunters and the like...
Dunhil Beach:
A small beach on the island of Yeltzern, this is usually a quiet
place with not much going on, until the recent territory
squabble with the Aqua and the Krakken, two fiends which
would normally be found nearer the Tibean Coast...
EOS
str[1] = <<-EOS #Goblin
Goblin:
These mischevious creatures are always causing annoyance
to the citizens of Dunhil. They are usually green, but special
breeds have various tones of colour, probably showing the
different levels of the pecking order, with the Goblin Elder
at the top. This one wields two daggers and is relatively
low in the pecking order. Even though these goblins know
no states or provinces, they still attack anything they
consider to be in there territory, making these a common
target for hunters...
Goblin Scimitar:
Once in every 1000 years, a Goblin genius is born, this
weapon in particular was developed by one of these
geniuses. It is curved so that it can slide over the top of
shields and hack away at the person behind. The genius
who developed this weapon was later tried, and found
guilty of being too clever and put to death...
EOS
str[2] = <<-EOS #Goblin Archer
Goblin Archer:
A more respected member of the pecking order, it is
skilled in the use of the bow. They are still a far way
down from The Elder, but are more respected than their
sword-wielding cousins...
Goblin Bow:
Curved and elegant, the Goblin Bow is a fine example
of rare Goblin inginuity. It isn't as good as most human
craft, but is still plausable in todays weapons market, even
if for a very low price. Again, the Goblin genius that designed
this weapon was sentenced to death by The Elder, this time
for being too smart... The poor goblin wrote his appeal in
his own blood, but was rejected because the Goblin Elder
was too busy looking at shiny rocks in the side of a cliff...
EOS
str[3] = <<-EOS
Basilisk:
A venomous fiend that inhabbits parts of Dunhil Canyons.
It is very agile and almost top of the food chain in that
area. The myth about these creatures eating men whole
is complete rubbish. They prefer to poison their victims
first, and then to eat their victims whole...
Antidotes:
A cure for the Basilisks venom had puzzled scientists
for many centuries. Until one day, when a scientist by
the name of Anne Dotte invented a cure by chance when
playing around with a flask of crushed Yaneor Leaf, a bag
of flour, and some stale, melted cheese. She originally
called her cure 'Anne Dotte', but it was later changed to
'Antidote'...
EOS
str[4] = <<-EOS
Cockatrice:
A bird similar to a chicken in appearance that roams
across many places on the island of Yeltzern. It is many
times faster and more violent than its tasty counter-part
and has a habbit of attacking passing merchants for items
of food. This one has not yet matured, but if it had, it
would be a much harder bird to catch indeed...
Cockatrice Feather:
Should you encounter one of these on your way, then
you should count yourself extremely lucky as these are
very hard to get hold of, since the birds move so very
fast. Some hunters eat raw cockatrice with the feathers
on, but it would be more advisable to actually sell the
feathers, as some people do, trying to pass them off for
Pheonix Feathers instead. So buyers beware!
EOS
str[5] = <<-EOS
Sand Scorpion:
One of the few creatures which can inhabbit the
intense heat and severe lack of water in Kalenn Desert.
This creature is more regarded as a pest, than a fiend of
Dalicia, but it has been known to attack unprepared
merchants and the like...
Sandy Knife:
A buttter knife that, because of being buried underneath the
sands of Kalenn Desert, has gained the extraordinary
power to command small sandstorms. This power thought
to be from a magician's staff that got buried under the sand
and released all of its magical energy into the sands turning
the butter knife into a most powerful weapon. It is strongly
adivised that if someone should find this weapon then
you should leave it alone, since this weapon could be
leathal if in the wrong hands...
EOS
str[6] = <<-EOS
Sand Wolf:
A dangerous type of wolf found in the unforgiving Kalenn
Desert. It is a fast, agile and hungry predator and most
certainly top the food chain in Kalenn Desert. But even they
cannot survive the sheer intensity of the heat at midday,
so they must rest under one of the few palm trees that
struggles to grow there. Even though you can sneak past
the wolves, be warned! The wolves have exceptionally good
hearing and anything that enters their territory does not
usually come out alive...
Kalenn Desert:
A barren wasteland that gaps the road from Dunhil to Lakur.
It inhabbits many a fiend and you should make sure that you
are fully prepared when entering the desert. Even though
the wolves and scorpions are frequent killers, the no.1 spot
is taken by the extreme and major lack of water...
EOS
str[7] = <<-EOS
Sewer Rat:
A verminous pest that over-ran the Yanua waterways
about 100 years ago. It is believed that they were
brought to the sewers by a Dunhil Sabbotage Unit
whence they were released into the sewers to cause
panic and disquiet. They are very agile and hard to hit
but don't have a great defence. Even though they are more
of a nuiscence than a fiend, they can still attack the
unwary traveller...
Yanua Waterways:
EOS
M_BOOK_COMMENT = str
end
(Hey! I said sorry already... I'm only 12... )
Anyhoo...
What I want...
I would like it so that it displays catergory 1 at the top and catergory 999 at the bottom, regardless of what order they are in in the database... Displaying the catergory name at the top... (Underlined and italic if possible...)
Like this:
Humans
Lakur Soldier
Saladon
General Soloman
I want it set out in this way...
THIS:
MONSTER_CAT
1 = [2,3,5,9,17]
Thanks...
OH! And as a reward there is an AMAZING BATTLER OF A HELL MONSTER!!! It isn't RTP but works perfectly with it...