ovate

tale
Veteran
Joined
Dec 16, 2016
Messages
1,046
Reaction score
1,694
First Language
English
Primarily Uses
N/A
NewGameSe - Version 1.1.0 (2018/11/23)

Creator name:
Triacontane

Overview

Plays a certain sound effect when New Game is selected.

Features
- You can select a sound effect through a parameter
- Settings for adjusting: volume, pitch, and pan
- Optional sound effect for Continue

ngse.png


Credit and Thanks:
Triacontane

Terms of Use-
Free for commercial and non-commercial use.

License -
MIT License: http://opensource.org/licenses/mit-license.php

Dropbox link: https://www.dropbox.com/s/7x2w38f1so903i8/NewGameSe.js?dl=1

Code:
/*=============================================================================
 NewGameSe.js
----------------------------------------------------------------------------
 (C)2018 Triacontane
 This software is released under the MIT License.
 http://opensource.org/licenses/mit-license.php
----------------------------------------------------------------------------
 Version
 1.1.0 2018/11/23 Optional sound effect for Continue
 1.0.0 2018/08/03 First release
----------------------------------------------------------------------------
 [Blog]   : https://triacontane.blogspot.jp/
 [Twitter]: https://twitter.com/triacontane/
 [GitHub] : https://github.com/triacontane/
=============================================================================*/

/*:
 * @plugindesc NewGameSePlugin
 * @author triacontane
 *
 * @param soundEffect
 * @desc Sound effect that plays when New Game is selected
 * @default
 * @type struct<AudioSe>
 *
 * @param includeContinue
 * @desc Same sound effect from New Game that plays when Continue is selected
 * @default false
 * @type boolean
 *
 * @help NewGameSe.js
 *
 * Plays a certain sound effect when New Game is selected.
 *
 * This plugin is released under the MIT License.
 */
/*:ja
 * @plugindesc ニューゲーム専用効果音プラグイン
 * @author トリアコンタン
 *
 * @param soundEffect
 * @text 効果音
 * @desc ニューゲーム選択時の効果音情報です。
 * @default
 * @type struct<AudioSe>
 *
 * @param includeContinue
 * @text コンティニューも含む
 * @desc コンティニュー、オプション選択時も専用効果音を演奏します。
 * @default false
 * @type boolean
 *
 * @help NewGameSe.js
 *
 * ニューゲーム選択時のみ専用の効果音を演奏します。
 * 
 * このプラグインにはプラグインコマンドはありません。
 *
 * 利用規約:
 *  作者に無断で改変、再配布が可能で、利用形態(商用、18禁利用等)
 *  についても制限はありません。
 *  このプラグインはもうあなたのものです。
 */

/*~struct~AudioSe:
 * @param name
 * @desc Audio se file
 * @default
 * @require 1
 * @dir audio/se/
 * @type file
 *
 * @param volume
 * @desc Set volume
 * @default 90
 * @type number
 * @min 0
 * @max 100
 *
 * @param pitch
 * @desc Set pitch
 * @default 100
 * @type number
 * @min 50
 * @max 150
 *
 * @param pan
 * @desc Set pan
 * @default 0
 * @type number
 * @min -100
 * @max 100
 */

(function() {
    'use strict';

    /**
     * Create plugin parameter. param[paramName] ex. param.commandPrefix
     * @param pluginName plugin name(EncounterSwitchConditions)
     * @returns {Object} Created parameter
     */
    var createPluginParameter = function(pluginName) {
        var paramReplacer = function(key, value) {
            if (value === 'null') {
                return value;
            }
            if (value[0] === '"' && value[value.length - 1] === '"') {
                return value;
            }
            try {
                return JSON.parse(value);
            } catch (e) {
                return value;
            }
        };
        var parameter     = JSON.parse(JSON.stringify(PluginManager.parameters(pluginName), paramReplacer));
        PluginManager.setParameters(pluginName, parameter);
        return parameter;
    };

    var param = createPluginParameter('NewGameSe');

    var _Window_TitleCommand_playOkSound = Window_TitleCommand.prototype.playOkSound;
    Window_TitleCommand.prototype.playOkSound = function() {
        if (param.soundEffect && this.isNeedTitleSound()) {
            AudioManager.playStaticSe(param.soundEffect);
        } else {
            _Window_TitleCommand_playOkSound.apply(this, arguments);
        }
    };

    Window_TitleCommand.prototype.isNeedTitleSound = function() {
        return this.currentSymbol() === 'newGame' || param.includeContinue
    };
})();

Edit: (2018/11/23) Triacontane added optional sound effect for Continue parameter
 
Last edited:

ovate

tale
Veteran
Joined
Dec 16, 2016
Messages
1,046
Reaction score
1,694
First Language
English
Primarily Uses
N/A
Minor update: Version 1.1.0 (2018/11/23)
Triacontane added a parameter for "includeContinue"
@desc Same sound effect from New Game that plays when Continue is selected
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
549
Reaction score
260
First Language
Spanish
Primarily Uses
RMMV
How did I miss this? I was searching for a feature like this in order to make a great introduction for the game.

I will try it later!
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Lord Vectra wrote on lianderson's profile.
*poke* Hello. Not suprised to see you here, but I didn't know you was here.
BCj
Replaced my battle victory/level up script by a custom-made script by Sixth
[media]
"It is very easy to break things and very difficult to make things."
Took a six week summer break from making my game, hoping some inspiration would magically strike me and I'd easily finish the last minigame and find the remaining music, but no such luck :D Guess I'll soon have to just sit down again and grind the project to the finish line. Well, at least I played a couple of good games. The Messenger was fun (when it didn't cause you rage) and currently playing World End Syndrome.
Enig and Riley.png
Each area of my game acts sort of like a level of sorts. These 3 are the bosses of the first area. Called Team Outcast, there's Riley, Mary Mars McQueen (Triple M), and Enig. A trio of wanna be super heroes.

Forum statistics

Threads
123,196
Messages
1,154,753
Members
161,565
Latest member
tangy_y
Top