RMMV Trying to modify Yanfly_PartySystem to show skills

Status
Not open for further replies.

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
I am using Yanfly_PartySystem Plugin. And I am using a BeastBook Plugin. The BeastBook Plugin lists the skills in a very pleasant way. So my Idea is to replace the Yanfly_Party System Equipment description with the BeastBook skill-list.

following picture is the desired output (actually just the 7 skillicons and names).
desired output.png
following picture shows where the skill-list is supposed to be:

Yanfly partysystem equip desc.png
Any help is appreciated! :rhappy:
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,289
Reaction score
2,461
First Language
Dutch
Primarily Uses
RMMV
If you copy Window_MonsterInfo over to Window_PartyDetail, those
are 2 different function.

keep in mind, even if you change it Window_Monster to Window_PartyDetail,
rect will be undefined.

so you need to adjust more to make it readable and correctly.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,993
Reaction score
2,280
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!
Unfortunately this is not how it works. You cannot simply copy paste a plugin code into another and hope it works.
I suggest you start learning JavaScript first. A tons of free tutorials on internet
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
Hi there!
Unfortunately this is not how it works. You cannot simply copy paste a plugin code into another and hope it works.
I suggest you start learning JavaScript first. A tons of free tutorials on internet
Isn't a call supposed to copy another method from another object?
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
Code:
Window_PartyDetail.prototype.drawActorEquipsList = function(equips) {
var actor = $dataActors[this._actorId];

        var attacks = [];
        var note = actor.note.split(/[\r\n]+/);  //error note is undefined

        for (var i = 0; i < note.length; i++)
        {
            var regex = /<attack:[ ]*(\d+)>/i;
            var match = regex.exec(note[i]);
            if (!match) continue;
            attacks.push(Number(match[1]));
        }

        this.makeFontBigger();
        this.drawText(attacksText, rect.x+5, rect.y+5, rect.width);
        this.makeFontSmaller();

        for (var i = 0; i < attacks.length; i++)
        {
            attack = $dataSkills[attacks[i]];
            var x = rect.x + 26;
            var h = rect.y+60+this.lineHeight()*i;
            var w = rect.width;
            this.drawIcon(attack.iconIndex, x, h);
            this.drawText(attack.name, x + 38, h, w, 'left');
        }
};

following picture is the desired output.
desired output.png
This picture shows the actor notetags that I try to acces, but the code listed above gives me the "note is undefined" error.
notetag input.png
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,289
Reaction score
2,461
First Language
Dutch
Primarily Uses
RMMV
you also missing a point, 1 function like that doesn't show all!

it is called in serveral functions, so you need to find them all,
alternate them all, and place it, it need probably a few new functions
as well, as Eliaquim said, "you cannot simply copy paste code from one to another".

there is more behind the code if you cannot read JS though or understand how
it works.
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
If copying does not work at all, I would try to do it like this:
1. Create a list of all 6 Notetags of the actor.
2. draw the icons and skillnames.
It probably shouldn't be too complex.
My javascript guess is: Create an array of values of the notetags by looping through all of them.
get the $dataSkills matching the notetag values.
Somehow draw the Icons and strings of the 6 $dataSkills.
Somehow Refresh the window whenever the player hovers over another actor.

It would be awesome if any1 could help me with this. :rhappy:
 
Last edited:

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
A .call does not work here, because the Beastbook-Plugin is an IIFE and IIFE's are not accessible from outside.
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
66
Reaction score
20
First Language
german
Primarily Uses
RMMV
Hi there!
Unfortunately this is not how it works. You cannot simply copy paste a plugin code into another and hope it works.
I suggest you start learning JavaScript first. A tons of free tutorials on internet
I did it guys. No need to start learning Javascript :rwink:.
i motherfcking did id fck the h8ers.png


I only needed to change these 2 words from "equips" to "skills".
i motherfcking did id fck the h8ersss.png
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,943
Reaction score
6,304
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts


Clarn Hold
(No storylines)
There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​
ScreenShot_9_24_2022_7_56_24.png
New area being started today. It leads to one of the games 2 optional bosses.

Forum statistics

Threads
125,540
Messages
1,171,821
Members
164,614
Latest member
guymelul
Top