RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Advanced Text System 3.0c

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 76
RMRK Junior
Hello! First off, I'd like to say that this is an awesome script.
Anyhow, I'm having a problem.
I'm using Display Victory Aftermath and, of course, your script. At first it all works fine, but when it begins popping up dialogue boxes of Actors saying things like "We beat them all" blah blah blah, it gets to Actor 3 and an error for ATS pops up and the game crashes.


Any ideas as to why this is happening?

EDIT: Oh, here's what the line looks like, in case you need to know.
Code: [Select]
        @text += $game_message.texts[i].clone + "\x00"
« Last Edit: August 04, 2010, 11:06:25 PM by E. Belle »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, try upgrading to v. 3.0b and see if the error persists. You will need the ATS 2.0 Conversion Patch too if you have already been using 2.0 in your project. If it does, I will look into the issue.

**
Rep: +0/-0Level 76
RMRK Junior
Well, I upgraded, but now I'm getting an error when I press new game.


Did I put it in wrong or something?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, my line 2604 is:
Code: [Select]

    @face_window = Window_FaceBox.new (self.viewport)

and that line is fine, since Window_Facebox expects that argument. If yours doesn't it's telling me that either (a) your line 2604 is not the same as mine, in which case you need to show me exactly what that line says; or (b) you did not delete the old version of the script or you have another script below it which redefines the initialize method of Window_Facebox. If it is the former, you have to delete the ATS 2.0 version; if the latter, tell me what script it is and I'll try to find a workaround.

**
Rep: +0/-0Level 76
RMRK Junior
Well, line 2604 is from this page so I doubt it's wrong, but here it is anyway:
Code: [Select]
@face_window = Window_FaceBox.new (self.viewport)
(The same as yours)
As for deleting 2.0, it's definitely deleted.
I have the following scripts below ATS 3.0:
Mithran Item Selection Number Fix
OriginalWij Row Changer
OriginalWij and Mac Malone Chest Item Pop-up
Yanfly Engine RD - Scene Menu Redux
Yanfly Engine RD - Scene Battle Redux
Scene Battle Redux Fix
Modern Algebra Flash Selected Enemy
Yanfly Engine RD - Scene Status Redux
Yanfly - Extended Equip
Yanfly - Custom Target Select
Yanfly Engine RD - Party Data Display
Yanfly Engine RD - Victory Aftermath
Yanfly Engine RD - Victory Extend
Modern Algerbra - Victory Aftermath Fix
Yanfly Engine RD - Common Event Menu
Yanfly Engine RD - Common Event Shop
Yanfly Engine RD - Bestiary/Scan
Yanfly Engine RD - Skill Display
Yanfly Engine RD - Menu System
KGC Steal
OriginalWij Debug Tools
Mr. Anonymous Battle Screen Effects
Neo Save System III
TDS Name Pop-Up
Prexus Party Manager Switcher

That's all of them, sorry about the long list.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, first try placing the ATS below all of them but still above Main. Then Press CTRL+SHIFT+F and put Window_FaceBox in the search field. Let me know if any beside the ATS come up in the list and tell me which it is.

