OcRam - Local Coop plugin [v3.01 updated 2019/11/07]

Discussion in 'JS Plugin Releases (RMMV)' started by OcRam, Feb 3, 2018.

  1. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Introduction
    I have tried to find this type of plugin for a long time and then decided to do it myself… This plugin allows up to 4 players to control their own actors. All players can interact with events, call menu and participate in battles.

    This plugin is compatible with all Yanfly battle -plugins: dtb = Default Turn Battle, atb = Active Turn Battle, ctb = Charge Turn Battle and stb = Standard Turn Battle

    This plugin is compatible also with "OcRam_Passages", "Ellye_ATB", "VE_DiagonalMovement" and "Timed Attack" from "SumRndmDde"

    Autodrop/add gamepad feature will ensure seamless integration with gamepads. Players will be dropped if he/she unplugs gamepad. And gets back in when gamepad is plugged on again (key press is still required).



    Important! Put this plugin AFTER supported plugins in your plugin list!

    Here's what you need:
    • "OcRam_Local_Coop" plugin
    • Configure parameters
    • Play your awesome RPG with your friends!
    Example how to use plugin commands to target player 2 instead of 1 or follower 1 instead of player.

    local_coop_set_move_routes.png

    Terms of Use has been slightly changed: I'm uniting Terms of Use for all of my plugins. Please check updated Terms if downloading current version of this plugin. Price for commercial use hasn't changed and it is still free for non-commercial use. Added also discounts for purchasing several licenses.

    If you have downloaded this plugin before this change to Terms of Use, you are free to follow those terms. And if you download current version please follow latest Terms of Use.


    Terms of Use
    Non-commercial: Free to use with credits to 'OcRam' for using this plugin.
    Commercial use: See details below
    License must be obtained BEFORE you start to DISTRIBUTE your game. Even if you obtain commercial license; copyrights still remain as they are. NOTE: If you gain money with your game by any means (crypto-mining, ads, purchase incomes, micro-transactions etc...) it is considered commercial use of this plugin!

    License types (licenses are per project):
    • Standard: 19.99 EUR - Paid in full (credits to ”OcRam” is required for using this plugin)
    • No credits: 59.99 EUR - Paid in full (credits not required)
    To obtain license:
    Mention which plugin license you want to purchase and your project name.
    PayPal link: https://paypal.me/MarkoPaakkunainen

    To obtain several licenses with discount: Each license purchased will reduce next plugin price by 2€ until minimum price of 2€ per license. Discounts can be used on any OcRam -plugin.

    After payment: I will send you verification e-mail that you may use this plugin commercially in project: [Your_project_name_here] with [license_type].

    Latest release - v3.01 (released 2019/11/07)
    • Jump command will listen to "followers_follow no" command
    • "Player collide" and "nearest player" functionality will apply for followers also if "followers_follow" is set to "no"
      This will give you the same feeling you would be playing in multiplayer mode even if you go solo
    Previous versions
    • New script command: $gameMap.currentActorId()
      Use it for example to require Harold to start this event...
    • Player collisions (on / off) (Credits: Hugo Yasha)
      Will effect ONLY players NOT "zombie" followers
    • New script commands: $gameMap.focusToNextActor() and $gameMap.focusToPreviousActor()
      Use it to toggle camera focus between actors (Lost Vikings style) (Credits: Parallax Panda)
    • New parameter(s) for keys to focus to next/prev actors
      (if gamepad is used LB and RB buttons are signed for this)
    • New parameter "Map edge block"
      Use plugin command "map_edge_block on/off" to change setting mid game (Handy on large coop puzzles for example)
    • Followers will now act same way as P1 on YEP_SlipperyTiles
    • Support for YEP_SlipperyTiles plugin
    • Fixed some follower movement route commands (opacity, speed etc...)
    • Improved gamepad compatibility (shouldn't give undefined error anymore)
    • Implemented 3 new plugin commands
      • apply_to_player 2
        Apply move routes, balloons and animations to this player instead of player 1 (possible values 1-4)
      • apply_to_follower 1
        Apply move routes, balloons and animations to this follower instead of player (possible values 1-3)
      • followers_follow yes/no
        Will followers follow player 1?
    • Players 2-4 will also trigger damage floor!
    • Turn/move Toward/AwayFrom player methods overridden... these methods will now actually target nearest PLAYER!
    • Support for "Yanfly - Event chase player" -plugin
    • Battle phases works now properly on single player mode.
    • Fixed bug where P2-3 OK button (kb2) got "stuck"
    • Fixed bug where 2 x swap command in row gave "null" error
    • Support for OcRam_Lights -plugin!
    My (long-term) Project
    banner.png
     

    Attached Files:

    Last edited: Nov 8, 2019 at 3:27 AM
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,984
    Likes Received:
    10,077
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I'm not going to use it, but will download it for study purposes ^_^
     
    #2
  3. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    I hope it helps you in your studies :)

    Are you interested in JS generally, or something specific in this plugin?
     
    #3
    Zarsla likes this.
  4. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,984
    Likes Received:
    10,077
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I'm trying to figure out how to employ multiple Game_Player objects. As it currently stands, you can have only one Game_Player and if you change it for some else, you have to reload whole map for some reason.
     
    #4
    Jeremiah Eastman likes this.
  5. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    755
    First Language:
    English
    Hi, i found a bug: If you open/close menu, Player2 will be transfer to Player1's current location
    - Also, it seem Player2 only available if a Gamepad is plugged in?
    Can you make Player2 playable via shared Keyboard?
    - I wonder what if my game use plugin like Timed Attack of Srndmdude - which require Player press 'Ok' button in correct time / or Arrows Keys. Is it going to be invalid for Player2?
     
    Last edited: Feb 3, 2018
    #5
  6. Black Mamba

    Black Mamba Veteran Veteran

    Messages:
    257
    Likes Received:
    74
    First Language:
    pt-br
    its work with any ABS?
     
    #6
    Tom_Baudelaire likes this.
  7. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Poryg: That sounds like it's going to break some fundamental principals of RMMV core. That takes A LOT of work (also Plugin compatibility is compromised). And how would it change usage of global $gamePlayer -object (which most RMMV games at the moment are dependend of).

    Isabella Ava: Thank you for bug report I will fix it as soon as I can. I will take a look at shared keyboard, it's a great idea if it doesn't break up when too many keys are pressed (also might be device dependent how many simultanous keys can pressed). I will take a look at "Timed Attack" -plugin from "Srndmdude", it should be doable (since Battle system is still turn based). Edit: "Shared keyboard" has too many problems to take care of (some of them aren't even possible to solve without some new hardware). I'm sorry to say that at the moment I do not have resources to do this. Edit2: I will fix "Warp bug to P1 after menu scene" and add support for "Timed Attack" -plugin you mentioned to next version I release.

    Black Mamba: I think this approach would be something like Poryg is looking for... This plugin is for turn based battle systems. Though I think "Map mode" would still work some how on ABS. Edit: I will implement new plugin command that gives "main" control to desired player with desired party member. This might even work with ABS!
     
    Last edited: Feb 4, 2018
    #7
    Isabella Ava likes this.
  8. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,984
    Likes Received:
    10,077
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Well... It's interesting nevertheless:
    $gamePlayer = new Game_Player ();
    $gamePlayer.refresh()
    now my $gamePlayer is brand new. Only actor and followers and stuff. I can even walk with him, he's just invisible. In order for him to be visible, I need to refresh the map. For this I can do SceneManager.push (Scene_Base);
    SceneManager.pop();
    This essentially reloads the map without messing up event position. If I apply something similar to your event functionality, I am capable of effectively changing players, making a similar functionality to prison puzzles where all charaters are separated and stuff.
     
    #8
    Jeremiah Eastman and OcRam like this.
  9. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Oh! You ment that $gamePlayer -object is only changed (only 1 character controlled at the same time) NOT creating multiple instances of it (for each player to control each characters at the same time). Then it is quite doable, actually if you don't mind I can implement this functionality in this plugin?

    Edit: Thanks Poryg! Then it is going to be in next version.


    Edit2: Though it might be little different implementation that you described.
     
    Last edited: Feb 3, 2018
    #9
  10. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,984
    Likes Received:
    10,077
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I intended to create multiple instances, but not being controllable at the same time. But it's true it is easily doable with just one party.
    And yes, you can implement the functionality, no problems there :)
     
    #10
    Jeremiah Eastman and OcRam like this.
  11. SoulOfRock

    SoulOfRock Veteran Veteran

    Messages:
    38
    Likes Received:
    6
    First Language:
    Spanish
    I love your plugin,but its boring copy the same event every time i need to call player 2 on each map, or to create a event to call the second player, i was thinking if u can make it apear with the joystick button, and make the plugin config file like: Player 2 join button. x. Player 2 Char index: x, player 2 id: x... and it wuld be even better if u can make a split screen... :o!!!... Sorry for so many pettitions grand master,but you are the only that have tried to make the local coop plugin... Thank you so much for all your effort :D.
     
    #11
    OcRam likes this.
  12. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,984
    Likes Received:
    10,077
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Actually, many have tried :D Few have succeeded, but as far as I know, all were Japanese... And I can't find them now :(
     
    #12
    Jeremiah Eastman likes this.
  13. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for trying out this plugin. Yes I have plans to create Player 2 event automatically in near future. But when it comes for player 2 to control one of the followers and split screen ...this isn't in near future (I need to learn to master the time first). At the start I was just thinking of player 2 to join ONLY battles. That controllable event is just bonus thing in this plugin.

    But please check this page out from time to time. Maybe, just maybe, someday I'll post controllable follower and/or split screen update :)
     
    Last edited: Feb 5, 2018
    #13
  14. SoulOfRock

    SoulOfRock Veteran Veteran

    Messages:
    38
    Likes Received:
    6
    First Language:
    Spanish
    Thank you for take your time to answer me, i will make this post fav,for a incoming update... well if u can, but im so gratefull for your work!
     
    #14
    OcRam likes this.
  15. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    New version of OcRam_Local_Coop -plugin is now available!

    Biggest changes are that "Player2" event can be controlled via mouse + keyboard. New plugin commands "assign_pm" and "swap_players". Also "Timed Attack" plugin from "SumRndmDde" is now supported.

    Please take a look at "Version history" for more information and you can always PM me.

    Edit: HotFix has been released (few hours after v1.01 release) where "DTB" system now resets player input between turns properly. Thank you for your patience.
     
    Last edited: Feb 11, 2018
    #15
    fizzly and Isabella Ava like this.
  16. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    755
    First Language:
    English
    Hi @OcRam the first bug i found that the plugin will make the reward screen (after defeated an enemy troop) keep repeating itself endlessly. After first time run normally "..Party was victorious >> Actor1 now level 7 ... " the game keep repeating the message below (and the FPS dropped dramatically like 50% for minute or two)
    I installed your plugin at bottom of plugin list though
    [​IMG]

    Another thing that, i saw you mentioned now P2 supported Keyboard+Mouse but how can i assign keys for P2?
    Also, P2 seem didn't join the battle. Maybe it's because of i don't have a Gamepad?
     
    Last edited: Feb 11, 2018
    #16
  17. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the report. I didn't have any issues with "Reward Screen" my self... Do you get any errors in console log (F8) and what plugins are you using?

    Player 2 can be assigned only with "p2_assign -1" command or "swap_players" command. This is just to make sure that there's always keyboard and mouse available. And yea if "P2 Auto Assign" parameter is -1 then it means you gotta assign Player 2 input device manually.

    Edit: Oh and this update didn't have "shared keyboard" if that's what you ment. Keys can't be assigned for P2, they are same as P1.
     
    Last edited: Feb 11, 2018
    #17
  18. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    755
    First Language:
    English
    Hi @OcRam Nothing showed in Console log. (The game FPS dropped more than 70% i think)
    I installed a lots plugins so ... :LZSblush: not sure if it help but i will post the list here:
    I tried plugin command "p2_assign -1"
    however after that, P1 is unable to control. Is there anyway to manual setup keys for both Players?
    Like P1 move with W,A,S,D + J,K,L and P2 move with Arrows + Num1,Num2,Num3?
     
    #18
  19. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Wow thats a lot of plugins :kaoswt:...Plugin order should be ok.

    I found "input reseting" bug in "DTB" system, I think maybe you should try that first? BTW: What battle system are you using?

    If this new "HotFix" update doesn't work, we need to find plugin that conflicts with this one... I would try to turn off plugin by plugin to find it.

    I will try to make this "Shared Keyboard" update when I have enough resources to do that. But ATM it is not possible to bind keys (other than gamepad) with this Plugin.
     
    #19
    Isabella Ava likes this.
  20. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    635
    Likes Received:
    755
    First Language:
    English
    The bug still hasn't been fixed. I am using Yanfly Battle Engine.
    And too much plugin to turn off one by one :LZSooo:
    Can you add some console log into your plugin to see what happen while it's running?
     
    #20

Share This Page