Status
Not open for further replies.

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
Im trying to create a custom title screen, and i'm very happy with what i have done so far.

This is was accomplished with:
Plugin: NanoWizard - TitleVideo Plugin v1.1
Plugin: SumRndmDde - Title Command Customizer
Plugin: SumRndmDde - Title Picture Choices
I tone of hours on After Effects
Music: Bensound - Little Planet

Now i would like to change the SE of the NewGame Exit commands, and Cursor. Is dont know anything about coding but this doesn't "sound" to difficult :guffaw:.

Any suggestions?
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,001
Reaction score
8,894
First Language
English
Primarily Uses
RMMV

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

 

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
So i think i over play my hand, Se for specific commands lokes tricky, i'm trying to understand how do i force the Cursor, Ok and Cancel sounds
to be different in the Title menu of dose i select in System Database.
 

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
ok i fund the base code.
Code:
//-----------------------------------------------------------------------------
// SoundManager
//
// The static class that plays sound effects defined in the database.

function SoundManager() {
    throw new Error('This is a static class');
}

SoundManager.preloadImportantSounds = function() {
    this.loadSystemSound(0);
    this.loadSystemSound(1);
    this.loadSystemSound(2);
    this.loadSystemSound(3);
};

SoundManager.loadSystemSound = function(n) {
    if ($dataSystem) {
        AudioManager.loadStaticSe($dataSystem.sounds[n]);
    }
};

SoundManager.playSystemSound = function(n) {
    if ($dataSystem) {
        AudioManager.playStaticSe($dataSystem.sounds[n]);
    }
};

SoundManager.playCursor = function() {
    this.playSystemSound(0);
};

SoundManager.playOk = function() {
    this.playSystemSound(1);
};

SoundManager.playCancel = function() {
    this.playSystemSound(2);
};

SoundManager.playBuzzer = function() {
    this.playSystemSound(3);
};

SoundManager.playEquip = function() {
    this.playSystemSound(4);
};

SoundManager.playSave = function() {
    this.playSystemSound(5);
};

SoundManager.playLoad = function() {
    this.playSystemSound(6);
};

SoundManager.playBattleStart = function() {
    this.playSystemSound(7);
};

SoundManager.playEscape = function() {
    this.playSystemSound(8);
};

SoundManager.playEnemyAttack = function() {
    this.playSystemSound(9);
};

SoundManager.playEnemyDamage = function() {
    this.playSystemSound(10);
};

SoundManager.playEnemyCollapse = function() {
    this.playSystemSound(11);
};

SoundManager.playBossCollapse1 = function() {
    this.playSystemSound(12);
};

SoundManager.playBossCollapse2 = function() {
    this.playSystemSound(13);
};

SoundManager.playActorDamage = function() {
    this.playSystemSound(14);
};

SoundManager.playActorCollapse = function() {
    this.playSystemSound(15);
};

SoundManager.playRecovery = function() {
    this.playSystemSound(16);
};

SoundManager.playMiss = function() {
    this.playSystemSound(17);
};

SoundManager.playEvasion = function() {
    this.playSystemSound(18);
};

SoundManager.playMagicEvasion = function() {
    this.playSystemSound(19);
};

SoundManager.playReflection = function() {
    this.playSystemSound(20);
};

SoundManager.playShop = function() {
    this.playSystemSound(21);
};

SoundManager.playUseItem = function() {
    this.playSystemSound(22);
};

SoundManager.playUseSkill = function() {
    this.playSystemSound(23);
};

Please help me to insert this code in one of the plugins above.
 

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
I have a breaktru, i fund this i the forum, now just need to translate it to inglis :)

You can setup the SE for each command on the title screen with this in the module settings with the 'Setup' options.


