Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED][VXA] change LevelUp message

Started by Angius, March 25, 2012, 10:13:53 PM

0 Members and 1 Guest are viewing this topic.

Angius

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!
Sorry 'bout my bad english :/

modern algebra

For which maker? XP, VX, or VX Ace?

Angius

Sorry 'bout my bad english :/

Angius

Sorry 'bout my bad english :/

pacdiggity

No it isn't. Please wait 48 hours before bumping.
it's like a metaphor or something i don't know

Countdown

I thought it was 24 hours before you should bump?

pacdiggity

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.
it's like a metaphor or something i don't know

Angius

Doesn't matter... I,ve buped this topic a little bit too early, sorry bout that. But' that's not this topic issue.
Sorry 'bout my bad english :/

Illumination™

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.

Angius

Really? Oh men, I don't know how to thank you! Well... Except selling my house.
Sorry 'bout my bad english :/

Angius

Sorry 'bout my bad english :/

Illumination™

Sorry for forgeting this over and over again.

Here it is though:

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

Angius

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...
Sorry 'bout my bad english :/

Illumination™

Check this, it is in the top of your script:

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:

module LAZY_LEVELUP_CONFIG
  GRAPHICS = "Graphics/Pictures/nicelogo.png"
  SWITCH = 1
end


And of course change nicelogo.png to the name of your image.

Angius

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:

And if I try to load earlier save, I have an error in 29 line.

I think it's problem with Khas Awesome Light Effects.
Sorry 'bout my bad english :/

Illumination™

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

Angius

Still freezing. If I load, there's no error, but it is freezed from very beginning.
Sorry 'bout my bad english :/

Illumination™

Do you have teamviewer? Could you let me slip into your screen and take a look?

Angius

#18
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.
Sorry 'bout my bad english :/

Illumination™

I fixed the problem for him, thread can be closed. :)

Angius

#20
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:
Sorry 'bout my bad english :/

Illumination™

change the line

display_level_up_is_lazy_as_pancakes to display_level_up_is_lazy_as_pancakes(new_skills)