**
Rep: +0/-0Level 76
RMRK Junior
Putting the script below all the other scripts (That was something I should've done in the first place, sorry) got rid of the line 2604 error, but the other error only changed to line 172, which is identical to the line from 2.0.
Code: [Select]
     @text += $game_message.texts[i].clone + "\x00"

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, it's definitely a compatibility error. But I'm not going to find and look through all of those scripts. Try starting a new project with just the ATS, and then add in each of those scripts one by one. When the error first occurs, tell me which script you had just added and give me a link to it. Well, it might be Display Victory Aftermath, so I'll test that first, but I need a link since I think Yanfly took down all his YERD scripts.

**
Rep: +0/-0Level 75
RMRK Junior
 ;8 This is absolutely amazing. I can't wait to dive into this script and enhance my games. Thank you so much.

*
Rep: +0/-0Level 75
RMRK Junior
Just wondering... is there any way to make it so it DOESN'T merge all the text boxes? I'm trying to make an event speak with only one line per message box. Like the default message system actually. Right now I'm just putting multiple line breaks but that becomes a hassle. Here's an example:

>"What's up?"
>
>
>

>"...Why do you look so down?"
>
>
>

and NOT

>"What's up?""Why do you look so down?"
>
>
>

Help is appreciated. This system is amazing  ^-^
« Last Edit: August 10, 2010, 08:18:43 AM by XxInfusionsxX »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Yeah, just set APPEND_TEXT to false in the script. It should be around line 769. If you want to turn it on or off in-game, then just use the following codes in a script call:

Code: [Select]
ats_all (:append_text, true)
to turn it on, or
Code: [Select]
ats_all (:append_text, false)
to turn it off.

*
Rep: +0/-0Level 75
RMRK Junior
Oh wow I can't believe I missed that! Exactly what I wanted, thanks  ;D

**
Rep: +0/-0Level 76
RMRK Junior
The error suddenly stopped appearing. I don't know what I did, but it's working fine now. Thanks for your help.

**
Rep: +0/-0Level 75
RMRK Junior
I have the exact same issue like E. Belle:
http://www.rpgmakervx.net/index.php?showtopic=19726&pid=330573&st=80&#entry330573

Judging from the list of scripts you posted, I assume you're using the KGC+YanflyPLUS Base Demo as well? I figured out which script is causing this error:


It's YERD_MenuSystem. I've verified this by deleting one script at a time, then start the game, then delete another script, and so on.  But once this script is being deleted, everything works.

I other news, I also found out that the game crashes if YERD_VictoryAftermath is deleted. The game doesn't crash if I keep it AND use ATB3.0b, but couldn't care less if I delete it AND DON't USE ATB3.0b. Since I plan to keep both ATB and VictoryAftermath anyway, everything's fine here. I know that it was already mentioned, but for the record, I though I might as well mention it.

Overall, these two scripts (YERD_MenuSystem and YERD_VictoryAftermath) are the only troublemakers, you can literally delete any other script you want and it still works in the KGC+YanflyPLUS Base Demo. The KGC scripts are fine, you can use ATS3.0b with KGC Script Library without any problems.

That's all I could figure out so far. I would be more then grateful if you could find a solution for this problem.


Edit: Nevermind, I fixed the problem. Appearently, if you place ATB3.0b at the very end (read: As the last script right before Main) the game won't crash. Only noticed that just now that you that you said "try placing the script at the end".
So yeah, case closed. Still, I guess it's good to know which scripts caused problems in the first place.

Here's the code from YERD_MenuSystem:

Code: [Select]
#===============================================================================
#
# Yanfly Engine RD - Menu System Options
# Last Date Updated: 2009.05.12
# Level: Easy, Normal
#
# The "End Game" option is quite possibly the most useless function in RPG Maker
# VX games. Not only does it have little functionality but its functions can
# be reproduced by Alt+F4 and F12. This script replaces "End Game" with a new
# menu altogether and giving the player some familiar options seen in many of
# today's commercial RPG's such as changing window skins, adjust sound volume,
# turning off animations during battle, and the like.
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.05.12 - Auto-Dash update. If player holds down the dash button when
#                this option is enabled, the player will walk instead of dash.
# o 2009.05.09 - Compatibility update with Woratana's NeoMessage.
#                Compatibility update with Modern Algebra's ATS.
# o 2009.05.07 - Started script and finished.
#===============================================================================
# Instructions
#===============================================================================
#
# Input this script anywhere above Main. It's plug and play outside of changing
# a few variables and switches, which will be listed below:
#
# - If you have variables bound to variables 91, 92, 93, and 94, scroll down and
#   bind them to unused variables.
# - If you have switches bound to switches 91, 92, 93, 94, 95, or 96, scroll
#   down and bind them to unused switches.
#
# Then, download the windows pack, and create a "Windows" folder inside your
# Graphics folder. Input the windows pack there. You're all set to go.
#
#===============================================================================
#
# Compatibility
# - Works With: Woratana's NeoMessage
# - Works With: Modern Algebra's ATS
# - Alias: Game_Player: dash?
# - Alias: Window_Base: initialize
# - Alias: Scene_Battle: display_normal_animation
# - Overwrites: Scene_End: All of it
# - Overwrites: Vocab: game_end
#
#===============================================================================

$imported = {} if $imported == nil
$imported["MenuSystemOptions"] = true

module YE
  module SYSTEM
     
    # This changes the "End Game" string to a new string. This completely
    # overrides the default term from the database for a reason and that's
    # because this is adjustable from the title menu as well.
    TITLE = "System"
   
    #---------------------
    # Window Configuration
    #---------------------
   
    # This will affect what string data will appear for the window selection
    # portion of the system menu.
    WINDOW_HELP = "Select preferred window skin."
    WINDOW_SKIN = "Window Skin"
   
    # This sets the default window used when nothing is selected. This also
    # determines the window skin used at the title screen. Reference it to
    # the list below to determine which window skin. Don't make this 0.
    DEFAULT_WINDOW = 7
   
    # This determines the variable used to store the player's windowskin choice.
    WINDOW_VARIABLE = 91
   
    # This below determines what the variable refers to when it's used as
    # reference. Put your windows inside the Graphics/Windows folder. ID 0 will
    # automatically push back to the default window's ID.
    WINDOW_HASH ={
    # Window ID => Window Name
              1 => "Red",
              2 => "Orange",
              3 => "Yellow",
              4 => "Green",
              5 => "Cyan",
              6 => "Navy",
              7 => "Blue",
              8 => "Violet",
              9 => "Purple",
             10 => "Pink",
             11 => "Grey",
             12 => "Black",
    } # Do not remove this.
   
    #---------------------
    # Volume Configuration
    #---------------------
   
    # This will affect what string data will appear for the volume adjustment
    # portion of the system menu.
    BGM_HELP  = "Adjust BGM volume. Press L/R to mute."
    SFX_HELP  = "Adjust SFX volume. Press L/R to mute."
    BGS_HELP  = "Adjust BGS volume. Press L/R to mute."
    BGM_TITLE = "BGM Volume"
    SFX_TITLE = "SFX Volume"
    BGS_TITLE = "BGS Volume"
    VOL_MUTE  = "Mute"
   
    # These are the variables and switches that govern the sound effect volumes.
    # Note that for the variables, the higher they are, the lower the volume.
    BGM_VOLUME_VAR  = 92    # Variable
    SFX_VOLUME_VAR  = 93    # Variable
    BGS_VOLUME_VAR  = 94    # Variable
    BGM_MUTE_SWITCH = 92    # Switch
    SFX_MUTE_SWITCH = 93    # Switch
    BGS_MUTE_SWITCH = 94    # Switch
   
    # This adjusts the gradient colours for each of the volume controls.
    BGM_COLOUR1 = 30
    BGM_COLOUR2 = 31
    SFX_COLOUR1 = 28
    SFX_COLOUR2 = 29
    BGS_COLOUR1 = 20
    BGS_COLOUR2 = 21
   
    #---------------------
    # Battle Animations
    #---------------------
   
    # This will affect what string data will appear for the toggling of
    # battle animations portion of the system menu.
    ANI_TITLE = "Battle Animations"
    ANI_HELP  = "Toggles animations during battle."
    ANI_ON    = "Shown"
    ANI_OFF   = "Hidden"
   
    # This is the switch used to adjust battle animations. If it is off,
    # animations are enabled. If it is on, animations are disabled.
    ANI_SWITCH = 91
   
    #---------------------
    # Automatic Dashing
    #---------------------
   
    # This will affect what string data will appear for the toggling of
    # automatic dashing portion of the system menu.
    AUTO_DASH_TITLE = "Automatic Dash"
    AUTO_DASH_HELP  = "Toggles automatic dashing."
    AUTO_DASH_ON    = "Auto"
    AUTO_DASH_OFF   = "Hold"
   
    # This is the switch used to determine whether or not autodashing is on.
    AUTO_DASH_SWITCH = 95
   
    #---------------------
    # Instant Text
    #---------------------
   
    # This will affect what string data will appear for the instant text
    # portion of the system menu.
    INSTANT_TEXT_TITLE = "Instant Text"
    INSTANT_TEXT_HELP  = "Toggles instant text display."
    INSTANT_TEXT_ON    = "Instant"
    INSTANT_TEXT_OFF   = "Default"
   
    # This is the switch used to determine whether or not instant text is on.
    INSTANT_TEXT_SWITCH = 96
   
    #---------------------
    # Remaining Text
    #---------------------
   
    # This will affect what remaining string data is left for the system menu.
    RETURN_TO_TITLE   = "Return to Title Screen"
    RETURN_TITLE_HELP = "Return back to the title screen."
    RETURN_TO_MENU    = "Return to Main Menu"
    RETURN_MENU_HELP  = "Return back to the main menu."
     
  end # SYSTEM
end # YE

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

module Vocab
  def self.game_end
    return YE::SYSTEM::TITLE
  end
end

module Cache
  def self.windows(filename)
    load_bitmap("Graphics/Windows/", filename)
  end
end

module RPG
 
  class BGM < AudioFile
    def play
      if @name.empty?
        Audio.bgm_stop
        @@last = BGM.new
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGM_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
        end
        Audio.bgm_play("Audio/BGM/" + @name, vol, @pitch)
        @@last = self
      end
    end #Play
  end # BGM
 
  class ME < AudioFile
    def play
      if @name.empty?
        Audio.me_stop
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGM_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
        end
        Audio.me_play("Audio/ME/" + @name, vol, @pitch)
      end
    end
  end # ME
 
  class SE < AudioFile
    def play
      unless @name.empty?
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::SFX_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
        end
        Audio.se_play("Audio/SE/" + @name, vol, @pitch)
      end
    end
    def self.stop
      Audio.se_stop
    end
  end # SE
 
  class BGS < AudioFile
    def play
      if @name.empty?
        Audio.bgs_stop
        @@last = BGS.new
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGS_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
        end
        Audio.bgs_play("Audio/BGS/" + @name, vol, @pitch)
        @@last = self
      end
    end
  end # BGS
 
end # RPG

#===============================================================================
# Game Player
#===============================================================================

class Game_Player < Game_Character
 
  #--------------------------------------------------------------------------
  # alias dash?
  #--------------------------------------------------------------------------
  alias dash_mso dash? unless $@
  def dash?
    if $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH]
      return false if @move_route_forcing
      return false if $game_map.disable_dash?
      return false if in_vehicle?
      return false if Input.press?(Input::A)
      return true
    else
      dash_mso
    end
  end
 
end

#===============================================================================
# Window
#===============================================================================

