How to implement a skill that displays enemy data?

● ARCHIVED · READ-ONLY
Started by Manofdusk 12 posts View original ↗
  1.  One of my characters has a skill that allows him to see enemy data (current hp, current mp, attack, def, weapon damage (formerly magic defence) element rates, and possibly special notes about a monster (like hints about how it behaves (such as "Sahuagin summons Jellyfish when afflicted by the 'Wet' Status". as an example))

     unfortunately, I don't even know how to begin making something like this. If the special notes are too much, it's not that important, but it would be nice to add an extra layer of depth to the game.

     I'm guessing I would need a script of some kind to call the desired attributes of the target (not sure what the code is to call attributes) and then show them in text boxes (again, not sure how to place code in text boxes)

     If I were to make a special note for each monster, my guess would be that I would need to call the ID of the enemy and create a separate text box for each creature somewhere (again not sure).
  2. Unless it's something really complicated, you could probably do it by giving your skill a common event, then using Script calls and Show Text within the common event.


    The "special notes" would depend on how you intend to set them up.
  3. theoretically, it could be done with events (you can get any enemy data into a variable by the control variable command:game data, and then display it), but doing it by events would require a lot of complex branching.


    I suggest looking through the master script list - if I remember correctly there are one or two scripts to display enemy data, and those scripts can be turned on or off with a switch iirc.
  4. I looked through the battler, enemy, troop, and all the other combat data for enemies I could find but didn't see anything like that (or, if I did, I couldn't recognize it).

     I've decided to try and set all the stats to variables and then display them in text boxes.

    the question now is how do I set element rates to a variable?

     also, once I get all of the variables set, how do I put them in a text box?

     Finally, I think the best way to make notes for creatures is to create an enemy variable and set the enemy's numerical ID (not sure what the code is to call that either) and then create a nested if statement that shows a text box based on what the enemy's numerical ID is.

     for example:

     The first enemy I've created is the Sahuagin. When he gets wet, he can summon Jellyfish (I haven't implemented this ability yet). So when my character Scans him, I would set his numerical ID (1) to the Variable Enemy ID and create an if statement

    Conditional Branch Variable [0059] == 1

    @>Text:-,-, Normal Bottom

    :        : The Sahuagin can summon jellyfish when suffering

    :        : from the Wet condition.

    Else

    Branch End

     and, in the Else branch, I can just keep adding monster numerical IDs as the variables and adding more text.

     Does all that sound about right?

    Scan Script.png
  5. Manofdusk said:
    Does all that sound about right?
    No, it does not.
    Common events are executed after the action, which means that the placeholders a and b from the damage formula no longer exist.


    That is why I told you to get the data by control variable : game data, NOT by control variable : script like you did in your screenshot.


    If you choose control variable : game data, the preselected game data is Map ID - but if you click on the dots to the right, you can change that to almost every other data available in the game.


    The scripts I was thinking of are:


    http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/enemy-hp-bars/


    http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/enemy-target-info/


    I do not know if they work without the battle engine ace however...


    I suggest you take a week or so off from your game project to explore the editor - there are a lot more advanced options than "only" the game data from control variables, and things will speed up for you if you take the time to look at the sample events, mapping tutorials and other things.


    The link in my signature was written to guide new users to the most important tutorials and learning games.
  6. I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
  7. The scripts I was thinking of are:http://yanflychannel.../enemy-hp-bars/

    http://yanflychannel...my-target-info/

    I do not know if they work without the battle engine ace however...
    They do need the Battle Engine script.  Also, the information they give is displayed by default (enemy HP bars when you target a particular enemy, general info by pressing shift) and I don't think they can just be run as a skill - though I could be wrong.
  8. Andar said:
    No, it does not.

    Common events are executed after the action, which means that the placeholders a and b from the damage formula no longer exist.

    That is why I told you to get the data by control variable : game data, NOT by control variable : script like you did in your screenshot.

    If you choose control variable : game data, the preselected game data is Map ID - but if you click on the dots to the right, you can change that to almost every other data available in the game.
     Well, the control variable: game data requires that I select a specific enemy slot (rather than the target of the skill). Also, it doesn't cover elemental rates.

     I'm not really able to use the links as I do plan on making this a commercial game at this point (I'm using other games to practice concepts but this one is likely the most straitforward one I have planned and likely to require the least amount of programing)

     However, I will go back and look at the tutorials and samples a bit more in depth.
  9. you need conditional branches to identify which slot had been targeted - but that is the only way to do it with eventing alone.


    Everything else needs a script one way or another...


    And there are scripts that are available commercially even without paying, you'll have to check the terms-of-service for each script or scripter.


    And even if you have to pay for a license to use the script commercially, depending on what you do that is often cheaper than spending dozens of hours writing workarounds yourself.
  10. well, the conditional branches worked. I made the skill ad the "Scanned" state and then made the conditional branches detect for the scanned state, add the data to a variable, place the variable into text, and then remove the state.

     However, that only works for attributes. I need elemental rates too. I have 15 elements (which include the 3 physical ones: piercing, slashing, and blunt) and they're used (instead of Def) to reduce damage. I need to figure out how to set the element rates to a variable and show them too. I just don't know how to reference them.

     I also need to get the creature's numerical ID. As far as I can see, Game Data doesn't give me the option to reference that from there.
  11. Yanfly's Enemy Info script allows you to set up a skill which includes scanning for elements, as well as for parameters, states, resistances and so on.  It seems to do everything that you want.  

    The old links to Yanfly scripts aren't working.  Here is the new one.  https://github.com/Archeia/YEARepo/blob/master/Battle/Enemy_Target_Info.rb

    As you can see from the script header, setting up a skill to do all this is very straightforward (there are other options, like it's default from the beginning etc. but you can ignore those).  I think it would save you a lot of time and effort.