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

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 97 of 166 View original ↗
  1. moldy said:
    Thanks a lot, Shoukang, I really appreciate it.

    Demo
    Well...After a lot of tests, I find the 1.34 core version added this Game_BattlerBase.prototype.isTargetInRange, Which caused the problem. Just delete everything in this function and add return true should make it work... Actually, this check will make any skills for friends impossible... I would suggest using the 1.32 version instead, it's what I'm using and I don't think 1.34 made any big updates.

    agi attack+ has been active this whole time (even though I turned it off in the plugin parameter) and thought it was triggering counter attack anyway.
    Do you mean counter-attack happens regardless of <srpgCounter:false> tag? This bug is caused by my AoE animation plugin and I just fixed it.
  2. Shoukang said:
    Well...After a lot of tests, I find the 1.34 core version added this Game_BattlerBase.prototype.isTargetInRange, Which caused the problem. Just delete everything in this function and add return true should make it work... Actually, this check will make any skills for friends impossible... I would suggest using the 1.32 version instead, it's what I'm using and I don't think 1.34 made any big updates.


    Do you mean counter-attack happens regardless of <srpgCounter:false> tag? This bug is caused by my AoE animation plugin and I just fixed it.

    Shoukang you are effing amazing. Everything works perfectly now. Charmed enemies now FINALLY use basic attack on enemies and reliably heal my allies using purely AiControl formulas now. Yay!
  3. First off, Shoukang, thanks for keeping this great project alive.

    Second: is there a way to have a switch or variable or something determine who took an action? For example, if a hero or an npc steps on a switch? Or an cursed chest that poisons whoever opens it? (That might be in there already, and I just missed it).

    3rd: If you're planning to update at some point, could the next mod add back some of the battle command mods that Dopan had in; specifically, being able to turn on / off battle commands, like the Item menu. (If can be used to interact with the Galv Equip items / pockets, even better, but that's just an added bonus.)
  4. 3Eyedcowboy said:
    First off, Shoukang, thanks for keeping this great project alive.

    Second: is there a way to have a switch or variable or something determine who took an action? For example, if a hero or an npc steps on a switch? Or an cursed chest that poisons whoever opens it? (That might be in there already, and I just missed it).

    3rd: If you're planning to update at some point, could the next mod add back some of the battle command mods that Dopan had in; specifically, being able to turn on / off battle commands, like the Item menu. (If can be used to interact with the Galv Equip items / pockets, even better, but that's just an added bonus.)

    About 2nd:
    you can access the Unit by: $gameSystem.EventToUnit(eventID)[1];
    and the active event by:
    $gameTemp.activeEvent().eventId();
    so "active unit" would be:
    $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1];
    (more scriptCall infos can be found on my github ->)ScriptCallList_SRPG.js
    so aslong your evented code action chain from the chest or whatever happens before the "after action event" triggers & before the "active Unit" changes..
    this should do the job

    About 3rd:

    sadly we dont have much influence on how the original srpg core gets updated in the future..
    Thats why i already had to edit 3 Srpgcore Versions with the same changes ^^
    So you can use any Srpgcore which can be found on my Github.
    (or you can pick only the edit which you want and replicate it in your Srpgcore)
    -> the "battle command edit" is pretty easy it requires only a few Plugin Variables added in the plugin param, and to edit the function that creates the commands..
    -> all my edits are marked with "// dopan edit info")
  5. About the error I mentioned in the previous message, it occurs every time an actor / enemy attacks the same target for the second time. How to use mapbattle, I imagine it is an error to find the event ID, but I don't understand until now the reason for not getting this information.

    @Dopan - Your code about poison damage work, but don't show the damage popup for some reason. I realized later that it only does damage before the turn ends, but doesn't focus the camera on the affected actor/enemy, so I just implemented it to do that. The problem is just showing the damage, unfortunately I don't know why, because I did exactly as you asked.

    I've modified the plugin I mentioned earlier to work perfectly in SRPG, I'm going to look for the creator to see if he authorizes me to post here, it might be useful for other people.
  6. Forgive the newbie question, I don't have a lot of experience using Java with Rpg maker:

    If I want to use the following script, how I implement it?

    $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1];

    Your plugin guide mentions, "getting a return," but is that stored as a variable?

    For example, let's say opening a chest (event 31) activated a common event that gave an equipment item (item 4) to the actor or event that opened it, and equipped it. / or, if it's easier, gave a state (18).

    1636069931941.png

    Would I use the java tool like the above? Would I fill in the parentheses for the chest / event? or add a variable to store the actor id with?

    dopan said:

    About 2nd:
    you can access the Unit by: $gameSystem.EventToUnit(eventID)[1];
    and the active event by:
    $gameTemp.activeEvent().eventId();
    so "active unit" would be:
    $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1];
    (more scriptCall infos can be found on my github ->)ScriptCallList_SRPG.js
    so aslong your evented code action chain from the chest or whatever happens before the "after action event" triggers & before the "active Unit" changes..
    this should do the job

    About 3rd:

    sadly we dont have much influence on how the original srpg core gets updated in the future..
    Thats why i already had to edit 3 Srpgcore Versions with the same changes ^^
    So you can use any Srpgcore which can be found on my Github.
    (or you can pick only the edit which you want and replicate it in your Srpgcore)
    -> the "battle command edit" is pretty easy it requires only a few Plugin Variables added in the plugin param, and to edit the function that creates the commands..
    -> all my edits are marked with "// dopan edit info")
  7. Adra said:
    About the error I mentioned in the previous message, it occurs every time an actor / enemy attacks the same target for the second time. How to use mapbattle, I imagine it is an error to find the event ID, but I don't understand until now the reason for not getting this information.

    @Dopan - Your code about poison damage work, but don't show the damage popup for some reason. I realized later that it only does damage before the turn ends, but doesn't focus the camera on the affected actor/enemy, so I just implemented it to do that. The problem is just showing the damage, unfortunately I don't know why, because I did exactly as you asked.

    I've modified the plugin I mentioned earlier to work perfectly in SRPG, I'm going to look for the creator to see if he authorizes me to post here, it might be useful for other people.

    I made a common event that does the "focus the camera on units who take DoT damage/or doomed" if you still wanna see it. I had to convert dopan's code to event commands because for some reason RPG maker script calls don't work very well when you wanna move the camera and wait for an animation to be done on multiple units (I had the same issue where it would perform the task properly on the first unit who was poisoned and then forget about the rest). I can share it, but a lot of the code is snipped off from the extremely tiny database editor window. If anyone can show me how to expand the box to see the whole thing, I'd be happy to share the screenshot.
  8. If people are willing to offer their help, I'll spoil my current project. I've tried to make it work, but keep hitting a brickwall:

    I'm hoping to use the SRPG system to implement a tactics game with a sports / ball element, much like Blood Bowl.

    Preferably, it would:
    1. have a way of keeping track of which event has the ball
    2. grant the ball holder 1-2 extra skills (ex. hand off, throw) to pass it to others; alternatively, to restrict those actions to everyone who doesn't have it.
    3. allow triggers when someone with ball reaches a specific spot.

    I've tried to implement it several ways, but it gets tricky:


    1. treat it as a state (con: how to have someone gain the state; also, all my attempts to make them lose the state which SHOULD work seem to fail)'

    2. treat as an item (downside -doesn't work without solo items; adding skills?)

    3. treat as an equipment that grants a state and/or skills (con: hard to create event to remove equipment from user; able to steal?)

    Any advice?
  9. moldy said:
    RPG maker script calls don't work very well when you wanna move the camera and wait for an animation to be done on multiple units
    Wait for several frames between each this.playermoveto script call should solve this issue. But I'm not sure how to do this in a plugin.
  10. @3Eyedcowboy
    $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1];
    is the active battler and can only do what battler can do..
    btw a state can be added to a battler,its on of the examples from my scriptcallList.. which is NOT a plugin i only put it into a plugin to have the JS shown better and to store it on github.

    Getting items is a group thing aslong you didnt implement individual item storage.. equiping items/weapons/armor is a thing for single actors..
    sry that i cant get into all your question and i already missed to answer a few others aswell

    About moving cursor: this info is in the srpg core help
    (for that you need the xy data from the unit event where it should move)
    Screenshot_1.png
    example:
    this.playerMoveTo($gameMap.event(eventID).x, $gameMap.event(eventID).y);


    @Adra
    -> for dmg pop ups try
    $gameSystem.EventToUnit(eventID)[1].startDamagePopup();


    ----------- @ ALL
    after i Finished the plugin on which i am working , i will try to get into more detailled answers sry
    (some answers would require more time to investigate)
  11. Shoukang said:
    Wait for several frames between each this.playermoveto script call should solve this issue.
    This is the code I tried to use, but it did everything at once instead of waiting for animations/popups on one enemy and moving onto the next:

    Code:
    for (var i = 1; i <= $gameMap.events().length; i++) {
    var battleunit = $gameSystem.EventToUnit([i]);
    var eventunit = $gameMap.event([i]);
    if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {
    if (battleunit[1].isStateAffected(23)) {
    this.playerMoveTo($gameMap.event(i).x, $gameMap.event(i).y);
    $gameMap._interpreter.wait(60);
    $gameMap.event(i).requestAnimation(59);
    $gameMap._interpreter.wait(60);
    battleunit[1].gainHp(-20);
    battleunit[1].startDamagePopup();
    } } };
  12. moldy said:
    This is the code I tried to use, but it did everything at once instead of waiting for animations/popups on one enemy and moving onto the next:

    Code:
    for (var i = 1; i <= $gameMap.events().length; i++) {
    var battleunit = $gameSystem.EventToUnit([i]);
    var eventunit = $gameMap.event([i]);
    if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {
    if (battleunit[1].isStateAffected(23)) {
    this.playerMoveTo($gameMap.event(i).x, $gameMap.event(i).y);
    $gameMap._interpreter.wait(60);
    $gameMap.event(i).requestAnimation(59);
    $gameMap._interpreter.wait(60);
    battleunit[1].gainHp(-20);
    battleunit[1].startDamagePopup();
    } } };
    1. you can replace "$gameMap.event(i)" with "eventunit" in that context: example:
    eventunit.requestAnimation(59);
    because its the variable from above: var eventunit = $gameMap.event(i);

    2. adding "wait" stuff into script is a bit more complicated..
    its probably easier to use smaller code parts in Eventing,
    and add eventing wait command between the scripts..
    -> or if you wanna try to "wait" with script code, look in forum ..
    i had my problems with that aswell sry.. its possible but not easy
    HELP | How set a Wait using JS
    -----
    edited last post because of some mistakes#1,930


    edit2
    @Adra
    You dont need the "bob plugin", if you have my edited srpg core version, which lets you controll all SRPGbattlecommands with switches..
    but that would need to find the right timing or trigger for enabling/disabling the BattleCommands
    (about the error: at the moment i got no idea sry)
  13. Anyone know how to adjust the hit rate in the prediction window to take DirectionMod into account? I tried this, but no results

    Code:
    Window_SrpgPrediction.prototype.drawSrpgBattleHit = function(hit, eva, x, y) {
            var val = 1.0 * hit * (1.0 - eva);
            if ($gameTemp.getAttackDirection() == 'back') { // delete this if it breaks
            val = (1.0 * hit * (1.0 - eva))*1.4; // 1.4 is hit modifier if attacking from behind
            }
            this.changeTextColor(this.systemColor());
            this.drawText(TextManager.param(8), x, y, 98);
            this.resetTextColor();
            this.drawText(Math.floor(val * 100) + '%', x + 64, y, 64, 'right');
        };
  14. moldy said:
    Anyone know how to adjust the hit rate in the prediction window to take DirectionMod into account? I tried this, but no results
    Direction is not set until you do the attack, because of... bad design. Refer to Scene_Map.prototype.prebattleSetDirection to see how it determines direction.(though, I think the logic there is very redundant...), modify and paste in the drawSrpgBattleHit function.
  15. Shoukang said:
    Direction is not set until you do the attack, because of... bad design. Refer to Scene_Map.prototype.prebattleSetDirection to see how it determines direction.(though, I think the logic there is very redundant...), modify and paste in the drawSrpgBattleHit function.

    I had a sneaking suspicion this was the issue. I tried so many codes and nothing worked, it was driving me crazy. I had a question about your summon plugin, I noticed when my summoner dies, his summons remain on the field.
  16. moldy said:
    I noticed when my summoner dies, his summons remain on the field.
    I don't think it's necessary, so I didn't implement it.

    @All
    I updated my signature to include more resources and tips for SRPG. I think it is worth the time to read through these tips,
    especially the 'how to debug' part. I think it will be helpful to those struggling with plugins and other coding issues.
  17. Shoukang said:
    I don't think it's necessary, so I didn't implement it.

    @All
    I updated my signature to include more resources and tips for SRPG. I think it is worth the time to read through these tips,
    especially the 'how to debug' part. I think it will be helpful to those struggling with plugins and other coding issues.

    Fair enough! I made a state note tag using Yanfly BuffsCore/Passive to simulate this effect and it works well, if anyone is still interested:

    Code:
    <Custom Respond Effect>
    if (target.hp <= 0) {
    for (var i = 1; i <= $gameMap.events().length; i++) {
    var battleunit = $gameSystem.EventToUnit([i]);
    var eventunit = $gameMap.event([i]);
    if (battleunit && eventunit && (battleunit[0] === 'actor') && (!battleunit[1].isDead())) {
    if (battleunit[1].isStateAffected(61)) { //Give summoned entity passive state 61 or whatever number you choose
    battleunit[1].setHp(0);
    battleunit[1].performCollapse();
    $gameMap.eraseEvent(i);
    } } }
    }
    </Custom Respond Effect>

    And if you don't have access to Yanfly things, it should work as a scriptcall in the <after action> srpg event box. Can replace "target.hp <=0" with "$gameActors.actor(enterSummonerActorIdHere).isDead()"
  18. Yew Bowman said:
    Alright, I have other aesthetic thing that I want to do.
    View attachment 205728
    how I do get rid of this stats window, so it doesn't show up when I click on an actor?
    I also want to know if it's replacable with static images for each actor
    so about my thing, how I do get rid of that stats window?
  19. Yew Bowman said:
    so about my thing, how I do get rid of that stats window?
    i investigated a little bit..
    about disable "SrpgStatusWindow"- trigger code:
    if you just wanna disable it completly ,thats easy just disable this scriptpart in the SRPGcore
    with "//" :

    JavaScript:
    //this.addWindow(this._mapSrpgStatusWindow);
    (this will disable that window for enemys & actors .. )
    sidenote:
    ->by default this window is only shown on actorUnits,if that Unit has its turn ended and putting cursor on that Unit..
    ->by default this window is shown on enemyUnits ,when putting cursor on an enemyUnit..

    disable SrpgStatusWindow
    Screenshot_5.png
    And if you want to change the window,you must track down the related codes and edit them.
    Or make your own window and replace the old one.
    (but i cant offer you a detailed description for that,
    maybe there is one in this forum when searching for "building windows")
  20. dopan said:
    i investigated a little bit..
    about disable "SrpgStatusWindow"- trigger code:
    if you just wanna disable it completly ,thats easy just disable this scriptpart in the SRPGcore
    with "//" :

    JavaScript:
    //this.addWindow(this._mapSrpgStatusWindow);
    (this will disable that window for enemys & actors .. )
    sidenote:
    ->by default this window is only shown on actorUnits,if that Unit has its turn ended and putting cursor on that Unit..
    ->by default this window is shown on enemyUnits ,when putting cursor on an enemyUnit..

    disable SrpgStatusWindow
    View attachment 206083
    And if you want to change the window,you must track down the related codes and edit them.
    Or make your own window and replace the old one.
    (but i cant offer you a detailed description for that,
    maybe there is one in this forum when searching for "building windows")
    Alright, many thanks!
    Now I don't need to be showing the stats.