class Window
 
  #--------------------------------------------------------------------------
  # update windowskin
  #--------------------------------------------------------------------------
  def update_windowskin
    if $game_variables != nil
      winvar = YE::SYSTEM::WINDOW_VARIABLE
      if $game_variables[winvar] == 0
        $game_variables[winvar] = YE::SYSTEM::DEFAULT_WINDOW
      elsif !YE::SYSTEM::WINDOW_HASH.include?($game_variables[winvar])
        $game_variables[winvar] = YE::SYSTEM::DEFAULT_WINDOW
      end
      mso_windowskin = YE::SYSTEM::WINDOW_HASH[$game_variables[winvar]]
    else
      mso_windowskin = YE::SYSTEM::WINDOW_HASH[YE::SYSTEM::DEFAULT_WINDOW]
    end
    self.windowskin = Cache.windows(mso_windowskin)
  end
 
end

#===============================================================================
# Window Base
#===============================================================================

class Window_Base < Window
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_window_mso initialize unless $@
  def initialize(x, y, width, height)
    initialize_window_mso(x, y, width, height)
    self.update_windowskin
  end
 
end

#===============================================================================
# Window Message
#===============================================================================

class Window_Message < Window_Selectable
 
  #--------------------------------------------------------------------------
  # alias update show fast
  #--------------------------------------------------------------------------
  alias update_show_fast_mso update_show_fast unless $@
  def update_show_fast
    if $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH]
      if self.pause or self.openness < 255
        @show_fast = false
      else
        @show_fast = true
      end
      if @show_fast and @wait_count > 0
        @wait_count -= 1
      end
    else
      update_show_fast_mso
    end
  end

if $worale != nil
  if $worale["NMS"]
  #--------------------------------------------------------------------------
  # alias draw_name
  #--------------------------------------------------------------------------
  alias draw_name_mso draw_name unless $@
  def draw_name(name, x, y)
    draw_name_mso(name, x, y)
    @namebox.update_windowskin
  end
  end
end
 
end

#===============================================================================
# Window System
#===============================================================================

class Window_System < Window_Selectable
 
  #--------------------------------------------------------------------------
  # Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 56, 544, 360)
    @column_max = 1
    self.index = 0
    self.active = true
    refresh
  end
 
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    @data.push(0) # Window Skins
    @data.push(1) # Sound Volume/Sound Mute
    @data.push(2) # BGM Volume/BGM Mute
    @data.push(3) # Ambience Volume/Ambience Mute
    @data.push(4) # Battle Animations
    @data.push(5) # Auto-Dash
    @data.push(6) # Instant Text
    @data.push(7) # Return to Title
    @data.push(8) # Return to Menu
    @item_max = @data.size
    self.contents.clear
    for i in 0..@item_max
      self.contents.font.color.alpha = 255
      draw_item(i)
    end
    #---
  end
 
  #--------------------------------------------------------------------------
  # Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    sw = self.width - 32
    dw = sw
    #---
    case index
    when 0
      dx = 0
      dy = 0
      text = YE::SYSTEM::WINDOW_SKIN
      self.contents.draw_text(dx, dy, dw, WLH, text, 1)
      winvar = $game_variables[YE::SYSTEM::WINDOW_VARIABLE]
      text = YE::SYSTEM::WINDOW_HASH[winvar - 2]
      self.contents.draw_text(dx + dw * 0/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar - 1]
      self.contents.draw_text(dx + dw * 1/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar]
      self.contents.draw_text(dx + dw * 2/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar + 1]
      self.contents.draw_text(dx + dw * 3/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar + 2]
      self.contents.draw_text(dx + dw * 4/5, dy + WLH, dw/5, WLH, text, 1)
    when 1
      dx = 0
      dy = WLH * 2
      text = YE::SYSTEM::BGM_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 2
      dx = 0
      dy = WLH * 4
      text = YE::SYSTEM::SFX_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 3
      dx = 0
      dy = WLH * 6
      text = YE::SYSTEM::BGS_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 4
      dx = 0
      dy = WLH * 8
      text = YE::SYSTEM::ANI_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::ANI_SWITCH]
        en1 = false
        en2 = true
      else
        en1 = true
        en2 = false
      end
      text1 = YE::SYSTEM::ANI_ON
      text2 = YE::SYSTEM::ANI_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 5
      dx = 0
      dy = WLH * 9
      text = YE::SYSTEM::AUTO_DASH_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH]
        en1 = true
        en2 = false
      else
        en1 = false
        en2 = true
      end
      text1 = YE::SYSTEM::AUTO_DASH_ON
      text2 = YE::SYSTEM::AUTO_DASH_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 6
      dx = 0
      dy = WLH * 10
      text = YE::SYSTEM::INSTANT_TEXT_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH]
        en1 = true
        en2 = false
      else
        en1 = false
        en2 = true
      end
      text1 = YE::SYSTEM::INSTANT_TEXT_ON
      text2 = YE::SYSTEM::INSTANT_TEXT_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 7
      dx = 0
      dy = WLH * 11
      text = YE::SYSTEM::RETURN_TO_TITLE
      self.contents.draw_text(dx + 20, dy, dw - 20, WLH, text, 0)
    #---
    when 8
      dx = 0
      dy = WLH * 12
      text = YE::SYSTEM::RETURN_TO_MENU
      self.contents.draw_text(dx + 20, dy, dw - 20, WLH, text, 0)
    end
  end
 
  #--------------------------------------------------------------------------
  # Update Cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    elsif @index < 4
      self.cursor_rect.set(0, @index * 48, self.width - 32, 48)
    else
      self.cursor_rect.set(0, @index * 24 + 96, self.width - 32, 24)
    end
  end
 
end

#===============================================================================
# Window Volume
#===============================================================================

class Window_Volume < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(wx, wy, ww, wh, var)
    super(wx, wy, ww, wh)
    @var = var
    if @var == YE::SYSTEM::BGM_VOLUME_VAR
      @gc1 = text_color(YE::SYSTEM::BGM_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::BGM_COLOUR2)
      @mute = YE::SYSTEM::BGM_MUTE_SWITCH
    elsif @var == YE::SYSTEM::SFX_VOLUME_VAR
      @gc1 = text_color(YE::SYSTEM::SFX_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::SFX_COLOUR2)
      @mute = YE::SYSTEM::SFX_MUTE_SWITCH
    else
      @gc1 = text_color(YE::SYSTEM::BGS_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::BGS_COLOUR2)
      @mute = YE::SYSTEM::BGS_MUTE_SWITCH
    end
    self.opacity = 0
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    sw = self.width - 32
    self.contents.fill_rect(0, 14, sw-80, 20, gauge_back_color)
    gw = sw-84
    gw *= 100 - $game_variables[@var]
    gw /= 100
    gw = [[gw, 0].max, sw-84].min
    self.contents.gradient_fill_rect(2, 16, gw, 16, @gc1, @gc2)
    if $game_switches[@mute]
      text = YE::SYSTEM::VOL_MUTE
    else
      text = sprintf("%d%%", 100 - $game_variables[@var])
    end
    self.contents.draw_text(sw-76, 0, 76, WLH*2, text, 0)
  end
 
end

#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize
    initialize_fb_mso
    self.update_windowskin
  end
 
end
end

class Window_NameBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize(string = '')
    initialize_nb_mso(string)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox < Window_Command
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize
    initialize_cb_mso
    self.update_windowskin
  end
 
end
end

class Window_Message < Window_Selectable
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize
    initialize_wm_mso
    self.update_windowskin
  end
 
end
end

