OcRam - Battle_EX plugin (with Dynamic Troops) [v1.01 updated 2018/11/11]

Discussion in 'JS Plugin Releases (RMMV)' started by OcRam, Nov 6, 2018.

  1. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Introduction
    With this plugin you may create enemy troops dynamically from fixed enemy ids or from named enemy group (like 1-4 enemies from named pool "Forest") or use wild card for total randomness (you may exclude some enemies ofc)!

    Also changing "Substitute" behaviour is possible for example: Substitute always on one target physical attacks.

    This plugin also gives possibility to control command list visibilities (attack, guard, skill, item).

    Here's what you need:
    1. OcRam_Battle_EX -plugin
    2. Configure plugin parameters
    3. Create "Base troop" (if you already havn't)
    4. Create DYNAMIC battles
    battle_ex_parameters.png

    base_troop.png

    battle_ex_event.png

    Latest release v1.01 (2018/11/11):
    • Randomized troops will be temporalily saved to event
    • Subsitute behaviour can be actor or enemy specific
    • New plugin command "force_ids" (use before battle_init)
    Terms of use:
    Non-commercial & commercial use: Free to use with credits to 'OcRam' for using 'Battle_EX' -plugin.
    If you want to support my work, I am accepting optional donations via PayPal (https://paypal.me/MarkoPaakkunainen)

    OcRam_Passages
    OcRam_Local_Coop
    OcRam_Battle_EX
    OcRam_Weather_EX
    OcRam_Parallels
    OcRam_Lights
    OcRam_Audio_EX
    OcRam_Time_System
     

    Attached Files:

    Last edited: Jun 23, 2019
    #1
    Calvynne, Kike and Neo Soul Gamer like this.
  2. Neo Soul Gamer

    Neo Soul Gamer Veteran Veteran

    Messages:
    612
    Likes Received:
    327
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    N/A
    Now this is cool! If I can request a feature... There are a lot of us devs who make games with on-map encounters. Those on-map enemies are sometimes represented by one monster who is joined by other monsters in battles. Is it possible to create a plugin command/parameter where at least ONE of a specific monster type has to show up in the troop pool?
     
    #2
    Kike and OcRam like this.
  3. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    This is a great idea! I will do it to next version of this plugin.
     
    #3
    Kike and Neo Soul Gamer like this.
  4. Neo Soul Gamer

    Neo Soul Gamer Veteran Veteran

    Messages:
    612
    Likes Received:
    327
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    N/A
    Awesome! Looking forward to it!
     
    #4
    Kike likes this.
  5. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    I have released new version now. Enjoy! :kaojoy:
     
    #5
    Kike and Neo Soul Gamer like this.
  6. anthnintendofan

    anthnintendofan Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    I don't know if this is a stupid question or not, but is it possible to get this to work with random encounters?
     
    #6
  7. BlubberBlabber

    BlubberBlabber Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    German
    Primarily Uses:
    RMMV
    Plugin not working for me. The "init_battle" plugin command simply does nothing.
    Any idea what I am doing wrong?
     
    #7
  8. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    Random encounters should also work if "init_battle" -command is used before encounter occurs.

    Thank you for the message,

    Example usage of this plugin command (before actual battle processing): "init_battle 1-6 from_ids *"

    Please see picture in opening post of this thread for more examples.
     
    #8
  9. Kike

    Kike Paladin Veteran

    Messages:
    37
    Likes Received:
    20
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    It's working until the battle part...
    The command init_battle select the enemies and the battle begins with them.

    But there are two issues :c

    1 - The command force_ids doesn't work
    Event 35 is a hornet;
    Event 32 is a Slime;
    upload_2019-6-13_16-55-33.png
    I set 4 hornets to appear from force_ids
    and 1 slime from init_battle

    upload_2019-6-13_16-57-43.png
    but only the slime from the init_battle appeared

    Taking another example for the same enemies ID:
    upload_2019-6-13_17-0-57.png
    I set 3 slimes to appear from force_ids
    and 2 hornets from init_battle

    upload_2019-6-13_17-2-14.png
    Now, only the 2 hornets from the init_battle appeared (each five hornets is one sprite xD)

    2 -
    The game crashes when I an actor uses a skill (All other plugins disabled)
    upload_2019-6-13_16-48-26.png
    Here's the error codes when I disabled all plugins to test compatibilities issues:
    Code:
    rpg_managers.js:1949 TypeError: Cannot read property 'result' of undefined
        at Game_Action.apply (rpg_objects.js:1647)
        at Function.BattleManager.invokeNormalAction (rpg_managers.js:2549)
        at Function.BattleManager.invokeAction (rpg_managers.js:2540)
        at Function.BattleManager.updateAction (rpg_managers.js:2522)
        at Function.BattleManager.update (rpg_managers.js:2253)
        at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
        at Scene_Battle.update (rpg_scenes.js:2257)
        at Function.SceneManager.updateScene (rpg_managers.js:2024)
        at Function.SceneManager.updateMain (rpg_managers.js:1983)
        at Function.SceneManager.update (rpg_managers.js:1907)
    SceneManager.catchException @ rpg_managers.js:1949
    upload_2019-6-13_16-52-49.png
    Code:
    SceneManager.catchException = function(e) {
        if (e instanceof Error) {
            Graphics.printError(e.name, e.message);
            console.error(e.stack);
        } else {
            Graphics.printError('UnknownError', e);
        }
        AudioManager.stopAll();
        this.stop();
    };
    The game crashes when I an actor uses a skill (All plugins enabled)
    upload_2019-6-13_17-4-15.png

    And when I press F8, it appears a Core Engine error
    Code:
    YEP_CoreEngine.js:1098 TypeError: Cannot read property 'hp' of undefined
        at Game_Action.apply (YEP_Z_SkillRewards.js:584)
        at Game_Action.apply (YEP_EnhancedTP.js:3759)
        at Game_Action.apply (YEP_RowFormation.js:1619)
        at Game_Action.apply (MOG_CollapseEffects.js:234)
        at Function.BattleManager.invokeNormalAction (rpg_managers.js:2549)
        at Function.BattleManager.invokeAction (YEP_BattleEngineCore.js:2095)
        at Function.<anonymous> (YEP_BattleEngineCore.js:2709)
        at Array.forEach (<anonymous>)
        at Function.BattleManager.actionActionEffect (YEP_BattleEngineCore.js:2706)
        at Function.BattleManager.processActionSequence (YEP_BattleEngineCore.js:2300)
    SceneManager.catchException @ YEP_CoreEngine.js:1098
    upload_2019-6-13_17-10-14.png another stack error :v well... I don't know if I'm showing the right things, I'm a layman :LZSlol:
    Code:
    SceneManager.catchException = function(e) {
      if (e instanceof Error) {
        Graphics.printFullError(e.name, e.message, e.stack);
        console.error(e.stack);
      } else {
        Graphics.printError('UnknownError', e);
      }
      AudioManager.stopAll();
      this.stop();
    };

    And about you, maybe you was doing the same thing as I was, and was trying to initiate a battle only with the plugin command, and not inserting the event battle command after it xD
     
    #9
    OcRam likes this.
  10. Calvynne

    Calvynne Veteran Veteran

    Messages:
    97
    Likes Received:
    57
    First Language:
    English
    This looks like it could be the plugin that I needed to pull my last project out of a holding pattern. I really wanted to mix up what enemies appeared where, and absolutely love that this appears to let me do it.
     
    #10
    OcRam and dragonx777 like this.
  11. dragonx777

    dragonx777 Veteran Veteran

    Messages:
    74
    Likes Received:
    14
    Location:
    SC
    First Language:
    English
    Primarily Uses:
    RMMV
    Perfect once again @OcRam. This is spot on what I need for mobs based on environment without having to program a crap ton of troops.
     
    #11
    OcRam likes this.
  12. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    What is the RMMV version of your project?
     
    #12
    Kike likes this.
  13. Kike

    Kike Paladin Veteran

    Messages:
    37
    Likes Received:
    20
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    It's 1.6.2 =)
     
    #13
  14. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Ok after some research I have an answer to force_ids issue:

    If you assign enemy ids directly with init_battle command there's no point of using force_ids commands before that (it just won't do nothing cause init_battle is forcing ids already). Intended usage of force_ids command is only to be used if you use init_battle from pool or have random enemies declared in init_battle parameters.

    The other issue you described where game crashes after actor uses a skill, I can't simulate in any circumstance. I might need screen shot from that specific skill that crashes your game.
     
    #14
    Kike likes this.
  15. rue669

    rue669 Veteran Veteran

    Messages:
    199
    Likes Received:
    152
    Location:
    Toronto
    First Language:
    English
    Unfortunately, the plugin didn't work for me. Kept hitting this error.

    Also tried it in a new project and it wouldn't do anything. I'm using MV 1.6.2.

    Would love to use it, but don't think I'll be able to.
     

    Attached Files:

    #15
  16. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    I think this was supposed to be on OcRam_Lights thread? But any ways light source needs to be defined like this: <light:[type]:[radius]:[color_in_rgba]> Example: <light:5:400:#ffdd00ff>
     
    #16
  17. rue669

    rue669 Veteran Veteran

    Messages:
    199
    Likes Received:
    152
    Location:
    Toronto
    First Language:
    English
    Sorry! Yes, I did mean for it to be in lights thread. My apologies. I'll test out your suggestion!
     
    #17
    OcRam likes this.
  18. Kike

    Kike Paladin Veteran

    Messages:
    37
    Likes Received:
    20
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    All skills. Even if I disable Yanfly's Action Sequence and remove all skill notetags, the skill still doesn't works ;_;

    upload_2019-6-23_11-58-32.png

    I liked the plugin proposal because I wanted to make enemies into the battle by checking for enemy events, similar to the Chrono Engine/Trigger.:D So I wanted to add enemies using the force_ids command on each event checked (by another plugin). But for the tests, I used only your plugin to avoid problems of possible incompatibilities.

    ~Edit~ ah... another thing is... that if I use force_ids command alone, don't using the init_battle, the enemy simply doesn't appear in the battle:
    upload_2019-6-23_12-28-11.png
     
    Last edited: Jun 24, 2019
    #18
  19. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    244
    Likes Received:
    281
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    I'm not sure if I understand this but... Do you mean you would like to add enemies during battle? You should be able to use built-in features for this commands in this plugin is ment to be used before battle processing.

    And remember: do not use force_ids command if enemies are not randomized in init_battle parameters (from pool or totally random).
     
    #19
    Kike likes this.
  20. Kike

    Kike Paladin Veteran

    Messages:
    37
    Likes Received:
    20
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Ahhh!!! now I got it! I though the force_ids just would add extra enemies! :headshake: SORRY!!! :headshake:

    I mean to add enemies before battle, for example...

    * If there's 5 spiders and 5 bats in a map as events that moves... and the player clicks in 1 spider event, a battle would start with at least 1 spider;

    * If near the spider/player is near another spider and 1 bat, the enemies battlers would be 2 spiders and 1 bat

    * It could be a radius event detect or something like, that detects "battler events" near, and join them in the same battle

    It would be like in Chrono Trigger, but, why I don't use Chrono Engine? well... I still prefer the battle system more complex that I made with action sequences and another conditional things :D so I tried to use yours to avoid the premade trops! :)
     
    #20
    dragonx777 likes this.

Share This Page