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

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 22 of 166 View original ↗
  1. @Dopan if you're using MapBattle_Motions, you can accomplish those via the <idleMotion:motion> tag for states, etc.

    And related to that, more updates:
    • SRPG_MapBattle_Motions doesn't have to wait for damage motions to finish before proceeding with the skill, which speeds things up considerably, and attack motions set to loop / hold last frame are properly cleared when the skill is finished. Hopefully this is the last fix I have to make for motion waiting behaviors.
    • SRPG_MapBattle now finally supports the native CounterAttack trait, if you aren't making use of SRPG_StatBasedCounter for whatever reasons. With the last vanilla feature now support, I'm putting it at version 1.0.
  2. Doktor_Q said:
    @Dopan if you're using MapBattle_Motions, you can accomplish those via the <idleMotion:motion> tag for states, etc.

    I need a example of this ,like what do i put in the "X" when i want the poison state motion to idle on map at poisoned status.. cos atm i dont see the tree in the woods again
    but thx that could avoid a lot of work^^


    and i get AI bugs in "not-mapbattle-mode" but its something with another of my plugins i didnt figured out yet
    ( i tested on demo)..but it happens that the enemys fight each other when there is not much room or whatever (they dont take dmg they just waste actions).. thats why i consider to just use map battle in future if i cant solve that without losing a plugin
    it was a wrong plugin setting
    ..
    and i assume thats normal that the game gets error broke when accidently switching on auto battle?
    (cos of the AI plugin incombatiblety with auto batlle?)
    if thats the case is there a way to hide that funktion in the battle menu?
  3. @Dopan You use the name of a motion you defined in DRQ_EventMotions, the same as the <srpgAttackMotion> and <srpgCastMotion> notetags from skills. Idle motions will play any time another motion is not being played already, and are automatically looped. Idle motions will play even if <noMotions> is set- for example, this is what my psuedo-death state looks like:
    Code:
    <srpgZoC:-100>
    <blockOpponents:false>
    <idleMotion:down>
    <noMotions>
    Where I defined a "down" motion in DRQ_EventMotions that uses the frame of the actor lying on the ground. I also made a similar effect for a "frozen" state, that gave them a sprite of being encased in ice.

    Generally, you should be able to stop enemies from attacking each other if you set <aiFriendRate: 0> in the relevant skills?

    As to auto battle incompatibilities, I'll look into it more- I didn't test auto actors as much as enemies, so I might have missed something.
  4. As to auto battle incompatibilities, I'll look into it more- I didn't test auto actors as much as enemies, so I might have missed something.

    just to be sure that we mean the same thing a few pics in spoiler,i accendently used it when using "turn end"..
    And i didnt used actors with the auto battle flag yet like friendly NPCs ect . thx for the info

    2 pics auto battle error
    AI2bsp.png


    edit
    on the <idleMotion:motion> i made a charakter img for 1 actor with 8 states added and the system gets the right one (the last =sleep) but it uses only 1 of 12 images no animation.. is this normal? or what am i doing wrong? its a nice feature but ill have to make a lot of char images for every actor including monsters if i understand it right
    (for adding visual-states with that function)..
    i allready nearly finished my solution with no monster included..so im not sure about that.


    edit 2
    nevermind i think i solved it .
    (incompatiblety betwen my solution and the plugin).. ill create every abnormal state a second time for enemys and make motions that trigger only for enemystates,while skills trigger both states, enemy and players,and both get immunity to seperate it, that way i can combine my work with the plugin without interfering each other
    edit 1
    Img i used to test it..
    Actor2states.png
  5. @Dopan that was incredibly helpful, thank you!

    Updated SRPG_AIControl to fix a crash with autoBattle, and to handle positioning better when it happens to use a skill on itself that allows multiple targets.
  6. Im not good in making formulas.. is there a Formula for the SRPG_AIControl-Plugin to put in skill notetag for using "cure"? something like: "if a friend- unit has a negative-abnormal status use cure on it,if not dont use cure" similar to the heal notetag i use which get triggert to heal the friend-unit with lowest hp or under 50%
    (everything works fine so far and ill try to test friendly NPCs in Battle soon)
  7. Dopan said:
    Im not good in making formulas.. is there a Formula for the SRPG_AIControl-Plugin to put in skill notetag for using "cure"? something like: "if a friend- unit has a negative-abnormal status use cure on it,if not dont use cure" similar to the heal notetag i use which get triggert to heal the friend-unit with lowest hp or under 50%
    (everything works fine so far and ill try to test friendly NPCs in Battle soon)

    The general way to check for status effects is b.isStateAffected(idNumberOfState). This style looks kind of messy, since you have to check for each state individually. || means "OR" in javascript, so this gives you a score of 1 if you have any of the listed states, and 0 if you have none.
    Code:
    b.isStateAffected(5) || b.isStateAffected(6) || b.isStateAffected(10)

    If you'd like to prioritize an ally with two ailments over an ally with just one, you can replace || with +, at which point you can also make some states higher-priority than others (maybe poison is a bigger problem than sleep?)
    Code:
    b.isStateAffected(5) + b.isStateAffected(6)*2 + b.isStateAffected(10)
    In this case, states 5 and 10 are worth 1 point, and state 6 is worth 2.

    If you're using Yanfly's state categories you can simplify the skills and shorten the formula somewhat:
    • Put <Category: ailment> on all of your ailments- or whatever other category you want, as long as you're consistent.
    • For your cure skill, put <Remove State Category: ailment> to have it remove all "ailment" states without having to list them out.
    • And for a formula, put <aiTarget: b.getStateCategoryAffectedCount('ailment')> to rank targets based on how many ailments they have, and prioritize the person with the most. You could still add bonus points for individual states with + b.isStateAffected(stateId), to prioritize some.
  8. Doktor_Q said:
    The general way to check for status effects is b.isStateAffected(idNumberOfState). This style looks kind of messy, since you have to check for each state individually. || means "OR" in javascript, so this gives you a score of 1 if you have any of the listed states, and 0 if you have none.
    Code:
    b.isStateAffected(5) || b.isStateAffected(6) || b.isStateAffected(10)

    If you'd like to prioritize an ally with two ailments over an ally with just one, you can replace || with +, at which point you can also make some states higher-priority than others (maybe poison is a bigger problem than sleep?)
    Code:
    b.isStateAffected(5) + b.isStateAffected(6)*2 + b.isStateAffected(10)
    In this case, states 5 and 10 are worth 1 point, and state 6 is worth 2.

    If you're using Yanfly's state categories you can simplify the skills and shorten the formula somewhat:
    • Put <Category: ailment> on all of your ailments- or whatever other category you want, as long as you're consistent.
    • For your cure skill, put <Remove State Category: ailment> to have it remove all "ailment" states without having to list them out.
    • And for a formula, put <aiTarget: b.getStateCategoryAffectedCount('ailment')> to rank targets based on how many ailments they have, and prioritize the person with the most. You could still add bonus points for individual states with + b.isStateAffected(stateId), to prioritize some.
    Thx! no i dont have Yanfly's state categories , i use only free plugins,and atm i got 32 AI plugins the SRPG_AIControl included*,as long they work together... But i would preffer to use only the SRPG_AIControl as soon i fully know how to handle it, cos its made for SRPG and i want to avoid incompatiblety bugs.
    Thanks for the quick response and the Formula + Explanation.

    *
    (+YEP_BattleAICore which is set "off" cos i cant really handle it atm and GALV_EnemyAI )
  9. >>AI tested only in "no-mapbattle" so far..without bugs it takes about 15-20 rounds till finished.
    testing AI
    1a.Im testing auto battles betwen enemys and friendly npcs.4_npcs VS 1_Slime (=highHP+high-def/Mdef)
    Im just watching and it seems that if not using YEP_BattleAICore -> the Game Freezes randomly after an Action of an Enemy or NPC-actor..sometimes in Round 1 and sometimes later.

    dark bug.pngTask manager needed to end the Game
    >>I asumed some wrong formulas or AI plugin-incompatibletys and turned all AI-plugins exept SRPG_AIControl "Off".. but still bug happens,only if i set YEP_BattleAICore "On" in addition, it doesnt.

    (i also took all "formula Notetags" out exept the "<aiFriendRate:0>" ,which is a Notetag on every Skill that Makes Dmg or negative
    Status-effects on Enemys=> to avoid enemys fight each other)

    ai setting yep.png
    >>> about YEP_BattleAICore Setting
    it worked with "Default AI Level *100*"
    ( i didnt used any formulas or notags on this Plugin.)

    1b.The Slime has 3 skills: "heal" works fine,but "attack" and "ice" sometimes happen* to attack nobody ,that looks similar to healing with no-one else on battlescreen.
    *(not always, more often it works like it should)

    Screenshot_1.png

    Im also testing some Formulas and would like to know if there is something wrong with the following Formulas:
    (that way i know if a bug happens cos of the formula or cos of anything else in the System)
    testing formulas
    Skill-Notetag-Formulas:
    - <aiTarget: a.mpRate() < 0.2 ?>
    (i want it to Notetag a "Recover MP-skill" on User.Trigger if MP is under 20%) ->doesnt work

    - <aiTarget: !(b.isStateAffected(ID of State which notetaged-Skill will add))>
    (i want it to Trigger the Skill only on Targets that doesnt have the resulting State allready.. like dont use "sleep on sleeping" or dont add this positive State again, with the notetaged-Skill if its still Active.)->Seem to work

    - <aiTarget: a.mp <= 20 ?>
    (it should trigger if User has 20 MP or Less)-> doesnt work


    edit i found out later that the YEP_BattleAICore Setting was wrong. SPRG is not compatible to dynamic actions\turns that has to be "Off" in plugin Settings
  10. @Dopan the first and third formulas are invalid code, and might be causing some errors. The proper format for a ternary operator is condition ? true value : false value and leaving off the latter portion probably won't compile. Also, I would typically suggest checking b.___ instead of a.___ for skills that apply an effect to the target, even if the target is supposed to be the user. It should look something more like this:

    <aiTarget: (b.mpRate() < 0.2) ? 1 : 0>
  11. Doktor_Q said:
    @Dopan the first and third formulas are invalid code, and might be causing some errors. The proper format for a ternary operator is condition ? true value : false value and leaving off the latter portion probably won't compile. Also, I would typically suggest checking b.___ instead of a.___ for skills that apply an effect to the target, even if the target is supposed to be the user. It should look something more like this:

    <aiTarget: (b.mpRate() < 0.2) ? 1 : 0>
    thx! ill try that and yes i dont use code 1 and 3.. only code 2 seem to work.. i just edited the last posting.
  12. Hello, I have a suggestion with plugin compatibility.

    Now SRPG plugin isn't compatible with Yanfly's event spawner.
    It would be useful in variety ways if player can spawn ally character from the library before the battle, with using event spawner plugin. Like pokemon.

    Is it possible to make SRPG plugin compatible with the event spawner?
  13. John_Perry said:
    Hello, I have a suggestion with plugin compatibility.

    Now SRPG plugin isn't compatible with Yanfly's event spawner.
    It would be useful in variety ways if player can spawn ally character from the library before the battle, with using event spawner plugin. Like pokemon.

    Is it possible to make SRPG plugin compatible with the event spawner?

    It already is, and I use them together. You just have to use the script calls for this.addActor(eventId, actorId) or this.addEnemy(eventId, enemyId) to initialize the newly-spawned event yourself. If you try to spawn two events for the same actor, though, it might cause some weird issues, since there's only one actual instance of each actor in the game by default, even without SRPG plugins.

    To get the ID of the event after you spawn it, use $gameMap.LastSpawnedEventID()

    EDIT: Another round of plugin updates!
    • SRPG_RangeControl and SRPG_AoE had minor updates to better support...
    • SRPG_AIControl AI units can center AoEs on empty cells or unaffected targets just like the player, and check whether they will be hit by their own AoE when looking for affected allies.
    • SRPG_MapBattle and SRPG_MapBattle_Motions properly wait for the cursor when starting enemy map skills, so targetAnimations don't look weird.
    • SRPG_StatBasedCounter lets you set a custom counter skill instead of using your normal attack!
  14. Doktor_Q said:
    It already is, and I use them together. You just have to use the script calls for this.addActor(eventId, actorId) or this.addEnemy(eventId, enemyId) to initialize the newly-spawned event yourself. If you try to spawn two events for the same actor, though, it might cause some weird issues, since there's only one actual instance of each actor in the game by default, even without SRPG plugins.

    To get the ID of the event after you spawn it, use $gameMap.LastSpawnedEventID()

    EDIT: Another round of plugin updates!
    • SRPG_RangeControl and SRPG_AoE had minor updates to better support...
    • SRPG_AIControl AI units can center AoEs on empty cells or unaffected targets just like the player, and check whether they will be hit by their own AoE when looking for affected allies.
    • SRPG_MapBattle and SRPG_MapBattle_Motions properly wait for the cursor when starting enemy map skills, so targetAnimations don't look weird.
    • SRPG_StatBasedCounter lets you set a custom counter skill instead of using your normal attack!

    Thanks for your help! I have some more questions.

    First one is about HP bar plugin on map battle.
    Screenshot
    HP BAR.png

    As you can see, The height of HP bar is too big. I've tried to fix this, but I don't even know the reason.
    Is there anyone who have same problem with me?


    And the other issue is a compatibility with SRD SuperToolsEngine plugin.

    screenshot
    SRPG+SRD HUD.png

    Everytime I try to use SRPG plugin with SRD SuperToolsEngine, error above comes out.

    Is there compatibility issue between those plugin?
  15. John_Perry said:
    Thanks for your help! I have some more questions.

    First one is about HP bar plugin on map battle.
    Screenshot
    View attachment 140765

    As you can see, The height of HP bar is too big. I've tried to fix this, but I don't even know the reason.
    Is there anyone who have same problem with me?


    And the other issue is a compatibility with SRD SuperToolsEngine plugin.

    screenshot
    View attachment 140767

    Everytime I try to use SRPG plugin with SRD SuperToolsEngine, error above comes out.

    Is there compatibility issue between those plugin?
    Well i think there must be some other plugin incompatiblety involved. Im using SRD SuperToolsEngine as core for the SRD Statpoint plugin without using any other SRD SuperToolsEngine functions and that works so far..I can only advise to use a SRPG demo and add all your Plugins one by one and in the right order to check where the problem comes from.

    @
    Doktor_Q

    About the Last Plugin update.I cant give a proper bug info yet but im pretty sure the SRPG_AIControl update messed up the auto battle AI.When NPC actors with auto battle flag are fighting vs enemy.Right before the update i finished my AI notetag set-up,cleaned up old formulas so that everything works fine and if i update SRPG_AIControl of the current projekt version,several AI notetags dont work anymore like they supossed to, and both kind of AI units start to act "stupid".
    (for example: 2 auto-actors cast "cure" several times on one of them even if he has no negative status -what shouldnt happen and didnt happen without the update).
    Using the old SRPG_AIControl solves the problem for me.Pls tell me if any spezific information needed,cos i dont know where to start and want to avoid large text if useless.
    Cure info just incase :
    "cure" notetag info
    <aiTarget: (b.isStateAffected(23) || b.isStateAffected(24) || b.isStateAffected(25) || b.isStateAffected(26) || b.isStateAffected(27) || b.isStateAffected(28) || b.isStateAffected(29) || b.isStateAffected(30)) ? 100000 : 0>

    (This supposed to only trigger if one of the states are affected and if "true" it has a huge Score of "100000" to add high priority)-> and that worked fine without the update
  16. @Dopan Just checked, and it looks like as I was saving the plugin to upload I had accidentally deleted a single ), which caused the plugin to not load correctly. When you run into these kinds of odd behavior, it's helpful to hit F8 and look at the console- it will show you errors such as specific plugins not being able to load.

    I've updated the Github version to not be broken anymore.
  17. When I use SRPG_AIControl plugin, After Turn End, occured this error
    sadsadasd.png
    What should i do??
  18. dlwjdvud123 said:
    When I use SRPG_AIControl plugin, After Turn End, occured this error
    View attachment 140943
    What should i do??

    Generic solution: Press F8 to open the console, and take a screenshot of the error text. That will give way more information to work from.

    Specifically, though, check your Target formula. If you see "value" in the formula, remove it, as that is not a value you can use in the current AI core. It was defined in a much older version, but has since been removed because it didn't work.
  19. Sorry for the intrusion, new member here!
    I L O V E this script, but is there a way to change or turn off the music "Battle_1" during the combat sequence?

    Each and every time you hear the same music and is driving me insane.
  20. Doktor_Q said:
    Generic solution: Press F8 to open the console, and take a screenshot of the error text. That will give way more information to work from.

    Specifically, though, check your Target formula. If you see "value" in the formula, remove it, as that is not a value you can use in the current AI core. It was defined in a much older version, but has since been removed because it didn't work.
    1221.png

    This is error text. I don't know what is this text meaning T.T