#===============================================================================
# Scene_Battle
#===============================================================================

class Scene_Battle < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias display_normal_animation
  #--------------------------------------------------------------------------
  alias display_normal_animation_mso display_normal_animation unless $@
  def display_normal_animation(targets, animation_id, mirror = false)
    return if $game_switches[YE::SYSTEM::ANI_SWITCH]     
    display_normal_animation_mso(targets, animation_id, mirror)
  end
 
end

#===============================================================================
# Scene_End
#===============================================================================

class Scene_End < Scene_Base

  #--------------------------------------------------------------------------
  # Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @help_window = Window_Base.new(0, 0, 544, 56)
    @help_window.contents.clear
    #---
    text = YE::SYSTEM::WINDOW_HELP
    @help_window.contents.draw_text(4,  0, 504, 24, text, 0)
    @system_window = Window_System.new
    var = YE::SYSTEM::BGM_VOLUME_VAR
    @bgm_vol_window = Window_Volume.new(160, 104, 384, 80, var)
    var = YE::SYSTEM::SFX_VOLUME_VAR
    @sfx_vol_window = Window_Volume.new(160, 152, 384, 80, var)
    var = YE::SYSTEM::BGS_VOLUME_VAR
    @bgs_vol_window = Window_Volume.new(160, 200, 384, 80, var)
    #---
    @last_index = 100
  end
 
  #--------------------------------------------------------------------------
  # Post-Start Processing
  #--------------------------------------------------------------------------
  def post_start
    super
  end
 
  #--------------------------------------------------------------------------
  # Pre-termination Processing
  #--------------------------------------------------------------------------
  def pre_terminate
    super
  end
 
  #--------------------------------------------------------------------------
  # Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    @help_window.dispose
    @system_window.dispose
    @bgm_vol_window.dispose
    @sfx_vol_window.dispose
    @bgs_vol_window.dispose
    dispose_menu_background
  end
 
  #--------------------------------------------------------------------------
  # Update Help
  #--------------------------------------------------------------------------
  def update_help
    @help_window.contents.clear
    case @system_window.index
    when 0; text = YE::SYSTEM::WINDOW_HELP
    when 1; text = YE::SYSTEM::BGM_HELP
    when 2; text = YE::SYSTEM::SFX_HELP
    when 3; text = YE::SYSTEM::BGS_HELP
    when 4; text = YE::SYSTEM::ANI_HELP
    when 5; text = YE::SYSTEM::AUTO_DASH_HELP
    when 6; text = YE::SYSTEM::INSTANT_TEXT_HELP
    when 7; text = YE::SYSTEM::RETURN_TITLE_HELP
    when 8; text = YE::SYSTEM::RETURN_MENU_HELP
    end
    @help_window.contents.draw_text(4,  0, 504, 24, text, 0)
  end
 
  #--------------------------------------------------------------------------
  # Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @system_window.update
   
    if @last_index != @system_window.index
      @last_index = @system_window.index
      update_help
    end
   
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    else
      #---
      if Input.repeat?(Input::LEFT) and @system_window.index == 0
        $game_variables[YE::SYSTEM::WINDOW_VARIABLE] -= 1
        if $game_variables[YE::SYSTEM::WINDOW_VARIABLE] == 0
          $game_variables[YE::SYSTEM::WINDOW_VARIABLE] = 1
        else
          Sound.play_cursor
        end
        @system_window.refresh
        @system_window.update_windowskin
        @help_window.update_windowskin
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 0
        $game_variables[YE::SYSTEM::WINDOW_VARIABLE] += 1
        if $game_variables[YE::SYSTEM::WINDOW_VARIABLE] >
        YE::SYSTEM::WINDOW_HASH.size
          $game_variables[YE::SYSTEM::WINDOW_VARIABLE] =
          YE::SYSTEM::WINDOW_HASH.size
        else
          Sound.play_cursor
        end
        @system_window.refresh
        @system_window.update_windowskin
        @help_window.update_windowskin
      #---
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 1
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 1
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::L) and @system_window.index == 1
        if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::R) and @system_window.index == 1
        if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 2
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @sfx_vol_window.refresh
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 2
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @sfx_vol_window.refresh
      elsif Input.trigger?(Input::L) and @system_window.index == 2
        if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @sfx_vol_window.refresh
      elsif Input.trigger?(Input::R) and @system_window.index == 2
        if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @sfx_vol_window.refresh
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 3
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 3
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::L) and @system_window.index == 3
        if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::R) and @system_window.index == 3
        if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 4
        $game_switches[YE::SYSTEM::ANI_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 4
        $game_switches[YE::SYSTEM::ANI_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 5
        $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 5
        $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 6
        $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 6
        $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::C) and @system_window.index == 7
        Sound.play_decision
        RPG::BGM.fade(800)
        RPG::BGS.fade(800)
        RPG::ME.fade(800)
        $scene = Scene_Title.new
        Graphics.fadeout(60)
      elsif Input.trigger?(Input::C) and @system_window.index == 8
        Sound.play_cancel
        return_scene
      end
      #---
    end
  end
 
end

#===============================================================================
#
# END OF FILE
#
#===============================================================================
« Last Edit: August 11, 2010, 02:05:37 PM by Genjis »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
OK, I'll definitely look into it. The problem with Victory Aftermath seems strange - the ATS does not in any way require it, so it shouldn't matter if it's deleted. Likely the Aftermath scripts overwrites or overrides some other script that is causing a problem, and it is that script the ATS is incompatible with. Anyway, I'll look into both and see if I can fix it.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
OK, to fix the Menu System Options bug, just do the following:

go to line 602 in the Menu System Options script and see this:

Code: [Select]
#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize
    initialize_fb_mso
    self.update_windowskin
  end
 
end
end

class Window_NameBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize(string = '')
    initialize_nb_mso(string)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox < Window_Command
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize
    initialize_cb_mso
    self.update_windowskin
  end
 
end
end

class Window_Message < Window_Selectable
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize
    initialize_wm_mso
    self.update_windowskin
  end
 
end
end

Fix it by replacing it with:

Code: [Select]
#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize (*args)
    initialize_fb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_NameBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize (*args)
    initialize_nb_mso(*args)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox < Window_Command
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize (*args)
    initialize_cb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_Message < Window_Selectable
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize (*args)
    initialize_wm_mso (*args)
    self.update_windowskin
  end
 
end
end

Also, it should be placed under the ATS in the Script Editor.

**
Rep: +0/-0Level 75
RMRK Junior
Yup, this new code fixes the problem with YERD_MenuSystem. Aternatively, I could fix the problem by placing ATS3.0b below MenuSystem. But I guess this was the cheap way, your fix is the real deal and allows me to place ATS3.0b in the same place which ATS2.0 was placed in the "Demo" (that is above MenuScene instead of below it).

As for Victory Aftermath: Just in case this isn't clear: Both ATS3.0b and VictoryAftermath work just fine(the upgrade from a to b must've solved the compatibility issue), BUT it causes trouble if someone tries to delete it. I guess it's just because there are other scripts left that requires the script. In fact, after deleting the 3 other scripts connected to VictoryAftermath, the game works once again.
In other words: If you want to remove VictoryAftermath from your game (or the demo in my case), be sure to delete these 4 scripts:
YERD_VictoryAftermath
YERD_VictoryExtend
MALG_YerdAftermathFix
YERD_JPDisplay

