Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

uMMORPG Official Thread

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

  1. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Are you asking if the WebGL demo is always updated when I release a new uMMORPG version?
    I only update it if there is a significant change that can be seen in the demo.
     
  2. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Progress Info: submitted V1.37 for review.

    It will have an important 5.4.1p2 upgrade to avoid UNET bugs.
    It will have a workaround for that OnDisconnectError bug.
    It will have a long anticipated feature from the roadmap: quests that are not repeatable.
    It will also have a few smaller improvements as usual.

    You guys may want to read this post too: https://forum.unity3d.com/threads/new-multiplayer-transport-release.435133/
    UNET threading will be a huge feature for any MMO!
     
    Last edited: Oct 7, 2016
  3. VE_GAME

    VE_GAME

    Joined:
    Mar 13, 2014
    Posts:
    39

    I meant it

    Thank you
     
  4. angeji_96

    angeji_96

    Joined:
    Oct 15, 2015
    Posts:
    8
    https://twitter.com/VReactor_ Last Empire
     
    vis2k likes this.
  5. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    As i understand it will be the default behavior. But can this be controlled, because sometimes you might want to spawn boss monster who won't be attack until player makes the first attack against it. If not then i guess i could just add that my own :p
     
  6. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    This is exactly what the code does. As soon as the player attacks a monster, it automatically calls OnAggro so that the monster attacks back.
    If you want a boss monster that doesn't attack players walking around it (unless they attack him), simply set the AggroArea size to 0. This behaviour didn't change.
     
  7. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Alright, that sounds good :)
     
  8. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Hi I was wondering if some one can tell me how to add a new weapon and armour in to the ummorpg I tried it but I don't get it and it didn't work I duplicated one of the swords then change the scale of the new weapon the change it on the new template but when I pick it up from the loot it was on the charecters hand and also how do I make questions not repeatable so if it's just complete that's it it's done 1 time only please help
     
  9. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Non repeatable quests will be in the next update already!

    Isn't the sword supposed to be on the characters hand?
     
  10. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    With the new sword in trying to make it so it's not the first equipped weapon it's a loot item but when I get it then I equip it it doesn't actually become visible
     
  11. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    I just duplicate the sword one that's in there change size scale then swap mesh out on the template am I missing something ohh and then I put it on the enemy drop list that's it
     
  12. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Does it become visible when you unequip it? This is a UNET bug, you should make sure to use Unity 5.4.1p2 (the patch version).
     
  13. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    So everything I have done is right do I need to place the character in the scene then scale it and leave it in the hand or not
     
  14. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    When you scale that sword then make new prefab (prefabs->itemmodels), drag that scaled item to that new prefab. By the way if u want to scale weapon then you dont need to put a player on the screen, just drop weapon on the screen and scale it and make new prefab.

    Also make sure you have create new item under resources -> items and make sure that you select item model too (that new item prefab). And of course then add that new item on your monster drop list.
     
    Last edited: Oct 11, 2016
    vis2k likes this.
  15. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Yeah I did that all of it but it doesn't show in the charecters hands the actual weapon I think the model is ns maya file not a FBX maybe that's why I don't know and I have patch 2 it still doesn't show
     
  16. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Does it show if you drag it into the scene in the Editor?
     
  17. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Yeah the other thing when I equip it it does show the damage
     
  18. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I've a question, I'm going to use projectiles with my "custom" attack behaviour.
    So I don't know how to add the projectile check with damage, spawn etc. I've tried to move it over to Player.cs but it just won't do the trick. thanks in advance.
    Simply explained, everything works but it won't deal project.Damage,,

    Code (CSharp):
    1. protected override void UpdateClient()
    2. //in here I call
    3. HnSCombat();
    4.  
    5. The HnSCombat looks like this, just the basic old one without some checks.
    6.  
    7.   void HnSCombat()
    8.     {
    9.         if (Input.GetMouseButton(0))
    10.  
    11.         {
    12.             var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    13.             RaycastHit hit;
    14.  
    15.  
    16.             if (Physics.Raycast(ray, out hit))
    17.             {
    18.  
    19.                 // valid target? //IWASHERE
    20.                 var entity = hit.transform.GetComponent<Entity>();
    21.                 if (entity)
    22.                 {
    23.  
    24.                     // set indicator
    25.                     SetIndicatorViaParent(hit.transform);
    26.  
    27.                     CmdSetTarget(entity.netIdentity);
    28.                     //NEW
    29.                     if (entity != this && entity == target)
    30.                     {
    31.  
    32.                         // what is it?
    33.                         if (entity is Monster)
    34.                         {
    35.  
    36.                             // dead or alive?
    37.                             if (entity.hp > 0)
    38.                             {
    39.                                 Attackingrand();
    40.  
    41.                             }
    42.  
    43.                             else
    44.                             {
    45.  
    46.                                 CmdNavigateTo(entity.collider.ClosestPointOnBounds(transform.position), skills.Count > 0 ? skills[0].castRange : 0f);
    47.                             }
    48.  
    49.                         }
    50.                     }
    51.                 }
    52.             }
    53.         }
    54.     }
    55.  
    56.  
    The way I do my combat.

    Code (CSharp):
    1.     [Client]
    2.     public void Attackingrand()
    3.     {
    4.         AudioSource audio = GetComponent<AudioSource>();
    5.         // Attack one
    6.         //Check Cooldown, if ready use skill
    7.         if (skills[0].IsReady() && whatattack == 0)
    8.             CmdUseSkill(0);
    9.  
    10.         GetComponent<AudioSource>().PlayOneShot(AttackSFX1);
    11.         // Attack two
    12.         //Check Cooldown, if ready use skill
    13.         CmdUseSkill(1);
    14.         if (skills[1].IsReady() && whatattack == 1)
    15.         GetComponent<AudioSource>().PlayOneShot(AttackSFX1);
    16.         // Attack three
    17.         //Check Cooldown, if ready use skill
    18.         CmdUseSkill(2);
    19.         //Check Cooldown, if ready use skill
    20.         if (skills[2].IsReady() && whatattack == 2)
    21.         GetComponent<AudioSource>().PlayOneShot(AttackSFX1);
    22.         return;
    23.         //END
    24.     }
     
  19. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Wait so the new prefab can't be in say the front out of the folder floating it has to be in resources
     
  20. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    New item (sword) prefab should stay Prefabs->ItemModels (like you can see it here - http://imgur.com/rbwCb7F)
    And under Resources->Items, there should be uMMORPG Item (http://imgur.com/ApQQrn3)
     
    Last edited: Oct 12, 2016
    vis2k likes this.
  21. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Yeah I'm sure it was like that but I'll double check anyway also I have another question with the quests how can I make it so a quest is to go see a person and talk to them or to go to a place/building how do I do this also thank you in advance and thank you heaps so far this has truly been the best package and easiest to understand I just don't know scripting I'm attempting to learn it
     
  22. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Try attaching the debugger or use prints to check which parts of the code execute, which are on the server and which are on the client, etc.

    Quests already have a kill target that requirement which is set after killing a monster.
    You would need a speak target requirement that is set after speaking to an NPC.
     
  23. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Ok how do I do this
     
  24. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Learn how the quest kill target works first. Understand the logic. Then add the same logic for speak targets.
     
  25. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Ok and what about for say an area like inside a building
     
  26. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Wouldn't "teleport to woods" example work on that case? Check that npc which is on the scene. On your inspector view, find "Teleportation" and under that there is "teleport to" which has linked object (which can be found on hierarchy window as "To the Woods". Just make copy from that and change positions and add that to the npc teleport option.

    But as i understand you wanted this way:
    - player takes quest x, which requries that player should go to location x
    - player moves to location x
    - quest is done and player can return to npc to take reward

    For that case you probably need to start make changes (including quest template). One idea would be to make somekind trigger zone, which can be trigged only if player has quest (for that case you need make somekind quests check).
    Maybe @vis2k or anyone else got better ideas?
     
  27. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Tomorrow I could try to do a implementation of speak to target quest, I'm currently working and I work on a boat a week then Im free for a week but working 12h shifts so before work tomorrow.
    @vis2k yeah but i just want to add the damage from projectiles, beacuse when i use cmduseskill code it wont triggee damage if I use projectile on the skills. Would be happy to get some more insight..

    EDIT: No of my skills work now using particles and I never changed anything but the combat while holding down the mouse cursor. Whats up with that? Is there a function that i need to stop any que'ed skills?
     
    Last edited: Oct 13, 2016
  28. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Update: uMMORPG V1.37 is now on the Asset Store:
    • Upgraded to Unity 5.4.1p2 to avoid UNET bugs
    • New feature: quests have a 'completed' flag now and are stored in the player's quest list forever, so that they are not repeatable anymore
      • This was the first huge quest improvement. There are more to come after testing this one for a while.
    • UI Login position rounded
    • Entity.DealDamageAt now calls OnAggro in any case, instead of only calling OnAggro if a Player attacks a Monster
    • Skillbar, Inventory, Equipment Slot sizes aren't hardcoded anymore and stretch to the GridLayout's size instead
    • NetworkManager SavePlayers is now invoked in OnStartServer and canceled in OnStopServer, so that SavePlayers is not called on clients anymore
    • Monster OnDrawGizmos pos renamed to startHelp for clarity
    • NetworkManager OnServerDisconnect player controller finding simplified and index is not hardcoded anymore
    • NetworkManager OnApplicationQuit sends a StopClient packet to the server now, so that clients are logged out immediately and to avoid the UNET timeout OnDisconnectError bug where possible.
    • Quests.IsFinished renamed to IsFulfilled for clarity
    My current projectile code is in Projectile.cs. The projectile is spawned when casting the skill and then shot towards the target. As soon as it reaches the target, Projectile.cs deals the damage. Maybe that helps.
     
  29. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    I have also been working on a 3D "?" indicator for NPCs that have quests:
    2016-10-13_questoverlay.png

    It will be released very soon.
     
  30. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Maaadvas I think you should make it on the template a check box that says make it repeatable or not that will be cool
     
  31. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    It's on my ToDo list. V1.38 will have a few more other quest improvements first, like preceding quests (players have to finish quest A before you can do quest B).
     
  32. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Very cool!
     
    vis2k likes this.
  33. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    That sounds really good. I assume that quest chain won't be limited?
     
  34. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    I tested little bit latest update and seems skillbar will adopt quite easily new slots. That same i can't say for player inventory. Not sure if i should make somewhere else some changes than just modifing inventory slot size under player characters prefab.
     
  35. michaelbeers

    michaelbeers

    Joined:
    Aug 19, 2015
    Posts:
    17
    I see there is a "!" if the quest is finished, baby to add a "o" indicator or something like that aswell if a quest is in progress?
     
  36. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Yes, a quest simply has a 'predecessor' quest property where you drag another quest into. Can do this endlessly often.

    Is there an issue with the code, or just with the inventory sizes?

    Uhm maybe. A greyed out "?" could work. Will think about it and see what others have to say.
     
  37. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Folks,

    For anyone that likes having a visual indicator for skill cooldowns, below is a quick and easy way to implement a spinner (like in WOW) when a skill is on cooldown.

    Code (CSharp):
    1.                
    2. // overlay cooldown
    3. var cd = player.skills[skillIndex].CooldownRemaining();
    4. if (cd > 0) {
    5.                     entry.GetComponent<Image>().color = Color.grey;
    6.                     entry.GetComponent<Image>().sprite = player.skills[skillIndex].image;
    7.                     entry.GetComponent<Image>().type = Image.Type.Filled;
    8.                     entry.GetComponent<Image>().fillMethod = Image.FillMethod.Radial360;
    9.                     entry.GetComponent<Image>().fillOrigin = 2;
    10.                     entry.GetComponent<Image>().fillClockwise = true;
    11.                     float mod = player.skills[skillIndex].cooldown;
    12.                     entry.GetComponent<Image>().fillAmount = (cd * (1.0f / mod));
    13.                 } else {
    14.                     entry.GetComponent<Image>().fillAmount = 1.0f;
    15.                 }
    16.  
    Basically in UISkillbar.cs inside Update() function replace the current // Overlay Cooldown with the above.

    enjoy
    -J
     
    cioa00, vis2k and JBR-games like this.
  38. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Ok as for everything sounds awesome as the question mark thing for quest it should be yellow ! For quest that haven't been start to say hey I have a quest a yellow ? To complete it and a fretted out ? When in progress and a light blue ! To start indicating repitable quests that's my opinion
     
  39. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Seems when i upgraded asset on my home pc then it worked. I guess when i tried it on my work laptop with new project, then something just went wrong.
     
  40. michaelbeers

    michaelbeers

    Joined:
    Aug 19, 2015
    Posts:
    17
    Fair enough, in the end everyone can change it if the feature is implemented :)
     
  41. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    Progress Info: one of the two critical UNET bugs that I reported almost exactly one year ago was finally fixed in 5.4.3: https://issuetracker.unity3d.com/is...with-certain-names-is-not-synced-with-clients .

    Good to hear.

    True.
     
    cioa00 likes this.
  42. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    minor question, how come the Cast range is not relevant? If I set it to .5 it's the lowest number accepted otherwise it will not get close enough. But it's like 3m between my player and monster, work around or smaller collision capsules?
    Do I have to scale my entire world in order to have a closer combat?
     
  43. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    It should be relevant. See normal attack warrior/archer in uMMORPG. One has cast range 10 and is far away, while the other one is much closer.

    Did you set the cast range for all skill levels too?
     
  44. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    @vis2k Well yes, I use 3 basic attacks, they are all at 0.5 but it's just as far away as 1.
    I tried 0.01 as well but that just don't work :/
     
  45. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    The player will use the navmeshagent to walk to the monster. The stopping distance is set to skill.castRange and the position is set to the target's closest point on bounds. So if your castRange is already very low like 0.1, try making your colliders smaller too, so that the player can actually walk close enough.

    Then see what happens. Does the player walk close to the monster, but then just stands there? Or tries to attack and deals no damage? Or does the player not even walk close enough? Etc.
     
  46. VE_GAME

    VE_GAME

    Joined:
    Mar 13, 2014
    Posts:
    39
    please tell me that it is easier to hack / decompilation
    Web version or under androyd apk ?
     
  47. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,215
    WebGL builds use IL2CPP, which means that it's all converted to C++ first, so no easy way to get the original C# source code back.

    For Android, IL2CPP is optional I think. If you use IL2CPP, then it's about as hard to decompile as the WebGL version.
     
    VE_GAME likes this.
  48. VE_GAME

    VE_GAME

    Joined:
    Mar 13, 2014
    Posts:
    39
    Thanks
     
  49. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Just wondering do you plan to do faction system I need it for my game so if you make a player that is team a you spawn team a but if you create team b player you go to team b spawn how to do this please like wow if your alliance or horde
     
  50. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Just plain idea would be just add new combobox with faction options on character creating window, then make changes on those functions which saves/read character data.