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

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 147 of 166 View original ↗
  1. adramalesh159753 said:
    In fact, I wanted to use the whole plugin including the item equip system, but I can't get it to work in conjunction with YepMainMenuManager, as it causes the error below.
    IMAGES
    View attachment 269949
    View attachment 269950
    View attachment 269951



    So, in your ForceAction you have information that to work correctly, it is necessary to have "edited-SRPG_core" & "SRPG_UnitCore" & "SRPG_StatBasedCounter", however, as I mentioned above, I am not able to use UnitCore because of the item equipping system. If I can use UnitCore together with YepMainMenuManager, I think that would solve both issues. As I couldn't solve the problem, I'm not using UnitCore and consequently ForceAction.
    ok pls try my demo, and put the yep plugins above everything else, like its shown on the img which is part of my demo..
    the img which i showed here:
    #2,905
    I am pretty sure that this should work fine..
    2023-07-19 10_22_11-Window.png <- reason for the bug you showed!
    -> also at the moment i am not sure if the code you showed on your img is correct for the YepMainMenuManager setup.. i think you dont need to use that setup, because my plugin allready adds the ActorItemSlots command to the menu..
    if you still need to use the YepMainMenuManager on the ActorItemSlots,.. it could be that the YepMainMenuManager plugin has to be somewhere below the srpg-UnitCore, but i didnt tested that
    (JS reads the code from top first, and if the UnitCore is read later, than this scene doesnt exist at that timing, when the yep plugin asks for it)


    as for the changes on the UnitMapInfo-plugin.. like i sayed, that should not be difficult, as soon i got time to look into it..
  2. Is it possible to make a skill that teleports a unit?
  3. LordEdmundGod said:
    Is it possible to make a skill that teleports a unit?
    teleport was already explained a few times in this thread,..

    there are several ways to do it..:
    - You can use event-commands to set/change event position in a skill-common event, ..
    - Or you can use the plugin SRPG_PositionEffects from drQ.
    - And there is also a teleport skill in my demo, which shows a solution aswell..
    ( i think other demos might have a teleport skill aswell, but i am not sure which one )

    However this info could also been found by using the "search"-function of this forum and search for :
    "teleport"-"in this thread"
  4. dopan said:
    teleport was already explained a few times in this thread,..

    there are several ways to do it..:
    - You can use event-commands to set/change event position in a skill-common event, ..
    - Or you can use the plugin SRPG_PositionEffects from drQ.
    - And there is also a teleport skill in my demo, which shows a solution aswell..
    ( i think other demos might have a teleport skill aswell, but i am not sure which one )

    However this info could also been found by using the "search"-function of this forum and search for :
    "teleport"-"in this thread"
    Thank you!
  5. Rather embarrassed as I've done it before, but for those using Dopan's core script... how do we update the color for the ranges? I swear I've made them darker in the past, but I cannot for the life of me remember where:
    image.png
    I have a game jam demo with a black and white color scheme and the highlighted red doesn't show up on the white XD
  6. like in any other demo, by editing the img in your system folder..
    2023-07-26 08_35_57-Plug-in.png
    and by using this plugin (SRPG_UX_RANGE) to adjust some stuff
  7. Frelsigard said:
    For the "SRPG_MapviewBatttler", is it possible to have a different motion for "Selected" and walking? I tried making a motion for when the character is selected but when they are moving on their turn they remain in the "Selected" motion.
    I'm having the same issue now. I thought of some command in SRPG_MapviewBattler that cancels the current animation, but getting the system to know that your character is moving seems to be tricky.
  8. Edit: Ignore, I misread the error message as meaning something else. Issue resolved.
  9. Question, how would I go about modifying the range in the display to only show the 1, and not the 2?Range.png

    Context:
    The details
    I want to enable diagonal attacks as a default option in my game. Giving all attacks the "King" range seemed to be the best way to do that. But then I realized I couldn't even hit adjacent targets with it until I set it's range to 2, so now my 1 tile range ability is claiming to be 2 range in the UI.

    Additionally, it was also highlighting the player itself as a target, which I didn't want. So I set the attacks minimum range to be 1, thus removing the user highlight. But now it makes the display say "1-2". Whenever I tried to edit this via the code, it just gives this error as soon as I click on an enemy.
    Move.png
    And the code is doing that after nothing else but me copying the section of code from the core document which seems to effect the display, but without actually touching said code at all yet.
    Code:
        Window_SrpgStatus.prototype.drawSrpgParameters = function(x, y) {
            this.changeTextColor(ColorManager.systemColor());
            this.drawText(_textSrpgMove, x, y, 120);
            this.resetTextColor();
            this.drawText(this._battler.srpgMove(), x + 120, y, 48, 'right');
            this.changeTextColor(ColorManager.systemColor());
            this.drawText(_textSrpgRange, x + 188, y, 120);
            this.resetTextColor();
            var text = '';
            if (this._battler.srpgWeaponMinRange() > 0) {
                text += this._battler.srpgWeaponMinRange() + '-';
            }
            text += this._battler.srpgWeaponRange();
            this.drawText(text, x + 188 + 72, y, 96, 'right');
        };
  10. GwaziMagnum said:
    Question, how would I go about modifying the range in the display to only show the 1, and not the 2?View attachment 271161

    Context:
    The details
    I want to enable diagonal attacks as a default option in my game. Giving all attacks the "King" range seemed to be the best way to do that. But then I realized I couldn't even hit adjacent targets with it until I set it's range to 2, so now my 1 tile range ability is claiming to be 2 range in the UI.

    Additionally, it was also highlighting the player itself as a target, which I didn't want. So I set the attacks minimum range to be 1, thus removing the user highlight. But now it makes the display say "1-2". Whenever I tried to edit this via the code, it just gives this error as soon as I click on an enemy.
    View attachment 271163
    And the code is doing that after nothing else but me copying the section of code from the core document which seems to effect the display, but without actually touching said code at all yet.
    Code:
        Window_SrpgStatus.prototype.drawSrpgParameters = function(x, y) {
            this.changeTextColor(ColorManager.systemColor());
            this.drawText(_textSrpgMove, x, y, 120);
            this.resetTextColor();
            this.drawText(this._battler.srpgMove(), x + 120, y, 48, 'right');
            this.changeTextColor(ColorManager.systemColor());
            this.drawText(_textSrpgRange, x + 188, y, 120);
            this.resetTextColor();
            var text = '';
            if (this._battler.srpgWeaponMinRange() > 0) {
                text += this._battler.srpgWeaponMinRange() + '-';
            }
            text += this._battler.srpgWeaponRange();
            this.drawText(text, x + 188 + 72, y, 96, 'right');
        };
    Your code:

    Code:
            if (this._battler.srpgWeaponMinRange() > 0) {
    
                text += this._battler.srpgWeaponMinRange() + '-';
    
            }
    
            text += this._battler.srpgWeaponRange();
    If you want to get rid of the -
    Then replace with:

    Code:
    if ($dataSkills[this._battler.attackSkillId()].meta.specialRange == "king"){
    text += this._battler.srpgWeaponRange() -1;
    } else {
      if (this._battler.srpgWeaponMinRange() > 0) {
    
                text += this._battler.srpgWeaponMinRange() + '-';
    
            }
    
            text += this._battler.srpgWeaponRange(); }
    This reduces range by 1 if using the king skill range and skips adding minimum range
    I also presume you are using the option: <specialRange:king>
    If you have no idea what im on about, read the srpg_core script help, it denotes chess-like ranges for skills
  11. How do I actually start a battle? I have the actors and events set but the plugin command SRPGBattle Start doesn't seem to do anything. It doesn't throw an error message, running the plugin command simply does nothing.
  12. the plugin command SRPGBattle Start , triggers the battle start, if that doesnt work, you do something wrong..
    could you replicate the same problem in any demo?
    (also giving more infos about your project and its plugins would be usefull)
  13. dopan said:
    the plugin command SRPGBattle Start , triggers the battle start, if that doesnt work, you do something wrong..
    could you replicate the same problem in any demo?
    (also giving more infos about your project and its plugins would be usefull)
    Yeah, there must be something I'm missing in the setup.

    I have no other plugins on. The only events I have setup are one for an actor (<type:actor><id:1> in the vent note) and one for an enemy (<type:enemy><id:1> in the event note). The plugin command is run by an event with action button as the trigger.

    There might be something else missing like character or cursor images, but if there were I would expect the game to throw an error for missing files. As it is now, the plugin command simply isn't doing anything at all.
  14. For Fire Emblem-based criticals, if you're interested. This also involves hit rates, because they have to pass for criticals to happen.

    Turn on a switch on Pre-Battle event and turn it off on Post-Battle event. Use that same switch for below.

    YEP_HitAccuracy
    ------------------
    First, I suggest doing this for the first two, accuracy applies before evade is factored.
    Accuracy: 1
    Evade: 1 - (skillHitRate * (userHitRate - targetEvadeRate))

    Now under User Hit Rate / Target Evade Rate, use this below and place at the very front of any code you got.

    User Physical Hit / Magical Hit:
    Code:
    $gameSwitches.value(x) === true && user._hitChanceRoll <= user._hitChance ? 1.00 : $gameSwitches.value(x) === true && user._hitChanceRoll > user._hitChance ? 0.00 : user.hit

    User Physical Evade / Magical Evade:
    Code:
    $gameSwitches.value(x) === true && user._hitChanceRoll <= user._hitChance ? 0.00 : $gameSwitches.value(x) === true && user._hitChanceRoll > user._hitChance ? 1.00 : target.eva

    YEP_X_CriticalControl
    ----------------------
    Place at the very front as well.

    Critical Rate Formula:
    Code:
    $gameSwitches.value(x) === true && user._crtChanceRoll > user._crtChance ? 0.00 : $gameSwitches.value(x) === true && user._crtChanceRoll <= user._crtChance ? 1.00 : user.cri - target.cev;

    YEP_X_ActionSequences
    --------------------------
    Insert this on setup action notetag, and adjust your sequences how you see fit. You want to know if you've activated a critical.

    <setup action>
    eval: user._hitChanceRoll = Math.randomInt(100) + 1;

    if (user._hitChanceRoll <= user._hitChance)
    eval: user._crtChanceRoll = Math.randomInt(100) + 1;
    end

    if (user._crtChanceRoll <= user._crtChance)
    animation x: user
    wait for animation
    wait: 2
    end
    </setup action>

    SRPG Troop Event
    --------------------
    Make sure Turn 0 is checked and insert this in the script box:
    Code:
    if ($gameSwitches.value(x) === true) {
    var user = $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1]; var target = $gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1];
    user._hitChance = Math.max(0, Math.min(100, parseInt(parseFloat(Math.round(user.action(0).itemHit(target) * 100))) - parseInt(parseFloat(Math.round(user.action(0).itemEva(target) * 100)))));
    user._crtChance = Math.max(0, Math.min(100, parseInt(parseFloat(Math.round(user.action(0).itemCri(target) * 100)))));
    if (target.currentAction() && target.canUse(target.currentAction().item()) === true) {
    target._hitChance = Math.max(0, Math.min(100, parseInt(parseFloat(Math.round(target.action(0).itemHit(user) * 100))) - parseInt(parseFloat(Math.round(target.action(0).itemEva(user) * 100)))));
    target._crtChance = Math.max(0, Math.min(100, parseInt(parseFloat(Math.round(target.action(0).itemCri(user) * 100)))));
    }
    }

    Also, find the DrawSrpgBattleHit (and the Critical one) in Srpg_core and comment that Math.floor code out and use this.

    Code:
    this.drawText(parseInt(parseFloat(Math.round(val * 100))) + '%', x + 64, y, 64, 'right');
    FireEmblemCalculation.png

    You can test it by giving some actors very high critical rates and see for yourself.
  15. I'm sorry if this has already been asked, it feels like it should have been already but I for the life of me cannot find it. I'm looking for a way to process an event when an actor is selected on the map. I have voice over files, so I wanted to try to play the voices when the actor is selected for a bit of extra feedback.

    Thanks, and sorry in advance if this has already been asked!
  16. gsc said:
    I'm sorry if this has already been asked, it feels like it should have been already but I for the life of me cannot find it. I'm looking for a way to process an event when an actor is selected on the map. I have voice over files, so I wanted to try to play the voices when the actor is selected for a bit of extra feedback.

    Thanks, and sorry in advance if this has already been asked!
    hey this is a nice add! nope, there's none, the only thing that is triggered when selecting events on map is updating the status window. so it would be nice if someone could add this.

    i generally have the idea is, run a common event ID, check the player or unit ID, or simply have a note on event note on which sound file to play upon selection.
  17. xabileug said:
    hey this is a nice add! nope, there's none, the only thing that is triggered when selecting events on map is updating the status window. so it would be nice if someone could add this.

    i generally have the idea is, run a common event ID, check the player or unit ID, or simply have a note on event note on which sound file to play upon selection.

    Okay I'm glad it seems it hasn't been asked! Yeah I might delve into the core that I have and see if I am able to find a solution that works. The common event is my best bet I think so I'll see.

    EDIT: Turns out it was pretty easy! Just 2 simple lines to the core script! (Using the 1.30 core script from the demo on the front page. I know, it's outdated, but it works fine for my purposes).

    JavaScript:
    Game_Temp.prototype.setActiveEvent = function(event) {
        this._ActiveEvent = event;
        $gameVariables.setValue(_activeEventID, event.eventId());
        $gameVariables.setValue(7, $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1]._actorId);
        $gameTemp.reserveCommonEvent(19);
    };

    (It's hardcoded to use variable 7 and common event 19, so improvements can be made still, but for my purposes it's fine for now. Just keep that in mind if others want to use it.)

    From here, my common event is pretty simple. Just a conditional branch checking variable 7 against the actor ID you want to set this for. Makes it pretty easy to add and remove actors, have a couple voice lines (random, depending on their HP, etc etc).
  18. @boomy
    Using ZoneCustomization. When I defeat an enemy with elemental damage and it's their turn again on Player Phase, the colored tile still shows. This only occurs when the unit hadn't move yet.
  19. @dopan Just to report, you were right and the problem was just the plugin position. I organized it the way you instructed and I only needed to reposition the Yep Menu Manager, because I modify BattlePrepare options with new commands directly through the MenuManager. In the end, it like the one below.

    IMAGE
    RPGMV_CDwuv7C3BS.png


    I'm trying to create a skill that the enemy applies a buff that when hit, there is a chance of the attacker being paralyzed.

    I tried using YEP BuffsStatesCore, but SRPG doesn't read Custom Action Effects commands like <Custom Respond Effect> or <Custom React Effect>.

    So I thought of using a counter to apply the paralyze debuff, but even using the SRPG_StateBasedCounter and setting a skill with <srpgCounterSkill:X> the SRPG still reads the basic attack as a counter.

    I tested the Dopan DEMO with the configuration I tried in my project and it worked, however, the enemy only used the correct counter when the equipment configurations were written down. In my project the enemies don't use equipment, but I don't know if that's really the reason it doesn't work.

    Edit: I found the reason, the SRPG_StateBasedCounter don't work with SRPG_AoeAnimation from @Shoukang . AoeAnimation have a counterattack mode, but I teste all the options and the enemy continue using the default attack in counter.

    Edit 2: About the YEP BuffStatesCore, another plugin outside the SRPG was interfering...
  20. So has anybody have a fire emblem demo for this or checklist what features these demos have now and those still on the wish list?

    SRPG GEAR MV just got updated to 1.04Q