if any of these scripts is spared, but the others are deleted, it'll crash. Otherwise, version 3.0b works just fine with it.




I'll let you know if I should encounter any other issues, but everything seems to work so far.

Once again many, many thanks for this super fast support  :) . This isn't the first time I see you in action, but you really helped me out big time this time (what a sentence XD).
« Last Edit: August 11, 2010, 09:27:32 PM by Genjis »

**
Rep: +0/-0Level 75
Kreaven
Hi !

First of all , THANKS for this script . this is awesome . i will raise a statue of you in my next game :)

But .... i have a small issue , look at this screen :


Here is the original text :
Voulez-vous jouer en mode developpeur ?\lb
Vous aurez accés au commentaire du créateur du jeu et vous
pourrez meme ... tricher .\lb
(yes , it is in french) .

As you can see , a word "créateur" is truncated ...

This is not a major issue because i can put a \lb before , but ...


Hmm, yeah it shouldn't happen. The spaces at the starts of those lines shouldn't happen either. For now, just put the \lb. If it becomes common I will have to look into it more closely. I suspect the problem has to do with the text_size method of bitmap and incorrectly calculating for french characters.

I have quite a similar problem for Polish characters. In my case, though, the whole paragraph formatting and justifying seems not to be working. It does work when I use English only. I'd like to know if there's any chance of fixing this. I'd rather stay with ATS, as I'm in great need of these alignment codes/properties and I didn't see them anywhere else.
« Last Edit: August 14, 2010, 04:23:02 PM by kreavenkreaven »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, paragraph formatting relies on the #text_size method of Bitmap. With some fonts, that method is not accurate. I can't really fix that unfortunately - that method is hidden. The only way to do it would be to manually adjust the method specifically for the font being used. I could do it if it were an English font, but I don't think I could with a Polish font. Sorry.

**
Rep: +0/-0Level 75
RMRK Junior
Ok, this script is really starting to get on my nerves. I encountered another bug. Each time a dialogue box with an extra name box is shown ( \nb is used), the game crashes and gives me this error:


Script 'YERD_MenuSystem' line 629: ArgumentError occurred.

wrong number of arguments (2 for 4)


Here is the line in question:

Code: [Select]
    initialize_nb_mso(*args)

And here is the script itself. It already contains your fix from before, but it still crashes. (Without the fix, the game wouldn't even come this far).

Code: [Select]
#===============================================================================
#
# Yanfly Engine RD - Menu System Options
# Last Date Updated: 2009.05.12
# Level: Easy, Normal
#
# The "End Game" option is quite possibly the most useless function in RPG Maker
# VX games. Not only does it have little functionality but its functions can
# be reproduced by Alt+F4 and F12. This script replaces "End Game" with a new
# menu altogether and giving the player some familiar options seen in many of
# today's commercial RPG's such as changing window skins, adjust sound volume,
# turning off animations during battle, and the like.
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.05.12 - Auto-Dash update. If player holds down the dash button when
#                this option is enabled, the player will walk instead of dash.
# o 2009.05.09 - Compatibility update with Woratana's NeoMessage.
#                Compatibility update with Modern Algebra's ATS.
# o 2009.05.07 - Started script and finished.
#===============================================================================
# Instructions
#===============================================================================
#
# Input this script anywhere above Main. It's plug and play outside of changing
# a few variables and switches, which will be listed below:
#
# - If you have variables bound to variables 91, 92, 93, and 94, scroll down and
#   bind them to unused variables.
# - If you have switches bound to switches 91, 92, 93, 94, 95, or 96, scroll
#   down and bind them to unused switches.
#
# Then, download the windows pack, and create a "Windows" folder inside your
# Graphics folder. Input the windows pack there. You're all set to go.
#
#===============================================================================
#
# Compatibility
# - Works With: Woratana's NeoMessage
# - Works With: Modern Algebra's ATS
# - Alias: Game_Player: dash?
# - Alias: Window_Base: initialize
# - Alias: Scene_Battle: display_normal_animation
# - Overwrites: Scene_End: All of it
# - Overwrites: Vocab: game_end
#
#===============================================================================

$imported = {} if $imported == nil
$imported["MenuSystemOptions"] = true

module YE
  module SYSTEM
     
    # This changes the "End Game" string to a new string. This completely
    # overrides the default term from the database for a reason and that's
    # because this is adjustable from the title menu as well.
    TITLE = "System"
   
    #---------------------
    # Window Configuration
    #---------------------
   
    # This will affect what string data will appear for the window selection
    # portion of the system menu.
    WINDOW_HELP = "Select preferred window skin."
    WINDOW_SKIN = "Window Skin"
   
    # This sets the default window used when nothing is selected. This also
    # determines the window skin used at the title screen. Reference it to
    # the list below to determine which window skin. Don't make this 0.
    DEFAULT_WINDOW = 7
   
    # This determines the variable used to store the player's windowskin choice.
    WINDOW_VARIABLE = 91
   
    # This below determines what the variable refers to when it's used as
    # reference. Put your windows inside the Graphics/Windows folder. ID 0 will
    # automatically push back to the default window's ID.
    WINDOW_HASH ={
    # Window ID => Window Name
              1 => "Red",
              2 => "Orange",
              3 => "Yellow",
              4 => "Green",
              5 => "Cyan",
              6 => "Navy",
              7 => "Blue",
              8 => "Violet",
              9 => "Purple",
             10 => "Pink",
             11 => "Grey",
             12 => "Black",
    } # Do not remove this.
   
    #---------------------
    # Volume Configuration
    #---------------------
   
    # This will affect what string data will appear for the volume adjustment
    # portion of the system menu.
    BGM_HELP  = "Adjust BGM volume. Press L/R to mute."
    SFX_HELP  = "Adjust SFX volume. Press L/R to mute."
    BGS_HELP  = "Adjust BGS volume. Press L/R to mute."
    BGM_TITLE = "BGM Volume"
    SFX_TITLE = "SFX Volume"
    BGS_TITLE = "BGS Volume"
    VOL_MUTE  = "Mute"
   
    # These are the variables and switches that govern the sound effect volumes.
    # Note that for the variables, the higher they are, the lower the volume.
    BGM_VOLUME_VAR  = 92    # Variable
    SFX_VOLUME_VAR  = 93    # Variable
    BGS_VOLUME_VAR  = 94    # Variable
    BGM_MUTE_SWITCH = 92    # Switch
    SFX_MUTE_SWITCH = 93    # Switch
    BGS_MUTE_SWITCH = 94    # Switch
   
    # This adjusts the gradient colours for each of the volume controls.
    BGM_COLOUR1 = 30
    BGM_COLOUR2 = 31
    SFX_COLOUR1 = 28
    SFX_COLOUR2 = 29
    BGS_COLOUR1 = 20
    BGS_COLOUR2 = 21
   
    #---------------------
    # Battle Animations
    #---------------------
   
    # This will affect what string data will appear for the toggling of
    # battle animations portion of the system menu.
    ANI_TITLE = "Battle Animations"
    ANI_HELP  = "Toggles animations during battle."
    ANI_ON    = "Shown"
    ANI_OFF   = "Hidden"
   
    # This is the switch used to adjust battle animations. If it is off,
    # animations are enabled. If it is on, animations are disabled.
    ANI_SWITCH = 91
   
    #---------------------
    # Automatic Dashing
    #---------------------
   
    # This will affect what string data will appear for the toggling of
    # automatic dashing portion of the system menu.
    AUTO_DASH_TITLE = "Automatic Dash"
    AUTO_DASH_HELP  = "Toggles automatic dashing."
    AUTO_DASH_ON    = "Auto"
    AUTO_DASH_OFF   = "Hold"
   
    # This is the switch used to determine whether or not autodashing is on.
    AUTO_DASH_SWITCH = 95
   
    #---------------------
    # Instant Text
    #---------------------
   
    # This will affect what string data will appear for the instant text
    # portion of the system menu.
    INSTANT_TEXT_TITLE = "Instant Text"
    INSTANT_TEXT_HELP  = "Toggles instant text display."
    INSTANT_TEXT_ON    = "Instant"
    INSTANT_TEXT_OFF   = "Default"
   
    # This is the switch used to determine whether or not instant text is on.
    INSTANT_TEXT_SWITCH = 96
   
    #---------------------
    # Remaining Text
    #---------------------
   
    # This will affect what remaining string data is left for the system menu.
    RETURN_TO_TITLE   = "Return to Title Screen"
    RETURN_TITLE_HELP = "Return back to the title screen."
    RETURN_TO_MENU    = "Return to Main Menu"
    RETURN_MENU_HELP  = "Return back to the main menu."
     
  end # SYSTEM
end # YE

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

module Vocab
  def self.game_end
    return YE::SYSTEM::TITLE
  end
end

module Cache
  def self.windows(filename)
    load_bitmap("Graphics/Windows/", filename)
  end
end

module RPG
 
  class BGM < AudioFile
    def play
      if @name.empty?
        Audio.bgm_stop
        @@last = BGM.new
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGM_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
        end
        Audio.bgm_play("Audio/BGM/" + @name, vol, @pitch)
        @@last = self
      end
    end #Play
  end # BGM
 
  class ME < AudioFile
    def play
      if @name.empty?
        Audio.me_stop
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGM_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
        end
        Audio.me_play("Audio/ME/" + @name, vol, @pitch)
      end
    end
  end # ME
 
  class SE < AudioFile
    def play
      unless @name.empty?
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::SFX_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
        end
        Audio.se_play("Audio/SE/" + @name, vol, @pitch)
      end
    end
    def self.stop
      Audio.se_stop
    end
  end # SE
 
  class BGS < AudioFile
    def play
      if @name.empty?
        Audio.bgs_stop
        @@last = BGS.new
      else
        vol = @volume
        if $game_variables != nil
          vol *= 100 - $game_variables[YE::SYSTEM::BGS_VOLUME_VAR]
          vol /= 100
          vol = [[vol, 0].max, 100].min
          vol = 0 if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
        end
        Audio.bgs_play("Audio/BGS/" + @name, vol, @pitch)
        @@last = self
      end
    end
  end # BGS
 
end # RPG

#===============================================================================
# Game Player
#===============================================================================

class Game_Player < Game_Character
 
  #--------------------------------------------------------------------------
  # alias dash?
  #--------------------------------------------------------------------------
  alias dash_mso dash? unless $@
  def dash?
    if $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH]
      return false if @move_route_forcing
      return false if $game_map.disable_dash?
      return false if in_vehicle?
      return false if Input.press?(Input::A)
      return true
    else
      dash_mso
    end
  end
 
