Yappy Monoxide
Reaction score
201

Profile posts Latest activity Postings About

  • So my computer just crashed while Rpg maker was open......god I hope everything is ok. :(
    GoodSelf
    GoodSelf
    I hope so too! Make sure to create a backup every day!
    Yappy Monoxide
    Yappy Monoxide
    I thankfully had a script that backed up my data every playtest just in case. Right now I am copying all of my files to a new project as this trick helped me save my game multiple times.
    Vance Raehart
    Vance Raehart
    I'm getting a new computer hopefully this week, so I can transfer everything over from this 5 year old laptop
    God help me i'm going to have to learn how to convert a mv plugin to ruby. :dizzy:
    PixelHeart
    PixelHeart
    Cant read it =< ....have any idea what the terms are?
    Yappy Monoxide
    Yappy Monoxide
    Why is there no converter online...ugh..
    Yappy Monoxide
    Yappy Monoxide
    Here's the script in text form:



    Spoiler



    //=============================================================================
    // MOG_CharShatterEffect.js
    //=============================================================================


    /*:
     * @plugindesc (v1.0) Cria o efeito de shatter nos sprites dos characters.
     * @author Moghunter
     *
     *
     * @help  
     * =============================================================================
     * +++ MOG - Char Shatter Effect (v1.0) +++
     * By Moghunter 
     * https://atelierrgss.wordpress.com/
     * =============================================================================
     * Cria o efeito de shatter nos sprites dos characters.
     *
     * =============================================================================
     * PLUGIN COMMAND
     * =============================================================================
     * Para ativar o efeito de Shatter use esse comando através do Plugin Command.
     *
     * shatter_event_id : EVENT_ID : MODE : X : Y
     *
     * EVENT_ID = ID do evento do mapa.
     * MODE - Tipo de animação;
     *      0 - Normal
     *      1 - Random
     *      2 - Gravity
     * X - Velocidade do shatter na horizontal.
     * Y - Velocidade do shatter na vertical.
     *
     */


    //=============================================================================
    // ** PLUGIN PARAMETERS
    //=============================================================================
      var Imported = Imported || {};
      Imported.MOG_CharShatterEffects = true;
      var Moghunter = Moghunter || {}; 


       Moghunter.parameters = PluginManager.parameters('MOG_CharShatterEffect');


    //=============================================================================
    // ** Game Character Base
    //=============================================================================


    //==============================
    // * Initialize
    //==============================
    var _mog_chaShatter_gchar_initMembers = Game_CharacterBase.prototype.initMembers;
    Game_CharacterBase.prototype.initMembers = function() {
        _mog_chaShatter_gchar_initMembers.call(this);
        this._shatter = [false,[],false,0,0,1];
    };


    //=============================================================================
    // ** Game_Interpreter
    //=============================================================================    


    //==============================
    // * PluginCommand
    //==============================
    var __mog_charShatter_pluginCommand = Game_Interpreter.prototype.pluginCommand
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        __mog_charShatter_pluginCommand.call(this,command, args)
        this.checkEventsCharShatter(command, args);
        return true;
    };


    //==============================
    // * checkEventsCharShatter
    //==============================
    Game_Interpreter.prototype.checkEventsCharShatter = function(command, args) {
        var shatterType = -1;
        var event_id = 0;    
        if (command === "shatter_event_id")  {
            event_id = Number(args[1]);
            m = Number(args[3]);
            x = Number(args[5]);
            y = Number(args[7]);
        };
        if (event_id > 0) {
            $gameMap.events().forEach(function(event) {
            if (event.eventId() === event_id) {
                event._shatter = [true,[],true,x,y,m];
            };
            }, this);    
        };
    };


    //=============================================================================
    // ** Sprite Character
    //=============================================================================


    //==============================
    // * Update
    //==============================
    var _mog_charShatter_update = Sprite_Character.prototype.update;
    Sprite_Character.prototype.update = function() {
        _mog_charShatter_update.call(this);
        if (this._character && this._character._shatter[0]) {this.updateShatterEffect()};
    };


    //==============================
    // * Update Shatter Effect
    //==============================
    Sprite_Character.prototype.updateShatterEffect = function() {
        if (!this._shatterField) {this.createShatterField()};
        if (!this._shatterSprites || this._character._shatter[2]) {this.createShatterSprites()};
        for (var i = 0; i < this._shatterSprites.length; i++) {
            this.updateShatterSprites(this._shatterSprites,i);

            if (this._shatterSprites
    .opacity === 0) {

                this._shatterField.removeChild(this._shatterSprites
    );

            };


        };


        this.setFrame(0,0,0,0);


    };





    //==============================


    // * create Shatter Field


    //==============================


    Sprite_Character.prototype.createShatterField = function() {


         this._shatterField = new Sprite();


         this.addChild(this._shatterField);


    };





    //==============================


    // * remove Shatter Sprites


    //==============================


    Sprite_Character.prototype.removeShatterSprites = function() {


         for (var i = 0; i < this._shatterSprites.length; i++) {


              this._shatterField.removeChild(this._shatterSprites
    );

              this._shatterSprites
    .bitmap = null;

              this._shatterSprites
    = null;

              this._character._shatter[1]
    = null;

         };


         this._shatterSprites = null;


    };





    //==============================


    // * create Shatter Sprites


    //==============================


    Sprite_Character.prototype.createShatterSprites = function() {


        this._character._shatter[2] = false;


        if (this._shatterSprites) {this.removeShatterSprites()};


        this._character._priorityType = 2


        this._character._through = true;


        this._shatterSprites = [];


        this._shatterType = this._character._shatter[5];


        var frag_size = 5  


        var pw = this.patternWidth();


        var ph = this.patternHeight();


        var maxw = Math.floor((pw / frag_size) * (ph / frag_size));


        if (this._tileId > 0) {


            var sx = (Math.floor(this._tileId / 128) % 2 * 8 + this._tileId % 8) * pw;


            var sy = Math.floor(this._tileId % 256 / 8) % 16 * ph;        


        } else {


            var sx = (this.characterBlockX() + this.characterPatternX()) * pw;


            var sy = (this.characterBlockY() + this.characterPatternY()) * ph;


        };


        for (var i = 0; i < maxw; i++) {


             this._shatterSprites
    = new Sprite(this.bitmap);

             var l = Math.floor((frag_size * i) / pw);


             var x =  (frag_size * i) - (l * pw);


             var y = Math.floor((l * frag_size));


             var y3 = Math.floor((l * frag_size));


             if (y >= ph - frag_size) {y = ph - frag_size};


             var sx2 = sx + x


             var sy2 = Math.floor(sy + y)


             this._shatterSprites
    .x = x;

             this._shatterSprites
    .y = y;

             this._shatterSprites
    .setFrame(sx2,sy2,frag_size,frag_size);

             this._shatterField.addChild(this._shatterSprites
    );

             this._shatterSprites
    .an = [0,0,0];

             if (!this._character._shatter[1]
    ) {

                this.setShatterAnimation(i) 


             } else {


                this.loadShatterData(i);


             };         


        };


        this._shatterField.x = -this.width / 2;


        this._shatterField.y = -this.height;


    };





    //==============================


    // * set Shatter Animation


    //==============================


    Sprite_Character.prototype.setShatterAnimation = function(i) {


        this._character._shatter[1]
    = [];

        var x = this._character._shatter[3];


        var y = this._character._shatter[4];


        if (this._character._shatter[5] === 1) {


            var sx = Math.random() * Math.abs(x) + 0.1;


            var sy = Math.random() * Math.abs(y) + 0.1;


            var r = Math.randomInt(2);


            sx = r === 0 ? sx : -sx;


            var r = Math.randomInt(2);


            sy = r === 0 ? sy : -sy;        


        } else if (this._character._shatter[5] === 2) {    


            var sx = Math.random() * Math.abs(x) + 0.1;


            var sy = Math.random() * Math.abs(y) + 0.1;


            var r = Math.randomInt(2);


            sx = r === 0 ? sx : -sx;


        } else {


            var sx = Math.random() * Math.abs(x) + 0.1;


            var sy = Math.random() * Math.abs(y) + 0.1;


            sx = this._character._shatter[3] >= 0 ? sx : -sx;


            sy = this._character._shatter[4] >= 0 ? sy : -sy;


        };


        this._shatterSprites
    .sx = sx;

        this._shatterSprites
    .sy = sy;

        this._shatterSprites
    .op = (Math.random() * 2) + 1.0;

        this._shatterSprites
    .sc = 0;

        this._shatterSprites
    .rt = 0;

    };





    //==============================


    // * Load Shatter Data


    //==============================


    Sprite_Character.prototype.loadShatterData = function(i) {


        this._shatterSprites
    .x = this._character._shatter[1].x;

        this._shatterSprites
    .y = this._character._shatter[1].y;

        this._shatterSprites
    .scale.x = this._character._shatter[1].scaleX;

        this._shatterSprites
    .scale.y = this._character._shatter[1].scaleY;

        this._shatterSprites
    .sc = this._character._shatter[1].sc;    

        this._shatterSprites
    .rotation = this._character._shatter[1].rotation;

        this._shatterSprites
    .opacity = this._character._shatter[1].opacity;

        this._shatterSprites
    .sx = this._character._shatter[1].sx;

        this._shatterSprites
    .sy = this._character._shatter[1].sy;

        this._shatterSprites
    .op = this._character._shatter[1].op;

        this._shatterSprites
    .rt = this._character._shatter[1].rt;

        this._shatterSprites
    .an = this._character._shatter[1].an;

    };





    //==============================


    // * Update Shatter Sprites


    //==============================


    Sprite_Character.prototype.updateShatterSprites = function(sprite,index) {


        sprite.an[0]++;


        if (this._character._shatter[5] === 2) {


            if (sprite.an[0] < 60) {


              sprite.x += sprite.sx;


              sprite.y -= sprite.sy;


            } else if (sprite.an[0] < 450) {


              sprite.x += sprite.sx;


              sprite.y += sprite.sy * 1.2;        


            };


        } else {


          sprite.x += sprite.sx;


          sprite.y += sprite.sy;


        };


        sprite.opacity -= sprite.op;


        sprite.scale.x += sprite.sc;


        sprite.scale.y += sprite.sc;


        sprite.rotation += sprite.rt;


    };





    //==============================


    // * Save Shatter Data


    //==============================


    Sprite_Character.prototype.saveShatterData = function(sprite,index) {


        this._character._shatter[1] = [];


        for (var i = 0; i < this._shatterSprites.length; i++) {


            var sprite = this._shatterSprites


            this._character._shatter[1]
    = {};

            this._character._shatter[1]
    .x = sprite.x;

            this._character._shatter[1]
    .y = sprite.y;

            this._character._shatter[1]
    .scaleX = sprite.scale.x;

            this._character._shatter[1]
    .scaleY = sprite.scale.y;        

            this._character._shatter[1]
    .opacity = sprite.opacity;

            this._character._shatter[1]
    .sx = sprite.sx;

            this._character._shatter[1]
    .sy = sprite.sy;

            this._character._shatter[1]
    .op = sprite.op;

            this._character._shatter[1]
    .sc = sprite.sc;

            this._character._shatter[1]
    .rotation = sprite.rotation;

            this._character._shatter[1]
    .an = sprite.an;

        };


    };





    //=============================================================================


    // ** Scene Map


    //=============================================================================





    //==============================


    // * Terminate


    //==============================
    • Like
    Reactions: 1 person
    taarna23
    taarna23
    The image you chose represents frustration at best and stress at worst. Perhaps you simply need to choose beter words.


    ...and avoid the site entirely at April Fool's if you have no sense of humour.
    Yappy Monoxide
    Yappy Monoxide
    Ok I will choose *Beter* words.
    Gin
    Gin
    When that happens to me I´m like:


    OH me goshhh! What is thissss??! :o




    And then I´m like:


    OH NOOOOOOOOO! There it is AGAINNN!!! :o






    Spoiler



    ...And AGAIN!!! :popcorn:






    Spoiler



    Annnndddd.... again! :unsure:





    What sort of witchcraft is this??? :dizzy:
  • Loading…
  • Loading…
  • Loading…

Latest Threads

Latest Profile Posts

So I decided the best way to represent insanity was to simply make two maps fight for supremacy in front of the player. The results are everything I hoped for! :LZSexcite:


Ami
look the release date - finally!!!
look the price - (convert into Rupiah)"maybe im too forcing myself…" (wait again until Autumn or Christmas Sale)
so MZ is releasing next month :/ I still don't know if I should pick it up or not
I wish all of you have a good time in your life!

Forum statistics

Threads
99,726
Messages
968,529
Members
131,436
Latest member
Batur
Top