累计送礼: 0 个 累计收礼: 1 个 TA的每日心情 开心 2026-7-12 04:10
签到天数: 209 天
连续签到: 2 天
[LV.7]常住居民III
管理员
VIP
7
卡币
58883
OK点
16
推广点
0
同能卷
50
积分 68848
Large Description
by: IneptAttorney
Introduction:
have you ever felt that the description box in your project is not extensive? maybe this script can help you explain some items / skills / equipment that are difficult for players to understand.
Screenshots:
not available
Script:
Spoiler Code: =begin[/B] [B]HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH H Large Description HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH ▼ Writer: IneptAttorney ▼ Date : 30 June 2019 ▼ Engine: RMVX Ace ▼ Name : Large Description ................................................................................ ▼ Terms Free for Commercial and Non-commercial Games! Credit me on your project! (If you want) ................................................................................ ▼ Installation Place this script below ▼ Materials and above ▼ Main Process. ................................................................................ ▼ Introduction this script allows you to write more descriptions of Item / Skills / Equipment ................................................................................ ▼ Instruction Use this format on Notebox in the database to write more descriptions. First, you must click 'Enter' button on database. Next, write the description as you want. the maximum description is 6 lines! already included description box Finally, Testplay your game and see the description! if you also fill in the description box, then you must use 'Enter' before starting to write a description in note box! if you clear the description box, then you can ignore "Enter" PS: This format can used for Item/Skill/Equipment Note Box! ................................................................................ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Don't edit the text below! or your PC will burn up! (0=0;) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! =end #=============================================================================== # ▼ Scene_Save #=============================================================================== class Scene_Save < Scene_File def start super create_save_info end def create_save_info @save_info = Window_SaveInfo.new(0, 0, Graphics.width, 50) end #-------------------------------------------------------------------------- # * Get File Index to Select First #-------------------------------------------------------------------------- def first_savefile_index DataManager.last_savefile_index end #-------------------------------------------------------------------------- # * Confirm Save File #-------------------------------------------------------------------------- def on_savefile_ok super if DataManager.save_game(@index) on_save_success else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Processing When Save Is Successful #-------------------------------------------------------------------------- def on_save_success Sound.play_save return_scene end end #=============================================================================== # ▼ Scene_File #=============================================================================== class Scene_File < Scene_MenuBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super create_savefile_viewport create_savefile_windows init_selection end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super @savefile_viewport.dispose @savefile_windows.each {|window| window.dispose } end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @savefile_windows.each {|window| window.update } update_savefile_selection end #-------------------------------------------------------------------------- # * Create Help Window #-------------------------------------------------------------------------- def create_help_window @help_window = Window_Help.new(1) @help_window.set_text(help_window_text) end #-------------------------------------------------------------------------- # * Get Help Window Text #-------------------------------------------------------------------------- def help_window_text return "" end #-------------------------------------------------------------------------- # * Create Save File Viewport #-------------------------------------------------------------------------- def create_savefile_viewport @savefile_viewport = Viewport.new @savefile_viewport.rect.y = 50 @savefile_viewport.rect.height -= 50 end #-------------------------------------------------------------------------- # * Create Save File Window #-------------------------------------------------------------------------- def create_savefile_windows @savefile_windows = Array.new(item_max) do |i| Window_SaveFile.new(savefile_height, i) end @savefile_windows.each {|window| window.viewport = @savefile_viewport } end #-------------------------------------------------------------------------- # * Initialize Selection State #-------------------------------------------------------------------------- def init_selection @index = first_savefile_index @savefile_windows[@index].selected = true self.top_index = @index - visible_max / 2 ensure_cursor_visible end #-------------------------------------------------------------------------- # * Get Number of Items #-------------------------------------------------------------------------- def item_max DataManager.savefile_max end #-------------------------------------------------------------------------- # * Get Number of Save Files to Show on Screen #-------------------------------------------------------------------------- def visible_max return 4 end #-------------------------------------------------------------------------- # * Get Height of Save File Window #-------------------------------------------------------------------------- def savefile_height @savefile_viewport.rect.height / visible_max end #-------------------------------------------------------------------------- # * Get File Index to Select First #-------------------------------------------------------------------------- def first_savefile_index return 0 end #-------------------------------------------------------------------------- # * Get Current Index #-------------------------------------------------------------------------- def index @index end #-------------------------------------------------------------------------- # * Get Top Index #-------------------------------------------------------------------------- def top_index @savefile_viewport.oy / savefile_height end #-------------------------------------------------------------------------- # * Set Top Index #-------------------------------------------------------------------------- def top_index=(index) index = 0 if index < 0 index = item_max - visible_max if index > item_max - visible_max @savefile_viewport.oy = index * savefile_height end #-------------------------------------------------------------------------- # * Get Bottom Index #-------------------------------------------------------------------------- def bottom_index top_index + visible_max - 1 end #-------------------------------------------------------------------------- # * Set Bottom Index #-------------------------------------------------------------------------- def bottom_index=(index) self.top_index = index - (visible_max - 1) end #-------------------------------------------------------------------------- # * Update Save File Selection #-------------------------------------------------------------------------- def update_savefile_selection return on_savefile_ok if Input.trigger?(:C) return on_savefile_cancel if Input.trigger?(:B) update_cursor end #-------------------------------------------------------------------------- # * Save File [OK] #-------------------------------------------------------------------------- def on_savefile_ok end #-------------------------------------------------------------------------- # * Save File [Cancel] #-------------------------------------------------------------------------- def on_savefile_cancel Sound.play_cancel return_scene end #-------------------------------------------------------------------------- # * Update Cursor #-------------------------------------------------------------------------- def update_cursor last_index = @index cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN) cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP) cursor_pagedown if Input.trigger?(:R) cursor_pageup if Input.trigger?(:L) if @index != last_index Sound.play_cursor @savefile_windows[last_index].selected = false @savefile_windows[@index].selected = true end end #-------------------------------------------------------------------------- # * Move Cursor Down #-------------------------------------------------------------------------- def cursor_down(wrap) @index = (@index + 1) % item_max if @index < item_max - 1 || wrap ensure_cursor_visible end #-------------------------------------------------------------------------- # * Move Cursor Up #-------------------------------------------------------------------------- def cursor_up(wrap) @index = (@index - 1 + item_max) % item_max if @index > 0 || wrap ensure_cursor_visible end #-------------------------------------------------------------------------- # * Move Cursor One Page Down #-------------------------------------------------------------------------- def cursor_pagedown if top_index + visible_max < item_max self.top_index += visible_max @index = [@index + visible_max, item_max - 1].min end end #-------------------------------------------------------------------------- # * Move Cursor One Page Up #-------------------------------------------------------------------------- def cursor_pageup if top_index > 0 self.top_index -= visible_max @index = [@index - visible_max, 0].max end end #-------------------------------------------------------------------------- # * Scroll Cursor to Position Within Screen #-------------------------------------------------------------------------- def ensure_cursor_visible self.top_index = index if index < top_index self.bottom_index = index if index > bottom_index end end class Window_SaveInfo < Window_Base def initialize(x, y, width, height) super(0, 0, Graphics.width, 50) draw_text_ex(0, 0, Vocab::SaveMessage) end end #=============================================================================== # ▼ Scene_Equip #=============================================================================== class Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super create_help_window create_status_window create_command_window create_slot_window create_item_window end #-------------------------------------------------------------------------- # * Create Status Window #-------------------------------------------------------------------------- def create_status_window @status_window = Window_EquipStatus.new(0, 0) @status_window.viewport = @viewport @status_window.actor = @actor end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window wx = @status_window.width wy = @help_window.height ww = Graphics.width - @status_window.width @command_window = Window_EquipCommand.new(wx, 0, ww) @command_window.viewport = @viewport @command_window.help_window = @help_window @command_window.set_handler(:equip, method(:command_equip)) @command_window.set_handler(:optimize, method(:command_optimize)) @command_window.set_handler(:clear, method(:command_clear)) @command_window.set_handler(:cancel, method(:return_scene)) @command_window.set_handler(:pagedown, method(:next_actor)) @command_window.set_handler(:pageup, method(:prev_actor)) end #-------------------------------------------------------------------------- # * Create Slot Window #-------------------------------------------------------------------------- def create_slot_window wx = @status_window.width wy = @command_window.y + @command_window.height ww = Graphics.width - @status_window.width @slot_window = Window_EquipSlot.new(wx, wy, ww) @slot_window.viewport = @viewport @slot_window.help_window = @help_window @slot_window.status_window = @status_window @slot_window.actor = @actor @slot_window.set_handler(:ok, method(:on_slot_ok)) @slot_window.set_handler(:cancel, method(:on_slot_cancel)) end #-------------------------------------------------------------------------- # * Create Item Window #-------------------------------------------------------------------------- def create_item_window wx = 0 wy = @slot_window.y + @slot_window.height ww = Graphics.width wh = Graphics.height - wy @item_window = Window_EquipItem.new(wx, wy, ww, 56) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.status_window = @status_window @item_window.actor = @actor @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @slot_window.item_window = @item_window end #-------------------------------------------------------------------------- # * [Change Equipment] Command #-------------------------------------------------------------------------- def command_equip @slot_window.activate @slot_window.select(0) end #-------------------------------------------------------------------------- # * [Ultimate Equipment] Command #-------------------------------------------------------------------------- def command_optimize Sound.play_equip @actor.optimize_equipments @status_window.refresh @slot_window.refresh @command_window.activate end #-------------------------------------------------------------------------- # * [Remove All] Command #-------------------------------------------------------------------------- def command_clear Sound.play_equip @actor.clear_equipments @status_window.refresh @slot_window.refresh @command_window.activate end #-------------------------------------------------------------------------- # * Slot [OK] #-------------------------------------------------------------------------- def on_slot_ok @item_window.activate @item_window.select(0) end #-------------------------------------------------------------------------- # * Slot [Cancel] #-------------------------------------------------------------------------- def on_slot_cancel @slot_window.unselect @command_window.activate end #-------------------------------------------------------------------------- # * Item [OK] #-------------------------------------------------------------------------- def on_item_ok Sound.play_equip @actor.change_equip(@slot_window.index, @item_window.item) @slot_window.activate @slot_window.refresh @item_window.unselect @item_window.refresh end #-------------------------------------------------------------------------- # * Item [Cancel] #-------------------------------------------------------------------------- def on_item_cancel @slot_window.activate @item_window.unselect end #-------------------------------------------------------------------------- # * Change Actors #-------------------------------------------------------------------------- def on_actor_change @status_window.actor = @actor @slot_window.actor = @actor @item_window.actor = @actor @command_window.activate end end #=============================================================================== # ▼ Scene_Skill #=============================================================================== class Scene_Skill < Scene_ItemBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super create_help_window create_command_window create_status_window create_item_window end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window wy = @help_window.height @command_window = Window_SkillCommand.new(0, 0) @command_window.viewport = @viewport @command_window.help_window = @help_window @command_window.actor = @actor @command_window.set_handler(:skill, method(:command_skill)) @command_window.set_handler(:cancel, method(:return_scene)) @command_window.set_handler(:pagedown, method(:next_actor)) @command_window.set_handler(:pageup, method(:prev_actor)) end #-------------------------------------------------------------------------- # * Create Status Window #-------------------------------------------------------------------------- def create_status_window y = @help_window.height @status_window = Window_SkillStatus.new(@command_window.width, 0) @status_window.viewport = @viewport @status_window.actor = @actor end #-------------------------------------------------------------------------- # * Create Item Window #-------------------------------------------------------------------------- def create_item_window wy = @status_window.y + @status_window.height ww = Graphics.width wh = Graphics.height - wy @item_window = Window_SkillList.new(0, 120, ww, 128) @item_window.actor = @actor @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @command_window.skill_window = @item_window end #-------------------------------------------------------------------------- # * Get Skill's User #-------------------------------------------------------------------------- def user @actor end #-------------------------------------------------------------------------- # * [Skill] Command #-------------------------------------------------------------------------- def command_skill @item_window.activate @item_window.select_last end #-------------------------------------------------------------------------- # * Item [OK] #-------------------------------------------------------------------------- def on_item_ok @actor.last_skill.object = item determine_item end #-------------------------------------------------------------------------- # * Item [Cancel] #-------------------------------------------------------------------------- def on_item_cancel @item_window.unselect @command_window.activate end #-------------------------------------------------------------------------- # * Play SE When Using Item #-------------------------------------------------------------------------- def play_se_for_item Sound.play_use_skill end #-------------------------------------------------------------------------- # * Use Item #-------------------------------------------------------------------------- def use_item super @status_window.refresh @item_window.refresh end #-------------------------------------------------------------------------- # * Change Actors #-------------------------------------------------------------------------- def on_actor_change @command_window.actor = @actor @status_window.actor = @actor @item_window.actor = @actor @command_window.activate end end #=============================================================================== # ▼ Scene_Item #=============================================================================== class Scene_Item < Scene_ItemBase #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super create_help_window create_category_window create_item_window end #-------------------------------------------------------------------------- # * Create Category Window #-------------------------------------------------------------------------- def create_category_window @category_window = Window_ItemCategory.new @category_window.viewport = @viewport @category_window.help_window = @help_window @category_window.y = 0 @category_window.set_handler(:ok, method(:on_category_ok)) @category_window.set_handler(:cancel, method(:return_scene)) end #-------------------------------------------------------------------------- # * Create Item Window #-------------------------------------------------------------------------- def create_item_window wy = @category_window.y + @category_window.height wh = Graphics.height - wy @item_window = Window_ItemList.new(0, 48, Graphics.width, 200) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @category_window.item_window = @item_window end #-------------------------------------------------------------------------- # * Category [OK] #-------------------------------------------------------------------------- def on_category_ok @item_window.activate @item_window.select_last end #-------------------------------------------------------------------------- # * Item [OK] #-------------------------------------------------------------------------- def on_item_ok $game_party.last_item.object = item determine_item end #-------------------------------------------------------------------------- # * Item [Cancel] #-------------------------------------------------------------------------- def on_item_cancel @item_window.unselect @category_window.activate end #-------------------------------------------------------------------------- # * Play SE When Using Item #-------------------------------------------------------------------------- def play_se_for_item Sound.play_use_item end #-------------------------------------------------------------------------- # * Use Item #-------------------------------------------------------------------------- def use_item super @item_window.redraw_current_item end end #=============================================================================== # ▼ Window_Help #=============================================================================== class Window_Help < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(line_number = 6) super(0, 248, Graphics.width, fitting_height(line_number)) end #-------------------------------------------------------------------------- # * Set Text #-------------------------------------------------------------------------- def set_text(text) if text != @text @text = text refresh end end #-------------------------------------------------------------------------- # * Clear #-------------------------------------------------------------------------- def clear set_text("") end #-------------------------------------------------------------------------- # * Set Item # item : Skills and items etc. #-------------------------------------------------------------------------- def set_item(item) set_text(item ? item.description + item.note : "") end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear draw_text_ex(4, 0, @text) end end # End Of Script! 复制代码
Credits:
- IneptAttorney
- Enterbrain
本贴来自国际rpgmaker官方论坛作者:IneptAttoney处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/large-description.110540/