end

#===============================================================================
# Window
#===============================================================================

class Window
 
  #--------------------------------------------------------------------------
  # update windowskin
  #--------------------------------------------------------------------------
  def update_windowskin
    if $game_variables != nil
      winvar = YE::SYSTEM::WINDOW_VARIABLE
      if $game_variables[winvar] == 0
        $game_variables[winvar] = YE::SYSTEM::DEFAULT_WINDOW
      elsif !YE::SYSTEM::WINDOW_HASH.include?($game_variables[winvar])
        $game_variables[winvar] = YE::SYSTEM::DEFAULT_WINDOW
      end
      mso_windowskin = YE::SYSTEM::WINDOW_HASH[$game_variables[winvar]]
    else
      mso_windowskin = YE::SYSTEM::WINDOW_HASH[YE::SYSTEM::DEFAULT_WINDOW]
    end
    self.windowskin = Cache.windows(mso_windowskin)
  end
 
end

#===============================================================================
# Window Base
#===============================================================================

class Window_Base < Window
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_window_mso initialize unless $@
  def initialize(x, y, width, height)
    initialize_window_mso(x, y, width, height)
    self.update_windowskin
  end
 
end

#===============================================================================
# Window Message
#===============================================================================

class Window_Message < Window_Selectable
 
  #--------------------------------------------------------------------------
  # alias update show fast
  #--------------------------------------------------------------------------
  alias update_show_fast_mso update_show_fast unless $@
  def update_show_fast
    if $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH]
      if self.pause or self.openness < 255
        @show_fast = false
      else
        @show_fast = true
      end
      if @show_fast and @wait_count > 0
        @wait_count -= 1
      end
    else
      update_show_fast_mso
    end
  end

if $worale != nil
  if $worale["NMS"]
  #--------------------------------------------------------------------------
  # alias draw_name
  #--------------------------------------------------------------------------
  alias draw_name_mso draw_name unless $@
  def draw_name(name, x, y)
    draw_name_mso(name, x, y)
    @namebox.update_windowskin
  end
  end
end
 
end

#===============================================================================
# Window System
#===============================================================================

