Joined
Apr 17, 2013
Messages
162
Reaction score
12
First Language
English
Primarily Uses
N/A
Hey. As the title says, I need a script that will randomly play 1 of specific sounds designated per character when they level up.

The main purpose is to use the VA lines I have from the game's voice actors.

Diamondplatinum3's "Actor Voice in Battle" script, which I already use, does that, but it's limited to when gaining exp from battling monsters, and my game uses a lot of dialogue checks that can give exp to the party (it's actually the main source of exp).

Can anyone help?

Respectfully,
Rutsah

(PS: Naturally, I will give credit properly.)
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,987
Reaction score
1,037
First Language
English
Primarily Uses
RMVXA
it's limited to when gaining exp from battling monsters
Do you have an older version of the script?
I have v2.6
LIne 746 or something says
# What Actor One Will Say when LevelUp Occurs
Leveling up sounds are included in DP3 Actor Voice in Battle script.
 
Joined
Apr 17, 2013
Messages
162
Reaction score
12
First Language
English
Primarily Uses
N/A
Do you have an older version of the script?
I have v2.6
LIne 746 or something says
# What Actor One Will Say when LevelUp Occurs
Leveling up sounds are included in DP3 Actor Voice in Battle script.
That's the one I have too but it doesn't work for the levelup outside of battle. (and all the other battle voices work normally, so I don't think I'm using it wrong)
Edit: Just tested it IN battle with an event that adds exp and it works normally, so it simply doesn't work outside of it.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,987
Reaction score
1,037
First Language
English
Primarily Uses
RMVXA
the levelup outside of battle
Is that the command levelup in the editor?
Not gain exp?

I see it now. That method was not checked.
add this. Take it apart and add it to the script or add it below.

It actually should replace gain Exp method. Otherwise it will play twice when gaining exp.
Ruby:
class Game_Actor < Game_Battler

  alias dp3_gameactor_level_up_1s098yu9j               level_up
  #--------------------------------------------------------------------------
  # * Aliased Method: Change Level
  #--------------------------------------------------------------------------
  def level_up
    last_level = @level
    dp3_gameactor_level_up_1s098yu9j # Call Original Method
    if @level > last_level
      DiamondandPlatinum3::BattleVoices::play_leveledup_voice(@actor_id)
    end
  end
 
end
 
Joined
Apr 17, 2013
Messages
162
Reaction score
12
First Language
English
Primarily Uses
N/A
Is that the command levelup in the editor?
Not gain exp?

I see it now. That method was not checked.
add this. Take it apart and add it to the script or add it below.

It actually should replace gain Exp method. Otherwise it will play twice when gaining exp.
Ruby:
class Game_Actor < Game_Battler

  alias dp3_gameactor_level_up_1s098yu9j               level_up
  #--------------------------------------------------------------------------
  # * Aliased Method: Change Level
  #--------------------------------------------------------------------------
  def level_up
    last_level = @level
    dp3_gameactor_level_up_1s098yu9j # Call Original Method
    if @level > last_level
      DiamondandPlatinum3::BattleVoices::play_leveledup_voice(@actor_id)
    end
  end
 
end
Still doesn't work. No crashes or anything mind you, just doesn't seem to change anything for the voices.

The events I'm talking about are a simple +500exp or something.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,987
Reaction score
1,037
First Language
English
Primarily Uses
RMVXA
Do you have scripts below this one?
Something could be overwriting it.
The original script would work fine for +500exp. it calls the gain_exp method so that's the original code.
Game_Interpreter command_315 calls actor.change_exp which calls level_up if the actor gains a level.

I don't see anything wrong. And it works fine in battle when you level up?
Very strange.
The battle calls gain_exp which calls change_exp so... ?

So I would be interested in knowing what other scripts you have below this one.

Wait just found it. There is a check for if you are in battle.
So it will only work in battle.
Comment out line 1068 - from the original script. return true if !allowed_to_play_voice?() under
def self.play_leveledup_voice(actor_id)
 
Joined
Apr 17, 2013
Messages
162
Reaction score
12
First Language
English
Primarily Uses
N/A
Do you have scripts below this one?
Something could be overwriting it.
The original script would work fine for +500exp. it calls the gain_exp method so that's the original code.
Game_Interpreter command_315 calls actor.change_exp which calls level_up if the actor gains a level.

I don't see anything wrong. And it works fine in battle when you level up?
Very strange.
The battle calls gain_exp which calls change_exp so... ?

So I would be interested in knowing what other scripts you have below this one.

Wait just found it. There is a check for if you are in battle.
So it will only work in battle.
Comment out line 1068 - from the original script. return true if !allowed_to_play_voice?() under
def self.play_leveledup_voice(actor_id)
That did it. Thanks man.
 

Latest Threads

Latest Profile Posts

Бас Лого.png
Reflections on the topic of choosing the path of the main character )
Now I want to change back to a Class system again xD Around and around we go!
Progress on the title graphic:
titledemo3.png
titledemo2.png
I'm still looking at the best way to do the subtitle.
I haven't touched the forum or my project for months because a few people were being a little aggressive when I asked for help
its_a_random_world.jpg
Well after half a year of health problems (that aren't as bad as before), and playing with UE4 & 5... I realized I should finish this project before working on something else. So I decided to upgrade my randomizer. And really just focus on compromising wherever I can to finish the project sooner rather than later. :kaoswt:

Forum statistics

Threads
121,897
Messages
1,145,025
Members
160,157
Latest member
cnotus
Top