Code:
module TitleSE Setup = { # RPG::SE.new("file_name", volume, pitch), :new_game => RPG::SE.new("Absorb2", 80, 100), :continue => RPG::SE.new("Bell1", 80, 100), :shutdown => RPG::SE.new("Crash", 80, 100), } endclass Window_TitleCommand < Window_Command def process_ok if current_item_enabled? TitleSE::Setup[current_symbol].play Input.update deactivate call_ok_handler else Sound.play_buzzer end end end


Will this work on MV?
Code:
class Scene_Map < Scene_Base

def call_menu
# Menu open SE: RPG::SE.new("file name", volume, pitch).play
RPG::SE.new("Absorb1", 80, 100).play
SceneManager.call(Scene_Menu)
Window_MenuCommand::init_command_position
end

end

class Window_MenuCommand < Window_Command

def process_cancel
# Menu cancel SE: RPG::SE.new("file name", volume, pitch).play
RPG::SE.new("Absorb2", 80, 100).play
Input.update
deactivate
call_cancel_handler
end

end
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
I have a breaktru, i fund this i the forum, now just need to translate it to inglis :)

You can setup the SE for each command on the title screen with this in the module settings with the 'Setup' options.


Code:
module TitleSE Setup = { # RPG::SE.new("file_name", volume, pitch), :new_game => RPG::SE.new("Absorb2", 80, 100), :continue => RPG::SE.new("Bell1", 80, 100), :shutdown => RPG::SE.new("Crash", 80, 100), } endclass Window_TitleCommand < Window_Command def process_ok if current_item_enabled? TitleSE::Setup[current_symbol].play Input.update deactivate call_ok_handler else Sound.play_buzzer end end end


Will this work on MV?
Code:
class Scene_Map < Scene_Base

def call_menu
# Menu open SE: RPG::SE.new("file name", volume, pitch).play
RPG::SE.new("Absorb1", 80, 100).play
SceneManager.call(Scene_Menu)
Window_MenuCommand::init_command_position
end

end

class Window_MenuCommand < Window_Command

def process_cancel
# Menu cancel SE: RPG::SE.new("file name", volume, pitch).play
RPG::SE.new("Absorb2", 80, 100).play
Input.update
deactivate
call_cancel_handler
end

end
This will not work, because this is a VXAce code. And Ruby and Javascript aren't compatible.



I use a custom plugin for sounds and music, because it allows me to preload any sounds I want, namely this one.
https://github.com/pixijs/pixi-sound
Using this plugin, I would then create another plugin with this code.
Code:
Scene_Title.prototype.create = function() {
    Scene_Base.prototype.create.call(this);
    this.createBackground();
    this.createForeground();
    this.createWindowLayer();
    this.createCommandWindow();
    PIXI.sound.sound.add ('cursor', filepath)
    PIXI.sound.sound.add ('ok', filepath)
    PIXI.sound.sound.add ('cancel', filepath)
};
Code:
SoundManager.playCursor = function() {
   if (SceneManager._scene.constructor == Scene_Title) {
    PIXI.sound.play ('cursor');
}else {
    this.playSystemSound(0);
}
};
SoundManager.playOk = function() {
    if (SceneManager._scene.constructor == Scene_Title) {
    PIXI.sound.play ('ok');
    }else {
    this.playSystemSound(1);
}

SoundManager.playCancel = function() {
   
if (SceneManager._scene.constructor == Scene_Title) {
    PIXI.sound.play ('cancel');
}else {
    this.playSystemSound(2);
}
};

Simple as that.
 

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
Code:
SoundManager.playCursor = function() {
    if (SceneManager._scene.constructor == Scene_Title) {
        AudioManager.playSe({name: "titlecursor", pan: 0, pitch: 100, volume: 100});
}else {
    this.playSystemSound(0);
}
};

SoundManager.playOk = function() {
    if (SceneManager._scene.constructor == Scene_Title) {
        AudioManager.playSe({name: "titleok", pan: 0, pitch: 100, volume: 100});
}else {
    this.playSystemSound(1);
}
};

SoundManager.playCancel = function() {
    if (SceneManager._scene.constructor == Scene_Title) {
        AudioManager.playSe({name: "titlecancel", pan: 0, pitch: 100, volume: 100});
}else {
    this.playSystemSound(2);
}
};

whit the help from Poryg i alter the base code from [rpg_managers.js] and its working.

Quest 1 - done

Quest 2 - The learning of the plugins building
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Screenshot-2021-05-02-at-15-07-54.png


Tivadar will help you travel to distant places in Eniko: Ghosts Of Grace

Finally done with the school project, here's the raw video of it. o_O :smile:
Can February March? No, but April May.

Forum statistics

Threads
111,175
Messages
1,058,980
Members
144,421
Latest member
luok
Top