Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

uMMORPG Official Thread

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

  1. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Any one know how to change the Mesh to the Projectile arrow? I want to add Fire Ball. How it Works the attack from the Bow to shut arrows? because now I have my mage shutting Arrows and I put Bow with a Staff weapon Mesh, but I want to make properly the weapon category, because I can use many bows with the mage and thats not good. Every Class have his weapon category. but if i make different category like EquipmentWeaponStaff, my bow with staff mesh not work, and i look where i can put this category but not success, if some one know diferent way to do this please help me or if know where i can add this category and sink the staff with the fire ball , like the bow and the arrows.All the skills works very good and I all ready make many very nice combos. I hope some one help me :)
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Great find, thank you. Will be fixed in V1.41! It's really fascinating how we can get all those tiny issues fixed before releasing our MMOs, thanks to having so many testers.

    Change the weapon category to EquipmentWeaponStaff and change the mage's equipmentTypes category to EquipmentWeaponStaff as well (in the prefab's Player script).
     
  3. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I all ready do that,I change and set properly the category for the mage all are fine but dont works the attack, because the category EquipmentWeaponStaff is not synk with the Arrow, so if I put other staff with the category EquipmentWeaponBow it works, and start to shut arrows.
    but my big problem is, how I can use a fire ball and synk with the staff, like the bow and the arrow, how I can do that?any tip? and how I can use different arrows in the archer? where is the set up for change the type of projectile, in order to use different proyectiles in the bow.Thank you , and I discover something funny, I make a stone of the death in case u are trap, and I discover that if you make and item and put the health in number negative you dont death, all the monsters not attack you, is like if you are invicible, maybe is a bug or something, but this way i can make a cloak for invicible for limited time.
     
    Last edited: Nov 4, 2016
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    One step after another, let's focus on equipping the staff first. Can you make a screenshot of the mage prefab's equipmentTypes and of the staff item?
     
  5. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    OK all this category works very good, all class cant use EquipmentWeaponStaff only the mage.
     

    Attached Files:

  6. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    How I can separate items which are sorted? It is made?
     
  7. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    hello Bartuq Just need create diferent class for each, for example weapon for mage EquipmentWeaponStaff, and for warrior EquipmentWeaponSword and finaly in the item just put same category for each weapon or stuff you make. I hope you undestande me
     
  8. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    I mean separate for example 2 potions in inventory to: 1 potion and 1 potion
     
  9. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I guess just drag, the potion. and split
     
  10. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    Press and hold the Left or Right Shift Key then drag the item, the stack will then split in half i.e. if you have a stack of 10 potions the stack will split into two stacks of 5.

    -J
     
    mischa2k likes this.
  11. michaelbeers

    michaelbeers

    Joined:
    Aug 19, 2015
    Posts:
    18
    @vis2k Maby time consuming but is an idea to add everyone who bought the plugin to a repository (if using) so we can collaborate...
     
  12. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes will keep it in mind. For now, if you have a suggestion / find code that can be improved, please just tell me directly. If people start doing it so often that a private repository makes sense, then it will happen.
     
  13. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello guys any one can help me? I need to know, how I can use a fire ball and synk with the staff, like the bow and the arrow, how I can do that?any tip? and how I can use different arrows in the archer? any help is welcome :)
     
  14. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    I think that you must look at:
    Prefabs/Projectiles
    Projectile.cs and NetworkManager - Spawn info

    jagatai33 Thanks for help with my question.

    I wanna make:
    Target closest enemy and select therebetween when I press "TAB". It's working but somehow randomly selects. Difficult to select properly because it's takes too long. I need something like select all one after the other from top to bottom as they stand and back again or by clockwise. Someone could help?

    Code (CSharp):
    1.     public List<Transform> targets;
    2.     public Transform selectedTarget;
    3.     void SortTargetsByDistance()
    4.     {
    5.         targets.Sort(delegate (Transform t1, Transform t2) {
    6.             return Vector3.Distance(t1.position, transform.position).CompareTo(Vector3.Distance(t2.position, transform.position));
    7.         });
    8.     }
    9.  
    10.     void DeselectTarget()
    11.     {
    12.         selectedTarget = null;
    13.         Destroy(indicator);
    14.     }
    15.  
    16.     [Client]
    17.     void SelectionHandling() {
    18.         if (Input.GetKeyDown("tab"))
    19.         {
    20.             Debug.Log("Tab pressed");
    21.             targets.Clear();
    22.             Collider[] col = Physics.OverlapSphere(transform.position, 60);
    23.             foreach (Collider c in col)
    24.             {
    25.                 if (c.CompareTag("Monster") && c is SphereCollider)
    26.                 {
    27.                     targets.Add(c.transform);
    28.                     Debug.Log("Tab pressed Monster");
    29.                 }
    30.             }
    31.             if (targets.Count == 0) return;
    32.  
    33.             SortTargetsByDistance();
    34.  
    35.             if (selectedTarget == null)
    36.             {
    37.                 selectedTarget = targets[0];
    38.             }
    39.             else
    40.             {
    41.                 int index = targets.IndexOf(selectedTarget);
    42.  
    43.                 if (index < targets.Count - 1)
    44.                 {
    45.                     index++;
    46.                 }
    47.                 else
    48.                 {
    49.                     index = 0;
    50.                 }
    51.                 DeselectTarget();
    52.                 selectedTarget = targets[index];
    53.             }
    54.             var entity = selectedTarget.GetComponent<Entity>();
    55.             SetIndicatorViaParent(selectedTarget.transform);
    56.          
    57.             CmdSetTarget(entity.netIdentity);
    58.         }
     
    Last edited: Nov 5, 2016
  15. ProverbsVG

    ProverbsVG

    Joined:
    Jun 15, 2016
    Posts:
    3
    Anyone know how to modify the Network Manager so the client can connect to a host over the internet?
     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Someone posted tab targeting code a few pages before in this thread. I didn't test it myself, but it might help you.

    You have to put your server's IP and Port into the NetworkManager settings.
    You may also find this useful: https://noobtuts.com/unity/unet-server-hosting
     
  17. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    My another problem is save and load when I put items on the floor from my inventory. I tried but it didn't work out. Save and load is working but problem is the position of the object. I don't know how to load position.

    Database.cs
    Code (CSharp):
    1. public static string ItemPath = Path.Combine(path, "Items");
    2.  
    3.     public static void ItemSave(ItemDrop item)
    4.     {
    5.  
    6.         Directory.CreateDirectory(ItemPath); // force directory
    7.  
    8.         var settings = new XmlWriterSettings();
    9.         settings.Encoding = Encoding.UTF8;
    10.         settings.Indent = true;
    11.  
    12.         //XmlWriter writer;
    13.  
    14.         if (!File.Exists(Path.Combine(ItemPath, "Item")))
    15.         {
    16.             using (var writer = XmlWriter.Create(Path.Combine(ItemPath, "Item"), settings))
    17.             {
    18.                 Debug.Log("Stwórz");
    19.                 writer.WriteStartDocument();
    20.                 writer.WriteStartElement("items");
    21.  
    22.                 writer.WriteStartElement("item");
    23.                 writer.WriteElementString("name", item.name);
    24.                 //writer.WriteElementObject("position", item.transform.position);
    25.                 writer.WriteStartElement("position");
    26.                 writer.WriteElementString("x", item.transform.position.x.ToString());
    27.                 writer.WriteElementString("y", item.transform.position.y.ToString());
    28.                 writer.WriteElementString("z", item.transform.position.z.ToString());
    29.  
    30.                 writer.WriteEndDocument();
    31.             }
    32.         }
    33.         else
    34.         {
    35.  
    36.             XmlDocument doc = new XmlDocument();
    37.             doc.Load(Path.Combine(ItemPath, "Item"));
    38.  
    39.             Debug.Log("Dodaj");
    40.             XmlElement _item = doc.CreateElement("item");
    41.             XmlElement _name = doc.CreateElement("name");
    42.             _name.InnerText = item.name;
    43.        
    44.             XmlElement _position = doc.CreateElement("position");
    45.             XmlElement _x = doc.CreateElement("x");
    46.             _x.InnerText = item.transform.position.x.ToString();
    47.             XmlElement _y = doc.CreateElement("y");
    48.             _y.InnerText = item.transform.position.y.ToString();
    49.             XmlElement _z = doc.CreateElement("z");
    50.             _z.InnerText = item.transform.position.z.ToString();
    51.  
    52.  
    53.             doc.DocumentElement.AppendChild(_item);
    54.             _item.AppendChild(_name);
    55.  
    56.             _item.AppendChild(_position);
    57.             _position.AppendChild(_x);
    58.             _position.AppendChild(_y);
    59.             _position.AppendChild(_z);
    60.             doc.Save(Path.Combine(ItemPath, "Item"));
    61.         }
    62.     }
    63.  
    64.  
    65.     public static GameObject ItemLoad(string name, List<ItemDrop> prefabs)
    66.     {
    67.         var fpath = Path.Combine(ItemPath, "Item");
    68.         if (File.Exists(fpath))
    69.         {
    70.             var settings = new XmlReaderSettings();
    71.             settings.IgnoreWhitespace = true;
    72.  
    73.             using (XmlReader reader = XmlReader.Create(Path.Combine(ItemPath, "Item"), settings))
    74.             {
    75.                 reader.ReadStartElement("items");
    76.  
    77.                 while (reader.Read())
    78.                 {
    79.                     var prefab = prefabs.Find(p => p.name == name);
    80.                     if (prefab != null)
    81.                     {
    82.                         var go = (GameObject)GameObject.Instantiate(prefab.gameObject);
    83.                         var item = go.GetComponent<ItemDrop>();
    84.  
    85.                         item.name = reader.ReadElementContentAsString();
    86.  
    87.                         //item.transform.position = reader.ReadElementObject<Vector3>();
    88.                         //Debug.Log(item.transform.position.x);                      
    89.                    
    90.                         reader.ReadEndElement();
    91.                         return go;
    92.  
    93.                     }
    94.                 }
    95.             }
    96.         }
    97.         Debug.LogWarning("couldnt load item data:" + fpath);
    98.         return null;
    99.     }
    New attempt, but still not working :/ with item.xx = item.transform.position.x.ToString(); etc.
    Code (CSharp):
    1.                         item.xx = reader.ReadElementContentAsString();
    2.                         item.yy = reader.ReadElementContentAsString();
    3.                         item.zz = reader.ReadElementContentAsString();
    4.                         float xVector = float.Parse(item.xx);
    5.                         float yVector = float.Parse(item.yy);
    6.                         float zVector = float.Parse(item.zz);
    7.                         item.transform.position = new Vector3(xVector, yVector, zVector);
     
  18. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Save with:

    writer.WriteElementObject("position", item.transform.position);

    Load with:

    item.transform.position = reader.ReadElementObject<Vector3>();
     
  19. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    I can't save it like that because I write all objects to one file that exists. Create, load and save to it, load.
     
  20. reefcrazed

    reefcrazed

    Joined:
    Oct 29, 2016
    Posts:
    12
    The way the networking is setup with this. Is this a dedicated network server you can host or is it hosted in the Unity Cloud? How many consistent players? That is a big thing for me spending $80, I would rather host the server dedicated.
     
  21. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    It`s self hosted - which means you set up server up yourself (during project build select server headless version) and for don't forget change your ip+port.
     
  22. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    hi all i was wondering in the chareter part armour and weapons attachment it only has sword and shield how can you do helmets and chest and legs and other stuff like that i wanna know please and thanks again in advace on how to do this
     
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    This should also work for multiple objects. XML is very flexible.

    As @cioa00 said, it's just a 'simple' UNET project that you can use as host, or as dedicated server. We can't host UNET servers in the Unity cloud yet, this was announced for UNET Phase 3 or 4 with the simulation server. You can host it on amazon etc. though.

    You just have to add the items and set the EquipmentLocation on the hand, head, etc.
     
  24. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    So do I duplicate like the sword or shield one place it over the chest say for chest then recname it the chest line then name the duplicate with the new one if that makes sense then place the item like I would with the sword and shield but the armour
     
  25. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    102
    Couple of questions about uMMORPG and UNET in general. Sorry ahead of time if these are basic. I do have a couple years of UE4 development behind me, but I'm brand new to Unity. :)

    My app is intended be run as a listen server with the server playing a character along with up to 8 additional players and maybe 30-50 mobs for killing. Is that realistic with an 'out of the box' implementation of uMMORPG? By realistic I mean will network performance be at a 'playable' state on a mid-range (say i7, 2+Ghz, 8MB) PC with decent bandwidth?

    Is there a compiled version of the web demo that I can download and run local that my friends could log into so we can test this ourselves?

    I am primarily interested in seeing how responsive the click-to-move functions are with multiple users. I am concerned about overshoots, rubber banding, etc.

    One thing I see with uMMORPG is that when you click to move in a different direction than you are facing, there is a noticeable amount of 'sliding' movement before the legs start moving. Is that a UNET issue?

    In general when I search the web and youtube for UNET multiplayer examples, the only thing I ever see are demos with a single player in them. I did find one or two with multiple players but the movement looks horrible - jerky, overshooting, bad prediction, etc. This and other forum comments are giving me the impression that UNET is 'not ready for prime time'. Can you comment (opinions are just fine) on how realistic you think my above scenario is to implement in Unity/UNET? Or should I stick with UE4?

    My main reasons for switching to unity are 1- My day job is as a c# developer. 2- I'm fine with c++ but BP is annoying. 3- I eventually want my app to be easily modded by users and UE just doesn't have solid support for that right now.

    In the end none of that will matter if Unity's networking cant give me what I want. Sorry for the long post. Just trying to pick you guy's brains a bit.
     
    Last edited: Sep 14, 2021
  26. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You just need an item with category EquipmentChest and a then add a EquipmentLocation for the chest to the player prefab's children (the bones).

    Yes, 8 players and 50 monsters will work fine. I tested it on namecheap's cheapest VPS a while ago. 500 monsters were okay. 1000 monsters caused 100% CPU usage but things still worked fine, just with a small delay.

    uMMORPG is meant to be hosted as dedicated server, so if you want to show a list of servers then you need to add some features or use whatever UNET provides (master server etc.)

    There is no compiled version of the Web demo for you to test locally. I did consider setting up a server for testers, but decided that my time is better spent working on the code. Servers need maintenance, security, updates, payments, etc. which all takes time.

    Click to move is as perfect and as simple as it gets. If a player moves somewhere then the server only synchronizes the destination. The client then calculates it's own path - which is always exactly the same as the server's path, thanks to Unity's Navigation system. So there will never be overshoots. There is no rubberbanding either, since the client and server path will always be exactly the same. The client does have a check to make sure that the server and client position don't go too far apart in case of lags etc.

    The sliding that you see sometimes is just a matter of tweaking the animation, no networking at all. The walking animation starts/stops at a certain speed. If you use a small flag then it starts and stops too abruptly. If you use a bigger flag then it slides a bit. You can play around with the parameter to get the perfect result for your case / animation. If that's not enough then you can still add extra animations like 'stop-walking'.

    About UNET capabilities: click movement is no problem whatsoever. Other MMOs usually synchronize the position every 500ms and then interpolate. But by using Unity's Navigation system we only have to synchronize the destination once, hence no interpolation and no weird affects. WSAD movement is another story, since the user might change directions more quickly. uMMORPG has a simple WSAD solution which is good enough for now. Client side prediction and similar features might be added later too. This is what's still difficult in UNET, mainly because there is no standard component for it.

    Since you asked: my experience with UNET was very poor during the last 1.5 years. I reported several critical UNET bugs that were all ignored for about a year. As a matter of fact, the highest rated UNET bug on the issue tracker was reported by me ( https://issuetracker.unity3d.com/is...lash-readbytes-out-of-range-errors-in-clients ) and then labeled as 'by design'. 'By design' is not acceptable on this skill level. If a bug can be reproduced then it can be fixed.

    That being said, things are improving. A few less important bugs were fixed. The UNET developers started posting on the forums again. And I know workarounds for all the major issues, which is why my uMMORPG and uMOBA packages all work flawlessly. I would recommend UNET to everyone. uMMORPG has all the core MMO features with only 4000 lines of code, which is crazy. It took me 50.000 lines of code for half the features back when I did that in C++.

    Also note that UNET is split into high level api (HLAPI) and low level api (LLAPI). The LLAPI works pretty good and the developer is very responsive. The HLAPI was the problem. The HLAPI is open source though, so we could always implement our own / modify it to our needs if necessary, so that's good.

    Let me know if you have any more questions.
     
    Last edited: Nov 7, 2016
  27. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    i have a question i have my own charecter now in the scene i struggled but got there but i have a problem where i have the sword doesnt follow the hand is that because the animation is a run the sword arm goes back and forth please help and the shield does to please help thanks again in advance how do i get the sword to follow and shield
     
  28. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Attach it to the model's bones that are used for the animation. There should be a hand bone somewhere. Check out the warrior prefab and see how the sword and shield equipment locations are attached to specific bones in the hierarchy.
     
  29. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    I used fuse does that make a different for auto rigg
     
  30. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello, I'm still can't sink the fireball with the Mage please help me. How I can do it.?
     
  31. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    102
    Hello vis2k

    Thank you for your informative reply. That will give me a lot to think about. For the most part though it looks like my requirements are well within what Unity can deliver.

    I have a couple more questions if you don't mind. My particular game will be a listen server app with the server also acting as a player - it will not be a dedicated server app. In addition it should allow the clients to connect after a game map has already been loaded - something that the UNET Lobby doesn't seem to support. I am assuming UNET has functions for directly connecting a client to a server via a given IP and port.

    Do you have any thoughts on this? At first I thought that UNET was just an API that allowed us to quickly write multiplayer apps. But on further reading it seems that it's an entire network with matchmaking, server lists, etc. That's a bit more than I need. Would I have to pay any kind of fees with a direct IP connect application?

    Finally I was looking at your uMOBA application. It seems to be geared more towards what I am trying to accomplish. I don't need a quest system - just a solid multiplayer foundation and vendors and skills. Maybe that is where I should start my learning curve. Can you talk more about specific differences between uMMORPG and uMOBA? What features does one have that the other does not?

    Thanks again!
     
    Last edited: Sep 14, 2021
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMMORPG V1.40 is now on the Asset Store:
    • UIUtils.AnyInputActive performance improved: doesn't use FindObjectsOfType workaround anymore.
    • NavMesh Voxel Size set to 0.3 to greatly reduce path calculation costs and NavMesh size from 462KB to 156KB.
    Important: a small bug made it into V1.40. Please open NetworkNavMeshAgent and change the send interval to 0 again in case you encounter issues on the client side. The change will be reverted in V1.41.

    As long as the GameObject has a bone structure in it, it should be fine.

    As I said before: tell us exactly what works and what doesn't, make screenshots, etc.

    uMMORPG clients connect directly to servers. You can easily have a list of running servers too. I think there's a UNET service for that. Otherwise just code something yourself, that should only be a few lines (each uMMORPG server pings the list server every minute, done).

    You don't need any UNET services for uMMORPG. It's just a client connecting to a server.

    uMOBA is for games like Dota where players match up, then start a game session, then the game session ends after a while. uMMORPG is for a game world that exists 24/7.
     
    Last edited: Nov 9, 2016
  33. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress Info: V1.41 was submitted for review. It will have the 5.4.2p3 upgrade for the UNET OnDisconnectError fix as well as a few minor uMMORPG fixes that were found during the last few weeks.
     
  34. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    i did all the stuff it works but i think its the animation is differnt the run animation is the shield goes infront when not moving then when starts runnign the shield should go on the side but it doesnt
     
  35. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    also i dont know if you fixed it the ? ! also is around the wrong way
     
  36. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    also i am wondering how do i get rid of the skill system i wanna make it like wow in the sense of you level then you have to go to a person to learn the skill instead how can i do that and its based on levels also im trying to make a quest so i have to talk to a person i have it set but i dont know how to make it so i get the quest from 1 then to the other all it does is i get the quest then it straight away goes to finish quest
     
  37. takapi

    takapi

    Joined:
    Jun 8, 2013
    Posts:
    79
    Hi
    Could I use the uMMORPG to 2d game ? :)
     
  38. michaelbeers

    michaelbeers

    Joined:
    Aug 19, 2015
    Posts:
    18
    Alot of the code can be used i guess... The only probleme you have to deal with is converting the 3D environment to a 2D environment, you'll have to change for example the movement functionality for your own 2D movement
     
    mischa2k likes this.
  39. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Well did you attach the equipment location to the hand bone?

    The ? is supposed to show if the npc has a quest. The ! when it's finished.

    Add a npc dialogue option for skills, then show the skills window.

    From the documentation:

    How to make a 2D MMORPG with uMMORPG
    uMMORPG is mostly networking code, it doesn't really matter if your game is 2D or 3D. For example, you could easily make your camera orthographic and make it look down on the player to have a 2D game already (which still uses 3D models).

    If you want to make a real 2D MMORPG with sprites instead of 3D models, then you will to keep a few things in mind:

    • You should be comfortable with Unity's 2D features.
    • You will have to replace all 3D models with Sprites and proper 2D Colliders.
    • If you want 2D top-down movement with navigation, then you need a 2D navigation system like our Navigation2D asset. You also have to modify our NetworkNavMeshAgent component to make it work with NavMeshAgent2D then - which should be very easy.
    • If you want 2D WSAD or sidescroller movement, then you will have to implement that yourself and also make it synchronize with the server.
    • The networking code uses Vector3 for positions, which means that an unecessary '0' is sent around all the time. You don't really have to worry about that, unless you run into bandwidth issues some day.
    Other than that, items, quests, skills etc. are all the same.
     
  40. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Are you plan to add deposit system? to storage your stuff? like a chest or something?
     
  41. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Not sure if its good idea to let a player consume potion right on the inventory even when hp is full. Here is a fix for that (probably it can be done more elegant way):
    Code (CSharp):
    1. // open file Scripts/Player.cs and find function called CmdUseInventoryItem
    2. // find line which start with
    3. //    if (item.category.StartsWith("Potion")) {
    4. // and replace it content with
    5.                 // use
    6.                 var itemUsed = false;
    7.  
    8.                 if(item.usageHp > 0 && hp < hpMax){
    9.                     hp += item.usageHp;
    10.                     itemUsed = true;
    11.                 }
    12.  
    13.                 if(item.usageMp > 0 && mp < mpMax){
    14.                     mp += item.usageMp;
    15.                     itemUsed = true;
    16.                 }
    17.  
    18.                 if(item.usageExp > 0){
    19.                     exp += item.usageExp;
    20.                     itemUsed = true;                  
    21.                 }
    22.  
    23.                 // decrease amount or destroy
    24.                 if (itemUsed && item.usageDestroy) {
    25.                     --item.amount;
    26.                     if (item.amount == 0) item.valid = false;
    27.                     inventory[index] = item; // put new values in there
    28.                 }
    29.  
    30.  
     
  42. takapi

    takapi

    Joined:
    Jun 8, 2013
    Posts:
    79
    Hi, vis2k and michaelbeers. :)
    thank you for reply.
     
  43. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Not planned yet. One step after another.

    You are welcome.
     
  44. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello guys please help me, I try for a few days how to make different projectile right now only exist ARROW projectile, how I make different one. I see many tutorials and Im still not success.
     

    Attached Files:

  45. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Drag the arrow into the scene, rename it, modify it to your needs and then drag it back into the project area again to create a new prefab.
     
  46. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Faster method if you need make a copy of prefab - click on it and push ctrl + d then rename it ;)
     
    mischa2k likes this.
  47. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Hi @vis2k quick questions... how do you limit the number of players per server? I don't see any mention in the docs about how to set the the amount of concurrent connections to a single server. Please advise when you have moment.
     
  48. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can change it in the NetworkManager under Advanced Configuration->Max Connections.
     
  49. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    It is possible to add textmesh over cursor and with OnMouseEnter it will be display proper text?
     
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What exactly are you trying to do? There is already a Tooltip that is shown when moving the cursor over items, skills, etc.