class Window_System < Window_Selectable
 
  #--------------------------------------------------------------------------
  # Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 56, 544, 360)
    @column_max = 1
    self.index = 0
    self.active = true
    refresh
  end
 
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    @data.push(0) # Window Skins
    @data.push(1) # Sound Volume/Sound Mute
    @data.push(2) # BGM Volume/BGM Mute
    @data.push(3) # Ambience Volume/Ambience Mute
    @data.push(4) # Battle Animations
    @data.push(5) # Auto-Dash
    @data.push(6) # Instant Text
    @data.push(7) # Return to Title
    @data.push(8) # Return to Menu
    @item_max = @data.size
    self.contents.clear
    for i in 0..@item_max
      self.contents.font.color.alpha = 255
      draw_item(i)
    end
    #---
  end
 
  #--------------------------------------------------------------------------
  # Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    sw = self.width - 32
    dw = sw
    #---
    case index
    when 0
      dx = 0
      dy = 0
      text = YE::SYSTEM::WINDOW_SKIN
      self.contents.draw_text(dx, dy, dw, WLH, text, 1)
      winvar = $game_variables[YE::SYSTEM::WINDOW_VARIABLE]
      text = YE::SYSTEM::WINDOW_HASH[winvar - 2]
      self.contents.draw_text(dx + dw * 0/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar - 1]
      self.contents.draw_text(dx + dw * 1/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar]
      self.contents.draw_text(dx + dw * 2/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar + 1]
      self.contents.draw_text(dx + dw * 3/5, dy + WLH, dw/5, WLH, text, 1)
      text = YE::SYSTEM::WINDOW_HASH[winvar + 2]
      self.contents.draw_text(dx + dw * 4/5, dy + WLH, dw/5, WLH, text, 1)
    when 1
      dx = 0
      dy = WLH * 2
      text = YE::SYSTEM::BGM_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 2
      dx = 0
      dy = WLH * 4
      text = YE::SYSTEM::SFX_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 3
      dx = 0
      dy = WLH * 6
      text = YE::SYSTEM::BGS_TITLE
      self.contents.draw_text(dx + 20, dy, dw/3 - 20, WLH*2, text, 0)
    when 4
      dx = 0
      dy = WLH * 8
      text = YE::SYSTEM::ANI_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::ANI_SWITCH]
        en1 = false
        en2 = true
      else
        en1 = true
        en2 = false
      end
      text1 = YE::SYSTEM::ANI_ON
      text2 = YE::SYSTEM::ANI_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 5
      dx = 0
      dy = WLH * 9
      text = YE::SYSTEM::AUTO_DASH_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH]
        en1 = true
        en2 = false
      else
        en1 = false
        en2 = true
      end
      text1 = YE::SYSTEM::AUTO_DASH_ON
      text2 = YE::SYSTEM::AUTO_DASH_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 6
      dx = 0
      dy = WLH * 10
      text = YE::SYSTEM::INSTANT_TEXT_TITLE
      self.contents.draw_text(dx + 20, dy, dw/2 - 20, WLH, text, 0)
      if $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH]
        en1 = true
        en2 = false
      else
        en1 = false
        en2 = true
      end
      text1 = YE::SYSTEM::INSTANT_TEXT_ON
      text2 = YE::SYSTEM::INSTANT_TEXT_OFF
      self.contents.font.color.alpha = en1 ? 255 : 128
      self.contents.draw_text(sw*1/2, dy, dw/4, WLH, text1, 1)
      self.contents.font.color.alpha = en2 ? 255 : 128
      self.contents.draw_text(sw*3/4, dy, dw/4, WLH, text2, 1)
    #---
    when 7
      dx = 0
      dy = WLH * 11
      text = YE::SYSTEM::RETURN_TO_TITLE
      self.contents.draw_text(dx + 20, dy, dw - 20, WLH, text, 0)
    #---
    when 8
      dx = 0
      dy = WLH * 12
      text = YE::SYSTEM::RETURN_TO_MENU
      self.contents.draw_text(dx + 20, dy, dw - 20, WLH, text, 0)
    end
  end
 
  #--------------------------------------------------------------------------
  # Update Cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    elsif @index < 4
      self.cursor_rect.set(0, @index * 48, self.width - 32, 48)
    else
      self.cursor_rect.set(0, @index * 24 + 96, self.width - 32, 24)
    end
  end
 
end

#===============================================================================
# Window Volume
#===============================================================================

class Window_Volume < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(wx, wy, ww, wh, var)
    super(wx, wy, ww, wh)
    @var = var
    if @var == YE::SYSTEM::BGM_VOLUME_VAR
      @gc1 = text_color(YE::SYSTEM::BGM_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::BGM_COLOUR2)
      @mute = YE::SYSTEM::BGM_MUTE_SWITCH
    elsif @var == YE::SYSTEM::SFX_VOLUME_VAR
      @gc1 = text_color(YE::SYSTEM::SFX_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::SFX_COLOUR2)
      @mute = YE::SYSTEM::SFX_MUTE_SWITCH
    else
      @gc1 = text_color(YE::SYSTEM::BGS_COLOUR1)
      @gc2 = text_color(YE::SYSTEM::BGS_COLOUR2)
      @mute = YE::SYSTEM::BGS_MUTE_SWITCH
    end
    self.opacity = 0
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    sw = self.width - 32
    self.contents.fill_rect(0, 14, sw-80, 20, gauge_back_color)
    gw = sw-84
    gw *= 100 - $game_variables[@var]
    gw /= 100
    gw = [[gw, 0].max, sw-84].min
    self.contents.gradient_fill_rect(2, 16, gw, 16, @gc1, @gc2)
    if $game_switches[@mute]
      text = YE::SYSTEM::VOL_MUTE
    else
      text = sprintf("%d%%", 100 - $game_variables[@var])
    end
    self.contents.draw_text(sw-76, 0, 76, WLH*2, text, 0)
  end
 
end

#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize (*args)
    initialize_fb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_NameBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize (*args)
    initialize_nb_mso(*args)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox < Window_Command
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize (*args)
    initialize_cb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_Message < Window_Selectable
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize (*args)
    initialize_wm_mso (*args)
    self.update_windowskin
  end
 
end
end

#===============================================================================
# Scene_Battle
#===============================================================================

class Scene_Battle < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias display_normal_animation
  #--------------------------------------------------------------------------
  alias display_normal_animation_mso display_normal_animation unless $@
  def display_normal_animation(targets, animation_id, mirror = false)
    return if $game_switches[YE::SYSTEM::ANI_SWITCH]     
    display_normal_animation_mso(targets, animation_id, mirror)
  end
 
end

#===============================================================================
# Scene_End
#===============================================================================

class Scene_End < Scene_Base

  #--------------------------------------------------------------------------
  # Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @help_window = Window_Base.new(0, 0, 544, 56)
    @help_window.contents.clear
    #---
    text = YE::SYSTEM::WINDOW_HELP
    @help_window.contents.draw_text(4,  0, 504, 24, text, 0)
    @system_window = Window_System.new
    var = YE::SYSTEM::BGM_VOLUME_VAR
    @bgm_vol_window = Window_Volume.new(160, 104, 384, 80, var)
    var = YE::SYSTEM::SFX_VOLUME_VAR
    @sfx_vol_window = Window_Volume.new(160, 152, 384, 80, var)
    var = YE::SYSTEM::BGS_VOLUME_VAR
    @bgs_vol_window = Window_Volume.new(160, 200, 384, 80, var)
    #---
    @last_index = 100
  end
 
  #--------------------------------------------------------------------------
  # Post-Start Processing
  #--------------------------------------------------------------------------
  def post_start
    super
  end
 
  #--------------------------------------------------------------------------
  # Pre-termination Processing
  #--------------------------------------------------------------------------
  def pre_terminate
    super
  end
 
  #--------------------------------------------------------------------------
  # Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    @help_window.dispose
    @system_window.dispose
    @bgm_vol_window.dispose
    @sfx_vol_window.dispose
    @bgs_vol_window.dispose
    dispose_menu_background
  end
 
  #--------------------------------------------------------------------------
  # Update Help
  #--------------------------------------------------------------------------
  def update_help
    @help_window.contents.clear
    case @system_window.index
    when 0; text = YE::SYSTEM::WINDOW_HELP
    when 1; text = YE::SYSTEM::BGM_HELP
    when 2; text = YE::SYSTEM::SFX_HELP
    when 3; text = YE::SYSTEM::BGS_HELP
    when 4; text = YE::SYSTEM::ANI_HELP
    when 5; text = YE::SYSTEM::AUTO_DASH_HELP
    when 6; text = YE::SYSTEM::INSTANT_TEXT_HELP
    when 7; text = YE::SYSTEM::RETURN_TITLE_HELP
    when 8; text = YE::SYSTEM::RETURN_MENU_HELP
    end
    @help_window.contents.draw_text(4,  0, 504, 24, text, 0)
  end
 
  #--------------------------------------------------------------------------
  # Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @system_window.update
   
    if @last_index != @system_window.index
      @last_index = @system_window.index
      update_help
    end
   
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    else
      #---
      if Input.repeat?(Input::LEFT) and @system_window.index == 0
        $game_variables[YE::SYSTEM::WINDOW_VARIABLE] -= 1
        if $game_variables[YE::SYSTEM::WINDOW_VARIABLE] == 0
          $game_variables[YE::SYSTEM::WINDOW_VARIABLE] = 1
        else
          Sound.play_cursor
        end
        @system_window.refresh
        @system_window.update_windowskin
        @help_window.update_windowskin
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 0
        $game_variables[YE::SYSTEM::WINDOW_VARIABLE] += 1
        if $game_variables[YE::SYSTEM::WINDOW_VARIABLE] >
        YE::SYSTEM::WINDOW_HASH.size
          $game_variables[YE::SYSTEM::WINDOW_VARIABLE] =
          YE::SYSTEM::WINDOW_HASH.size
        else
          Sound.play_cursor
        end
        @system_window.refresh
        @system_window.update_windowskin
        @help_window.update_windowskin
      #---
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 1
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 1
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::BGM_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::L) and @system_window.index == 1
        if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::R) and @system_window.index == 1
        if $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGM_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgm_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 2
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @sfx_vol_window.refresh
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 2
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::SFX_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @sfx_vol_window.refresh
      elsif Input.trigger?(Input::L) and @system_window.index == 2
        if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @sfx_vol_window.refresh
      elsif Input.trigger?(Input::R) and @system_window.index == 2
        if $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::SFX_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @sfx_vol_window.refresh
      elsif Input.repeat?(Input::LEFT) and @system_window.index == 3
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] += 10
        else
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] += 1
        end
        if $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] >= 100
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] = 100
        end
        Sound.play_cursor
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.repeat?(Input::RIGHT) and @system_window.index == 3
        if Input.press?(Input::A)
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] -= 10
        else
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] -= 1
        end
        if $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] <= 0
          $game_variables[YE::SYSTEM::BGS_VOLUME_VAR] = 0
        end
        Sound.play_cursor
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::L) and @system_window.index == 3
        if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::R) and @system_window.index == 3
        if $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH]
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = false
        else
          $game_switches[YE::SYSTEM::BGS_MUTE_SWITCH] = true
        end
        Sound.play_decision
        @bgs_vol_window.refresh
        RPG::BGM.last.play
        RPG::BGS.last.play
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 4
        $game_switches[YE::SYSTEM::ANI_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 4
        $game_switches[YE::SYSTEM::ANI_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 5
        $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 5
        $game_switches[YE::SYSTEM::AUTO_DASH_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::LEFT) and @system_window.index == 6
        $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH] = true
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::RIGHT) and @system_window.index == 6
        $game_switches[YE::SYSTEM::INSTANT_TEXT_SWITCH] = false
        Sound.play_decision
        @system_window.refresh
      elsif Input.trigger?(Input::C) and @system_window.index == 7
        Sound.play_decision
        RPG::BGM.fade(800)
        RPG::BGS.fade(800)
        RPG::ME.fade(800)
        $scene = Scene_Title.new
        Graphics.fadeout(60)
      elsif Input.trigger?(Input::C) and @system_window.index == 8
        Sound.play_cancel
        return_scene
      end
      #---
    end
  end
 
