Jump to content
CT Bolt

XS - Fame System Add-On/Patch for YEA Status Menu

Recommended Posts

 XS - Fame System Add-On (v2.0)

by CT_Bolt

Features

 

  • Patched XS - Fame System to work with YEA Status Menu
    • Can be displayed next to actor face (optional)
    • Can be displayed in biography (optional)
    • Adjustable X & Y for both
  • Font/Drawing Options
    • Name, Color, Outline Color, Bold, Italic, Shadow, Size, Alignments
    • Displaying fame numbers is now optional
  • Can now display one of the following:
    • Max fame
    • Fame of the next level
    • Fame until the next level
  • Adjustable text
    • Pre-text, Post-text, Next Amount Text, Until Next Text, Maxed Reached

 
How to Use

 

To install this script, open up your script editor and copy/paste this script to an open slot below â–¼ Materials & XS - Fame System but above â–¼ Main.
Also, insert this below YEA - Status Menu (if you use it).
Remember to save.

Configure Module FAME_SYS to suit your needs

 



Script

 

#==============================================================================
#   XaiL System - Fame System Add-On (v2.0)
#   Add-On Author: CT_Bolt
#
#   Add-On Version History:
#   v1.0 2/24/2013 - Initial Modification
#   v1.1 2/24/2013 - Cleaned up code & removed visual bug
#   v2.0 3/14/2013 - Major Change
#                   - Seperated my code into a new script of its own.
#                   - Added more features
#
#   Add-On Features:
#     - Patched XS - Fame System to work with YEA Status Menu
#       * Can be displayed next to actor face (optional)
#       * Can be displayed in biography       (optional)
#       * Adjustable X & Y for both
#
#     - Font/Drawing Options
#       * Name, Color, Outline Color, Bold, Italic, Shadow, Size, Alignments
#       * Displaying fame numbers is now optional
#
#     - Can now display one of the following:
#       * Max fame
#       * Fame of the next level 
#       * Fame until the next level
#
#     - Adjustable text
#       * Pre-Text, Post-Text, Next Amount Text, Until Next Text, Maxed Reached
#
# XaiL System - Fame System
# Author: Nicke
# Created: 26/12/2012
# Edited: 30/12/2012
# Version: v1.0a
#
# YEA - Ace Status Menu
# Author: Yanfly
# Last Updated: 2011.12.26
# Version: v1.02
#
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below â–¼ Materials & XS - Fame System but above â–¼ Main. 
# Remember to save.
#==============================================================================
# Requires: XS - Core Script.
# Requires: XS - Fame System Script.
# Requires: Numeric Class by IceDragon.
#==============================================================================
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================

module XAIL
  module FAME_SYS
    #--------------------------------------------------------------------------#
    # * Settings
    #--------------------------------------------------------------------------#
      #FONT = Font.default_name
      FONT  = ["Courier New", "Comic Sans MS", "Verdana", "Arial"]
      
      #FONT_COLOR    = Colors::LightBlue  
      FONT_COLOR     = Color.new(0, 128, 255)
      FONT_OUT_COLOR = Color.new(0,   0, 255)
      
      FONT_BOLD   = true
      FONT_SHADOW = true
      FONT_ITALIC = false
      FONT_SIZE = 16
      ALIGNMENT = 0
      
      DISPLAY_FAME_NUMBERS = true
      DISPLAY_MAX_FAME     = false
      
      PRE_TEXT         = "Fame » "
      POST_TEXT        = ""
      
      DISPLAY_NEXT_AMOUNT = true
      NEXT_AMOUNT_TEXT    = "/"
      
      DISPLAY_UNTIL_NEXT = false
      UNTIL_NEXT_TEXT    = " until next "
      
      MAXED = "Max Reached"
      
      USE_STATUS    = true
      USE_BIOGRAPHY = true
      
      XAIL::FAME_SYS::Stat_Pos = [108,  -4]
      XAIL::FAME_SYS::Bio_Pos  = [ 24,  96]
  end
end

# *** Don't edit below unless you know what you are doing. ***
class Window_Base < Window
  alias :my_reset_font_settings :reset_font_settings
  def reset_font_settings
    my_reset_font_settings()
    contents.font.name = Font.default_name
    contents.font.out_color = Font.default_out_color
    contents.font.shadow = Font.default_shadow
  end
  
  def draw_font_text(text, x, y, width, alignment, font, size, color, 
                     bold = true, italic = Font.default_italic,
                     shadow = true, out_color = Color.new(0,0,0,255))
                     
    # // Method to draw font text.
    contents.font.name = font
    contents.font.size = size
    contents.font.color = color
    contents.font.bold = bold
    contents.font.italic = italic
    contents.font.shadow = shadow
    contents.font.out_color = out_color
    draw_text(x, y, width, calc_line_height(text), text, alignment)
    reset_font_settings
  end
end

