Search Unity

uMMORPG Official Thread

Discussion in 'Assets and Asset Store' started by mischa2k, Dec 29, 2015.

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please check out the mirror documentation to get comfortable with it :)
     
  2. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    Looks like you did not get it. Server's connection to Server is always null. And if I give authority over bot to null - bot does not have authority to execute commands.
     
  3. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    @vis2k Why uMMORPG does not use any object pooling techniques for monsters, projectiles and visual effects?
     
  4. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    @vis2k
    Since SpatialHashing needs to react on bots and they must be able to execute Commands, this is the way of doing that:

    1. Server needs to have LocalConnection authenticated
    2. Server needs to ActivateHostScene
    3. Server's NetworkClient should be ready
    4. Ownership over bots should be given to server's local client.

    So I added that to NetworkManager.cs and call it from my script with OnStartServer
    Code (CSharp):
    1. public void AddHost()
    2. {
    3.     if (NetworkServer.active && !NetworkServer.localClientActive)
    4.     {
    5.         OnStartHost();
    6.         // FinishStartHost has NetworkServer.SpawnObjects
    7.         // which we alerady executed on StartServer
    8.         // Lets call ConnectHost and StartHostClient manually
    9.         NetworkClient.ConnectHost();
    10.         StartHostClient();
    11.     }
    12. }
    Later on in Update I call
    Code (CSharp):
    1.  if (NetworkServer.active && isServer && NetworkServer.localClientActive)
    2.     {
    3.         if(NetworkClient.connection.isReady)
    4.         {
    5.             // Spawn bots to NetworkServer.localConnection
    6.         }
    7.         else
    8.         {
    9.             if(NetworkClient.connection.isAuthenticated)
    10.             {
    11.                 NetworkClient.Ready();
    12.             }
    13.         }
    14.     }
    All of that equals to Host (Server + Client) mode. Except that NetworkClient is set Ready manually in Update (Because in standard case it is set Ready only when player character is selected from menu and it bugs out if I set it ready in my AddHost() function because it happens before authentication).

    Unfortunately it looks like this is the only way.
    And no, Mirror documentation does not say anything about that.

    UPD: It works without errors until bot calls for Player.localplayer.
     
    Last edited: Nov 14, 2021
  5. wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    Joined:
    Nov 15, 2021
    Posts:
    4
    I want to modify the ui of the party on the left side of the interface. But I can't find where it is. Where can I find the corresponding code? QQ图片20211124212451.png QQ图片20211124212459.png
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Canvas->HealthMana UI :)
     
  7. wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    Joined:
    Nov 15, 2021
    Posts:
    4
    Where can I use "AoE Skills"?
     
  8. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can use the ScriptableSkill system to implement any type of skill that you like.
     
  9. m0rr0ws0n

    m0rr0ws0n

    Joined:
    Sep 18, 2014
    Posts:
    65
    where do I get a good ubuntu server host? i ent to namecheap but that seems outdated.

    Or just a good server to host in general. I'd really prefer windows than that commandline stuff
     
  10. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Google cloud is easiest imho.
    Can just rent / remove any time without stupid contracts.
     
  11. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Didnt you used to sale an asset that was a different type of play style. That wasn't a MMO. where you had a character that had to fight through stuff.
     
  12. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, uSurvival :)
     
  13. LiLyDarcy

    LiLyDarcy

    Joined:
    Oct 10, 2018
    Posts:
    15
    Can mmorpg games use sqlite database?
     
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes. uMMORPG already does.
     
  15. LiLyDarcy

    LiLyDarcy

    Joined:
    Oct 10, 2018
    Posts:
    15
    Thank you so much
     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  17. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  18. wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    wechat_os_Qy04XrhqnHG1iUUsofBI01l04

    Joined:
    Nov 15, 2021
    Posts:
    4
    Code (JavaScript):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3.  
    4. [CreateAssetMenu(menuName= "uMMORPG Skill/Convey Skill", order=999)]
    5. public class ConveySkill : BuffSkill
    6. {
    7.  
    8.  
    9.     // OverlapSphereNonAlloc array to avoid allocations.
    10.     // -> static so we don't create one per skill
    11.     // -> this is worth it because skills are casted a lot!
    12.     // -> should be big enough to work in just about all cases
    13.     static Collider[] hitsBuffer = new Collider[10000];
    14.  
    15.     public override bool CheckTarget(Entity caster)
    16.     {
    17.         // no target necessary, but still set to self so that LookAt(target)
    18.         // doesn't cause the player to look at a target that doesn't even matter
    19.         caster.target = caster;
    20.         return true;
    21.     }
    22.  
    23.     public override void Apply(Entity caster, int skillLevel)
    24.     {
    25.  
    26.         // validate
    27.         if (caster.target != null &&
    28.             caster.target.health.current > 0 )
    29.         {
    30.             caster.movement.Warp(new Vector3(-14,6, -11));
    31.             caster.target = null;
    32.         }
    33.  
    34.         return ;
    35.  
    36.  
    37.     }
    38.  
    39.     public void SpawnEffect(Entity caster, Entity spawnTarget)
    40.     {
    41.  
    42.     }
    43.  
    44.     public override bool CheckDistance(Entity caster, int skillLevel, out Vector3 destination)
    45.     {
    46.         // can cast anywhere
    47.         destination = caster.transform.position;
    48.         return true;
    49.     }
    50.  
    51.  
    52. }
    53.  
    I was looking to make a hearthstone script but I didn't succeed and I need help.
     
  19. elvin0272

    elvin0272

    Joined:
    Feb 16, 2021
    Posts:
    13
    Can I apply this asset to VR games by replacing the player controller or use other VR assets to this asset? for example, VR Interaction Framework
     
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Any controller that you want to use needs to work with Mirror.
    For VR you probably need first person controller.
    So in that case, my other asset uSurvival might be better, it has first person.
    AFAIK my character controller is the only one for Mirror. It's quite difficult to make, I don't think anyone else made one.
     
  21. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  22. sudjains

    sudjains

    Joined:
    Nov 5, 2018
    Posts:
    1
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  24. MortalMan

    MortalMan

    Joined:
    Nov 6, 2012
    Posts:
    25
    Could you briefly go over the pros and cons of usurvival versus ummorpg? Is there a link already made? I'm debating on what package I should purchase.
     
    troynall likes this.
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    uMMORPG is based on uSurvival, it's almost the same architecture.
    uSurvival has character controller & first person.
    uMMORPG has skills, quests, etc.
     
  26. oded

    oded

    Joined:
    Jun 7, 2013
    Posts:
    10
    Clean download to unity 2019.4.37
    and The uMMORPG has this errors.

    Assets\uMMORPG\Plugins\NavMeshComponents\NavMeshComponents\Editor\NavMeshAssetManager.cs(276,46): error CS0246: The type or namespace name 'PrefabStage' could not be found (are you missing a using directive or an assembly reference?)
     
  27. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please use at least Unity 2020 LTS :).
    Ideally 2021 LTS.
     
  28. oded

    oded

    Joined:
    Jun 7, 2013
    Posts:
    10
  29. Sysware

    Sysware

    Joined:
    Jan 10, 2019
    Posts:
    13
    Hey guys! Does anybody know if it’s possible to use the collisions with Tilemap using RuleTile? When I press “bake” he’s ignoring it ...
     
  30. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Navigation2D only works with Unity's built in Collider2D/Tilemap/etc.
     
  31. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Hi there @vis2k !
    Hopefully you are doing well, I'm posting here because I'm not entirely sure how to properly solve this since the newest mirror changes.
    On line 1246 in NetworkManager.cs the OnClientConnect() method invokes a NetworkClient.Ready() method.
    Now the OnClientConnect() method will be called when a player logs-in to view their character previews.
    Which seems fine, however the issue is in the class UICharacterSelection.cs on line 43 it also calls NetworkClient.Ready() when you click the "Start" button.

    This double calling of NetworkClient.Ready() is giving me a a mirror runtime error telling me to not call Ready() method more than once.
    Which makes sense, however do I simply just remove the Ready() method call in the Characer Selection since it will be called in the OnClientConnect() method or do I need to make sure not to call Ready() until the character is out of preview stage and actually in the game?
    Because a player shouldn't be getting any packets/syncvar/etc when they are just in the preview stage correct?

    Thanks! :)
     
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I'll update to latest Mirror asap.
    Best not to worry about it, let me worry about it for you :)
     
  33. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Okay thanks, also I am very worried about Unity's server build with ummorpg right now.
    I just built a test build of both Server and Client and when running the server it shows a lot of "mesh" and "shader" stuff for supposedly running on "server mode" which should not worry about any graphics or materials.....
    I am using Unity LTS 2021.3.0f1
    Do you know why it's doing this? And or what's going on... I'm just worried about these messages. :confused:
    Links: https://i.ibb.co/1rb3fnB/s2.png + https://i.ibb.co/HdjDn67/s1.png

     
  34. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    @vis2k To addition to my last post, does the latest mirror need any specific unity version?
    Because honestly... I am having the urge to download the project to like the 2019 LTS or 2020 LTS where Unity didn't fack around with the "dedicated server build" mode.
     
  35. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Mirror works with 2020+ LTS.
    Looks like the server build performance issue is only apple silicon.
    Fakebyte tested it in discord, and it's same perf as desktop on windows.
     
  36. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Great, thanks for the info!

    Also if I can get a tiny bit of help to solve this issue with my small change to uMMMORPG.
    I am attempting to delete all "character selection" feature. Just login and your in your one character/account.

    So I have all this going on:
    When client types user and pass, it sends LoginMsg.

    Server's LoginMsg receiving:
    Code (CSharp):
    1. void OnServerLogin(NetworkConnectionToClient conn, LoginMsg message) {
    2. // checks if user + pass is good
    3. conn.Send(new LoginSuccessMsg());
    4. OnServerAuthenticated.Invoke(conn);
    5. GameObject go = null;
    6. if (Database.singleton.CharacterExists(message.account)) {
    7.     go = Database.singleton.CharacterLoad(message.account, playerPrefab, false);
    8. } else {
    9.     go = manager.CreateCharacter(playerPrefab.gameObject, message.account, message.account).gameObject;
    10. }
    11. NetworkServer.AddPlayerForConnection(conn, go);
    12. }
    However when I test this, I get this error message from Mirror:
    No ready connection found for setting player controller during InternalAddPlayer


    What am I missing to do on the client side to make this connection ready?
    I see there is a method called NetworkClient.Ready() however, where would I issue that? And if that is even the fix?
    Thanks!
     
  37. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    @vis2k

    I found a little buggy.

    • Missing [GM] Tag on players name, even though they're marked with GM Status. Seems like the code was removed for this in the player.cs file. I've reverted it back unless theirs a actual reason for this.
     
    Last edited: Jul 11, 2022
    CrandellWS, gghitman69 and mischa2k like this.
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @vis2k I'm running the demo world in uMMORPG Remastered, but when my character goes into the little rock crevice where the dungeon teleporter is, nothing happens. How can I get this teleport to work correctly?
     
    CrandellWS likes this.
  39. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You need to be in a party with other players :)
     
    CrandellWS likes this.
  40. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    allowing for single player "missions" might be a good thing
     
  41. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can disable the party requirement in the script, there are two InParty() checks that you can comment out.
     
  42. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    uMMORPG and DOTSNET are on sale.
    I think it's -40% but occasionally -95%.
    For me it jumped to -95% after a few seconds.

     
  43. Grl-Kiko

    Grl-Kiko

    Joined:
    Mar 16, 2015
    Posts:
    12
    Running a dedicated server within wsl, clients can't connect to it (it is working fine when running the same exact build on native ubuntu). Any ideas why this might be happening?
     
  44. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Any errors in the console on client?
     
  45. Grl-Kiko

    Grl-Kiko

    Joined:
    Mar 16, 2015
    Posts:
    12
    It times out with this message:

    KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.
    UnityEngine.Debug:LogWarning (object)
    kcp2k.KcpConnection:HandleTimeout (uint) (at Assets/uMMORPG/Plugins/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs:169)
    kcp2k.KcpConnection:TickIncoming_Connected (uint) (at Assets/uMMORPG/Plugins/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs:266)
    kcp2k.KcpConnection:TickIncoming () (at Assets/uMMORPG/Plugins/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs:366)
    kcp2k.KcpClient:TickIncoming () (at Assets/uMMORPG/Plugins/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpClient.cs:115)
    kcp2k.KcpTransport:ClientEarlyUpdate () (at Assets/uMMORPG/Plugins/Mirror/Runtime/Transport/KCP/MirrorTransport/KcpTransport.cs:172)
    Mirror.NetworkClient:NetworkEarlyUpdate () (at Assets/uMMORPG/Plugins/Mirror/Runtime/NetworkClient.cs:1346)
    Mirror.NetworkLoop:NetworkEarlyUpdate () (at Assets/uMMORPG/Plugins/Mirror/Runtime/NetworkLoop.cs:194)
     
  46. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Didn't you say you use wsl / websockets?
    The above log is for kcp, which is for UDP sockets.
     
  47. Grl-Kiko

    Grl-Kiko

    Joined:
    Mar 16, 2015
    Posts:
    12
    Meant Windows Subsystem for Linux
     
  48. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I see. Sounds like some kind of firewall issue then.
    Kcp transport is used in production by a lot of projects, and generally works :)
     
  49. Grl-Kiko

    Grl-Kiko

    Joined:
    Mar 16, 2015
    Posts:
    12
    Seems to be a problem related to wsl and mirror (maybe wsl handling of udp doesn't work with mirror?). You're right though, production should work fine (working fine with native ubuntu). Problem only exists in test environment using wsl.
     
    mischa2k likes this.
  50. david_unity165

    david_unity165

    Joined:
    Sep 14, 2022
    Posts:
    3
    Is there a way to provide an API to the uMMORPG Inventory system ?

    @vis2k

    To add an item / remove / fetch items to a user?