end

#===============================================================================
#
# END OF FILE
#
#===============================================================================

No other scripts are involved in this error. I've tested this by using a new "ATS3b Demo" project file and inserting the MenuScene script below ATS3.0b.
My guess is that one of the features from YERD_MenuScene (to change the windowskin) is causing this error. Strangely enough, it crashes without even changing the windowskin in the first place (I don't even access the main menu). I mean, ATS should work as long as the default one is still in use, but it looks like MenuScene is overwriting the entire windowskin part.
Btw, it also crashes if I set the background to "Dim Background" or "Transparent".

As always, the "cheap and easy way" still works: Place "YERD_MenuScene" ABOVE "ATS 3.0" and everything's fine, but place it below "ATS 3.0" and it crashes.
Would it make a difference if we leave MenuScene above ATS 3.0 anyway?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, no, not on the ATS end. However, whatever Yanfly is trying to do by aliasing those ATS methods in the first place wouldn't be done, which probably means one of the options that Yanfly has in the System menu doesn't work exactly as it should. I have never used that script, but it looks like it's the windowskin option, and the methods that are causing the issue are intended to make sure that the ATS windows have the chosen windowskins upon initialization. This particular error is occuring because I changed the superclass for Window_NameBox in ATS 3.0 and didn't think to change it here. Anyway, the following should fix it. Replace the whole ATS compatibility section: Ie.
Spoiler for old code:
Code: [Select]
#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize (*args)
    initialize_fb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_NameBox < Window_Base
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize (*args)
    initialize_nb_mso(*args)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox < Window_Command
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize (*args)
    initialize_cb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_Message < Window_Selectable
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize (*args)
    initialize_wm_mso (*args)
    self.update_windowskin
  end
 
end
end

with:

Spoiler for new code:
Code: [Select]
#===============================================================================
# Modern Algebra ATS Compatibility
#===============================================================================

class Window_FaceBox
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_fb_mso initialize unless $@
  def initialize (*args)
    initialize_fb_mso (*args)
    self.update_windowskin
  end
 
end

  alias remake_window_fb_mso remake_window unless $@
  def remake_window (*args)
    remake_window_fb_mso (*args)
    self.update_windowskin
  end
end

class Window_WordBox
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_nb_mso initialize unless $@
  def initialize (*args)
    initialize_nb_mso(*args)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceBox
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cb_mso initialize unless $@
  def initialize (*args)
    initialize_cb_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_ChoiceHelp
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_ch_mso initialize unless $@
  def initialize (*args)
    initialize_ch_mso (*args)
    self.update_windowskin
  end
 
end
end

class Window_Message
unless method_defined?(:initialize)
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_wm_mso initialize unless $@
  def initialize (*args)
    initialize_wm_mso (*args)
    self.update_windowskin
  end
 
end

  alias remake_window_wm_mso remake_window unless $@
  def remake_window (*args)
    remake_window_wm_mso (*args)
    self.update_windowskin
  end
end

Place the Menu System script under the ATS and that fix should work fine. I haven't tested it myself because I'd have to get new windowskin graphics and set the Menu System Options script up and I don't really have time, but I imagine that should fix the problems you have and retain compatibility between the two scripts. I remind you that the ATS properties used to change the windowskin will be automatically trumped by whatever windowskin is selected by the player in Menu System Options.

**
Rep: +0/-0Level 75
RMRK Junior
Wow, you certainly are fast, and you know what you're doing.

The new code works, thanks a lot.

Should I encounted yet another bug with MenuScene, I'll send it to hell.
« Last Edit: August 15, 2010, 09:23:23 PM by Genjis »

**
Rep: +0/-0Level 75
Kreaven
Well, paragraph formatting relies on the #text_size method of Bitmap. With some fonts, that method is not accurate. I can't really fix that unfortunately - that method is hidden. The only way to do it would be to manually adjust the method specifically for the font being used. I could do it if it were an English font, but I don't think I could with a Polish font. Sorry.

I see. Thanks anyway. I'll stick to English then. If that's the only option then so be it. By the way, that's a really great script, so thanks for it (I should have said that in the first place).

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, maybe try sending me the font you are using, as well as a text document that has every polish character you might need listed. The only reason I say I can't do it is because I don't know Polish and therefore don't know what characters I need to adjust or how to do it. So if I can get those from you I might be able to fix it.

**
Rep: +0/-0Level 75
Kreaven
I understand. It's quite an unrewarding job. Not many people will make use of the fix. I'll try being of as much help to you as possible - I can't do much more than provide fonts and sample texts, though. I'll PM you links. One more thing, don't haste. I'm quite sure you're working on thousands of other scripts right now. ;)