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
    I did this in uMOBA. You need a team enum and a player.team property. And as ciao00 said, have an option for it when creating the character.
     
  2. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    How
    how do you do this
     
  3. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    Also I saw the new update nice what's next mate
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMMORPG V1.38 is now on the Asset Store. Changes:
    • QuestTemplate uses [Header] now for clarity
    • ItemTemplate uses [Header] now for clarity
    • SkillTemplate uses [Header] now for clarity
    • Player.CanStartQuest helper function
    • Player.CmdCompleteQuest extra check added to make sure that completed quest can't be completed again
    • Preceding quests implemented
    • NPC has a "?" Quest Indicator for new quests above it's head
    • NPC has a "!" Quest Indicator for fulfilled quests above it's head
    • Player.hpmax, mpmax, expmax, basedamage, basedefense are now all in one Player.levels array so that level dependent settings are more clear and easier to modify
    • Player.levelMax property removed because levels.Length is enough
    I will wait a few days to see if anyone finds any issues with the current version.
     
  5. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    I did fast check related with the quests and seems it's working. I`ll try later quests chains with multiple npc-s.
     
  6. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Journal with description for quests like Morrowind/Gothic would be great.
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Did you see the quest window? You can press the button at the bottom right shortcut menu, or press Q to open it. Is this what you mean?
     
  8. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Last edited: Oct 18, 2016
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I see. That's not really planned at the moment. It might be a cool feature, but uMMORPG is more about getting the MMO networking right. That's most important right now.
     
  10. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    102
    How hard would it be to implement usable object such as doors, treasure chests, levers that run custom scripts, and traps?
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Those are a lot of features for a networking game. I suggest starting at one thing, like doors, and then doing it one step at the time. The Player.SelectionHandling function will be a good starting point.
     
  12. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Treasure chests... hmm. If you were thinking about something like - player can found the chest and can kill it. When it`s killed then it will drop some loot. If you meant something like that, then why not make an new monster - chest or even different chests.
     
    Sirxy likes this.
  13. Sirxy

    Sirxy

    Joined:
    Jun 20, 2013
    Posts:
    3
    anyone with 5.3.1 face import crashes?
    after few it run but faced some prefabs look corrupted (UINpcQuest > Slot Prefab)
    and when try to import them as it suggest on selection... boom :)

    now downloading 5.4.1, but if possible workaround?

    Thank you very much vis2k for hard work and new features :)
    i am more unity3d fan then game dev :)
    but this asset is most worthy i have seen and have in my acc purchases... <3
     
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Thank you.

    Yes, downgrading is never guaranteed. There seemed to have been a Unity internal change which caused this. So I suggest trying 5.4.1p2. There were a few important UNET bugfixes that we needed anyway.

    Note: you can also drag the questslot prefab into the UI component's slot manually if needed.
     
    Last edited: Oct 20, 2016
  15. angeji_96

    angeji_96

    Joined:
    Oct 15, 2015
    Posts:
    8
    Fishing, testing
     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Great to see uMMORPG in action!
     
  17. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress Info: submitted V1.39 for review. This version will be a small maintenance update:
    • SpeedTree: removed unused trees, decreased texture sizes to shrink project size by 55MB.
    • PlayerChat.CmdWhisper syntax: added missing space in foreach loop
    • NavMeshAgent SendInterval changed from 0 to 9999 for clarity
    • UI Login: TextName, TextPass, TextHeader, TextStatus RaycastTarget disabled so that the buttons are easily clickable even if one of the Texts overlaps them
    • UI Login: TextStatus anchored at the bottom for easier resizing
    • Documentation: added Technology Overview and added a beginner's exercise
    • Removed unnecessary [Server] tag from Entity.OnStartServer
    • Removed unnecessary [Server] tag from Monster.OnStartServer
    • Removed unnecessary [Server] tag from Npc.OnStartServer
    • UIUtils is just a default class now and doesn't inherit from MonoBehaviour anymore
     
    Last edited: Oct 21, 2016
  18. MarkVatani

    MarkVatani

    Joined:
    Sep 4, 2012
    Posts:
    39
    Do you have a How-To on using the patcher? I've never used it before.
     
  19. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    The softcouch patcher? Did you see the readme that you got via email after the purchase? Which step doesn't work?
     
  20. MarkVatani

    MarkVatani

    Joined:
    Sep 4, 2012
    Posts:
    39
    I didn't see an email. Who did it come from?
     
  21. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    From Fastspring. You should also get the instructions immediately after your purchase. I can press the resend button if you send me your order number via private message.
     
  22. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    It is possible to develop a multi FPS? or is it just for moba style?
     
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It's for MMORPGs. For a FPS you would need a lobby and first person controls.
     
  24. spelljv

    spelljv

    Joined:
    Jan 24, 2016
    Posts:
    30
    After Unity 5.4.2f2 update... is returning this message after press play:

    NetworkManager detected a script reload in the editor. This has caused the network to be shut down.
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

    Tested with a new project and same message.
     
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes we saw this message a while ago already. I remember reading on the UNET forum that it can be ignored.
     
  26. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMMORPG V1.39 released:
    • SpeedTree: removed unused trees, decreased texture sizes to shrink project size from 54 to 12 MB.
    • PlayerChat.CmdWhisper syntax: added missing space in foreach loop
    • NavMeshAgent SendInterval changed from 0 to 9999 for clarity
    • UI Login: TextName, TextPass, TextHeader, TextStatus RaycastTarget disabled so that the buttons are easily clickable even if one of the Texts overlaps them
    • UI Login: TextStatus anchored at the bottom for easier resizing
    • Documentation: added Technology Overview and added a beginner's exercise
    • Removed unnecessary [Server] tag from Entity.OnStartServer
    • Removed unnecessary [Server] tag from Monster.OnStartServer
    • Removed unnecessary [Server] tag from Npc.OnStartServer
    • UIUtils is just a default class now and doesn't inherit from MonoBehaviour anymore
     
    cioa00 likes this.
  27. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    Thanks!
     
    mischa2k likes this.
  28. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello Im new in unity and I just purchase your exellent uMM kit , I have a question, do you know how to modify the max lvl because right now is max lvl 14 and max hp is 180 also I make some custom potions and this potion can be use for example at lvl 10, and went i loot this potion at lvl 1 I can use this potions, if you can give me a tip, and thank you for this very nice system.
     
  29. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Select the player prefab in the project area, then in the Inspector modify the 'Levels' under 'Level based Stats'. If you want 4 levels, then set the levels array length to 4. If you want 14 levels, make it length 14.
     
  30. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Thank you for fast respond, I still have question how to set up the potion because i set for minimum lvl 10 and I can use at lvl 1 also I create a custom weapon and I can loot this weapon but I cant equip. Please help me with this 2 questions and im sorry for many questions :)
     
  31. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    Go in your Player.cs script and replace the CmdUseInventoryItem with this one:

    Code (CSharp):
    1.    
    2. [Command]
    3.     public void CmdUseInventoryItem(int index) {
    4.         // validate
    5.         if ((state == "IDLE" || state == "MOVING" || state == "CASTING") &&
    6.             0 <= index && index < inventory.Count && inventory[index].valid) {
    7.             // what we have to do depends on the category
    8.             //print("use item:" + index);
    9.             var item = inventory[index];
    10.             if (item.category.StartsWith("Potion") && item.minLevel <= level) {
    11.                 // use
    12.                 hp += item.usageHp;
    13.                 mp += item.usageMp;
    14.                 exp += item.usageExp;
    15.  
    16.                 // decrease amount or destroy
    17.                 if (item.usageDestroy) {
    18.                     --item.amount;
    19.                     if (item.amount == 0) item.valid = false;
    20.                     inventory[index] = item; // put new values in there
    21.                 }
    22.             } else if (item.category.StartsWith("Equipment")) {
    23.                 // for each slot: find out if equipable and then do so
    24.                 for (int i = 0; i < equipment.Count; ++i)
    25.                     if (CanEquip(equipmentTypes[i], item))
    26.                         SwapInventoryEquip(index, i);
    27.             }
    28.         }
    29.     }
     
    mischa2k and cioa00 like this.
  32. Borvorn

    Borvorn

    Joined:
    Oct 25, 2016
    Posts:
    1
    Hi all,
    I am now having an issue that;
    When I have tried to connect several servers together, this will create a bug that would prevent a client from running, and eventually shut down and get disconnected.

    ClientScene.DestroyAllClientObjects();
    NetworkManager.singleton.client.connection.Disconnect();

    Order client to connect to server again

    NetworkManager.singleton.client.Connect(NetworkManager.singleton.networkAddress, NetworkManager.singleton.networkPort);


    When a client get disconnected, and reconnected, over and over again several times. The server has displayed an error shown as below picture;
    upload_2016-10-25_23-40-16.png

    I would greatly appreciate it if anyone kindly give me some feedback on this.

    Thanks
     
  33. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Thank you for the help
     
  34. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Is any one can recomend what asset from the store i need to buy for make compatible with this kit, I need byt monsters , heros and i need build Doungeon, any tip helps alot, also if any is free i can use. Here is my email and face book name thank you. heroiclands@gmail.com if any one, want to talk I really need it.
     
  35. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    If someone were wondering how to make expired potions (for example when player tries to use it then it will be destroyed and potion effect won't be applied). Not sure if someone has already pointed out similar example but if not then here it is.

    First off, let's make a new field for expiration date.
    Code (CSharp):
    1.  
    2. // open ItemTemplate.cs and place code after public Sprite image
    3. public string expired; // date format should be yyyy-mm-dd, ex: 2016-10-26
    4.  
    Code (CSharp):
    1. // open Item.cs and add
    2.     public string expired {
    3.         get { return ItemTemplate.dict[name].expired; }
    4.     }
    5.  
    Now the juicy part - when user tries to use potion.
    Code (CSharp):
    1. // open Player.cs and find function CmdUseInventoryItem and replace function content with
    2.  
    3.         if ((state == "IDLE" || state == "MOVING" || state == "CASTING") &&
    4.             0 <= index && index < inventory.Count && inventory[index].valid) {
    5.             // what we have to do depends on the category
    6.             //print("use item:" + index);
    7.             var item = inventory[index];
    8.  
    9.             if (item.category.StartsWith("Potion")) {
    10.                 var isNotExpired = true;
    11.  
    12.                 if (item.expired.Length != 0) {
    13.                     // item expired field is not empty
    14.  
    15.                     if(Convert.ToDateTime(item.expired) >= DateTime.Today){
    16.                         // not yet expired
    17.                         // you can do some magic here
    18.                     } else {
    19.                         // item has expired
    20.                         // destroy item
    21.                         --item.amount;
    22.                         if (item.amount == 0) item.valid = false;
    23.                         inventory[index] = item; // put new values in there
    24.  
    25.                         isNotExpired = false;
    26.                     }
    27.                 }
    28.  
    29.                 if (isNotExpired && item.minLevel <= level) {
    30.                     // use
    31.                     hp += item.usageHp;
    32.                     mp += item.usageMp;
    33.                     exp += item.usageExp;
    34.  
    35.                     // decrease amount or destroy
    36.                     if (item.usageDestroy) {
    37.                         --item.amount;
    38.                         if (item.amount == 0) item.valid = false;
    39.                         inventory[index] = item; // put new values in there
    40.                     }
    41.                 }
    42.  
    43.             } else if (item.category.StartsWith("Equipment")) {
    44.                 // for each slot: find out if equipable and then do so
    45.                 for (int i = 0; i < equipment.Count; ++i)
    46.                     if (CanEquip(equipmentTypes[i], item))
    47.                         SwapInventoryEquip(index, i);
    48.             }
    49.         }
    50.  
    51.  
    I also included @jagatai33 posted solution to use item level.
    Now you just can add expiration date by using format yyyy-mm-dd (ex. 2016-10-26)
     
    Last edited: Oct 26, 2016
    mischa2k likes this.
  36. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Nice find, the minimum level check was only used for equipment and not for potions. Interesting that no one noticed that during the last year. It will be fixed in V1.41. Until then you can use jagatai's code.

    What do you mean with can't equip? Can you drag it into the equipment slot? Can you see it in the game world in 3D?

    What exactly are you trying to do? Have multiple server instances talk to each other?
     
  37. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Let's continue with expired items. Just tried out (maybe there is better way, not sure at the moment), but here is the example how to destroy already expired items which is exist already on players inventory (item will be destroyed when player opens inventory window).

    Code (CSharp):
    1. // open file Scripts/_UI/UIInventory.cs and find void Update
    2. // at the start after using UnityEngine.UI;
    3. // add
    4. using System;
    5.  
    6. // find condition which starts with   if (item.valid) {
    7. // and replace it content with
    8.                     var isNotExpired = true;
    9.  
    10.                     // destroy expired items
    11.                     if (item.expired.Length != 0) {
    12.                         if (Convert.ToDateTime(item.expired) >= DateTime.Today) {
    13.                         } else {
    14.                             // item has expired, destroy it                
    15.                             --item.amount;
    16.                             if (item.amount == 0) item.valid = false;
    17.                             player.inventory[i] = item; // put new values in there
    18.  
    19.                             isNotExpired = false;
    20.                         }
    21.                     }
    22.  
    23.                     if (isNotExpired) {
    24.                         // click event
    25.                         int icopy = i; // needed for lambdas, otherwise i is Count
    26.                         entry.GetComponent<Button>().onClick.SetListener(() => {
    27.                             player.CmdUseInventoryItem(icopy);
    28.                         });
    29.                      
    30.                         // set state
    31.                         entry.GetComponent<UIShowToolTip>().enabled = true;
    32.                         entry.GetComponent<UIDragAndDropable>().dragable = true;
    33.                         // note: entries should be dropable at all times
    34.  
    35.                         // image
    36.                         entry.GetComponent<Image>().color = Color.white;
    37.                         entry.GetComponent<Image>().sprite = item.image;
    38.                         entry.GetComponent<UIShowToolTip>().text = item.Tooltip();
    39.  
    40.                         // amount overlay
    41.                         entry.GetChild(0).gameObject.SetActive(item.amount > 1);
    42.                         if (item.amount > 1) entry.GetComponentInChildren<Text>().text = item.amount.ToString();
    43.                     }
    44.  
     
    Last edited: Oct 26, 2016
  38. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello I have a problem adding monster, npc or player to a custom one, I did what the documentation say, but im still cant, any one can help with pictures or video how to do it? I try all day yesterday and today but im still can't do it :( i did 2 different ways, im go leave video link, I hope can help me, Thank you

     
  39. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    For those of you that like to test large number of spawns but hate having to drag each one into the Scene, below is a fairly straight forward script that spawns X number of monsters in a given radius.

    How to use:
    1. Create a new C# Script (Copy/Paste the code below).
    2. In your Hierarchy create an empty object (right click in your hierarchy and select "Create Empty" then give it any name, 2a. Add Component Sphere Collider to your object and set your desired radius. (used for spawn distance) also make sure to set the Layer for "Ignore Raycast".
    2b. Add the script from Step 1 to your object (you can either drag it or click Add Component and search it).
    3. Drag different monster(s) into the Monsters field of the script and set the total spawns (number of monsters to spawn).
    4. place your object anywhere in your scene
    5. start uMMORPG and your monsters should now spawn.

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using UnityEngine.Networking;
    4. using System.Collections;
    5.  
    6. public class SpawnController : NetworkBehaviour
    7. {
    8.     [Header("List of Random Monsters to Spawn")]
    9.     public GameObject[] _monsters;
    10.  
    11.     [Header("Set the Total Number of Monsters to Spawn")]
    12.     public int totalSpawn = 5;
    13.  
    14.     [SerializeField, HideInInspector] Transform center;
    15.     [SerializeField, HideInInspector] float radius;
    16.     [SerializeField, HideInInspector] int x = 0;
    17.  
    18.     // Use this for initialization
    19.     [Server]
    20.     public override void OnStartServer() {
    21.         // Gets the Transform of the Object.
    22.         center = GetComponent<Transform>();
    23.  
    24.         // Gets the SphereColliders Radius value.
    25.         radius = GetComponent<SphereCollider>().radius;
    26.     }
    27.  
    28.     [Server]
    29.     void Update() {
    30.         if (!(x >= totalSpawn ? true : false)) {
    31.             Vector3 spawnPosition = center.position + Random.insideUnitSphere * radius;
    32.             NavMeshHit hit;
    33.             if (NavMesh.SamplePosition(spawnPosition, out hit, 1.0f, NavMesh.AllAreas)) {
    34.                 StartCoroutine("Spawn", (spawnPosition));
    35.                 x++;
    36.             }
    37.         }
    38.     }
    39.  
    40.     [Server]
    41.     IEnumerator Spawn(Vector3 pos) {
    42.         int idx = Random.Range(0, _monsters.Length);
    43.         var go = (GameObject)Instantiate(_monsters[idx], pos, Quaternion.identity);
    44.         go.name = _monsters[idx].name;
    45.         NetworkServer.Spawn(go);
    46.         yield return new WaitForEndOfFrame();
    47.     }
    48. }
    49.  
    Enjoy and hope you find this useful.
    -J
     
    bartuq, cioa00 and mischa2k like this.
  40. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What exactly isn't working?
     
  41. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I show in the video, I dont know how to add new monsters,player or NPC. I did 2 different ways and Im still cant add diferent player or monster or npc, and I follow the documentation.
     
  42. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You changed the avatar correctly. Now you also have to change the actual mesh in the child objects. The avatar is just for the animation.
     
  43. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Im still cant change the mesh.. i cant find it .. sorry for to many post here... is just can't find it. if any one can have some pictures or video how to do that is be very nice. Thank you
     
  44. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It's a child object of the skeleton:
    Screenshot at Oct 27 09-41-56.png
     
  45. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Im so frustrate :( Im still can do it.. all models that i have has different bones or im doing something bad. Is any monster in the store that has the equal bones to the skeleton? also i try with the npc and with the player and is the same, for change the mesh all are very different. please help. I wake up too early and i think im burn all ready my brain XD, Im go attach video,to see what i have, is any chance to make some short video or some quick tutorial? how i can success full change the mesh. Thank you I hope dont bother all whit my noobs issues.
     
  46. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    This is a bit difficult, don't worry. Does your monster model have bones, animations, is rigged etc.? You can in theory use the skeleton's rig and animations, but that's really weird.
     
  47. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Yes I dont know what can I do, I did many modifications to the mesh and the skeleton looks with no head, LOL, I do other try and then spaw like half of the body, but Im still cant success in add new mesh to the monster , npc or player. Please make short tutorial how i can do it, and if I need specific type of monster or player ( hero or Npc) I can purchase or if you recommend any I really appreciate. I did all full equipment for this 2 class archer and warrior , Im go make 1 more for mage with all his equipment. and the good part is that all is working very good and the only monster that i have ( default skeleton) I put different tags like ORC, Troll, Worm Etc. all in drop all weapons and equipment very good. but in order to feel that i accomplish something I need to have many monsters XD. I hope you can help me.
     
  48. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
  49. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I wouldn't buy any packs unless they have exactly the animations that are needed.

    Also I suggest trying to replace the warrior's model+animations with the archer's model+animations by using only the archer's .fbx model, not the prefab. This way you can try with a model that definitely works and in the end you can compare your result to the archer prefab to see what you did right/wrong.
     
  50. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    I would hold off buying any packs until your more familiar with both Unity and uMMORPG.