#==============================================================================#
# ** Game_Actor
#==============================================================================#
class Game_Actor < Game_Battler
  def next_fame_amount
    foundIt = false
    counter = 0
    next_amount = @max_fame

    XAIL::FAME_SYS::FAME.each {|key, value|
      if current_fame == key
        foundIt = true
      end
         
      if foundIt == true
        counter = counter + 1
      end
      
      if counter > 1 then
        return value[0]
      end
    }
    
    return @max_fame
  end  
  
  def next_fame_title
    foundIt = false
    counter = 0

    XAIL::FAME_SYS::FAME.each {|key, value|
      if current_fame == key
        foundIt = true
      end
         
      if foundIt == true
        counter = counter + 1
      end
      
      if counter > 1 then
        return key
      end
    }
    if XAIL::FAME_SYS::MAXED != ""
      return XAIL::FAME_SYS::MAXED
    else
      return current_fame
    end
  end
end 

#==============================================================================#
# ** Game_Party
#==============================================================================#
class Game_Party < Game_Unit
  def next_fame_amount?(id)
    return members[id].next_fame_amount
  end
  
  def next_fame_title?(id)
    return members[id].next_fame_title
  end
end
#==============================================================================#
# ** Window_Base
#==============================================================================#
  class Window_Base < Window
    # // Method to draw fame.
    def draw_fame(x, y, w = contents_width, alg = XAIL::FAME_SYS::ALIGNMENT, fn = XAIL::FAME_SYS::FONT, fs = XAIL::FAME_SYS::FONT_SIZE, b = XAIL::FAME_SYS::FONT_BOLD)      
      if XAIL::FAME_SYS::DISPLAY_FAME_NUMBERS == true
        if XAIL::FAME_SYS::DISPLAY_MAX_FAME == true
          fame = XAIL::FAME_SYS::PRE_TEXT + "#{@actor.current_fame} (#{@actor.fame}/#{@actor.max_fame})"
        else
          if XAIL::FAME_SYS::DISPLAY_UNTIL_NEXT != true
              fame = XAIL::FAME_SYS::PRE_TEXT + "#{@actor.current_fame} (#{@actor.fame})"
              if XAIL::FAME_SYS::DISPLAY_NEXT_AMOUNT == true
                fame = XAIL::FAME_SYS::PRE_TEXT + 
                  "#{@actor.current_fame} (#{@actor.fame}" +
                  XAIL::FAME_SYS::NEXT_AMOUNT_TEXT + 
                  (@actor.next_fame_amount).to_s + ")"
              end
          else
            fame = XAIL::FAME_SYS::PRE_TEXT + 
                  "#{@actor.current_fame} (#{@actor.fame}" +
                  XAIL::FAME_SYS::UNTIL_NEXT_TEXT + 
                  (@actor.next_fame_amount - @actor.fame).to_s + ")"
          end
        end
      else
        fame = XAIL::FAME_SYS::PRE_TEXT + "#{@actor.current_fame}"
      end
      
      fame = fame + XAIL::FAME_SYS::POST_TEXT
      
#     draw_font_text(text, x, y, width, alignment, font, size, color, 
#                    bold = true, italic = Font.default_italic, 
#                    shadow = true, 
#                    outline color = Color.new(0,0,0,255))
      draw_font_text(fame, x, y, w, alg, fn, fs, XAIL::FAME_SYS::FONT_COLOR, 
                     b, XAIL::FAME_SYS::FONT_ITALIC, 
                     XAIL::FAME_SYS::FONT_SHADOW, 
                     XAIL::FAME_SYS::FONT_OUT_COLOR)
    end
  end
  
unless $imported["YEA-StatusMenu"].nil?
#==============================================================================#
# ** Window_StatusItem
#==============================================================================#
  unless XAIL::FAME_SYS::REPLACE_NICKNAME
    if XAIL::FAME_SYS::USE_BIOGRAPHY
      class Window_StatusItem < Window_Base    
        alias :my_draw_actor_biography :draw_actor_biography
        def draw_actor_biography()
          my_draw_actor_biography()
          draw_fame(XAIL::FAME_SYS::Bio_Pos[0], XAIL::FAME_SYS::Bio_Pos[1])
        end
      end
    end
    
    if XAIL::FAME_SYS::USE_STATUS
      class Window_StatusActor < Window_Base
        alias :my_refresh :refresh
        def refresh
          my_refresh()
          draw_fame(XAIL::FAME_SYS::Stat_Pos[0], XAIL::FAME_SYS::Stat_Pos[1])
        end
      end
    end
  end
end # END OF FILE
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#

 

 
 
Demo
Demo: Click Here

Official Page

CT_Bolt's Creations: XS Fame System - Add-On

FAQ
None yet.

Version History:

 

v1.0 2/24/2013 - Initial Modification
v1.1 2/24/2013 - Cleaned up code & removed visual bug
v2.0 3/14/2013 - Major Change
 - Seperated my code into a new script of its own.
 - Added more features

 



Credits
- Nicke for XS - Fame System

 

So I was wondering if I can have your permission to post an add-on script I wrote in the completed scripts section.

Sure go ahead.

 


- Yanfly for YEA - Status Menu
- CT_Bolt for XS Fame System Add-On/Patch

Thanks
- To everyone who has ever contributed to this community!

 

Author's Notes
Enjoy! Let me know how it works for you. Please give feedback, anything that could be added, etc.

Edited by CT Bolt

Share this post


Link to post
Share on other sites

excuse me sir i found your script very interesting .. thanks but i am wondering how to use that

ex. event 1 needs the actor 1 to be "TOLERATED" to gain a certain weapon
what do i need to do? sorry for the noob question 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted