CGMV Encyclopedia w/ Bestiary

@Rpgmaster1234 This plugin loads whatever is in $dataWeapons and $dataArmors which by default is what is in the database. If you are using other plugins, they might modify the defaults for some reason. You will need to disable other plugins one by one until you find the problematic one.
@Rpgmaster1234 This plugin loads whatever is in $dataWeapons and $dataArmors which by default is what is in the database. If you are using other plugins, they might modify the defaults for some reason. You will need to disable other plugins one by one until you find the problematic one.
Hey! Thanks for the quick response! Yes I found the problem thank you!
Is there a way to set up the multiple categories part? For example I want to do a "Flying beasts" category and another would be "Sea monsters" category
@Gudako Yes, you would need to make them custom categories and then make your entries custom entries. Then link them to the custom category you want.
@Gudako Yes, you would need to make them custom categories and then make your entries custom entries. Then link them to the custom category you want.
Thanks for your answer, I saw and I tried and it worked, however there is a problem, what would I need to do to make the enemies on a custom category show their stats like hp, atk, def, etc. Like in the normal bestiary.
@Gudako Custom categories are not set up to show that information, they are limited to just the image and description.
MDQtNTQ3Ni5qcGVn.jpeg
Hello! I've got couple of questions. I want to use only beastiary for my creature book. I want to hide Drops, Exp, Gold and Sketch from description. Maybe i don't find this parameters in plugin description?
6381e10957778f437741b4cb1adcd929e4bd209a.jpg
You will have to find those in the .js file, then delete the draw function that those are using.
For the sketch, go to the line 1932, that's where it is drawing the text 'Sketch:' and just above, in line 1881 is the whole thing that draws gold and exp, try deleting both 'this.drawEncyclopediaStandardLine(descriptor1, descriptor2, x, y, this.contents.width);'.

And for the drops in line 1897 starts the method that shows drops, delete every drawtext() and the drawitemname() lines. That should do it.
You will have to find those in the .js file, then delete the draw function that those are using.
For the sketch, go to the line 1932, that's where it is drawing the text 'Sketch:' and just above, in line 1881 is the whole thing that draws gold and exp, try deleting both 'this.drawEncyclopediaStandardLine(descriptor1, descriptor2, x, y, this.contents.width);'.

And for the drops in line 1897 starts the method that shows drops, delete every drawtext() and the drawitemname() lines. That should do it.
Thanks, everything woks fine exept Drops text.
Maybe i miss something?
6381e10957778f437741b4cb1adcd929e4bd209a.jpg
ab2ct64qkb5a1.png
Sorry, I forgot about the title, go to line 1591 and delete the 'this.drawEncyclopediaCenteredText(CGMV.Encyclopedia.DropsText, this.lineHeight()*5, true);'.
That is what draws the 'Drops' title.
Sorry, I forgot about the title, go to line 1591 and delete the 'this.drawEncyclopediaCenteredText(CGMV.Encyclopedia.DropsText, this.lineHeight()*5, true);'.
That is what draws the 'Drops' title.
Yeah, everythink works! Thank you again i'm very appreciate your help.
But now i wonder about some design stuf.
I want to write elemental weakness after description
and want it to look like straight column like in screen 2,
but it always end up like in screen one, everytime
i paste words in the note. And also can you make picture
of creature bigger in bestiary?
@casper667 any plan to update for support text code? like the MZ version?
1688929578130.png


The VE Control Text plugins screw up some text colour and word warping :rsad:.
@SifDoge Hi, sorry but at this time I have no plans to update my plugins from MV or my VXA scripts with new features, I am only focusing on MZ for now.
The VE Control Text plugins screw up some text colour and word warping :rsad:.
Hello, have you tried repositiong VE Control Text below/above this one?
But now i wonder about some design stuf.
I want to write elemental weakness after description
and want it to look like straight column like in screen 2,
but it always end up like in screen one, everytime
i paste words in the note. And also can you make picture
of creature bigger in bestiary?
For element weakness you need manually write same as note description,

-under code
JavaScript:
CGMV_Window_EncyclopediaDisplay.prototype.drawEncyclopediaMeta = function(meta, y) {
    if(!meta) return y;
    var txtArray = meta.split(" ");
    return this.drawTextArray(y, CGMV.Encyclopedia.NoteText, txtArray);
};

add these function

