The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: DoctorTodd on April 26, 2012, 09:54:27 PM

Title: DT's Level up +
Post by: DoctorTodd on April 26, 2012, 09:54:27 PM
DT's Level up +
Version: 1.0.1
Author: DoctorTodd
Date: 4/26/2012

Version History



Planned Future Versions


Description


Gives the option to play a sound effect, ME, and/or animation when you level up.

Features


Screenshots

I can't really show a picture, just try the script.

Instructions

Paste above main.

Script


Code: [Select]
#===============================================================================
#
# DT's Level up +
# Author: DoctorTodd
# Date (04/26/2012)
# Version: (1.0.1) (VXA/VX)
# Level: (Simple/Medium)
# Email: Todd@beacongames.com
#
#===============================================================================
#
# Description: Gives the option to play a sound effect, ME, and/or animation
# when you level up.
#
# Credits: Me (DoctorTodd)
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Contact me for commercial use, other wise just credit me and don't repost
# without my permission.
#
#===============================================================================
#
# Editing begins 39 and ends on 46.
#
#===============================================================================
module DTLUP
 
  #Name of the ME to play.
  ME = "Fanfare2"
 
  #Name of the SE to play.
  SE = "Starlight"
 
  #ID of the animation to play.
  ANIMATION = 110
 
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  alias dt_vxa_level_up level_up
  def level_up
    $game_player.animation_id = DTLUP::ANIMATION
    Audio.se_play("Audio/SE/" + DTLUP::SE, 100, 100)
    Audio.me_play("Audio/ME/" + DTLUP::ME, 100, 100)
    dt_vxa_level_up
  end
end

Credit



Thanks


Support


Post here for quickest support, or send an email to Todd@beacongames.com.

Known Compatibility Issues

None known of.

Demo


I don't think it's really necessary but let me know if you want one.

Author's Notes


I realized that I was still yet to alias or write a script that didn't involve windows or scenes.

Restrictions

Check header of script.
Title: Re: DT's Level up +
Post by: modern algebra on April 27, 2012, 12:03:32 AM
This seems like something some people will find useful.

Quote
# NOTES: 1)This script will only work with ace.

You sure about that? I don't see anything in the code that would prevent it from working in VX.

However, why didn't you actually use the alias? Aliasing isn't typically useful for compatibility if you don't actually call the aliased method within the overwritten method. Also, you shouldn't use capital letters in method names - those typically signify constants.

It should have been:

Code: [Select]
  alias dt_vxa_level_up level_up
  def level_up
    $game_player.animation_id = DTLUP::ANIMATION
    Audio.se_play("Audio/SE/" + DTLUP::SE, 100, 100)
    Audio.me_play("Audio/ME/" + DTLUP::ME, 100, 100)
    dt_vxa_level_up
  end


But anyway, good job!
Title: Re: DT's Level up +
Post by: DoctorTodd on April 27, 2012, 12:06:36 AM
Thanks  :)
I originally tried to call the aliased method but it gave me an error, it might have been because I used caps. I'll update the script.

EDIT: I just copied my template, so I guess I should put this in the VX section to.
Title: Re: DT's Level up +
Post by: Nybras on October 20, 2012, 12:18:28 AM
Great script. Any chance next version will be able to show the animation on the actor/follower that levels up instead of the player as default? :)
Title: Re: DT's Level up +
Post by: DoctorTodd on October 20, 2012, 12:22:22 AM
May be, not sure if it's really possible. I'll have to check later. I'm leaving RPG Maker soon so I won't really be focusing on upgrading or creating new scripts.
Title: Re: DT's Level up +
Post by: Tuomo L on October 25, 2012, 03:14:10 PM
Can I make it call a common event as well? For instance, to let the player pick which power to pick.  ;8
Title: Re: DT's Level up +
Post by: DoctorTodd on October 25, 2012, 03:43:13 PM
I'll do it when I get home.
Title: Re: DT's Level up +
Post by: DoctorTodd on October 25, 2012, 08:42:55 PM
Code: [Select]
#===============================================================================
#
# DT's Level up +
# Author: DoctorTodd
# Date (04/26/2012)
# Version: (1.0.1) (VXA/VX)
# Level: (Simple/Medium)
# Email: Todd@beacongames.com
#
#===============================================================================
#
# Description: Gives the option to play a sound effect, ME, and/or animation
# when you level up.
#
# Credits: Me (DoctorTodd)
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Contact me for commercial use, other wise just credit me and don't repost
# without my permission.
#
#===============================================================================
#
# Editing begins 39 and ends on 46.
#
#===============================================================================
module DTLUP
 
  #Name of the ME to play.
  ME = "Fanfare2"
 
  #Name of the SE to play.
  SE = "Starlight"
 
  #ID of the animation to play.
  ANIMATION = 110

  #The id of the common event to call.
  COMMONEVENT = 1
 
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  alias dt_vxa_level_up level_up
  def level_up
    $data_common_events[DTLUP::COMMONEVENT]
    $game_player.animation_id = DTLUP::ANIMATION
    Audio.se_play("Audio/SE/" + DTLUP::SE, 100, 100)
    Audio.me_play("Audio/ME/" + DTLUP::ME, 100, 100)
    dt_vxa_level_up
  end
end