RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Soul Engine Ace - Soul Liquid Music Player

0 Members and 1 Guest are viewing this topic.

*
Scripter
Rep:
Level 40
Crownless King
Soul Engine Ace - Soul Liquid Music Player
Version: 1.0
Author: Soulpour777
Date: 3 / 6, 2014

Description


Creates a customizable music player for your games. The music player allows a simple play and stop as well as free space to add graphics.

Features

  • Customizable Music
  • Customizable Graphics
  • Easy to set up music

Screenshots



Instructions


Needed Files:
Place the Music_BG, Music_Wave and Music_Layout on the Graphics\Systems folder. For your custom music, place them under Audio\BGM folder.

Script Calls:
To call up the Music Player, do this on a script call:
SceneManager.call(Scene_MusicMenu)
The script is currently installed on the Menu Command.

Script


Code: [Select]
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Soul Engine Ace - Soul Liquid Music Player
# Author: Soulpour777
# Version 1.0
# Script Category: Custom Scenes
# Included in Soul Engine Ace
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description: Creates a customizable music player for your games. The music
# player allows a simple play and stop as well as free space to add graphics.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Needed Files:
# Place the Music_BG, Music_Wave and Music_Layout on the Graphics\Systems
# folder. For your custom music, place them under Audio\BGM folder.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Script Calls:
# To call up the Music Player, do this on a script call:
# SceneManager.call(Scene_MusicMenu)
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# The script is currently installed on the Menu Command.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Terms of Use:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# For Non-Commercial Use:
# You are free to use the script on any non-commercial projects.
# You are free to adapt the script. Any modifications are allowed as long
# as it is provided as a note on the script.
# Credits to SoulPour777 for the script.
# Preserve the Script Header.
# Claiming the script as your own is prohibited.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

#==============================================================================
# ** Soulpour
#------------------------------------------------------------------------------
#  This module holds all Soulpour configurations.
#==============================================================================
module Soulpour
  # What is the name of the music player in your menu?
  Menu_Name = "Soul Music"
  #--------------------------------------------------------------------------
  # * Music Configuration Variable Module
  #-------------------------------------------------------------------------- 
  module MusicConfig
    # Width of the Window Displayer
    Displayer_Hieght = 200
    # New Width of the Displayer
    Display_Width = 400
    # X Location of the Displayer
    Display_X = 78
    # Y Location of the Displauer
    Display_Y = 45
    # Opacity of the Displayer
    DisplayOpacity = 100
    # Height of the Displayer
    DisplayHeight = 100
    # Opacity of the Window
    Window_Opacity = 35
    # Y Location of the Window
    Window_Y = 272
    # Height of the Window
    Window_Height = 160
  end
 
  #--------------------------------------------------------------------------
  # * Music Player Module
  #--------------------------------------------------------------------------
  module MusicPlayer
   
  #--------------------------------------------------------------------------
  # * Music Names
  # Here, indicate which music is to be played. Custom music is to be placed
  # under the BGM folder.
  #--------------------------------------------------------------------------   
    Music_Info = {
      "Stop" => { :song_command => RPG::BGM, },
      "Praise the King" => { :song_command => RPG::BGM.new("Theme2", 100, 100), },
      "Holy Land" => { :song_command => RPG::BGM.new("Theme3", 100, 100), },
      "Dragonsing" => { :song_command => RPG::BGM.new("Theme4", 100, 100), },
      "Dragonsong" => { :song_command => RPG::BGM.new("Dungeon1", 100, 100), },
      "Creepy Cave" => { :song_command => RPG::BGM.new("Dungeon2", 100, 100), },
      "Caverns of No Return" => { :song_command => RPG::BGM.new("Dungeon3", 100, 100), },
      "Dark Raid" => { :song_command => RPG::BGM.new("Dungeon4", 100, 100), },
      "Crawl" => { :song_command => RPG::BGM.new("Dungeon5", 100, 100), },
      "Queen Shall Be Saved" => { :song_command => RPG::BGM.new("Scene2", 100, 100), },
      "King's Claim" => { :song_command => RPG::BGM.new("Scene3", 100, 100), },
      "Dragon Return" => { :song_command => RPG::BGM.new("Scene4", 100, 100), },
    }
   
  end
 
