efeberk 84 Posted May 7, 2013 (edited) XS - Level Title(Range Based) Version 1.1 Edited by efeberk IntroductionThis script changes how levels are displayed. Instead of the default numbers it will use a specified title for each actor. See more at screenshot how it looks like.Features Each actor can have their own title using the notetag field. Easy to add new titles or change the existing ones. Adjustable level range per title. Special rank title which will be based on roman numerals. And more! Screenshots How to UseTo install this script, open up your script editor and copy/paste the script to an open slot below Materials but above Main. Remember to save. This script requires Numeric class. Please install this script first. Script #============================================================================== # XS - Level Title(Range Based) # Editor : efeberk # Owner : Nicke # Created: 28/12/2012 # Edited: 07/05/2013 # Version: 1.1 #============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ? Materials but above ? Main. Remember to save. #============================================================================== # Requires: Numeric Class by IceDragon. #============================================================================== # Level Title script which changes how level are displayed. # The actor is still level 1, 2, 3 etc but displayed differently in the status # scene. # # This version is range-based version like that: # # Beginner C in level 1 - level 5 # Beginner B in level 5 - level 10 # Beginner A in level 10 - level 15 # Master A in level 50 - level 70 # Use the actor notetag field to setup which title to use for specified actor. # <level_title: title> # Where title need to be replaced by the actual titles found in the settings # below. # # Examples: # <level_title: warrior> # Use the magician title. # <level_title: rank> # Use the rank title. # (Will automatically change the level to roman numerals.) # # *** Only for RPG Maker VX Ace. *** #============================================================================== ($imported ||= {})["XAIL-LVL-TITLE"] = true module XAIL module LVL_TITLES #--------------------------------------------------------------------------# # * Settings #--------------------------------------------------------------------------# # Change the titles based on the level of the actor. # Note: Don't add any titles on rank! # TITLES = {symbol => [ # [title1, min_level, max_level] # [title2, min_level, max_level] # TITLES = { :all => [ ["Beginner", 1, 10], ["Junior", 11, 20], ["Amateur",21, 30], ["Senior", 31, 40], ["Pro", 41, 50], ["Elite", 51, 60], ["Special-X", 61, 70], ["Master", 71, 80], ["Big-Time", 81, 90], ["Legend", 91, 100] ], :rank => ["Rank"] # << Don't edit this! Add more above or below. } # Don't remove this line! end end # *** Don't edit below unless you know what you are doing. *** #==============================================================================# # ** RPG::Actor #==============================================================================# class RPG::Actor < RPG::BaseItem def level_title # // Method to check level title. @note.scan(/<(?:LEVEL_TITLE|level_title):\s(\w+)>/i) return $1.to_s end end #==============================================================================# # ** Game_Actor #==============================================================================# class Game_Actor < Game_Battler attr_reader :level_title alias xail_lvl_titles_sys_gm_actor_setup setup def setup(actor_id) # // Method to setup game actor. xail_lvl_titles_sys_gm_actor_setup(actor_id) @level_title = actor.level_title end end #==============================================================================# # ** Window_Base #==============================================================================# class Window_Base < Window def draw_title_level(actor) # // New method to draw title level based on specified actor. result = "" title = actor.level_title titles = XAIL::LVL_TITLES::TITLES[title.to_sym] # // Check if title is empty or nil. unless title == "" and titles.nil? for i in 0..titles.size - 1 # // Rank title based on roman numerals. if title.downcase == "rank" return titles[0] + " " + actor.level.to_roman # // Else use ordinary titles. else if actor.level >= titles[i][1] && actor.level <= titles[i][2] return titles[i][0] end end end # // Return default level if title are empty or nil. else return actor.level end return result end def draw_actor_level(actor, x, y) # // Method override to draw actor level. # (Used if XS - Status Delux isn't imported. lvl = draw_title_level(actor) change_color(system_color) draw_text(x, y, 32, line_height, Vocab::level_a) change_color(normal_color) draw_text(x + 12, y, text_size(lvl).width + 20, line_height, lvl, 2) end end # END OF FILE #=*==========================================================================*=# # ** END OF FILE #=*==========================================================================*=# Compatible Script is compatible with XS - Status Delux and XS - Attribute System. CreditDo credit efeberk and Nicke, if you are planing on using this script. Thanks.Can be use in commercial projects. Edited August 8, 2013 by efeberk 1 Share this post Link to post Share on other sites
anavn1 9 Posted May 7, 2013 Looks really cool but does not work with yanfly save engine. would there be way to fix that ? Or did I make a mistake in the usage? Share this post Link to post Share on other sites
efeberk 84 Posted May 8, 2013 Can you share a screenshot about error if exist? or nothing happens with Yanfly save engine? Share this post Link to post Share on other sites