I'm having a bug with the script WeaponOverActor

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
@LadyBaskerville when I activate this script and I do not have any equipped weapons and enter into battle, this error appears "can not read property 'meta' of null" ,but when I'm equipped with a weapon nothing happens, sSorry for the inconvenience, I do not want to be boring. ;c
 

Attachments

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,720
Reaction score
13,996
First Language
English
Primarily Uses
RMMV
@LadyBaskerville asked for screenshots showing how you set up the actors and their equipment, as she needs to know that to confirm if her suspicions are correct. Unfortunately the screenshot you provided is of very little use. If you get that error, press F8 to open the developer tools, go to the Console tab, and grab a screenshot of that, which us much more useful. But also provide the actor/equipment info.

I'd also be interested to know if you've set up your party members correctly - if you don't want all 4 actors in the starting party, did you delete them from the System tab (which is the correct way) or from the Actors tab (which is the incorrect way that a lot of people mistakenly do, as you then have "empty" party members).
 

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
@LadyBaskerville asked for screenshots showing how you set up the actors and their equipment, as she needs to know that to confirm if her suspicions are correct. Unfortunately the screenshot you provided is of very little use. If you get that error, press F8 to open the developer tools, go to the Console tab, and grab a screenshot of that, which us much more useful. But also provide the actor/equipment info.

I'd also be interested to know if you've set up your party members correctly - if you don't want all 4 actors in the starting party, did you delete them from the System tab (which is the correct way) or from the Actors tab (which is the incorrect way that a lot of people mistakenly do, as you then have "empty" party members).
I did not know about the console, here is f12 :c
 

Attachments

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
645
Reaction score
527
First Language
German
Primarily Uses
RMMV
I couldn't test it yet, but try replacing the plugin's content with this:

Code:
/*:
 * @plugindesc For sideview battle, change the order in which weapon and actor are drawn.
 * @author LadyBaskerville
 *
 * @help
 * Use the notetag <Weapon Over Actor> in the actor or weapon notebox
 * to draw the weapon image on top of the actor image.
 * Might not work when changing weapons during battle.
 *
 * Free for use in both non-commercial and commercial games.
 * No credit required.
 * Edits and reposts allowed.
 */

Sprite_Actor.prototype.initMembers = function() {
    Sprite_Battler.prototype.initMembers.call(this);
    this._battlerName = '';
    this._motion = null;
    this._motionCount = 0;
    this._pattern = 0;
    this.createSprites();
};

Sprite_Actor.prototype.createSprites = function() {
    this.createShadowSprite();
    if (this._actor && ($dataActors[this._actor._actorId].meta["Weapon Over Actor"] ||
                        ($dataWeapons[this._actor._equips[0]._itemId] && $dataWeapons[this._actor._equips[0]._itemId].meta["Weapon Over Actor"]))) {
        this.createMainSprite();
        this.createWeaponSprite();
    } else {
        this.createWeaponSprite();
        this.createMainSprite();
    }
    this.createStateSprite();
};

Sprite_Actor.prototype.setBattler = function(battler) {
    Sprite_Battler.prototype.setBattler.call(this, battler);
    var changed = (battler !== this._actor);
    if (changed) {
        this._actor = battler;
        if (battler) {
            this.setActorHome(battler.index());
        }
        this.createSprites();
        this.startEntryMotion();
        this._stateSprite.setup(battler);
    }
};
I only added a check whether the actor has a weapon equipped in the first play before trying to access the notetag of the equipped weapon; hopefully that was everything that was wrong. If you still get an error, please post a screenshot of the console with again with the new error.
 

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
I couldn't test it yet, but try replacing the plugin's content with this:

Code:
/*:
 * @plugindesc For sideview battle, change the order in which weapon and actor are drawn.
 * @author LadyBaskerville
 *
 * @help
 * Use the notetag <Weapon Over Actor> in the actor or weapon notebox
 * to draw the weapon image on top of the actor image.
 * Might not work when changing weapons during battle.
 *
 * Free for use in both non-commercial and commercial games.
 * No credit required.
 * Edits and reposts allowed.
 */

Sprite_Actor.prototype.initMembers = function() {
    Sprite_Battler.prototype.initMembers.call(this);
    this._battlerName = '';
    this._motion = null;
    this._motionCount = 0;
    this._pattern = 0;
    this.createSprites();
};

Sprite_Actor.prototype.createSprites = function() {
    this.createShadowSprite();
    if (this._actor && ($dataActors[this._actor._actorId].meta["Weapon Over Actor"] ||
                        ($dataWeapons[this._actor._equips[0]._itemId] && $dataWeapons[this._actor._equips[0]._itemId].meta["Weapon Over Actor"]))) {
        this.createMainSprite();
        this.createWeaponSprite();
    } else {
        this.createWeaponSprite();
        this.createMainSprite();
    }
    this.createStateSprite();
};

Sprite_Actor.prototype.setBattler = function(battler) {
    Sprite_Battler.prototype.setBattler.call(this, battler);
    var changed = (battler !== this._actor);
    if (changed) {
        this._actor = battler;
        if (battler) {
            this.setActorHome(battler.index());
        }
        this.createSprites();
        this.startEntryMotion();
        this._stateSprite.setup(battler);
    }
};
I only added a check whether the actor has a weapon equipped in the first play before trying to access the notetag of the equipped weapon; hopefully that was everything that was wrong. If you still get an error, please post a screenshot of the console with again with the new error.
Worked perfectly C: thank you very much, sorry for the way I did the post, it's my first time here
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

The second draft of my script is almost done, and I don't think I'm going to write a third draft. I'll make changes to dialogue here and there, but I'm happy with the series of events the way they are.
How you feel about font and dialogue box changing for every main character while the minor cast and regular npc get their own styles? Too much?
Just found an obviously custom effect (i.e. edited by me) in my resources>sounds folder called "rip jaw off". Dear Lord what is wrong with me as a person that at some point I needed a sound *specifically* for THAT??
(...rhetorical question.)
so like with the whole 'familiarity breeds contempt thingy', how are you supposed to tell if your title screen/battle music gets really tedious after a few dozen plays or if you're just personally hella sick of it?

Forum statistics

Threads
107,520
Messages
1,030,238
Members
139,647
Latest member
JesuProYT
Top