#============================================================================== # ■ VX-RGSS2-5 用語辞典-自動生成Plugin [Ver.2.0.0] by Claimh #------------------------------------------------------------------------------ #・データベース上のアクター/エネミー/アイテム/武器/防具/スキル/クラスの情報を # 用語辞典として自動生成します。 #・自動生成された辞書データはすべて初期状態では非表示になります。 #------------------------------------------------------------------------------ #【アクター、エネミー、アイテム、武器、防具、スキル、クラス、クエストの自動生成】 #・自動生成した場合の用語IDは生成元のIDと同じです # (例) エネミーID:5 --(自動生成)--> 用語ID:5 #------------------------------------------------------------------------------ #【場所情報の自動生成】 #・必須:ワールドマップ #・ワールドマップのタウン・リージョン情報を用語辞典に反映します。 #・リージョン情報の用語IDは リージョンID * 1000 です # 用語ID = DictAutoCreate.conv_region_id(リージョンID) #・タウン情報の用語IDは リージョンID * 1000 + タウンID + 1 です # 用語ID = DictAutoCreate.conv_town_id(リージョンID, タウンID) # ※タウンIDは0-998しか使えません。 #============================================================================== =begin - 使い方 - 用語辞典[設定] の 「用語設定」で以下のように設定してください。 WORDS[項目番号] = ATC_ACTOR # アクターの自動生成 WORDS[項目番号] = ATC_ENEMY # エネミーの自動生成 WORDS[項目番号] = ATC_ENEMY_A # エネミー(アナライズ用)の自動生成 WORDS[項目番号] = ATC_ITEM # アイテムの自動生成 WORDS[項目番号] = ATC_WEAPON # 武器の自動生成 WORDS[項目番号] = ATC_ARMOR_ALL # 防具(全て)の自動生成 WORDS[項目番号] = ATC_ARMOR_S # 防具(盾のみ)の自動生成 WORDS[項目番号] = ATC_ARMOR_H # 防具(頭防具のみ)の自動生成 WORDS[項目番号] = ATC_ARMOR_C # 防具(身体防具のみ)の自動生成 WORDS[項目番号] = ATC_ARMOR_A # 防具(装飾品のみ)の自動生成 WORDS[項目番号] = ATC_SKILL # スキルの自動生成 WORDS[項目番号] = ATC_CLASS # クラスの自動生成 WORDS[項目番号] = ATC_TOWN # 場所の自動生成 WORDS[項目番号] = ACT_QUEST # クエストの自動生成 =end module DictAutoCreate # 属性表示の限界個数 ELEMENTS_MAX = 10 # 表示しない属性ID ELE_NOT_SHOW = [ID, …] ELE_NOT_SHOW = [] # アイコン表示する ELE_USE_ICON = false # アイコン(ELE_USE_ICON = trueのときだけ必要) ELE_ICON = { # 属性ID => アイコンIndex 1 => 74, # 炎 2 => 77, # 氷 3 => 78, # 雷 4 => 75, # 水 5 => 76, # 土 6 => 73, # 風 7 => 79, # 光 8 => 80 # 闇 } # ステート表示の限界個数 STATES_MAX = 5 # 表示しないステートID STS_NOT_SHOW = [ID, …] STS_NOT_SHOW = [] # アイコン表示する STS_USE_ICON = false # アイコン(STS_USE_ICON = trueのときだけ必要) STS_ICON = { # ステートID => アイコンIndex 1 => "046-Skill03", # 戦闘不能 2 => "049-Skill06", # スタン 3 => "045-Skill02", # 毒 4 => "049-Skill06", # 幻惑 5 => "skill_027", # 沈黙 6 => "skill_064", # 混乱 7 => "skill_026", # 睡眠 8 => "skill_025", # 麻痺 9 => "047-Skill04", # ウィークン 10 => "047-Skill04", # クラムジー 11 => "047-Skill04", # ディレイ 12 => "047-Skill04", # フィーブル 13 => "048-Skill05", # シャープ 14 => "048-Skill05", # バリア 15 => "048-Skill05", # レジスト 16 => "048-Skill05" # ブリンク } # 特定IDの情報は自動生成しないようにする XXX_NOT_SHOW = [ID, …] # アクター ACT_NOT_SHOW = [] # エネミー ENM_NOT_SHOW = [] # アイテム ITM_NOT_SHOW = [] # 武器 WPN_NOT_SHOW = [] # 防具 ARM_NOT_SHOW = [] # スキル SKL_NOT_SHOW = [] # クラス CLS_NOT_SHOW = [] # 場所 TWN_NOT_SHOW = [] end module DictAutoCreate include DictDef #---------------------------------------------------------------------------- # カスタマイズSTART #---------------------------------------------------------------------------- =begin 【説明文の設定】 XXX_text(id)というメソッド内で、 自動生成する際の説明分を設定できます。 アイテム、武器、防具、スキルはデータベースのものを表示するようになってますが、 変更することも可能です。 また、用語辞典用の制御文字も使用可能です。 【自動生成時の設定値】 create_XXXというメソッド内で自動生成する際の設定値を決め打ちしてます。 用語名はデータベースのもの、表示は無効(false)として自動生成します。 =end #-------------------------------------------------------------------------- # ● Plugin- アクター自動生成 : 説明文 #-------------------------------------------------------------------------- def self.actor_text(id) info = "" # アクターの情報 # text = "" case id when 0; text = "アクターID:○の説明文〜" end # return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- エネミー自動生成 : 説明文 #-------------------------------------------------------------------------- def self.enemy_text(id) data = $data_enemies[id] case data.drop_item1.kind when 0; item1 = "----" when 1 d = $data_items[data.drop_item1.item_id] item1 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item1.denominator).truncate}%)" when 2 d = $data_weapons[data.drop_item1.weapon_id] item1 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item1.denominator).truncate}%)" when 3 d = $data_armor[data.drop_item1.armor_id] item1 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item1.denominator).truncate}%)" end case data.drop_item2.kind when 0; item2 = "----" when 1 d = $data_items[data.drop_item2.item_id] item2 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item2.denominator).truncate}%)" when 2 d = $data_weapons[data.drop_item2.weapon_id] item2 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item2.denominator).truncate}%)" when 3 d = $data_armor[data.drop_item2.armor_id] item2 = "\\icon[#{d.icon_index}]#{d.name}(#{(100/data.drop_item2.denominator).truncate}%)" end info = # エネミーのパラメータ情報 "\\c[8]#{$data_system.terms.hp}\\c[0]\\x[90]\\u[#{id},maxhp]"+ "\\x[170]\\c[8]#{$data_system.terms.mp}\\c[0]\\x[260]\\u[#{id},maxmp]\\n"+ "\\c[8]#{$data_system.terms.atk}\\c[0]\\x[90]\\u[#{id},atk]"+ "\\x[170]\\c[8]#{$data_system.terms.def}\\c[0]\\x[260]\\u[#{id},def]\\n"+ "\\c[8]#{$data_system.terms.spi}\\c[0]\\x[90]\\u[#{id},spi]"+ "\\x[170]\\c[8]#{$data_system.terms.agi}\\c[0]\\x[260]\\u[#{id},agi]\\n"+ "\\c[8]命中率\\c[0]\\x[90]\\u[#{id},hit]"+ "\\x[170]\\c[8]回避率\\c[0]\\x[260]\\u[#{id},eva]\\n"+ "\\c[8]EXP\\c[0]\\x[90]\\k[#{id}]\\n"+ "\\c[8]Gold\\c[0]\\x[90]\\g[#{id}] \\c[8]#{$data_system.terms.gold}\\c[0]\\n"+ "\\c[8]Treasure1\\c[0]\\x[100]#{item1}\\n"+ "\\c[8]Treasure2\\c[0]\\x[100]#{item2}" if defined?(DefeatCounter) # ★撃破数カウンタとの併用 info += "\\n\\c[8]撃破数\\c[0]\\x[100]\\t[#{id}]" end # unless $data_system.elements.empty? ranks = element_ranks(data.element_ranks) if ranks != "" info += "\\p" + ranks end end # unless $data_states.empty? ranks = state_ranks(data.state_ranks) if ranks != "" info += "\\p" + ranks end end # b_actions = [] # 0-3:basic s_actions = {} # skill total = 0 for action in data.actions if action.kind == 0 # 基本 b_actions[action.basic] = 0 if b_actions[action.basic].nil? b_actions[action.basic] += action.rating elsif action.kind == 1 # スキル s_actions[action.skill_id] = 0 if s_actions[action.skill_id].nil? s_actions[action.skill_id] += action.rating end total += action.rating end if !b_actions.empty? or !s_actions.empty? page = 1 size = b_actions.size + s_actions.size if (Dictionary.d_line_max - 1) < size info += "\\p\\c[8]【行動パターン(#{page})】\\c[0]\\n" else info += "\\p\\c[8]【行動パターン】\\c[0]\\n" end line = 1 type = ["#{$data_system.terms.attack}", "#{$data_system.terms.guard}", "#{$data_system.terms.escape}", "何もしない"] for action in b_actions unless action.nil? per = (action * 100.0 / total).round info += "\\x[10]#{type[line-1]}\\x[200]#{per} %\\n" line += 1 end end ids = s_actions.keys.sort for i in 0...ids.size skill = $data_skills[ids[i]] if (line % (Dictionary.d_line_max) == 0) page += 1 info += "\\p\\c[8]【行動パターン(#{page})】\\c[0]\\n" line = 1 end per = (s_actions[ids[i]] * 100.0 / total).round info += "\\x[10]\\icon[#{skill.icon_index}]#{skill.name}\\x[200]#{per} %\\n" line += 1 end end # text = "" case id when 0; text = "エネミーID:○の説明文〜" end # return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- アイテム自動生成 : 説明文 #-------------------------------------------------------------------------- TARGET = ["なし", "敵単体", "敵全体", "敵単体(連続)", "敵単体(ランダム)", "敵二体(ランダム)", "敵三体(ランダム)", "味方単体", "味方全体", "味方単体蘇生", "味方全体蘇生", "使用者"] #OCCASION = ["常時使用可能", "戦闘のみ", "マップ上のみ", "使用不可"] def self.item_text(id) data = $data_items[id] target = TARGET[data.scope] #occasion = OCCASION[data.occasion] # info = # アイテム情報のテキスト化 "\\c[8]価格\\c[0]\\x[90]#{data.price} \\c[8]#{$data_system.terms.gold}\\c[0]\\n"+ "\\c[8]効果範囲\\c[0]\\x[90]#{target}\\n" # hp = "#{$data_system.terms.hp}" mp = "#{$data_system.terms.mp}" hp_recovery = data.hp_recovery_rate != 0 ? "最大#{hp}の#{data.hp_recovery_rate}%" : "" hp_recovery += " + " if data.hp_recovery != 0 and data.hp_recovery_rate != 0 hp_recovery += data.hp_recovery != 0 ? "#{data.hp_recovery}" : "" if hp_recovery != "" info += "\\c[8]#{hp}回復\\c[0]\\x[90]#{hp_recovery}\\n" end mp_recovery = data.mp_recovery_rate != 0 ? "最大#{mp}の#{data.mp_recovery_rate}%" : "" mp_recovery += " + " if data.mp_recovery != 0 and data.mp_recovery_rate != 0 mp_recovery += data.mp_recovery != 0 ? "#{data.mp_recovery}" : "" if mp_recovery != "" info += "\\c[8]#{mp}回復\\c[0]\\x[90]#{mp_recovery}\\n" end if data.parameter_type != 0 param = ["なし", "最大#{hp}", "最大#{mp}", $data_system.terms.atk, $data_system.terms.def, $data_system.terms.spi, $data_system.terms.agi][data.parameter_type] pm = data.parameter_points >= 0 ? "+" : "-" info += "\\c[8]能力変化\\c[0]\\x[90]#{param} #{pm}#{data.parameter_points}\\n" end if data.base_damage != 0 info += "\\c[8]威力\\c[0]\\x[90]#{data.base_damage}\\n" end unless data.element_set.empty? elements = make_elements(data.element_set) info += "\\c[8]属性\\c[0]\\x[90]#{elements}\\n" end unless data.plus_state_set.empty? p_state = make_states(data.plus_state_set) info += "\\c[8]付与ステート\\c[0]\\x[130]#{p_state}\\n" end unless data.minus_state_set.empty? m_state = make_states(data.minus_state_set) info += "\\c[8]解除ステート\\c[0]\\x[130]#{m_state}\\n" end # case id when 0; text = "アイテムID:○の説明文〜" else; text = $data_items[id].description end # ##return text + "\\n\\n" + info return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- 武器自動生成 : 説明文 #-------------------------------------------------------------------------- def self.weapon_text(id) data = $data_weapons[id] elements = make_elements(data.element_set) p_state = make_states(data.state_set) info = # 武器情報のテキスト化 "\\c[8]価格\\c[0]\\x[90]#{data.price} \\c[8]#{$data_system.terms.gold}\\c[0]\\n"+ "\\c[8]#{$data_system.terms.atk}\\c[0]\\x[90]#{data.atk}"+ "\\x[170]\\c[8]#{$data_system.terms.def}\\c[0]\\x[260]#{data.def}\\n"+ "\\c[8]#{$data_system.terms.spi}\\c[0]\\x[100]#{data.spi}"+ "\\x[170]\\c[8]#{$data_system.terms.agi}\\c[0]\\x[260]#{data.agi}\\n"+ "\\c[8]属性\\c[0]\\x[90]#{elements}\\n"+ "\\c[8]付与ステート\\c[0]\\x[130]#{p_state}" # case id when 0; text = "武器ID:○の説明文〜" else; text = $data_weapons[id].description end # return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- 防具自動生成 : 説明文 #-------------------------------------------------------------------------- def self.armor_text(id) data = $data_armors[id] elements = make_elements(data.element_set) g_state = make_states(data.state_set) # info = # 武器情報のテキスト化 "\\c[8]価格\\c[0]\\x[90]#{data.price} \\c[8]#{$data_system.terms.gold}\\c[0]\\n"+ "\\c[8]#{$data_system.terms.atk}\\c[0]\\x[90]#{data.atk}"+ "\\x[170]\\c[8]#{$data_system.terms.def}\\c[0]\\x[260]#{data.def}\\n"+ "\\c[8]#{$data_system.terms.spi}\\c[0]\\x[90]#{data.spi}"+ "\\x[170]\\c[8]#{$data_system.terms.agi}\\c[0]\\x[260]#{data.agi}\\n"+ "\\c[8]回避率\\c[0]\\x[90]#{data.eva}\\n"+ "\\c[8]防御属性\\c[0]\\x[130]#{elements}\\n"+ "\\c[8]ステート防御\\c[0]\\x[130]#{g_state}" # case id when 0; text = "防具ID:○の説明文〜" else; text = $data_armors[id].description end # return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- スキル自動生成 : 説明文 #-------------------------------------------------------------------------- def self.skill_text(id) data = $data_skills[id] target = TARGET[data.scope] #occasion = OCCASION[data.occasion] # elements = make_elements(data.element_set) p_state = make_states(data.plus_state_set) m_state = make_states(data.minus_state_set) info = # スキル情報のテキスト化 "\\c[8]消費#{$data_system.terms.mp}\\c[0]\\x[90]#{data.mp_cost}\\n"+ "\\c[8]効果範囲\\c[0]\\x[90]#{target}\\n"+ "\\c[8]威力\\c[0]\\x[90]#{data.base_damage}\\n"+ "\\c[8]命中率\\c[0]\\x[90]#{data.hit}%\\n"+ "\\c[8]属性\\c[0]\\x[90]#{elements}\\n"+ "\\c[8]付与ステート\\c[0]\\x[130]#{p_state}\\n"+ "\\c[8]解除ステート\\c[0]\\x[130]#{m_state}" # case id when 0; text = "スキルID:○の説明文〜" else; text = $data_skills[id].description end # return textinfo(text, info) end #-------------------------------------------------------------------------- # ● Plugin- クラス自動生成 : 説明文 #-------------------------------------------------------------------------- def self.class_text(id) data = $data_classes[id] # info = "" # クラス情報のテキスト化 # unless $data_system.elements.empty? info += element_ranks(data.element_ranks) end # unless $data_states.empty? info += "\\p" if info != "" info += state_ranks(data.state_ranks) end # unless data.learnings.empty? info += "\\p" if info != "" learns = data.learnings.sort {|a,b| a.level - b.level } page = 1 if (Dictionary.d_line_max - 1) < learns.size info += "\\c[8]【習得#{$data_system.terms.skill}(#{page})】\\c[0]\\n" else info += "\\c[8]【習得#{$data_system.terms.skill}】\\c[0]\\n" end line = 1 for i in 0...learns.size if (line % (Dictionary.d_line_max) == 0) page += 1 info += "\\p\\c[8]【習得#{$data_system.terms.skill}(#{page})】\\c[0]\\n" line = 1 end skill = $data_skills[learns[i].skill_id] info += "\\x[0]\\c[8]Lv.#{learns[i].level}\\c[0]\\x[80]\\icon[#{skill.icon_index}]#{skill.name}\\n" line += 1 end end # text = "" case id when 0; text = "クラスID:○の説明文〜" end # return textinfo(text, info) end #---------------------------------------------------------------------------- # カスタマイズEND #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # ■ 汎用メソッド #---------------------------------------------------------------------------- #-------------------------------------------------------------------------- # ● 情報テキストとデータベース情報の結合 #-------------------------------------------------------------------------- def self.textinfo(text, info) return "説明文がありません" if text == "" and info == "" return text if info == "" return info if text == "" return info + "\\p" + text end #-------------------------------------------------------------------------- # ● 属性配列生成 #-------------------------------------------------------------------------- def self.element_icon_text(id) if ELE_USE_ICON and !ELE_ICON[id].nil? return "\\icon[#{ELE_ICON[id]}] #{$data_system.elements[id]}" end return $data_system.elements[id] end def self.element_name(id) return "\\icon[#{ELE_ICON[id]}]" if ELE_USE_ICON and !ELE_ICON[id].nil? return $data_system.elements[id] end def self.make_elements(elements) text = "" cnt = 0 for id in elements next if ELE_NOT_SHOW.include?(id) if cnt == ELEMENTS_MAX text += "など" break end text += element_name(id) + " " cnt += 1 end return text end #-------------------------------------------------------------------------- # ● ステート配列生成 #-------------------------------------------------------------------------- def self.state_icon_text(id) if STS_USE_ICON and !STS_ICON[id].nil? return "\\icon[#{STS_ICON[id]}] #{$data_states[id].name}" end return $data_states[id].name end def self.state_name(id) return "\\icon[#{STS_ICON[id]}]" if STS_USE_ICON and !STS_ICON[id].nil? return $data_states[id].name end def self.make_states(states) text = "" cnt = 0 for id in states next if STS_NOT_SHOW.include?(id) if cnt == STATES_MAX text += "など" break end text += state_name(id) + " " cnt += 1 end return text end #-------------------------------------------------------------------------- # ● 属性有効度 #-------------------------------------------------------------------------- RANK = ["", "A", "B", "C", "D", "E", "F"] def self.element_ranks(element_ranks) divide = 2 ids = [] for id in 1...$data_system.elements.size next if ELE_NOT_SHOW.include?(id) ids.push(id) end return "" if ids.size == 0 page = 1 if (Dictionary.d_line_max - 1) < (ids.size / divide) info = "\\c[8]【属性有効度(#{page})】\\c[0]" else info = "\\c[8]【属性有効度】\\c[0]" end line = 1 for i in 0...ids.size id = ids[i] if (i % divide) == 0 if (line % (Dictionary.d_line_max) == 0) page += 1 info += "\\p\\c[8]【属性有効度(#{page})】\\c[0]\\n" line = 1 else info += "\\n" line += 1 end end rank = RANK[element_ranks[id]] ele = element_icon_text(id) x = (i % divide) * 170 xx = x + 100 info += "\\x[#{x}]\\c[8]#{ele}\\c[0]\\x[#{xx}]#{rank}" end return info end #-------------------------------------------------------------------------- # ● ステート有効度 #-------------------------------------------------------------------------- def self.state_ranks(state_ranks) divide = 2 ids = [] for id in 1...$data_states.size next if STS_NOT_SHOW.include?(id) ids.push(id) end return "" if ids.size == 0 page = 1 if (Dictionary.d_line_max - 1) < (ids.size / divide) info = "\\c[8]【ステート有効度(#{page})】\\c[0]" else info = "\\c[8]【ステート有効度】\\c[0]" end line = 1 for i in 0...ids.size id = ids[i] if (i % divide) == 0 if (line % (Dictionary.d_line_max) == 0) page += 1 info += "\\p\\c[8]【ステート有効度(#{page})】\\c[0]\\n" line = 1 else info += "\\n" line += 1 end end rank = RANK[state_ranks[id]] sts = state_icon_text(id) x = (i % divide) * 170 xx = x + 100 info += "\\x[#{x}]\\c[8]#{sts}\\c[0]\\x[#{xx}]#{rank}" end return info end #---------------------------------------------------------------------------- # ■ 自動生成メソッド #---------------------------------------------------------------------------- #-------------------------------------------------------------------------- # ● アクター情報の自動生成 #-------------------------------------------------------------------------- def self.create_actor(id) data = ["\\n[#{id}]", "\\n[#{id}]", "\\b[#{id}]", actor_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● エネミー情報の自動生成 #-------------------------------------------------------------------------- def self.create_enemy(id) data = ["\\e[#{id}]", "", "\\e[#{id}]", enemy_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● エネミー情報の自動生成 #-------------------------------------------------------------------------- def self.create_enemy_analize(id) data = ["\\e[#{id}]", "", "\\e[#{id}]", ""] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● アイテム情報の自動生成 #-------------------------------------------------------------------------- def self.create_item(id) data = ["\\i[#{id}]", "\\i[#{id}]", nil, item_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● 武器情報の自動生成 #-------------------------------------------------------------------------- def self.create_weapon(id) data = ["\\w[#{id}]", "\\w[#{id}]", nil, weapon_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● 防具情報の自動生成 #-------------------------------------------------------------------------- def self.create_armor(id) data = ["\\a[#{id}]", "\\a[#{id}]", nil, armor_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● スキル情報の自動生成 #-------------------------------------------------------------------------- def self.create_skill(id) data = ["\\s[#{id}]", "\\s[#{id}]", nil, skill_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● クラス情報の自動生成 #-------------------------------------------------------------------------- POS = ["【前衛タイプ】", "【中衛タイプ】", "【後衛タイプ】"] def self.create_class(id) data = ["\\J[#{id}]", POS[$data_classes[id].position], nil, class_text(id)] return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● 場所情報の自動生成 #-------------------------------------------------------------------------- def self.create_town(id) unless defined?(WorldMap) p "Error : can't use ATC_TOWN [WorldMapが定義されてません]";exit end region_id = id / 1000 town_id = (id % 1000) - 1 if town_id < 0 # リージョン情報 region = $game_system.worldmap[region_id] data = [region.region_name, "地域", nil, region.region_info, region.visible] else # タウン情報 town = $game_system.worldmap[region_id][town_id] data = [town.town_name, "場所", nil, town.town_info, town.visible] end return Dictionary::DictData.new(id, data) end #-------------------------------------------------------------------------- # ● クエスト情報の自動生成 #-------------------------------------------------------------------------- def self.create_quest(id) unless defined?(Quest) p "Error : can't use ATC_QUEST [QuestSystemが定義されてません]";exit end data = ["#{$game_system.quest[id].name}", "", nil, Quest.conv_text($game_system.quest[id].text)] return Dictionary::DictData.new(id, data) end end module DictAutoCreate #-------------------------------------------------------------------------- # ● Plugin-自動生成(用語ID) #-------------------------------------------------------------------------- def self.plugin_auto_ids(type) ids = [] case type when ATC_ACTOR # アクターの自動生成 for i in 1...$data_actors.size next if ACT_NOT_SHOW.include?(i) ids.push(i) end when ATC_ENEMY, ATC_ENEMY_A # エネミーの自動生成 for i in 1...$data_enemies.size next if ENM_NOT_SHOW.include?(i) ids.push(i) end when ATC_ITEM # アイテムの自動生成 for i in 1...$data_items.size next if ITM_NOT_SHOW.include?(i) ids.push(i) end when ATC_WEAPON # 武器の自動生成 for i in 1...$data_weapons.size next if WPN_NOT_SHOW.include?(i) ids.push(i) end when ATC_ARMOR_ALL # 防具(全て)の自動生成 for i in 1...$data_armors.size next if ARM_NOT_SHOW.include?(i) ids.push(i) end when ATC_ARMOR_S # 防具(盾のみ)の自動生成 for i in 1...$data_armors.size next if ARM_NOT_SHOW.include?(i) next if $data_armors[i].kind != 0 # 盾 ids.push(i) end when ATC_ARMOR_H # 防具(頭防具のみ)の自動生成 for i in 1...$data_armors.size next if ARM_NOT_SHOW.include?(i) next if $data_armors[i].kind != 1 # 頭防具 ids.push(i) end when ATC_ARMOR_C # 防具(身体防具のみ)の自動生成 for i in 1...$data_armors.size next if ARM_NOT_SHOW.include?(i) next if $data_armors[i].kind != 2 # 身体防具 ids.push(i) end when ATC_ARMOR_A # 防具(装飾品のみ)の自動生成 for i in 1...$data_armors.size next if ARM_NOT_SHOW.include?(i) next if $data_armors[i].kind != 3 # 装飾品 ids.push(i) end when ATC_SKILL # スキルの自動生成 for i in 1...$data_skills.size next if SKL_NOT_SHOW.include?(i) ids.push(i) end when ATC_CLASS # クラスの自動生成 for i in 1...$data_classes.size next if CLS_NOT_SHOW.include?(i) ids.push(i) end when ATC_TOWN # 場所の自動生成 if defined?(WorldMap) for region_id in WorldMap::REGION.keys.sort i = self.conv_region_id(region_id) next if TWN_NOT_SHOW.include?(i) ids.push(i) for town_id in WorldMap::REGION[region_id][WorldMap::R_TOWN].keys.sort i = self.conv_town_id(region_id, town_id) next if TWN_NOT_SHOW.include?(i) ids.push(i) end end else p "WorldMapがありません。"; exit end =begin when ATC_QUEST # クエストの自動生成 if defined?(Quest) for i in Quest::QUEST.keys.sort next if QST_NOT_SHOW.include?(i) ids.push(i) end else p "QuestSystemがありません。"; exit end =end else p "[PluginAutoCreate] ATC_XXXの指定が間違ってます >>#{type}" end return ids end #-------------------------------------------------------------------------- # ● ATC_TOWN : リージョンID -> 用語ID変換 #-------------------------------------------------------------------------- def self.conv_region_id(region_id) if defined?(WorldMap) return (region_id * 1000) else p "WorldMapがありません。"; exit end end #-------------------------------------------------------------------------- # ● ATC_TOWN : タウンID -> 用語ID変換 #-------------------------------------------------------------------------- def self.conv_town_id(region_id, town_id) if defined?(WorldMap) return (self.conv_region_id(region_id) + town_id + 1) else p "WorldMapがありません。"; exit end end #-------------------------------------------------------------------------- # ● Plugin-自動生成(用語データ) #-------------------------------------------------------------------------- def self.plugin_auto_create(type, id) case type when ATC_ACTOR # アクターの自動生成 return DictAutoCreate.create_actor(id) when ATC_ENEMY # エネミーの自動生成 return DictAutoCreate.create_enemy(id) when ATC_ENEMY_A # エネミー(アナライズ用)の自動生成 return DictAutoCreate.create_enemy_analize(id) when ATC_ITEM # アイテムの自動生成 return DictAutoCreate.create_item(id) when ATC_WEAPON # 武器の自動生成 return DictAutoCreate.create_weapon(id) when ATC_ARMOR_ALL # 防具(全て)の自動生成 return DictAutoCreate.create_armor(id) when ATC_ARMOR_S # 防具(盾のみ)の自動生成 return DictAutoCreate.create_armor(id) when ATC_ARMOR_H # 防具(頭防具のみ)の自動生成 return DictAutoCreate.create_armor(id) when ATC_ARMOR_C # 防具(身体防具のみ)の自動生成 return DictAutoCreate.create_armor(id) when ATC_ARMOR_A # 防具(装飾品のみ)の自動生成 return DictAutoCreate.create_armor(id) when ATC_SKILL # スキルの自動生成 return DictAutoCreate.create_skill(id) when ATC_CLASS # クラスの自動生成 return DictAutoCreate.create_class(id) when ATC_TOWN # 場所の自動生成 return DictAutoCreate.create_town(id) # when ATC_QUEST # クエストの自動生成 # return DictAutoCreate.create_quest(id) else p "[PluginAutoCreate] ATC_XXXの指定が間違ってます >>#{type}" exit end end end