"Identify" Skill with Enemy Description?

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Hello.

I want to create a skill where an actor would "identify" an enemy. The main purpose for this is to provide a description of the enemy, much like OFF's identification system worked with The Batter's "Wide Angle":


So I would want an enemy that has not yet been identified to be labeled as ??? And when the identification skill is used, something like the above would appear (name, short description, HP, and weakness; I don't need the (x1) or CP).

I've looked at different plugins like Yanfy's Libra, Monster Book, etc but none of them seem to do quite what I want. I'm not extremely famliiar with pugins so maybe I'm just missing an obvious one that does what I need, or an obvious way that I can do this without any plugins.

I appreciate any help you all can give me.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
Phi! It's super mega easy! Give me just 2 minutes and I make you this :D

@ThyNexus :

save this as js file in your plugin folder:
Code:
skill_IdentifyEnemy = function(a, b){
    if (SceneManager.isSceneBattle()){
        $gameMessage.add('\\c[6]Identification: ' + b.name() + '\\c[0]\nHP: ' + b.hp + ' / ' + b.mhp + '\n' + 'MP: ' + b.mp + ' / ' + b.mmp + '\nATK / DEF: ' + b.atk + ' / ' + b.def + '\nMagic ATK / DEF: ' + b.mat + ' / ' + b.mdf+ '\nAgility: ' + b.agi + '\nLuck: ' + b.luk);
        return 0;
    }
}
and in skill formula wich is your identyfication spell write this skill_IdentifyEnemy(a,b);
Wich should look like this - https://prnt.sc/qkiji8

I don't know a script call for obtaining elements rate so someone else will help
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
you can shift the work load to the message window, and make it override itself with "???" upon checking for a specific state added onto the battler by the identify skill.
basically, the "identify" skill would just be a 100% add state "identified", and a refresh of the message window, which itself would have the check for that state.

work by negative, rather than positive.... "normal" behavior would be displaying the actual description, "override" behavior would be "???", where "normal" works in negative, by waiting for an operation to be made: adding the state.
 

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Thank you both for your help.

@gstv87 I'm afraid I don't follow. I understand what you mean by that the identified information would always be there and there would be a state that would hide said information, but how exactly would I set up a skill so that a window with the appropriate information for the specified enemy would pop up? Where would this information for each enemy be stored before the skill is used? That's what I'm struggling with.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
I have an approach for your problem, but it will not be as efficient as I was expecting and pretty lame solution...

Store in database two instances of your enemy, one would be named "???" and the second one (e.g Grunt), you would always setup troops with enemies named "???" and whenever skill "Identify" would be used during battle it will replace enemy with corensponding name. But that work only with name parameter since the rest is
integer type data. It will require some scripting :p

This will require to edit my code I gave you but that would be simple since it requires to obtain two data wich are easy to get in battle.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
but how exactly would I set up a skill so that a window with the appropriate information for the specified enemy would pop up?
if you can't make your own, you might be able to tap into the message window (the default one, the one that's used for dialogues) via a troop event.

do you have a way of reading the enemy's condition like HP and added states? because those are hidden by default, and the only readout you ever get is through the battle message window, that reads out damage done and states added, but not on demand.

if all you've got is the message window, a simple common event should suffice.
 

ZhoAlone

Warper
Member
Joined
Oct 7, 2020
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
I've been looking for a thread like this, and I would like help on this as well.

I followed Soulrender's words, but without the screenshot, I'm a little lost.

Can you repost the screenshot so that I can complete the skill?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
sure:

database setup:

code:

JavaScript:
eyeOfTruth = function(caster, target){
    //setub basic variables wich we will use later
    /* Current HP wich will be shown in format x / y" */
    var currentHp = 0;
    /* Current MP wich will be shown in format x / y" */
    var currentMp = 0; 
    /* Current ATK value (states included) */
    var currentAtk= 0;
    /* Current DEF value (states included) */
    var currentDef= 0;
    /* Current Magic Attack value (states included) */
    var currentMat= 0;
    /* Current Magic Defence value (states included) */
    var currentMdf= 0;
    /* Current ATK value (states included) */
    var currentAgi= 0;
    /* Current ATK value (states included) */
    var currentLuk= 0;
    /* Enemy description if there is any (use notetag for enemy <enemy_desc:your desc>*/
    var description = null;
    /*    *****    Start obtaining data    ***** */
    if (target.isEnemy() && target.isAlive()){
        if (!target.isStateAffected(48)){
            currentHp = target.hp + " / " + target.mhp;
            currentMp = target.mp + " / " + target.mmp;
            currentAtk = target.atk;
            currentDef = target.def;
            currentMat = target.mat;
            currentMdf = target.mdf;
            currentAgi = target.agi;
            currentLuk = target.luk;         
            description = target.name() + ": " + $dataEnemies[target.enemyId()].meta['enemy_desc'];
            /*    *****    reading data completed    *****    */
          

        } else {
          
            var fog = ["t4D?vn", "(5Fe4n", "Ab'5M?", "uV37-U", "#ScM7;", "r-2*FQ", "T%8rtj", "e8_Sd'", "zN^q7$", "L75b*m", "g*K5wA", "9H'tb#", "W7pg?P", "f6Zr(#", "9kH;wf", "c4[Z@+", "?u9WC$", "8gJP(K", "?fQ9.s"];                 
            currentHp = fog[Math.randomInt(fog.length)] + " / " + fog[Math.randomInt(fog.length)];         
            currentMp = fog[Math.randomInt(fog.length)] + " / " + fog[Math.randomInt(fog.length)];         
            currentAtk = fog[Math.randomInt(fog.length)];                       
            currentDef = fog[Math.randomInt(fog.length)];                       
            currentMat = fog[Math.randomInt(fog.length)];                       
            currentMdf = fog[Math.randomInt(fog.length)];                       
            currentAgi = fog[Math.randomInt(fog.length)];
            currentLuk = fog[Math.randomInt(fog.length)];         
            description = "3RR0R!"+fog[Math.randomInt(fog.length)];         
        }
        //    /////    Render Data and display it    /////    //
        $gameMessage.add("<WordWrap>\\msgrows[5]\\c[6]" + description + "\\c[24]<br>HP: " + currentHp + "<br>\\c[23]MP: " + currentMp + "<br>\\c[0]Atk: " + currentAtk + " / M. Atk: " + currentMat + "<br>Def: " + currentDef + " / M. Def: " + currentMdf + "<br>Agi: " + currentAgi + " / Luck: " + currentLuk);     
    }
    return 0;
}
You can use notetag <enemy_desc: xxx> to type some brief info about enemy
 

ZhoAlone

Warper
Member
Joined
Oct 7, 2020
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Is this new code for the plugin?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
Not quite a plugin, its a custom script to execute for skill. You May not know but in damage formula you call any kind of script you want. So I write more advanced skills in custom js class.

In other words, it is a plugin, but not a plugin as we know by default with parameters.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,895
Reaction score
1,029
First Language
Dutch
Primarily Uses
RMMV
what does the fog means? and all the code ( var fog = ["t4D?vn", "(5Fe4n", "Ab'5M?", "uV37-U", "#ScM7;", "r-2*FQ", "T%8rtj",.............)

is this one time or all the time need for the same enemy? or does it revealed the next time you battle the enemy?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
In the middle of code is if target.isStateAffected(48)

This is a custom state id 48(actually empty) to conceal enemy status So whenever you use that skill on enemy with state 48 you will See these bushes. I decided to do it that way after completing 1st season of Impossibly Cautious hero
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top