JavaScript:
//<cgmvdescweak:Description Here>
CGMV_Window_EncyclopediaDisplay.prototype.drawEncyclopediaMetaWeak = function(meta, y) {
    if(!meta) return y;
    var txtArray = meta.split(" ");
    return this.drawTextArray(y, CGMV.Encyclopedia.NoteTextWeak, txtArray);
};

//<cgmvdescresist:Description Here>
CGMV_Window_EncyclopediaDisplay.prototype.drawEncyclopediaMetaResist = function(meta, y) {
    if(!meta) return y;
    var txtArray = meta.split(" ");
    return this.drawTextArray(y, CGMV.Encyclopedia.NoteTextResist, txtArray);
};

-under code
JavaScript:
    var y = this.drawEncyclopediaBestiaryDrops(enemy.dropItems);

add these code
JavaScript:
    y = this.drawEncyclopediaMetaWeak(enemy.meta.cgmvdescweak, y);
    y = this.drawEncyclopediaMetaResist(enemy.meta.cgmvdescresist, y);

-under code
JavaScript:
CGMV.Encyclopedia.NoteText = CGMV.Encyclopedia.parameters["Note Text"] || "Note";

add these code
JavaScript:
CGMV.Encyclopedia.NoteTextWeak = CGMV.Encyclopedia.parameters["Weak Element"] || "Element Weakness";
CGMV.Encyclopedia.NoteTextResist = CGMV.Encyclopedia.parameters["Resist Element"] || "Element Resistance";

-for image scale
change this function
JavaScript:
CGMV_Window_EncyclopediaDisplay.prototype.drawEncyclopediaBestiarySketch = function(battlerHue, battlerName, y)

to
JavaScript:
CGMV_Window_EncyclopediaDisplay.prototype.drawEncyclopediaBestiarySketch = function(battlerHue, battlerName, y) {

    if ($gameSystem.isSideView()) {
        this._bitmap = ImageManager.loadSvEnemy(battlerName, battlerHue);
    } else {
        this._bitmap = ImageManager.loadEnemy(battlerName, battlerHue);
    }
    this._bitmapY = y;
    this._bitmapNeedsDrawing = true;

    var originalScale = 9; // Custom scale value
    var originalOpacity = 50; // Custom opacity value

    var customScale = 1; // Original scale value
    var customOpacity = 255; // Original scale value

    // Draw the original image
    this._bitmap.addLoadListener(function() {
        var originalCanvas = document.createElement('canvas');
        var originalCtx = originalCanvas.getContext('2d');
        originalCanvas.width = this._bitmap.width * originalScale;
        originalCanvas.height = this._bitmap.height * originalScale;
        originalCtx.globalAlpha = originalOpacity / 255;
        originalCtx.drawImage(this._bitmap._canvas, 0, 0, originalCanvas.width, originalCanvas.height);

        // Draw the custom image
        var customCanvas = document.createElement('canvas');
        var customCtx = customCanvas.getContext('2d');
        customCanvas.width = this._bitmap.width * customScale;
        customCanvas.height = this._bitmap.height * customScale;
        customCtx.globalAlpha = customOpacity / 255;
        customCtx.drawImage(this._bitmap._canvas, 0, 0, customCanvas.width, customCanvas.height);

        // Reset the bitmap to original size
        this._bitmap = new Bitmap(originalCanvas.width, originalCanvas.height);
        this._bitmap.context.globalAlpha = 1;
        this._bitmap.context.drawImage(originalCanvas, 0, 0);

        // Draw the custom image onto the bitmap
        this._bitmap.context.globalAlpha = 1;
        this._bitmap.context.drawImage(customCanvas, 0, 0);
    }.bind(this));

    return y;
};
Mine used Scale *9 an Opacity 50, also you can remove the original image by changing scale = 0

The description should be like these (not the GUI and UI) and use VE Control Text plugin for text code

Casper.png


CasperBookEdited.png
JESUS CHRIST! Now if someone could modify it so two drops that are the same item show as x2:
Small Potion x2 Chance 50%
So, I'm having a bit of an issue. Whenever I get an item, it says 'TypeError undefined is not a function'. What's strange about this is I was able to get items with no issue beforehand. This even happens when I start a new game
@Semolous29 You will need to open the dev tools console for the full error trace before I can see what is happening. You can do this by pressing F8 in game, and then at the top of the window that opens up make sure you have console selected.

Original thread: https://forums.rpgmakerweb.com/threads/cgmv-encyclopedia-w-bestiary.93854/