end
#==============================================================================
# ** Window_MusicDisplayer
#------------------------------------------------------------------------------
#  This class performs the window that displays the displayer.
#==============================================================================
class Window_MusicDisplayer < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return Soulpour::MusicConfig::Display_Width
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
 
end


#==============================================================================
# ** Window_MusicCommand
#------------------------------------------------------------------------------
#  This command window appears on the menu screen for the Music Player.
#==============================================================================

class Window_MusicCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return Graphics.width
  end
 
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def window_height
    return Graphics.height - 50
  end
 
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_main_commands
  end
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    Soulpour::MusicPlayer::Music_Info.each_key { |i|
      add_command(i,   :song_command)
    }
  end 
 
end

#==============================================================================
# ** Scene_MusicMenu
#------------------------------------------------------------------------------
#  This class performs the Music Menu.
#==============================================================================

class Scene_MusicMenu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_command_window
    create_background
    create_window_display
  end
 
  #--------------------------------------------------------------------------
  # * Create Window Display
  #--------------------------------------------------------------------------
  def create_window_display
    @window_display = Window_MusicDisplayer.new
    @window_display.width = Soulpour::MusicConfig::Display_Width
    @window_display.x = Soulpour::MusicConfig::Display_X
    @window_display.y = Soulpour::MusicConfig::Display_Y
    @window_display.height = Soulpour::MusicConfig::Displayer_Hieght
    @window_display.opacity = Soulpour::MusicConfig::DisplayOpacity
  end
 
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @music_window = Window_MusicCommand.new
    @music_window.opacity = Soulpour::MusicConfig::Window_Opacity
    @music_window.y = Soulpour::MusicConfig::Window_Y
    @music_window.height = Soulpour::MusicConfig::Window_Height
    @music_window.set_handler(:song_command, method(:command_song))
  end
 
  #--------------------------------------------------------------------------
  # * Create Background
  #-------------------------------------------------------------------------- 
  def create_background
    @music_background = Plane.new
    @music_background.bitmap = Cache.system("Music_BG")
    @music_background.z = 20
    @music_layout = Plane.new
    @music_layout.bitmap = Cache.system ("Music_Layout")
    @music_layout.z = 80
    @music_wave = Plane.new
    @music_wave.bitmap = Cache.system("Music_Wave")
    @music_wave.opacity = 45
    @music_wave.z = 120
  end
 
  #--------------------------------------------------------------------------
  # * Dispose Background
  #-------------------------------------------------------------------------- 
  def dispose_background
    @music_layout.dispose
    @music_background.dispose
    @music_wave.dispose   
  end

  #--------------------------------------------------------------------------
  # * Update Frame (Basic)
  #--------------------------------------------------------------------------
  def update_basic
    @music_wave.ox += 1
    command_return if Input.trigger?(:B)
    super
  end 
 
  #--------------------------------------------------------------------------
  # * Command Return
  #--------------------------------------------------------------------------
  def command_return
    RPG::BGM.stop
    Sound.play_cancel
    return_scene
  end 
 
  # ------------------------------------------------------------------
  # Command Song
  # ------------------------------------------------------------------
  def command_song
    case
    when @music_window.index == 0
      Soulpour::MusicPlayer::Music_Info[Soulpour::MusicPlayer::Music_Info.keys[@music_window.index]][:song_command].stop
    when @music_window.index != 0
      Soulpour::MusicPlayer::Music_Info[Soulpour::MusicPlayer::Music_Info.keys[@music_window.index]][:song_command].play
    end
    @music_window.activate
  end
 
end

#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
#  This command window appears on the menu screen.
#==============================================================================

class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Original Commands
  #-------------------------------------------------------------------------- 
  alias soul_command_add_original_commands_music add_original_commands
  def add_original_commands
    soul_command_add_original_commands_music
    add_command(Soulpour::Menu_Name,   :soul_music, main_commands_enabled)
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  alias soul_command_create_command_window_music create_command_window
  def create_command_window
   soul_command_create_command_window_music
    @command_window.set_handler(:soul_music,    method(:command_soul_music))
  end
 
  #--------------------------------------------------------------------------
  # * Create Sutom Command
  #-------------------------------------------------------------------------- 
  def command_soul_music
    SceneManager.call(Scene_MusicMenu)
  end
 
end

You will also need these system graphics:

https://dl.dropboxusercontent.com/u/36246420/Soul%20Engine%20Ace/System.rar

Credit


  • Soulpour777

Support


For any comments, suggestions or critique about the script, please do comment or give me a message.

Known Compatibility Issues

 - None


Terms of Use


All Soul Engine Ace scripts are bound under my terms of use. if any terms of use in RMRK is not located on my terms of use, do remember to add those terms.
« Last Edit: March 06, 2014, 02:27:55 PM by SoulPour777 »


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

*
RMRK's dad
Rep:
Level 86
You know, I think its all gonna be okay.
For going the distance for a balanced breakfast.Project of the Month winner for June 2009For being a noted contributor to the RMRK Wiki2013 Best WriterSilver Writing ReviewerSecret Santa 2013 Participant
So basically, this script calls a new scene where the string (or is that an array, I always get that backwards) are BGMs?

Nifty. I dig it. Any chance you'd code it for VX?
:tinysmile:

*
Rep:
Level 52
RMRK Junior
Nice Work! Glad to see your getting the hang of command windows. I like the animated BG too.   :)
Spoiler for "More About Vindaca":

Spoiler for "General Prices":
You can also build packages containing multiple resources. (Package prices are not included.)


Music

Basic Songs = $20 - $50 USD
Advanced Songs = $100+


Graphics
32 x 32, 4 Directional Sprite = $7 USD each / $50 USD per sheet
64 x 32, 4 Directional Sprite = $10 USD each / $60 USD per sheet
Backgrounds = $10 - $40 USD
Tilesets = $5 each / $20 - $50 USD per group
(depending on types of tilesets)
Iconset = $5 each / $35 - $80 if buying more then 10
(depending on quantity)
Windowskins = $7 each


Animations
Titles = $20+ USD (Depending on complexity)
Backgrounds= $20+ USD (Depending on complexity)
Regular Evented Scenes = $40+ USD each (Depending on complexity)
Parallax Scenes = $60+ USD each (Depending on complexity)
CG  = $300+ USD (Depending on complexity)
Maps

Basic Map Design = $7 USD each
Advanced Map Design = $10+ USD (Depending on complexity)
Scripts

Basic Custom Menu Script = $60 - $100 USD
More Advanced Menu Script = $120 - $300 USD (Animated, ext.)
Mini-games = $100 - $300 USD (Depending on complexity)
I am willing to build a custom card game if specifications are given Commissioned out E.T.A. 3 - 6 months
Battle Systems = $100 - $300 USD (Depending on complexity) Commissioned out E.T.A. 3 - 6 months
Others Scripts = $80 - $300 USD (Depending on complexity)

We are also willing to build games for you with as little or as much direction as you want. (Prices vary depending on complexity of game)
If you want to use your resources in multiple titles there is an additional charge of half the cost of the resource. (Prices vary depending on packages)
I require half of the total cost of any projects up front and the other half before completion.
If a project is finished and not picked up within 1 month of notification,
your resources will be resold and no money will be refunded.


*
Scripter
Rep:
Level 40
Crownless King
So basically, this script calls a new scene where the string (or is that an array, I always get that backwards) are BGMs?

Nifty. I dig it. Any chance you'd code it for VX?

Thanks :) I'll try to look at VX and code it there.

Nice Work! Glad to see your getting the hang of command windows. I like the animated BG too.   :)

Thanks V :) Been thinking of making this for a while and glad I came up with a possible solution of doing so :D


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

*
Rep: +0/-0Level 36
Love is a Beautiful Pain ♥
Uhm...sorry to bother you but i cant see my custom music :|
and its in the right folder since i can use it when i'm edditting my game, do I have to wright something in the script?
Sorry, and thanks in avance
---------------------------------------------------------
Its nothing, I figured out how to do it, and thank for your awesome scripts :)
« Last Edit: July 08, 2014, 04:34:37 PM by Axer »

*
Scripter
Rep:
Level 40
Crownless King
Uhm...sorry to bother you but i cant see my custom music :|
and its in the right folder since i can use it when i'm edditting my game, do I have to wright something in the script?
Sorry, and thanks in avance
---------------------------------------------------------
Its nothing, I figured out how to do it, and thank for your awesome scripts :)

Glad you were able to figure it out. Have a nice day and happy game making :D


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h