random game over music plugin?

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
so let's say i have a pool of 12 audio files, okay? and i'd like to have one chosen randomly to play for the game over screen.
is there any plugin/script that allows such a thing?
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,812
Reaction score
5,212
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
59
Reaction score
10
First Language
português
Primarily Uses
RMVXA
* * * removed, use code below * * *
 
Last edited:

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
is there a way to make a sound have a very rare chance of playing?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
59
Reaction score
10
First Language
português
Primarily Uses
RMVXA
is there a way to make a sound have a very rare chance of playing?
probably... i'll try to code it tomorrow, but no promises.
do you need many files to have a rare chance at appearing, or just one?
 

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
probably... i'll try to code it tomorrow, but no promises.
do you need many files to have a rare chance at appearing, or just one?
just one
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
59
Reaction score
10
First Language
português
Primarily Uses
RMVXA
Code:
#==============================================================================
# ** Game Over Song Shuffle [VXA]
#------------------------------------------------------------------------------
# Version: 1.1
# Author: zeroscares
# Thread: https://bit.ly/3mdxuJM
#==============================================================================
# Description: 
#------------------------------------------------------------------------------
# Shuffles between song files for the Game Over screen.
# Has the option to add a file that has a much lower chance at playing.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste below Materials above Main. Customize the module below. 
#==============================================================================
# Terms:
#------------------------------------------------------------------------------
# > I'm not adding extra features or compatibility fixes
# > Crediting is optional. Free for all VXA games, edit as you wish.
#==============================================================================
module SCARES_GAMEOVER
  #--------------------------------------------------------------------------
  SONG_EXTENSION = "gameover"
  # Name your game over songs (song extension text + number)
  # example: "gameover1", "gameover2", ...
  #--------------------------------------------------------------------------
  LOWCHANCESONG = "randomsong" 
  # example: write "songfilename", not "songfilename.mp3"
  #--------------------------------------------------------------------------
  RANDOMCHANCE = 10
  # By default, low chance song has a 1 in 10 chance at playing.
  #--------------------------------------------------------------------------
  REGULARCHANCE_SONG_COUNT = 12
  # How many regular-chance songs do you need to be shuffled?
  # This excludes the song in LOWCHANCESONG.
  #--------------------------------------------------------------------------
end
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================
class Scene_Gameover < Scene_Base
  def play_gameover_music
    @lowchance = rand(SCARES_GAMEOVER::RANDOMCHANCE)
    p @lowchance
    if @lowchance == 1
      @gameoversong = SCARES_GAMEOVER::LOWCHANCESONG
      #p "low chance song"
    else
      @songnumber = rand(SCARES_GAMEOVER::REGULARCHANCE_SONG_COUNT) + 1 
      @gameoversong = SCARES_GAMEOVER::SONG_EXTENSION + @songnumber.to_s
    end
    RPG::BGM.stop
    RPG::BGS.stop
    RPG::BGM.new(@gameoversong, 100, 100).play
  end
end
you can say thanks now :p
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

being able to transition music seamlessly is amazing. my main character's theme has lyrics and it goes from vocal version to istrumental when he leaves his room. and vice versa. and thanks to a plugin, the transition is seamless. I love it.
All of the auditions for our game are so good, I'm so glad I'm not in charge of choosing completely. lol I just can't with some of them. I listen to them on repeat. XD
Working on a Patch to integrate AlphaABS into random generated Dungeons. Was a bit tricky, but the outcome is a real Life Changer!!

Will release it the next days!
Been pretty busy... but I got a better headset for recording and listening today. Dad says that he'll consider taking me to Great Wolf Lodge for the first time once I finish summer classes (my final semester!) I'll be taking my plushie friends with me: Bendy, Lolbit, and Helen Henny. (I WUV PLUSHIES!)
SF_Monster3,4 added!

Forum statistics

Threads
105,651
Messages
1,015,304
Members
137,327
Latest member
Mezzy
Top