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

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 46 of 166 View original ↗
  1. Doktor_Q said:
    Not currently. I tried a few times to make a plugin for it, but it always ends up incompatible with everything else related to range, targeting, an AI, so I wouldn't hold by breath for that as a feature. Too much of the code assumes that 1 tile = 1 unit.
    Yeah, and the system where that was being planned for such a thing, (lecode) had the creator drop off before such a thing was implemented.
  2. @MetalKing11417

    In my main project i used Units which are bigger than usual,but they still use 1 tile.
    I also got no Idea how using more than 1 tile for 1 unit should work, in order to calculate Distances for Example..
    Image with bigger Units
    Screenshot_1.png
    -----------------------
    Edit @ All
    i recognized a problem in a few of my Plugins,because they didnt check if any Unit is Dead before using the Effect.
    To do this i found out that the easiest was to chek if a Unit is Dead, is simply using this Code:
    Code:
    $gameSystem.EventToUnit(eventID)[1].isDead();
    //to check if Unit is Dead ..or
    !$gameSystem.EventToUnit(eventID)[1].isDead();
    // to check if Unit is NOT Dead (=alive)
    This way its not needed to ask for "isStateAffected" or ask about which deathState is used ect..

    -> i had to Edit SRPG_Aura.js & SRPG_UnitGroups.js & SRPG_MapForceAction.js to fix this.
    i also changed a few ScriptCall names from SRPG_UnitGroups.js in order to make more sence ..Example:
    before edit =>this.allAxCheckAddSkillState
    after edit => this.allAxCheckSkillAddState
    (this Scriptcall Checks if a Unit has a Skill and adds a State)
    ->
    and i changed , that if u use "gainHp" with "PassiveAOE" or with "Aura",there will be"DmgPopUp-numbers" (SRPG_Aura.js)
    ->"DmgPopUp-numbers" is also added to SRPG_UnitGroups.js
    if using a Scriptcall that uses "gainHp"..
    => no other Changes in the Updated-SRPG_Demo only the Fixed Plugins are replaced

    => there are still Issues in the Experimental Plugin SRPG_MapForceAction.js which i couldnt figure out yet..
    => Links in Signature Spoiler are updated
  3. I'm pretty new at this but how do I end the battle (victory condition) once any actor has reached a specified location?
  4. Kuroida said:
    I'm pretty new at this but how do I end the battle (victory condition) once any actor has reached a specified location?
    There are two ways to do that- first you can copy a treasure chest trigger, remove all the pages but the first and then use the Plugin command "SRPGBattle End", or you can use the post action map event and script "this.fromActorMinimumDistance(variable num, Event ID);" and then if {variable num} <= (distance from event) as shown in devil castle 1f (the final battle in the demo) and then use the Plugin command "SRPGBattle End".
  5. MetalKing11417 said:
    There are two ways to do that- first you can copy a treasure chest trigger, remove all the pages but the first and then use the Plugin command "SRPGBattle End", or you can use the post action map event and script "this.fromActorMinimumDistance(variable num, Event ID);" and then if {variable num} <= (distance from event) as shown in devil castle 1f (the final battle in the demo) and then use the Plugin command "SRPGBattle End".

    Hey thanks for this. The treasure chest trigger is much simpler than what I was doing but I think my problem is that the SRPGBattle End command is crashing for me (cannot read property image of undefined). Not sure why because I copy pasted it to a different page in the same project and it worked.. any ideas? Can you not have other events on the battle page?
  6. Kuroida said:
    (...) the SRPGBattle End command is crashing for me (cannot read property image of undefined). Not sure why because I copy pasted it to a different page in the same project and it worked.. any ideas?(...)
    @Kuroida
    you probably made a wrong Setup.
    "(cannot read property image of undefined)."
    -> sry but i cant tell what the problem is, u have to use F8 to see more informations,also Screenshots could be helpfull to figure it out ..
    --------------------------------------------------------------
    Edit 2 @ All
    Links in the Signature Spoiler are Updated:
    -edited SRPG_MapForceAction.js (more info here)
    -added minimum Setup for SRPG_MapForceAction.js:
    ->added 2 common events and a Skill to the Updated-SRPG_Demo

    -fixed SRPG_UnitGroups.js
    (in order to only erase Events if they are not allready erased)

    => About "forceAction":
    In SRPG "forceAction" works only in SV mode like explained here #891.
    The Plugin SRPG_MapForceAction.js does something similar for Mapbattle"true" battles, with the Help of 3 ScriptCalls:
    3 Scriptcalls
    Code:
    "this.isMapForceAction(userId, targetId, skillId, payCost);"
    will forceAction on Map if no other action is currently happen
    (can not be used in Custom Ex skillNotetags!)

    Code:
    "this.isMapForceActionNote(userId, targetId, skillId, payCost);"
    will add a Note to forceAction on another Action that happens
    (can be used in Custom Ex skillNotetags!)

    Code:
    "this.isCreateMapForceAction();"
    this is needed to make sure that the Plugin makes the first action..(at BattleMapStart)
    .. its a self action of the last unit,which does nothing.
    But its the only walkaround i could find in order to make the plugin work correctly
    .
    Example for SRPG_MapForceAction.js in the Updated-SRPG_Demo:
    The default map, from chucks maps (Map 0),
    has some test functions added to the Girl next to chuck,and there is a Minimum Setup in 2 Common events.
    -> if u need help using this plugin pls ask.

    Edit 3
    For reasons which i dont understand, the SRPG_MapForceAction.js Plugin, needs to make the first action at BattleStart in order to make the Plugin-Scriptcalls work properly. Thats what this Scriptcall is made for:
    Code:
    "this.isCreateMapForceAction();"
    -> if anybody figures out why this has to happen and how i can solve this with other ways, pls let me know !
    (this has to happen 1 time. every time the game is opened, it will last till the game is closed and gets new started)
  7. Any ideas for a way to have neutral units or enemies who will attack other enemies?
  8. Grilled Mormons said:
    Any ideas for a way to have neutral units or enemies who will attack other enemies?

    Making enemies who will attack each other can be done using SRPG_AIControl and SRPG_PositionEffects, by giving them skills with <anyTarget> and not setting the AI to ignore or avoid allies with their skills. It might be easiest to model the neutral units as actors set to auto-battle instead of enemies- that way enemies will fight them by default, and the player can choose to fight them, since all their skills are set to target whoever.

    The downside of this approach is that it devolves into a free-for all rather than a team battle- the plugin is built around RPGMaker's standard two teams: The actors in the player's party, and the enemies you encounter. Faking a third faction will involve quite a bit of scripting or eventing, probably.

    Some other thoughts: Assigning each team a specific "state", and having the AI check if the characters have matching states to decide if they should target them with their anyTarget moves? Could get complicated quickly.

    [EDIT]
    After sleeping on it, I realized a way to address neutral entities, pseudo-death states, and an easy way to make battles with specific "VIP" units to protect / kill. A new plugin, SRPG_Teams.

    In short, it lets you tag a battler (via actor, class, enemy, or state) as part of a "team." This doesn't do anything by itself, but the plugin allows you to get the character's team, check if two battlers are on the same team (for use in AI and damage formulas), and count the remaining members of a team (for win/lose conditions).

    For example, I can set my win condition to $gameSystem.isTeamDead("enemy"), so I win when everyone on the "enemy" team is dead. If make an immobile, destructible gate as enemy with the <srpgTeam:environment> tag, they're no longer part of the "enemy" team, so the battle can end even if they haven't been defeated yet.

    Similarly, if I set my lose condition to $gameSystem.isTeamDead("actor"), I get a game over when everyone on the "actor" team is dead. But I can also tag non-essential NPCs with <srpgTeam:ally>, marking them as a different team, so them being alive won't stop me from getting a game over. I can also make a pseudo-death state by giving the state an <srpgTeam:dead> tag, so that actors in a psuedo-death state won't count as part of the living "actor" team to stop a game over.
  9. Doktor_Q said:
    Making enemies who will attack each other can be done using SRPG_AIControl and SRPG_PositionEffects, by giving them skills with <anyTarget> and not setting the AI to ignore or avoid allies with their skills. It might be easiest to model the neutral units as actors set to auto-battle instead of enemies- that way enemies will fight them by default, and the player can choose to fight them, since all their skills are set to target whoever.

    The downside of this approach is that it devolves into a free-for all rather than a team battle- the plugin is built around RPGMaker's standard two teams: The actors in the player's party, and the enemies you encounter. Faking a third faction will involve quite a bit of scripting or eventing, probably.

    Some other thoughts: Assigning each team a specific "state", and having the AI check if the characters have matching states to decide if they should target them with their anyTarget moves? Could get complicated quickly.

    [EDIT]
    After sleeping on it, I realized a way to address neutral entities, pseudo-death states, and an easy way to make battles with specific "VIP" units to protect / kill. A new plugin, SRPG_Teams.

    In short, it lets you tag a battler (via actor, class, enemy, or state) as part of a "team." This doesn't do anything by itself, but the plugin allows you to get the character's team, check if two battlers are on the same team (for use in AI and damage formulas), and count the remaining members of a team (for win/lose conditions).

    For example, I can set my win condition to $gameSystem.isTeamDead("enemy"), so I win when everyone on the "enemy" team is dead. If make an immobile, destructible gate as enemy with the <srpgTeam:environment> tag, they're no longer part of the "enemy" team, so the battle can end even if they haven't been defeated yet.

    Similarly, if I set my lose condition to $gameSystem.isTeamDead("actor"), I get a game over when everyone on the "actor" team is dead. But I can also tag non-essential NPCs with <srpgTeam:ally>, marking them as a different team, so them being alive won't stop me from getting a game over. I can also make a pseudo-death state by giving the state an <srpgTeam:dead> tag, so that actors in a psuedo-death state won't count as part of the living "actor" team to stop a game over.
    I didnt tested the new Plugin yet,but i looked into the JS code and i asume that the new plugin SRPG_Teams , should be compatible with the Updated-SRPG_Demo. As far i understand it the Plugin checks the Meta data of the Units and provides some extra Scriptcalls/NoteTags for team usage.
    In the Past ,i mostly used the State-Setup in order to let Units attack "friends"(=Confusion) or "all other units"(Enrage).
    But this new plugin can probably make things easier,its a good Idea! Perhaps i will try to edit some of my plugins later,like "SRPG_Unitgroups.js"&"SRPG_Aura" for example, in order to also work for specific teams only.
    I am still stucked on trying to Fix the last Issue (=loading data Issue) on SRPG_MapForceAction.js ,but i will take some Time to add SRPG_Teams.js to the Updated-SRPG_Demo. I will also test if they are some Compatiblety Issues with other Plugins ,but i dont think there should be any Problems.
    => When i add this Plugin to the demo under "functional" is there any preffered place where it has to be or should i just place it at the end of the "functional" Plugins?
    (in the PluginManager)


    About my SRPG_MapForceAction.js Issue:
    - The only new thing,i found out is,that if the plugin does the "first action on Map",than this "dataInput" will last till the game is Closed and Opened again.
    That means till then, the plugin will work correctly,but as soon the Game was Closed and Opened again,it is needed to make another "first action on Map" with a Plugin Scripcall, in order to make the "dataInput" again and in order to make the Plugin work correctly.
    If this "dataInput" doesnt happen atFirst all kind of weard Stuff can happen when using the Plugin Scriptcalls later,things like "no action triggered" or "multiple extra actions added" ect ..
    It depends on how much other "normal" Actions happen before and if the Actions are Mapbattle"true" or Mapbattle"false".
    Any idea how i could do that "dataInput" without triggerring an Action(with a Plugin Scripcall) could be helpfull.

    (there are still a lot of Things on JS which i dont understand..)
  10. @Dopan @Doktor_Q

    How does this plugin's AI handle targeting? It seems they just swarm whoever Actor 1 happens to be and will only seek other targets if they can't attack Actor 1. I've tried this multiple times and gotten the same result. Make a character Atcor 1 and the enemy will swarm them no matter what their stats and no matter what their TRG rating is.

    Is there any way to alter or tweak this behavior?
  11. @Dopan @Doktor_Q

    Nevermind, the key to my problems was in my last post. I was modifying "TRG" instead of "TGR". Modifying TGR causes the AI to prefer actors with higher TGR. I guess Actor 1 is a default choice if all TGR is equal.
  12. @theredglove SRPG_AIControl allows you to write a formula to "score" targets, and the AI will always go after the highest-scoring target. TGR (target rate) is a multiplier on top of that value, so someone with a 200% TGR will have their scores doubled. If a target scores 0 or less, it won't be chosen, but might still be caught in an AoE if there are other, higher-scoring targets nearby. In addition to the default formula, you can specify different targeting formulas for each unit or skill.

    And to clarify, they don't default to targeting Actor 1 specifically- if two or more targets have identical scores, the AI goes after the lowest Event ID. This shouldn't be too noticeable if you're making using the formulas, though- things like going after the closest target, or the one with the least defense, or the one with the most HP, or the one they can hit from the furthest range (that last one is good for ranged attackers, since it makes them keep their distance while attacking).
  13. @Doktor_Q

    Thanks for the explanation! I didn't realize that plugin had so much functionality. I was using Yanfly's Special Parameter Formula plugin to modify TGR based on the user's def value.

    If I'm reading the explanations in the plugin right, it shouldn't cause any conflict since SRPG_AIControl is using its formula criteria in addition to TGR, correct?
  14. theredglove said:
    @Doktor_Q

    Thanks for the explanation! I didn't realize that plugin had so much functionality. I was using Yanfly's Special Parameter Formula plugin to modify TGR based on the user's def value.

    If I'm reading the explanations in the plugin right, it shouldn't cause any conflict since SRPG_AIControl is using its formula criteria in addition to TGR, correct?

    There should not be any conflicts, since Special Params Formula should just be modifying how the SP Params are calculated, and SRPG_AIControl is simply using whatever calculated value is provided to it. However, using both a formula that changes how TGR works and an AI formula could be more confusing for you as the developer, since it means there's now two places you have to look to figure out why something behaves a certain way, and its harder to make things with unique behaviors. For example, an "assassin" enemy who specifically targets units with lower defense, and a "sniper" who shoots armor-piercing arrows at the highest defense unit.

    Most of the SRPG plugins should have a fairly detailed help text explaining how to use their features, and I also try to include examples of more advanced uses, especially in the newer plugins I make.
  15. Hello @Dopan @Doktor_Q I really liked the mapbattle plugin and it worked really good for me, except that I'm wondering if there is any way to show skill use message on the map? Right now there is only damage and heal values. Thank you so much!
  16. bubblekong said:
    Hello @Dopan @Doktor_Q I really liked the mapbattle plugin and it worked really good for me, except that I'm wondering if there is any way to show skill use message on the map? Right now there is only damage and heal values. Thank you so much!

    Currently no, as the message window is very heavily integrated with the actual battle processing, so I can't just copy it straight from the battle scene to the map like I did for damage popups.

    If you want, you could fake it using a script call inside a <custom execution> tag that shows a text box containing a message, with no background, positioned at the top of the screen, and use the text code to wait for a specified period at the end before auto-advancing and closing.
    The script calls in question:
    Code:
    $gameMessage.setFaceImage("", 0); // make sure there's no leftover actor face
    $gameMessage.setBackground(2); // 0 = normal, 1 = dim, 2 = none
    $gameMessage.setPositionType(0); // 0 = top, 1 = middle, 2 = bottom
    $gameMessage.add("your text here, end with text codes");

    The relevant text codes, which you can find by hovering your mouse over the normal "show message" text field for a few seconds:
    \. waits for 0.25 seconds
    \| waits for 1 second
    \^ will make the window close automatically if placed at the end
  17. bubblekong said:
    Hello @Dopan @Doktor_Q I really liked the mapbattle plugin and it worked really good for me, except that I'm wondering if there is any way to show skill use message on the map? Right now there is only damage and heal values. Thank you so much!

    Doktor_Q said:
    Currently no, as the message window is very heavily integrated with the actual battle processing, so I can't just copy it straight from the battle scene to the map like I did for damage popups.

    If you want, you could fake it using a script call inside a <custom execution> tag that shows a text box containing a message, with no background, positioned at the top of the screen, and use the text code to wait for a specified period at the end before auto-advancing and closing.
    The script calls in question:
    Code:
    $gameMessage.setFaceImage("", 0); // make sure there's no leftover actor face
    $gameMessage.setBackground(2); // 0 = normal, 1 = dim, 2 = none
    $gameMessage.setPositionType(0); // 0 = top, 1 = middle, 2 = bottom
    $gameMessage.add("your text here, end with text codes");

    The relevant text codes, which you can find by hovering your mouse over the normal "show message" text field for a few seconds:
    \. waits for 0.25 seconds
    \| waits for 1 second
    \^ will make the window close automatically if placed at the end
    @ bubblekong
    Clarification:
    .. ,like Doktor_Q explained you have to do something similar like the "show-Message" from "Player Phase -Message" does ,in order to let the Message dissapear after some time from alone.This "Message input" has to happen with Custom Ex Skill-noteTag because its the only way to act before the Dmg is dealed.
    With Custom Ex you need to use JS code ,which Doktor_Q showed in his answer.. in order to use a "$gameMessage".
    You could also activate a Common Event with Custom Ex in order to use the "show-Message" -Event Command in the Common Event instead of JS code, but that would use a lot of Common Events if you do this for every Skill^^
    Here some Screenshoots for better understanding:
    imgs example
    Screenshot_2.png
    Screenshot_1.png
    about the 2nd spoiler img:
    Sry but my sytem uses German.This text window that appairs,when you hovering your mouse over "Text",will be written in the Language your system uses..

    I didnt used such a walkaround in the Updated-SRPG_Demo, instead i tried to use Animations that show clearly what skill is used.
  18. Doktor_Q said:
    Currently no, as the message window is very heavily integrated with the actual battle processing, so I can't just copy it straight from the battle scene to the map like I did for damage popups.

    If you want, you could fake it using a script call inside a <custom execution> tag that shows a text box containing a message, with no background, positioned at the top of the screen, and use the text code to wait for a specified period at the end before auto-advancing and closing.
    The script calls in question:
    Code:
    $gameMessage.setFaceImage("", 0); // make sure there's no leftover actor face
    $gameMessage.setBackground(2); // 0 = normal, 1 = dim, 2 = none
    $gameMessage.setPositionType(0); // 0 = top, 1 = middle, 2 = bottom
    $gameMessage.add("your text here, end with text codes");

    The relevant text codes, which you can find by hovering your mouse over the normal "show message" text field for a few seconds:
    \. waits for 0.25 seconds
    \| waits for 1 second
    \^ will make the window close automatically if placed at the end
    Dopan said:
    @ bubblekong
    Clarification:
    .. ,like Doktor_Q explained you have to do something similar like the "show-Message" from "Player Phase -Message" does ,in order to let the Message dissapear after some time from alone.This "Message input" has to happen with Custom Ex Skill-noteTag because its the only way to act before the Dmg is dealed.
    With Custom Ex you need to use JS code ,which Doktor_Q showed in his answer.. in order to use a "$gameMessage".
    You could also activate a Common Event with Custom Ex in order to use the "show-Message" -Event Command in the Common Event instead of JS code, but that would use a lot of Common Events if you do this for every Skill^^
    Here some Screenshoots for better understanding:
    imgs example
    View attachment 160108
    View attachment 160110
    about the 2nd spoiler img:
    Sry but my sytem uses German.This text window that appairs,when you hovering your mouse over "Text",will be written in the Language your system uses..

    I didnt used such a walkaround in the Updated-SRPG_Demo, instead i tried to use Animations that show clearly what skill is used.

    Thank you so much for the reply, I will try to work around it.
    Also, I just want to say that I really appreciate the work you have done, thanks again!
  19. @Doktor_Q
    about the " show skill use message on the map "-Issue:

    edit

    -> nevermind i solved it with a better way.. ill add the new solution into the next Demo Update
    Example video

    This will work with every MapBattle"true"-Skill and the "message" will be controlled within a single common event for all skills.That way the EventCommand "show message" will be used,in order to make it easier to edit the Message Style ..
    (color, size, duration, position,.. ect)
    To do that i added an extra function into SRPG_MapForceAction.js :
    2 GameVariables + 1 CommonEvent + 1 GameSwitch will be needed for the whole Setup.
    I also had to edit SRPG_Mapbattle.js ,but its only 1 small line which is added to connect with SRPG_MapForceAction.js, in order to avoid editing more into SRPG_Mapbattle.js .
    (this edit was needed for the right timing)
    Screenshot_1.png
    -----------
    -----------
    @ All
    About the Updated-SRPG_Demo and the next update including SRPG_Teams.js..

    Im a bit busy these days and want to finish several things before i make the next update ,so this will take more time,sry.
  20. @ All
    sorry for double posting! (its to make sure this bug-report will be recognized)

    @ Doktor_Q
    while testing your new Plugin SRPG_Teams.js (<-oldLink) and working on adding Team-Usage to 2 of my Plugins (SRPG_Aura.js & SRPG_UnitGroups.js ) ,i found a bug.

    Here some Images to show it , i tried to fix it (seems to work) ,but im not sure if my fix was correctly.Please take a look yourself.
    Bug info Images
    "F8 bug report"
    Screenshot_1.png
    "edit to fix it" added ")"
    Screenshot_2.png
    "Original Plugin"
    Screenshot_3.png
    The last image is the "Original Plugin" the other Images are "F8 bug report" and my "edit to fix it".. Im not sure if i put the ")" at the right Place but i hope so^^