MV - SRPG Engine MV - Plugins for creating Tactical Battle System

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 69 of 166 View original ↗
  1. @Dopan sorry it was obvious in reality.

    Maybe a bit less obvious this one: is there a way to test if a unit is injured (not dead, just HP < MHP)?
  2. CarpenterScr said:
    (...) is there a way to test if a unit is injured (not dead, just HP < MHP)?
    ...

    JavaScript:
    $gameSystem.EventToUnit(9)[1]
    - get acces to every units battler..
    =>in that Example_case its the EVENTUNIT (event ID "9" )

    JavaScript:
    $gameSystem.EventToUnit(9)[1].mhp
    - returns units max HP

    JavaScript:
    $gameSystem.EventToUnit(9)[1].hp
    - returns units HP

    JavaScript:
    $gameSystem.EventToUnit(9)[1].hp === 450
    - returns "true" if HP is 450
    (or else returns "false")

    JavaScript:
    $gameSystem.EventToUnit(9)[1].hp < 450
    - returns "true" if HP is smaller than 450
    (or else returns "false")

    JavaScript:
    $gameSystem.EventToUnit(9)[1].hp === $gameSystem.EventToUnit(9)[1].mhp
    - returns "true" is HP equal to max HP
    (or else returns "false")

    This works with all stats ,for example "agi" :
    JavaScript:
    $gameSystem.EventToUnit(9)[1].agi
    - returns the Units "agi"

    Screenshot from Console (F8):
    Screenshot_1.png
  3. Dopan said:
    @MisterFu

    meta data
    is allways someting like a "note" which the system reads,in that case its probably the Skill Notetag: "ai target"

    I know, but I don't know which plugin is converting this notetags. So I am looking for that responsible plugin and the line. I think there might be a problem, because only a snippet of the notetag was converted.
  4. MisterFu said:
    I know, but I don't know which plugin is converting this notetags. So I am looking for that responsible plugin and the line. I think there might be a problem, because only a snippet of the notetag was converted.
    the code line:

    "item.meta.aiTarget"

    is only in the Plugin SRPG_AIControl
    probably i dont understand correctly what you are looking for,
    but if its not in the SRPG_AIControl than it can only be in the SRPG_Core or in the default rpg plugins


    i just looked into this topic:
    Preloading Notetags vs meta here=> #8
    The other downside of meta is that it won't support multiple of the same tag. I guess the last one would be added and the rest would be missed.

    ->perhaps that might be related??

    i think my JS knowledge is to low to help on that issue sry
  5. @Dopan and @MisterFu

    I think I found my mistake...well half my mistake how notetags work.

    <aiTarget: (a.mpRate() >= 0.3) ? 50 : 0>

    This was my formula and the culprit is the > before the =. Because the > closes the notetag, so everything after was cutted out. I changed it to

    <aiTarget: (a.mpRate() <= 0.3) ? 0 : 50> and all works.

    Learned something new :3
  6. Diz89 said:
    @Dopan and @MisterFu

    I think I found my mistake...well half my mistake how notetags work.

    <aiTarget: (a.mpRate() >= 0.3) ? 50 : 0>

    This was my formula and the culprit is the > before the =. Because the > closes the notetag, so everything after was cutted out. I changed it to

    <aiTarget: (a.mpRate() <= 0.3) ? 0 : 50> and all works.

    Learned something new :3
    makes sence. kind of obvious , we should have seen that earlier^
    ->congratz
  7. Hello, I need help concerning action sequence,
    I want to ask which one is better,
    DynamicAction or YEP Action Sequence?
    *before I had problem concerning the counterattack is too fast that the moving animation is stopped in the middle of the screen because they follow the characters after the attack immediately
    **solved it with adding wait 30 frames before the attack/counterattack skill
  8. siluman said:
    Hello, I need help concerning action sequence,
    I want to ask which one is better,
    DynamicAction or YEP Action Sequence?
    *before I had problem concerning the counterattack is too fast that the moving animation is stopped in the middle of the screen because they follow the characters after the attack immediately
    **solved it with adding wait 30 frames before the attack/counterattack skill
    i dont have much EXP with the "DynamicAction"- Plugin myself..
    but you can use these links for more Infos:

    "DynamicAction" (Plugin Threads)
    Tutorial: - English version
  9. Is it possible to include several conditions in the AI?
    Instead of just:
    <aiTarget: 4 * a.atk - 2 * b.def>
    (target the enemy that receives the highest damage if I understand correctly)

    Pick the condition highest damage + enemy dies, so add 4 * a.atk - 2 * b.def > b.hp

    But how to include it in the formula without having the unit do nothing if it can NOT kill the enemy?

    And even more complex: in case it has a choice between several enemies it can kill, have it pick the one with the most HP?
  10. Is it possible to include several conditions in the AI?
    Instead of just:
    <aiTarget: 4 * a.atk - 2 * b.def>
    (target the enemy that receives the highest damage if I understand correctly)

    Pick the condition highest damage + enemy dies, so add 4 * a.atk - 2 * b.def > b.hp

    I think, this is possible as I just experimented with something like this myself: so for you it would be:


    <aiTarget: (4 * a.atk - 2 * b.def < b.hp) ? 0 : 1000>

    this would check, if the formula is lesser then the targeht HP. If yes, then make the TGR Zero, so the skill will not get picked, if no, make the TGR 1000 (or any other number you want the skill to be kinda prioritized. If the Target Score is Zero like here, the skill will not get picked.


    I hope, this helps :)
  11. I thought SRPG_AI was NOT deciding on skill selection, but on target selection.
    In other words, a skill is picked at random or depending on the priorities you set in the monster skill page.
    Once the skill IS actually picked, a target must be determined, and this is when SRPG_AI comes into play.
    @Dopan correct me if I'm wrong...
  12. @Diz89 Targets with a final aiTarget score of 0 or less won't be selected as targets. If a skill has no valid targets, it will be treated as unusuable, and the built-in AI will skip over it the same way it would if the skill had been sealed, or was otherwise unusable.

    Doktor_Q said this to me once. So if the Score is Zero, the skill will not be used. That's what I tried so far with this true/false-checks. "Not get picked" was not good wording though XD More like "unusable skill"
  13. CarpenterScr said:
    I thought SRPG_AI was NOT deciding on skill selection, but on target selection.
    In other words, a skill is picked at random or depending on the priorities you set in the monster skill page.
    Once the skill IS actually picked, a target must be determined, and this is when SRPG_AI comes into play.
    @Dopan correct me if I'm wrong...
    i cant say much on battle formulas
    (thats what the AI plugins uses)

    there are threads with tutorials for battleformulas..
    for Example:
    Damage Formulas 101
    And i think Diz89 is correct on what he mentioned..
    (at the end DrQ knows best i guess, but it will probably help a lot to learn more by trial/failure)
  14. Thanks.

    I'm also trying to change the Options menu and remove a few things but I have no idea where exactly is the options plugin. I looked into the list and there doesn't seem to be any clear reference to options.
    Any clues?

    EDIT:
    I have another question. What is the script line to launch the Equip menu of SRPG_core? (the one between "Item" and "Wait", second from bottom, in the menu)
  15. CarpenterScr said:
    Thanks.
    I'm also trying to change the Options menu and remove a few things but I have no idea where exactly is the options plugin. I looked into the list and there doesn't seem to be any clear reference to options.
    Any clues?

    I have another question. What is the script line to launch the Equip menu of SRPG_core? (the one between "Item" and "Wait", second from bottom, in the menu)
    look for any "options plugin" in the forum that does what you want

    the Equip menu is not from SRPG its the same like in any project,
    Screenshot_1.png
    .. and the scene_equip or how to call it, is something that is explained in the forum,better than i could explain it.. i gave you 1 link already..

    Can I open the equipment menu of a specific actor with a script call? if that link doesnt solve it, you need to look for a similar thread..
    => probably you could also find the needed info in the SRPG Core Plugin.., but I am not sure where exactly you can find that info
  16. Is there a way to put "Turn End" and "Autoturn" at the bottom of the list instead of at the top (in the main menu)? Or to disable them if a switch is ON?
    I looked into YEP Main Menu but I couldn't find either command. Where are they?
  17. CarpenterScr said:
    Is there a way to put "Turn End" and "Autoturn" at the bottom of the list instead of at the top (in the main menu)? Or to disable them if a switch is ON?
    I looked into YEP Main Menu but I couldn't find either command. Where are they?
    These MenuCommands are made in the SRPG Core and they are not added in the yep plugin by default..
    /(I am not sure how to change the Command_order without adding them to the yep Plugin, and i didnt try to add them to the yep plugin so far,but i think it could be possible to add them to the yep plugin)

    You can find the related Code here(IMG Below)
    .. probably you could add switches to that Code(same way i did it for the battleCommands), in order to disable them,but i didnt try to do that yet..
    Screenshot_1.png
  18. I was able to find the bit you mention but how to edit it so that both commands show at the bottom instead of the top? Sorry I'm not too good with code...
  19. Hmm, anything I could do so the counterattack is based on percentage or maybe buff skills/state?
  20. siluman said:
    Hmm, anything I could do so the counterattack is based on percentage or maybe buff skills/state?
    Use SRPG_StatBasedCounter..
    Spoiler
    Screenshot_1.png
    make sure to disable AGIAtt+ function in the core or with the skillnote(AgiExtra:false) from my edited core version..
    (this AGIAtt+ function and its counter behavior,which is based on AGI, conflicts with SRPG_StatBasedCounter Plugin)

    Spoiler
    Screenshot_2.png