Search Unity

[RELEASED] TopDown Engine by More Mountains [new v2.1 : procedural gen, new sound manager...]

Discussion in 'Assets and Asset Store' started by reuno, Oct 9, 2018.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > The documentation describes step by step what to do, I'd recommend following them :
    https://topdown-engine-docs.moremountains.com/loot.html

    If that doesn't work, could you be more specific about what part exactly you don't understand? What "didn't work"? At what step are you lost?

    As for scriptable objects, you can't "open" them, they're a data structure. All you can do is select them, and their contents will display in your inspector panel. Here's a beginner tutorial about them :
    https://learn.unity.com/tutorial/introduction-to-scriptable-objects
     
  2. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    Oh thank you, I was looking in the API documentation. Also, why are all my health bars turning black when I build and run the game?
     
    reuno likes this.
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > Ah that's reassuring, I wasn't sure what else to add to these steps!
    As for your health bars turning black, I have to admit I don't know why they'd do that.
    Does the problem happen if you create an empty project, and build the demos, no changes made?
     
  4. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    I built Koala2D in my project folder but only added that scene to the build and the health bars are working fine. Out of curiosity I changed the black background color of the health bars to a pink to see if it was maybe drawing that layer over the top but they were still black. Do you still want me to test a demo scene in an empty project?
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > If it works in the demos, then it must be something you changed in your scenes or prefabs. I can't think of anything that could cause this though. I'd recommend looking at your history of changes to check what that may be.
     
  6. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    Okay it turns out it was something happening with the scene before it. I have a main menu scene with ui on it and then I set it to inactive when the game starts before activating the game scene, but I dont know how or why it causes the health bars to turn black.

    Edit:Okay I figured it out, there is a scene transition script on it that fades to black as the scene switches, for some reason the health bars are inheriting that color. I turned the alpha down to zero and the health bars disappeared as well
     
    reuno likes this.
  7. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    Hey, me again. I'm having a few issues with the inventory system. I created an item but when I debug it and try to add it to an inventory the image of the item does not show up, however the details of the item does. The inventory Im using I copied over from Koala2D so I set up the item to work with that.
    I loaded up the Koala2D and was able to add my item properly to that inventory in that scene, but that doesn't make sense to me since I copied the inventory over.
    -I added the item to a Resources/item folder
    -The itemID matches the name of the item object
    -The target inventory is set properly

    If I add the item once, no error appears, the item doesn't show in the inventory panel, but the display details do.
    If I try to add the item again or remove that item I get an error (shown below), the item is still invisible but the display details update to reflect item count.
    Error message:
    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    3. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
    5. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <fb001e01371b4adca20013e0ac763896>:0)
    6. MoreMountains.InventoryEngine.InventoryDisplay.UpdateSlot (System.Int32 i) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryDisplay.cs:457)
    7. MoreMountains.InventoryEngine.InventoryDisplay.UpdateInventoryContent () (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryDisplay.cs:440)
    8. MoreMountains.InventoryEngine.InventoryDisplay.ContentHasChanged () (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryDisplay.cs:383)
    9. MoreMountains.InventoryEngine.InventoryDisplay.OnMMEvent (MoreMountains.InventoryEngine.MMInventoryEvent inventoryEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryDisplay.cs:814)
    10. MoreMountains.Tools.MMEventManager.TriggerEvent[MMEvent] (MMEvent newEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Tools/Events/MMEventManager.cs:162)
    11. MoreMountains.InventoryEngine.MMInventoryEvent.Trigger (MoreMountains.InventoryEngine.MMInventoryEventType eventType, MoreMountains.InventoryEngine.InventorySlot slot, System.String targetInventoryName, MoreMountains.InventoryEngine.InventoryItem eventItem, System.Int32 quantity, System.Int32 index) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/InventoryEvents.cs:50)
    12. MoreMountains.InventoryEngine.Inventory.AddItem (MoreMountains.InventoryEngine.InventoryItem itemToAdd, System.Int32 quantity) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/Inventory.cs:143)
    13. MoreMountains.InventoryEngine.Inventory.OnMMEvent (MoreMountains.InventoryEngine.MMInventoryEvent inventoryEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/Inventory.cs:668)
    14. MoreMountains.Tools.MMEventManager.TriggerEvent[MMEvent] (MMEvent newEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Tools/Events/MMEventManager.cs:162)
    15. MoreMountains.InventoryEngine.MMInventoryEvent.Trigger (MoreMountains.InventoryEngine.MMInventoryEventType eventType, MoreMountains.InventoryEngine.InventorySlot slot, System.String targetInventoryName, MoreMountains.InventoryEngine.InventoryItem eventItem, System.Int32 quantity, System.Int32 index) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/InventoryEvents.cs:50)
    16. MoreMountains.InventoryEngine.ItemPicker.Pick (System.String targetInventoryName) (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/ItemPicker.cs:109)
    17. MoreMountains.InventoryEngine.PickableInventoryItemEditor.OnInspectorGUI () (at Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Editor/Core/PickableInventoryItemEditor.cs:73)
    18. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
    19. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > Without knowing exactly what you did, and in what context, it's very hard to guess what you may have done wrong. I'd recommend checking the documentation, it explains in details exactly how to setup your inventories and items. If your issue persists, please use the support form and provide repro steps, thanks.
     
  9. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    I fixed it by copying over the demo inventories and canvas's again, but I cant loot items unless I use the koala player prefab, why might this be? I'm not using the LevelManager to spawn my player or the playerID or anything of that nature since I merged my project into the top down engine, am I required to use these things for the pickups to work?
    I added the character inventory component to my player but that didn't change anything.

    I removed every single component from the Koala player prefab except the collider and rigidbody and it was still able to pick up items whereas my player cannot.
    I removed all the scripts from the koala coin prefab and it was still able to be picked up by the koala player prefab and the coin appears in the inventory... I don't understand this magic.
     
    Last edited: Feb 4, 2021
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > No, you don't need the LevelManager or playerID to have inventories work. The Inventory Engine is an independent library. You can look at the standalone InventoryEngine demos, they're separate from the TopDown Engine entirely.

    If your issues persist, again please use the support form and provide repro steps, thanks. It's very hard to tell what you may be doing wrong without these. I would need exact repro steps.
     
  11. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    21
    I'm not sure how to give you the reproduction steps, I bought this tool because of how little I know about unity and c#. Reproduction steps are the steps I took to arrive at my problem right?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @bdae > Yes, especially for beginners that's the easiest way to explain a problem (because it doesn't require to understand the problem). Just writing down each and every step you took should be enough to help you. Hard to do so without that though.
     
  13. renegrox

    renegrox

    Joined:
    Nov 24, 2013
    Posts:
    2
    Hello there, Im looking everywhere, and as a designer, not a programmer, Im freaking out here. I want to know if there is a way to allow the coneOfVision2d to face somehow the direction of your character. So far this cone only points to +x :(
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
  15. miikalo

    miikalo

    Joined:
    Nov 23, 2012
    Posts:
    10
    Hi @reuno , amazing asset! I can't for the life of me get the WeaponAim3D to aim also in the Y axis. A project of mine absolutely requires free aim also in Y axis. The aim seems to otherwise function correctly, meaning it rotates to face the target. Also a small bug I noticed when I run the demos: If I pick something up, the particle effect for the pickup seems to repeat forever.
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @miikalo > If you think you've found a bug, please use the support form to report it, and provide context info (what version of TDE? what demo? etc). I'm not aware of any issue with pickers in any of the demos in recent versions.

    As for vertical aim, this being a top down framework it's not something it focuses on. But you can of course set aim to any direction, there's an API for that. There's also an option in WeaponAim3D to have it shoot at the reticle's position, and have the reticle follow slopes (resulting in aim on the y axis) :

    upload_2021-2-7_15-44-13.png
     
  17. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    31
    Hi Reuno, I have a boss enemy with two guns which I am trying to set up. I've managed to set up the first gun firing projectiles but I am not too sure how to setup the other gun firing. I have added a secondary handle weapon script and added its initial weapon and added a weapon attachment, is there another step i'm missing? Thanks
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @AKAGT17 > Right now there is (surprisingly) no AI action to target specifically the secondary handle weapon ability. I'll add that to the next release. Don't hesitate to drop me a message via the support form if you'd like access to it before then.
     
  19. aishlove

    aishlove

    Joined:
    Apr 1, 2018
    Posts:
    1
    Hello Reuno, I want to make a system where bullets are fired continuously without pressing a button(mobile input), but the assets are so large that I would if you let me know appreciate a hint of which class to start with or option in engine. thx!
     
    Last edited: Feb 22, 2021
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @aishlove > I'd recommend creating a custom class that will pilot your weapon to have it always shoot. You can look at the AIActionShoot class to see how it's done. Just to be clear : your class wouldn't have to be an AI action, but looking at that class will show you how an external class can automatically cause a weapon to shoot.
     
  21. CHOPJZL

    CHOPJZL

    Joined:
    Dec 5, 2016
    Posts:
    54
    Hello Reuno, maybe this has been asked before, can you make Inventory Engine and MMFeedbacks free for TopDown or Corgi owners?
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @CHOPJZL > Both assets are already included as gifts in both TopDown and Corgi.
     
  23. CHOPJZL

    CHOPJZL

    Joined:
    Dec 5, 2016
    Posts:
    54
    Yeah, it's just nor very convenient to import the whole engine when I just want to use Inventory Engine or MMFeedbacks
     
  24. Cunny-Lang

    Cunny-Lang

    Joined:
    Jul 30, 2019
    Posts:
    19
    Yo! Why I can't use circle collider 2D on player char? It shows red error at start
     

    Attached Files:

  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Cunny-Lang > Because the controller requires a box collider 2D to function, as explained in the documentation.
     
  26. Cunny-Lang

    Cunny-Lang

    Joined:
    Jul 30, 2019
    Posts:
    19
    Yeah, I understand, but I just watched video and read doc where you said that we can use circle collider :(
    https://topdown-engine-docs.moremountains.com/how-to-create-character.html

    Is there any way to use it?
    And now I'm trying to create respawnable targets (not AI, just gameobj w hp, moving platform and auto-resp components), it's so cool and easy, but can I define a random zone or random points (wich are placed on scene) to respawn that obj? Ofc means "out of box", I definitely not a programmer so code is kinda hard for me(
    If not, so be it! Will think in other direction)
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Cunny-Lang > Yes, there are ways to use a circle collider, but that depends on what version you're on.
    What version of the engine are you running?
     
  28. Cunny-Lang

    Cunny-Lang

    Joined:
    Jul 30, 2019
    Posts:
    19
    Aww, sorry! I didn't upgrade!
    Still use 1.8 like theme named here) Never visit asset store for no reason. Here and with corgi engine always check theme name for updates, my bad!
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Cunny-Lang > Try to update to 1.10.1, it'll let you use a circle collider 2D.
     
    Cunny-Lang likes this.
  30. Lengjai

    Lengjai

    Joined:
    Nov 19, 2019
    Posts:
    6
    Hi Reuno I’ve encountered a bug with my ai. I’m using the version 1.10 and i basically swapped the prebuilt ai prefab character mesh for my own charactee mesh. I noticed sometimes when i play my game in the build, and i shoot my ai character they then just turn red and then just idle and dont attack anymore and most of all, they dont disappear after death. I wonder if any one else has encountered this issue?
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Lengjai > I can't recall anyone reporting something like this. I supposed you did a bit more than change the mesh, so I'd need a bit more details about what you're doing. If your issues persist, please use the support form and provide detailed steps I could try and reproduce on my end, thanks!
     
  32. khrysller

    khrysller

    Joined:
    Mar 14, 2019
    Posts:
    92
    @reuno, does your engine has the stuff to make the movement as point and click instead of using the virtual joystick? Thanks.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @khrysller > No, it doesn't, it focuses on top down action games at the moment, not point & clicks.
     
    khrysller likes this.
  34. zackarhino

    zackarhino

    Joined:
    May 19, 2016
    Posts:
    7
    Hey, I recently bought this asset to get a headstart on my game and learn about good practice in Unity. Everything is great so far (love the documentation!), but I ran into an issue with collision for grid-based movement.

    So I'm trying to make a snappy grid-based game. I started by building off of the Minimalist 2D Grid scene. I haven't really got a chance to dig into the engine code yet, been busy with school and work, but I quickly threw together a scene that roughly encapsulates what I want. In order to get this snappy movement, I cranked up the acceleration and limited the max speed. It feels good for the most part, but when the character collides with any wall, they'll be thrown slightly off the grid which causes the "Perfect Tile" boolean to never be reactivated, and from that point on it seems to be impossible to get back on the grid.

    I'm not really if this is a bug or a Unity problem, or just a collision problem in general because I jacked up the acceleration value. It's not an insanely high number, but the problem still seems to stick around even when I set it to something more sensible. I know I could definitely fix it once I start building off the code, but if you could help me find an "official" solution before I start to add more functionality, you'd be a lifesaver.

    Thanks, Zack
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @zackarhino > I believe it's something I've fixed for the next release. Until it's out, I'd recommend lowering acceleration to avoid that.
     
  36. Lengjai

    Lengjai

    Joined:
    Nov 19, 2019
    Posts:
    6
    Hi Reuno from my last post "Hi Reuno I’ve encountered a bug with my ai. I’m using the version 1.10 and i basically swapped the prebuilt ai prefab character mesh for my own character mesh. I noticed sometimes when i play my game in the build, and i shoot my ai character they then just turn red and then just idle and dont attack anymore and most of all, they dont disappear after death. I wonder if any one else has encountered this issue?"

    I think the issue stems from the proximinty managed script as I tested playing with the figures on the distance on my enemies and I am not sure if its something to do with if I shoot the enemy when it is out of the camera shot it can potentially just make the enemies not die or disappear and they just stay on the spot. Just for some random test I put the enable distance at 35 and enable distance at 5 and I kept shooting the enemy it woulnt die or disappear.
     
  37. zackarhino

    zackarhino

    Joined:
    May 19, 2016
    Posts:
    7
    I can definitely do that. Follow-up question: When the update is out, will I be able to update the assets in my existing project? I've never really worked with Asset Store assets.

    Also, I know in the FAQs that you said you don't really do release dates, totally understandable, but can I ask if this update is coming any time in the near future? No pressure obviously. I would like to know if I should hang on for a bit or just start grinding out code now.
     
    Last edited: Mar 10, 2021
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @zackarhino > If you look at the release page (https://topdown-engine.moremountains.com/topdown-engine-releases), either in the list or on the graph at the bottom, you'll get an idea at the pace at which things get updated. What I can tell you is there won't be an update tomorrow. As for how to update, that's explained on the first page of the documentation (https://topdown-engine-docs.moremou...y-to-update-from-an-old-version-of-the-engine). And as long as you've done things separately and "correctly", you'll be fine!

    @Lengjai > You should tweak your proximity manager's settings to ensure that it won't interfere with gameplay. You don't want it disabling a character in the middle of an action or a fight.
     
    zackarhino likes this.
  39. wechat_os_Qy0yYBl-hW1Q8B7zxVxYv-gKA

    wechat_os_Qy0yYBl-hW1Q8B7zxVxYv-gKA

    Joined:
    Mar 2, 2021
    Posts:
    1
    I am a Chinese creator. Please forgive me for my poor English.
    Can the corgi engine be in the same project as the top down engine?
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
  41. Martin_Blackbird

    Martin_Blackbird

    Joined:
    Dec 23, 2013
    Posts:
    8
    Hi @reuno,
    Your work is amazing. I have been stuck very early in the project, but I cannot solve it at all, so I come here for help and advice:

    I have created a AI character meant to be the sidekick of the Player; I have set up all the stuff following the manual and the AI behaviour works flawlessly, but the animation controller does not receive any feedback from the IA scripts. If I change the values manually it works so the animation controller and the animations works perfectly by their own.

    I have tried to link the animator into the prefab and into the instance but neither works… I put you a few screenshots of the setup.

    Any advice or help will be very appreciated!

    PS. The Run behaviour fails too (If I put the Koala prefab fails too for him…), not sure if relevant.

    Thanks!
    ShibaShoho_Animator.jpg
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Martin_Blackbird > It looks like you unchecked "Use Default Mecanim".
    As explained in the documentation, or the inspector itself, this should only be "set to false if you want to implement your own animation system". I'd suggest keeping it true.
     
  43. Martin_Blackbird

    Martin_Blackbird

    Joined:
    Dec 23, 2013
    Posts:
    8
    Thanks, now it receive the data reference to speed and direction, but not states like 'idle' or 'walking'... just 'alive'.
    ¿Any advice on this? ShibaShoho_Animator02.jpg
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Martin_Blackbird > I suppose you have some setup issue, but it's really hard to tell from that screenshot mosaic.
    I'd recommend looking at the documentation, it explains how to setup characters. You can also look at the many examples included throughout the demos. If your issue persists, please use the support form and provide repro steps I could follow to identify what you may be missing.
     
  45. Martin_Blackbird

    Martin_Blackbird

    Joined:
    Dec 23, 2013
    Posts:
    8
    Yep, I have done it twice... but I will try again... If I have success making itwork I will post the solution for anyone that fail in the same.
    Thanks!
     
    reuno likes this.
  46. Martin_Blackbird

    Martin_Blackbird

    Joined:
    Dec 23, 2013
    Posts:
    8
    SOLVED!
    upload_2021-3-18_21-7-36.png
    Ok, I detected the root of the issue (characters are falling)... now I will look for the solution! :D

    Solution: The collider for the ground was missing, but as there is no falling state in the animator for 2D it was unnoticed due to the lack of experience with the framework.

    Thanks for the support!
     
    Last edited: Mar 18, 2021
  47. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    Sorry, but i have no idea How save/load character status.
    is there any ready script for that? or use "DontDestroyOnLoaded" or just use custom script?
    if i should use custom script, which class/function i should call to "save" and "load" the status or at least get and set it.

    Thanks.
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @SarhanSoft > You can use the MMSaveLoadManager helper for that, or implement any other save/load solution of your choice, there's no limitation in that regard. I wouldn't use DontDestroyOnLoad though, that's not really what it's for.
     
  49. Tharlimas

    Tharlimas

    Joined:
    Mar 19, 2021
    Posts:
    3
    @reuno Is your nice TopDown Engine mixable with Playmaker or will that cause errors and can not be handled? Do you know that or have an integration or even tested it?
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,248
    @Tharlimas > While it won't cause errors, there's no integration for Playmaker. You'll be able to call TDE's public methods, like you would in any other Unity project, but that's pretty much it. If you don't plan on doing any C# and want to rely solely on Playmaker, it's probably not something I'd recommend.
     
unityunity