Sprit reload

Discussion in 'Javascript/Plugin Support' started by Tatsumaro, Apr 25, 2018.

  1. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    PLUGINS: Character Creator EX
    CCEX Dynamic Actors
    Sprinte In Windows
    WAY_CustomOnEquipEval

    Hi, im having a problem on my equip menu. It works, but its not perfect, if you enter in Scene_Equip the Sv Sprite as the correct weapon and armor but if you change the equipment you have to exit and reenter to view the alteration. I think its Victor´s plugin that reloads the Sv Sprite, what i need is a way to force the reload when you change the equipment, "user.refresh()" is not working because all the armors have the your code and the Sv Sprite do not change.

    "ITS NOT EASY USING THE WORDS" lol so i made a video.
     
    #1
  2. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    1º a temp
    Sprit reload.png
     
    #2
  3. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    based in this "status.refresh" i fund this code
    Code:
    //-----------------------------------------------------------------------------
    // Sprite_DisplayCharacter
    //-----------------------------------------------------------------------------
    
    Sprite_DisplayCharacter.prototype = Object.create(Sprite_Base.prototype);
    Sprite_DisplayCharacter.prototype.constructor = Sprite_DisplayCharacter;
    
    Sprite_DisplayCharacter.prototype.initialize = function() {
        Sprite_Base.prototype.initialize.call(this);
        this._stepCounter = 1;
        this._stepDirection = 1;
        this._directionCounter = 0;
        this._directions = [0, 1, 3, 2];
        this._specificCounter = 0;
        this.visible = false;
        this.refresh();
    };
    
    Sprite_DisplayCharacter.prototype.update = function() {
        Sprite_Base.prototype.update.call(this);
        this._specificCounter++;
        if(this._specificCounter % 10 === 0) {
            this._stepCounter += this._stepDirection;
            if(this._stepCounter === 2 || this._stepCounter === 0) this._stepDirection *= (-1);
            this.refresh();
        }
        if(this._specificCounter % 120 === 0) {
            this._directionCounter++;
            if(this._directionCounter > 3) this._directionCounter = 0;
            this.refresh();
        }
    };
    
    Sprite_DisplayCharacter.prototype.refresh = function(reset) {
        if(reset) {
            this._stepCounter = 1;
            this._stepDirection = 1;
            this._directionCounter = 0;
            this._specificCounter = 0;
        }
        this.setFrame(_.width * this._stepCounter, _.height * this._directions[this._directionCounter],
            _.width, _.height);
        if(!this.visible) this.visible = true;
    };
    
    now what do i test in the debug mode?
    Sprit reload2.jpg
     
    Last edited: Apr 25, 2018
    #3
  4. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    #4
  5. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    SceneManager.push(Scene_Equip); in the debug mode :)
     
    #5
  6. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
  7. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    @Rhino and hi now believe that it can be done if we initialize only Window_SkillStatus, in YEP.10 – Equip Core.

    What i need now is a whay to test this in a eval code to insert on WAY_CustomOnEquipEval.

    Thanks
     
    #7
    Rhino likes this.
  8. Rhino

    Rhino ~Inactive~ Veteran

    Messages:
    482
    Likes Received:
    784
    First Language:
    English
    Primarily Uses:
    RMMV
    There's quite a number of plugins involved, so I've made a demo project to hopefully make it easier on anyone who'd like to test their code out!

    Everything you need to know should be in there, but feel free to ask us if you've got any questions. I'm fairly confident that refreshing window SkillStatus is the answer, if only we could write it out :hswt:

    Thanks for looking!
     
    #8
    Tatsumaro likes this.

Share This Page