The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Angius on March 25, 2012, 10:13:53 PM

Title: [RESOLVED][VXA] change LevelUp message
Post by: Angius on March 25, 2012, 10:13:53 PM
I need a script (Wow, seriously?) for VX Ace. I want something, that will disable standard displaying of LevelUp, but instead of that will display certain graphic in top-left corner of the screen and turn certain switch ON. If I turn this switch OFF, this graffic should disppear.

I believe, that's not a problem for any scripter ;)

Thanks in advance!
Title: Re: [request] change LevelUp message
Post by: modern algebra on March 25, 2012, 10:21:01 PM
For which maker? XP, VX, or VX Ace?
Title: Re: [request] change LevelUp message
Post by: Angius on March 26, 2012, 06:40:23 AM
Oh, sorry, I forgot...
VX Ace.
Title: Re: [request][VXA] change LevelUp message
Post by: Angius on March 27, 2012, 07:45:30 AM
Ok, time to @bump!
Title: Re: [request][VXA] change LevelUp message
Post by: pacdiggity on March 27, 2012, 08:53:44 AM
No it isn't. Please wait 48 hours before bumping.
Title: Re: [request][VXA] change LevelUp message
Post by: Countdown on March 27, 2012, 05:07:40 PM
I thought it was 24 hours before you should bump?
Title: Re: [request][VXA] change LevelUp message
Post by: pacdiggity on March 27, 2012, 05:59:52 PM
Even if it is, let's not discuss it here. I think I saw 48 in a post Holk, and Holk's always right, so I just assumed it's 48.
Title: Re: [request][VXA] change LevelUp message
Post by: Angius on March 27, 2012, 07:12:29 PM
Doesn't matter... I,ve buped this topic a little bit too early, sorry bout that. But' that's not this topic issue.
Title: Re: [request][VXA] change LevelUp message
Post by: Illumination™ on March 27, 2012, 10:48:21 PM
I presumed that someone had this case because of the constant new posts, I will do this tomorrow first thing after school. It will cost you though, sell yo house.

Nah, but seriously I will do it tomorrow.
Title: Re: [request][VXA] change LevelUp message
Post by: Angius on March 28, 2012, 06:38:46 AM
Really? Oh men, I don't know how to thank you! Well... Except selling my house.
Title: Re: [AVAILABLE][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 01:08:40 AM
Ok, is it a right time to bump now?
Title: Re: [AVAILABLE][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 03:03:36 PM
Sorry for forgeting this over and over again.

Here it is though:

Code: [Select]
module LAZY_LEVELUP_CONFIG
  GRAPHICS = "nicelogo.png"
  SWITCH = 1
end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Show Level Up Message
  #     new_skills : Array of newly learned skills
  #--------------------------------------------------------------------------
  def display_level_up(new_skills)
    # Change a switch
    $game_switches[1] = true
  end
end

class Game_Map
  alias old_lazy_init initialize
  def initialize
    old_lazy_init
    @level_up_lazy_sprite = Sprite.new
    @level_up_lazy_sprite.z = 99999
    @level_up_lazy_sprite.visible = false
    @level_up_lazy_sprite.bitmap = Bitmap.new(LAZY_LEVELUP_CONFIG::GRAPHICS)
  end
  alias old_lazy_update update
  def update(main = false)
    old_lazy_update(main = false)
    @level_up_lazy_sprite.visible = $game_switches[LAZY_LEVELUP_CONFIG::SWITCH]
  end
end
Title: Re: [AVAILABLE][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 03:12:20 PM
Thank you very, very much!
But one last (I hope) question: which folder is for graphic? I tried Pictures, System, Characters, even directly Graphic, and it always shows me message "Can't find file xyz.png...
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 03:28:11 PM
Check this, it is in the top of your script:

Code: [Select]
module LAZY_LEVELUP_CONFIG
  GRAPHICS = "nicelogo.png"
  SWITCH = 1
end

Currently the path to the graphics is just nicelogo.png

That means the root folder of your game, where your graphics folder is, your audio folder is and where game.exe is. If you want to use for example the Pictures folder, you must change it to this:

Code: [Select]
module LAZY_LEVELUP_CONFIG
  GRAPHICS = "Graphics/Pictures/nicelogo.png"
  SWITCH = 1
end

And of course change nicelogo.png to the name of your image.
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 04:34:53 PM
Ok, thanks. But now it's something wrong with events - I have one with self switch, and when I activate it, the game is freezing.
That's an event:
(http://img23.imageshack.us/img23/8351/przechwytywanievr.png)
And if I try to load earlier save, I have an error in 29 line.
(http://img210.imageshack.us/img210/5346/przechwytywanieeu.png)
I think it's problem with Khas Awesome Light Effects.
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 04:37:56 PM
Code: [Select]
module LAZY_LEVELUP_CONFIG
  GRAPHICS = "nicelogo.png"
  SWITCH = 1
end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Show Level Up Message
  #     new_skills : Array of newly learned skills
  #--------------------------------------------------------------------------
  def display_level_up(new_skills)
    # Change a switch
    $game_switches[1] = true
  end
end

class Game_Map
  alias old_lazy_init initialize
  def initialize
    old_lazy_init
    @level_up_lazy_sprite = Sprite.new
    @level_up_lazy_sprite.z = 99999 if @level_up_lazy_sprite != nil
    @level_up_lazy_sprite.visible = false if @level_up_lazy_sprite != nil
    @level_up_lazy_sprite.bitmap = Bitmap.new(LAZY_LEVELUP_CONFIG::GRAPHICS) if @level_up_lazy_sprite != nil
  end
  alias old_lazy_update update
  def update(main = false)
    old_lazy_update(main = false)
    @level_up_lazy_sprite.visible = $game_switches[LAZY_LEVELUP_CONFIG::SWITCH] if @level_up_lazy_sprite != nil
  end
end

Try now
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 04:42:36 PM
Still freezing. If I load, there's no error, but it is freezed from very beginning.
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 04:44:05 PM
Do you have teamviewer? Could you let me slip into your screen and take a look?
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 04:45:41 PM
No, I don't have teamviewer, but I can give you my project, I don't have much in it, just scripts in general.
Ok, I have Teamviewer now.
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 05:34:33 PM
I fixed the problem for him, thread can be closed. :)
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Angius on April 01, 2012, 05:36:22 PM
Yup, ready to close! Thank you one more time, Illumination! :)

Ok, not so fast... It looks like I have ANOTHER problem, with line 15, after successful battle:
(http://img857.imageshack.us/img857/3145/przechwytywanieg.png)
Title: Re: [RESOLVED][VXA] change LevelUp message
Post by: Illumination™ on April 01, 2012, 06:17:14 PM
change the line

display_level_up_is_lazy_as_pancakes to display_level_up_is_lazy_as_pancakes(new_skills)