Title screen Se

Discussion in 'Javascript/Plugin Support' started by Tatsumaro, Nov 6, 2017.

Thread Status:
Not open for further replies.
    Tags:
  1. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    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?
     
    #1
  2. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,729
    Likes Received:
    7,583
    Location:
    Texas
    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.

     
    #2
  3. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    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.
     
    #3
  4. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    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.
     
    #4
  5. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    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: Nov 9, 2017
    #5
  6. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,856
    Likes Received:
    9,638
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    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.
     
    #6
  7. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    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
     
    #7
  8. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,586
    Likes Received:
    10,507
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #8
Thread Status:
Not open for further replies.

Share This Page