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. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  2. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Looks very good :)
    I see you change tooltip position, it's my "how to change tooltip position similarly to Morrowind" or some other way?
     
  3. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Thanks bartuq!
    Yes I used your tooltip solution, it was way better :)
     
  4. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    How do you scale item sprite when you drag it?

    This is a good way to do that? In OnBeginDrag:
    current.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    To keep everyone up to date: I contacted Unity about my forum domain. Will know more soon.
    Will keep researching the addon system in the meantime.

    Modify Prefabs/UI/Dragee's size in the Inspector.
     
  6. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    That would be overkill. UNET has two parts, the LLAPI and the HLAPI. The LLAPI (raw packet sending) works fine. The HLAPI has this bug. We could write our own HLAPI, fix the bug ourselves in the HLAPI (https://bitbucket.org/Unity-Technol...d9961092c4a73443c09694cff5dde9e56f9f1/?at=5.4) or ask the Unity people to fix it. Maybe head over to the networking forum and ask for a fix, maybe it helps.
     
    Natalynn likes this.
  8. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
  9. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    I assume your character which u want to load is not on the location where is your main (floor) area. You could delete character and create new one. Or did you changed map (floor) and forgot move spawn point?
     
    mischa2k likes this.
  10. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    HLAP is that hard?
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What do you mean?
     
  12. Sattebu

    Sattebu

    Joined:
    Feb 25, 2017
    Posts:
    2
    Hello!
    First, thanks for your work!

    Btw, Could you explain me how to do a server chat (not for all observers, but all player on the server), please?
     
  13. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Where can I find the "CmdTradeRequestSend" source code? and how to add class inside the combobox? Is Gathering and Killing are the only available options in quests? thanks.
     
    Last edited: Feb 25, 2017
  14. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    Is it working? I want to create a party system. Is this the easiest way to do it?
     
  15. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    @vis2k ideas on loading characters actuall 3d models with equipment to the character selection screen? Full display of your created characters?
     
  16. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    I would say write up your own HLAPI, that way all this stuff would be fixed lol. Then once they released there own in-house fix, then remove the workaround. Cause at this rate (who knows how long it will be for this to happen). Unet Phase 3 already taking ages as is :(.
     
  17. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    How can I integrate my email address in registration? We know there comes a time we forgot our username and password, so in order to retrieve it we need to connect to our valid email. Does someone tried this? And I saw mount system? How did they made that? And pet system, can we implement that? Sorry for the questions, its too many
     
  18. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    Agree with you. Please write up your owm HLPA because we need this game working fine.
     
  19. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Take a look at the PlayerChat component. The CmdMsgWhisper function already goes through every player on the server, you can start from there.

    Player.cs

    You would have to send all the character info in the CharactersAvailableMsg so that the client knows about the equipment etc. Then modify the CharacterSelection UI script to also load the character prefab, instantiate the equipment, etc. This would require a whole lot of extra code and worrying, I am not sure if it's worth the effort for those 2 seconds in the beginning of playing the game.

    That's the thing. I would spend months developing HLAPI fixes, just for them to release their own fix a year later. Of course that would be useful for a few people, but that would also be a 100% waste of my time and energy. Unity doesn't pay me to fix their code. They pay a whole group of developers thousands of dollars a month to do just that.

    Just use 'email' instead of 'name' for the account name and make sure that there is an "@" in it.
    You would have to implement mounts and pets on your own or wait until I do that.
     
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: still playing around with the addon system. Another approach today, based on C#'s partial again. Looks very promising so far.
     
  21. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    93
    vis2k please Prevision because my project is waiting for its big change
    I hope the end of renomages?:)
     
  22. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What do you mean with prevision? What do you mean with renomages?
     
  23. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    93
    vis2k v.1.64 and renomage variable and partial class :p
     
  24. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    @vis2k Did you know how can I fix this
    NetworkManager detected a script reload in the editor. This has caused the network to be shut down.
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

    .thanks
     
  25. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    It`s just notice error, which you can ignore. Beside if im not wrong it happens only throught editor view.
     
    mischa2k likes this.
  26. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    How does the skeleton moves even though it is on idle? I want my monster to move too. Help! What is the purpose of the box collider?
     

    Attached Files:

    Last edited: Feb 25, 2017
  27. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please be more detailed. Does it move and it's not supposed to, or is it supposed to move and it's not?
    Also please make a screenshot of the monster component in the Inspector.
     
  28. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    Parameter 'currentSkill does not exist.UnityEngine.Animator.SetInteger(String, Int32). What is this error?
     
  29. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Open the animation controller (in the Models folder), rename the skillCur parameter to currentSkill:
    Screenshot at Feb 26 09-16-09.png
     
  30. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    Question:

    the following works so far in hosted mode.
    but if i run a dedicated server and connect with the client i got this error after interacting with the object:

    "trying to send command for object without authority"

    the gameobject is a Chest in the scene.
    can someone show me the right way to give the "authority"?



    Code (CSharp):
    1.     using UnityEngine;
    2.     using UnityEngine.Networking;
    3.    
    4.     public class Test : NetworkBehaviour {
    5.    
    6.         Player player;
    7.    
    8.         void Update()
    9.         {
    10.             player = Utils.ClientLocalPlayer();
    11.             if (!player) return;
    12.    
    13.             if (Input.GetKeyDown("y"))
    14.             {
    15.                 ItemTemplate gatherItem = ItemTemplate.dict["Steelplate"];
    16.                 if (gatherItem != null)
    17.                 {
    18.                     var freeIdx = player.inventory.FindIndex(item => !item.valid);
    19.                     if (freeIdx != -1)
    20.                     {
    21.                         CmdAddSomething("Steelplate");
    22.                     }
    23.                 }
    24.             }
    25.         }
    26.    
    27.         [Command(channel = Channels.DefaultUnreliable)] // unimportant => unreliable
    28.         void CmdAddSomething(string gatherName)
    29.         {
    30.             ItemTemplate gatherItem = ItemTemplate.dict[gatherName];
    31.             if (gatherItem != null)
    32.             {
    33.                 player.InventoryAddAmount(gatherItem, 1);
    34.             }
    35.         }
    36.     }
    37.  
     
  31. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Show me your prefab Inspector to which you have added this script. You need add that prefab to you networkmanager in scene hierarchy.
     
    Last edited: Feb 26, 2017
  32. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    inspect.jpg
     
  33. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    I will check it right away what is wrong. I use a similar script but slightly more developed. Give me few minutes.
     
    Ronith likes this.
  34. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    How to have a button for a world map?
     
  35. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    mh, there are multiple ways to implement a world map.

    just a pretty simple example:

    Code (CSharp):
    1.  
    2. if(Input.GetKeyDown("m")){
    3. // show a GUI with a selfpainted worldmap
    4. }
    5.  
     
  36. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    @Ronith - I don't know why this not working when it is attached to individual object.

    Do it this way:

    Player.cs
    protected override void UpdateClient()
    here
    Code (CSharp):
    1. AddSomething();
    then also in Player.cs
    Code (CSharp):
    1.     [Client]
    2.     public void AddSomething()
    3.     {
    4.         if (Input.GetKeyDown("y"))
    5.         {
    6.             ItemTemplate gatherItem = ItemTemplate.dict["Steelplate"];
    7.             if (gatherItem != null)
    8.             {
    9.                 var freeIdx = inventory.FindIndex(item => !item.valid);
    10.                 if (freeIdx != -1)
    11.                 {
    12.                     CmdAddSomething("Steelplate");
    13.                 }
    14.             }
    15.         }
    16.     }
    17.  
    18.     [Command(channel = Channels.DefaultUnreliable)] // unimportant => unreliable
    19.     void CmdAddSomething(string gatherName)
    20.     {
    21.         ItemTemplate gatherItem = ItemTemplate.dict[gatherName];
    22.         if (gatherItem != null)
    23.         {
    24.             InventoryAddAmount(gatherItem, 1);
    25.         }
    26.     }
    and if you need make detect mouse click etc. do it also in Player.cs but you need make new Tag in Inspector then set it to your clickable object and in script for example hit.collider.gameObject.tag == "GatherItem"
     
  37. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    I figured it out . Thanks for the quick response
     
  38. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    thanx, i will try it.

    Edit: it works, thank you!
     
    Last edited: Feb 26, 2017
  39. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Wow! A world map. can you explain it further? I want to have it also.
     
  40. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    in my case, i dont use a worldmap in my project. i searched around with google and found these examples for you:
    http://answers.unity3d.com/questions/416354/loading-a-image-to-display-on-screen.html
    http://answers.unity3d.com/questions/1111789/how-to-show-image-when-button-is-pressed.html
    http://answers.unity3d.com/questions/519960/interactive-2d-world-map.html

    a worldmap is a clientside thing, it should be very simple to implement it with basic unity knowledge. just look around and try a bit.
     
    Last edited: Feb 26, 2017
    jria likes this.
  41. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Thanks a lot bro!
     
  42. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Where can I see the codes inputted in the shortcut bar? or how will I put a code in a button that can open a image ?
     
  43. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    @vis2k
    Do you plan rewrite NPC trade system in style of Item Mall in near future? I mean item categories, buy more item type than one at the same time (adds item to the list after click, then show total cost).

    If not then I will start today to modify it yourself :)
     
  44. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: the addon system is getting really good. I tested it by converting all of the following features to addons:
    Screenshot at Feb 26 18-54-58.png

    It's kind of neat to have all the Quests logic in one script, which can be deleted to remove the whole quest addon at once. Same with the other addons.

    I am not yet sure if I will convert all those features to addons in the official code base, since that would break everyone's code again. Will probably just release the addon system and go from there.

    I probably won't, I like it as it is - simple and useful.

    Check out the UIShortcuts script.
     
    Ronith likes this.
  45. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    How about the code. where will I put it? I want to add a shortcut and put a world map on it
     
  46. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Look in UIShortcuts.cs and Scene Hierarchy World/Canvas/Shortcuts.
    You should be able to do on this basis.

    Sometimes I see here a simple questions. Some of those questions going to solve in simple way reading Unity documentation [LINK] or searching error text in internet.

    also view code in uMMORPG, Canvas in Hierarchy, searching by similar function.

    You can learn a lot.
     
    Last edited: Feb 26, 2017
    mischa2k and Ronith like this.
  47. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    Yay... the very first LetsPlay of Canyonbreed with a teammate running on a dedicated virtual server. I'm pretty glad that everything works so smoothly.

    @bartuq thank you for helping me out with your AddItem-Support. check 9:30 in the video, there is a chest with your script :)

    @vis2k I already mentioned that uMMORPG is totally cool? thank you

     
    jagatai33 and camta005 like this.
  48. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Great progress as always. Thanks!
     
  49. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Cool! Looks promising. I'm glad I could help :)
     
  50. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    I've import a bow. but there's no arrow when I'm attacking the monster. why is that?