Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Unity RTS Engine

Discussion in 'Assets and Asset Store' started by OussamaB, Feb 7, 2017.

  1. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    The "initialHeight" property is set private for a reason. It is only processed when the Camera Controller is initialized. So setting it as part of Awake and/or Start in your own component is far from ideal since the initializaition of RTS Engine components is independent of those two (except the Game Manager).

    Does calling the "LookAt()" method from the Camera Controller component solve the problem here? You can make the camera look at any position. I'll be adding a method where you can set the zoom level of the camera without having to actually change the values of the zoom settings but apart from that, why do you want to change the min and max zoom level values? Do you want to have custom values for each player?
     
  2. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Working hard to ship some necessary updates where the workflow of few systems will be changed and will be heavily influenced on feedback from users and then the plan is to release a short get started video tutorial series. So I ask for your patience on this one.
     
    cidiego likes this.
  3. sanuvin

    sanuvin

    Joined:
    Feb 11, 2014
    Posts:
    61
    I may want to use my own camera controller would that be hard to implement?
     
  4. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    HI! I suppose Look at method is not enough, course it doesn't set a camera position.
    I need a possibility to set it through code. Imagine this, I have a non-flat terrain, one side is lower than other one. And if I place start position of one player in one side and others players in another side after game start their cameras will have different distance to terrain.
    Min and max height should be different too for any point at terrain. Otherwise we will fly too high or look under terrain.
    In other words I need a method which will keep the height for every point at terrain and won't let the camera to fall throw terrain or fly to high in accordance with initial height, Minh eight and maxheight
     
  5. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    171

    "This will be fixed in the next update." that is how you support your customer people !!! (Compared to other assets in the market. lol)

    Thank you. you are the best.
     
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Not really, the only thing that needs to be considered here is that the MinimapCameraController requires access to the active SelectionManager instance in a game to add interactions regarding moving units using the minimap and not interfering with the selection box.
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Setting the min and max height won't solve this problem completely for you then.

    You still need a system in game that detects the terrain's height and update the min and max values accordingly. Setting the values initially is good but what happens when move around the map? I was going to work on it with the camera update but due to time constraints I chose to push it to another update.

    For now I advise exposing the variables you need publicly and then updating them from your own script. I'll get into adding this feature ASAP.
     
    PinkPanteRus likes this.
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Thanks a lot for your kind words, update should be submitted within the next two days. Currently in testing and doc update phase.
     
    Pollawat likes this.
  9. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    Thanks a lot!
    Yes I supposed that where would be another method which will keep height during changing position
     
  10. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    Hi,OussamaB
    I have another problem.
    Maybe be you can show me a path to solve it.
    I spent several hours and really dont know what to do.

    upload_2019-12-22_21-7-13.png

    upload_2019-12-22_21-8-52.png
     
    Last edited: Dec 23, 2019
  11. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    Need help.
    I really don`t understand how main camera is controlled.
    I created new faction, marked it with "Player Controlled" and expected that Main camera will show the capital of my faction at start, but looks like it shows capital of faction with id 0


    And I have another problem. My building becomes twice bigger in game then in scene preview.
    And it is fully colored in faction color. What wasn`t planned so.

     
    Last edited: Dec 24, 2019
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    This seems like the unit hasn't been correctly initialized. Is this unit pre-placed in the map scene? if yes, has it been added to the its faction's default entities list?
     
  13. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Thanks for reporting this bug, it has been fixed and will be part of the next update.

    You're using a faction type called "USA" for that faction slot, right? (I saw that in the first video). If you have a "Capital Building" assigned to the "USA" faction type, then it will be used when the game starts. Can you check whether the capital building's prefab assigned to the faction type has the correct scale?

    As for the faction coloring, check the "Faction Colored Renderers" field in the Building component (link: http://soumidelrio.com/docs/unity-rts-engine/buildings/building-component/).
     
    PinkPanteRus likes this.
  14. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    OussamaB, thank you very much. One problem less. Wrong building was assighned to USA faction.


    Other your suggestion will be able to check only tomorrow
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Just submitted 1.5.2 to the asset store. This one is all about fixing some issues that have been reported lately and listening to your feedback regarding changing and adding features for the NPC behavior and unit movement. Here's the main update list:
    • Fixed an issue where the NPC faction doesn’t recognize resource instances spawned during the game.
    • Fixed an issue where the NPC faction fails to send the correct resource collectors to the collect a resource type that they can actually collect.
    • Fixed an issue with NPC faction building placement on different heights of the map.
    • Fixed initializing tasks of a task launcher when they are set to only be available for a different faction type than their task launcher’s faction type.
    • Fixed initializing pre-placed buildings in a map.
    • Fixed handling upgrading building instances when they still are under construction.
    • Fixed resetting the whole unit’s movement when it changes its target destination (receives a new movement command) while already on an active movement and added an option to either force the unit movement to reset completely in this case or just directly move to the new movement command.
    • Fixed a bug that hides one-time-execution tasks when they are cancelled while in progress.
    • Fixed a unit movement issue when builder, healer, resource collector and converter units are moving towards their target while it is no longer valid to have.
    • Fixed a bug triggered when a Border instance is deactivated and is attempting to un-register the resources that were inside its territory.
    • Fixed a bug where the Border component instances do not unsubscribe from events when the player leaves the map scene.
    • Fixed a game crashing bug that occurs when the NPCBuildingPlacer component is attempting to place a building while its faction is defeated.
    • Fixed the rectangular formation movement when the units group faces a direction that is blocked by obstacles. The movement now switches to a circular formation in case:
      • The count of the attempts to get a valid target position reaches the maximum allowed amount.
      • The amount of total empty rows reaches a certain amount that can be set from the MovementManager component’s inspector.
    • Fixed triggering the converter order audio.
    • Fixed a bug where the camera doesn’t initially look at the correct faction’s capital when the game starts inside the editor.
    • Added missing library selection audio, icon and regulator data asset file in the demo game.
    • Added the “Minimum Collectors Amount” field to the NPCResourceCollector component which allows to specify a minimum amount of collector units for each resource type the NPC faction is able to collect. The NPC faction will prioritize assigning this minimum amount of collector units which ensures that resource types are being collected.
    • Updated the NPCAttackManager component to cancel its ongoing attack if it’s out of attack units.
    • Added the UnitAttackRange class which is used by the UnitAttack component to define the stopping distance of the attack unit when it is engaging its target. Assigning the unit ranges is no longer part of the AttackManager component.
    • Added an option to allow the NPC faction to only send idle attack units when targeting an enemy unit/building.
    The full changelog can be found here as always: http://soumidelrio.com/assets/rts-engine/changelog/
    I will be also adding a list of the updated documentation pages (and what changed exactly) in the above changelog page. This allows you to know where to update your prefabs exactly to have a smoother update process.
     
    Shadowing, PinkPanteRus and Pollawat like this.
  16. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    18
    And as usuall I am the only person who has problems with RTS Engine:


    I can say that I didn`t touch orcs at all.
     
  17. kottabos

    kottabos

    Joined:
    May 3, 2012
    Posts:
    45
    Hey, first off I just recently purchased this and have been loving it so far. very well put together. i do have a few questions though about if certain things are currently possible or might be in a future update.

    The First one is on resources. I'm wanting each faction to use unique resources rather than all the same. Currently I'm doing this by using custom collector characters for each faction that can only grab their specific resources. This has been working well, but my problem is that all resources are still showing up at the top of the UI. is there something in this currently that allows me to change that or do I need to find my own way to code it in? and if the later will this be a feature added at some point?

    Second is in regards to conversion. I'm making some units able to be converted using the built in system, which works great, but I'm wanting other units to be able to be converted by a custom event. So my question here is if a unit doesn't have the "can be converted" check box checked can they still be force converted by an event?

    And finally I've noticed that there is an on death feature to create a resource when a unit is killed. So I'm wondering if there is something built in to have something else spawn, like another unit or something like that. If not I figure i can probably do it with an on death custom event, but I was curious if I just missed a feature somewhere.

    Thanks for any answers to these questions, and thanks for the amazing kit I can't wait to see what you add to it next.
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    It seems like you have a bunch of errors coming up there. These errors usually appear when components haven't been initialized correctly.

    Can you check whether the Orc units in the scene are correctly assigned to the "Free Units" list in the Unit Manager inspector?
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    This is currently not available but it seems very reasonable to have this feature. I've added to my todo list and I'll add it ASAP.

    Yes, the "Can Be Converted" checkbox is used only for when a converter picks their target. You can simply the "Convert()" method from the Unit component which allows you to convert a unit without even specifying a converter (but simply the target faction ID).

    The current feature allows to add resources to the killer's faction, it doesn't really create an actual resource object in the game.

    I guess the best way to do this right now is to use the on death custom event.
     
  20. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Happy new year's to everyone. Wish everyone health and happiness! With your continuous support, the asset will keep better and better.

    Update 1.5.2 is now available on the asset store by the way!
     
  21. kottabos

    kottabos

    Joined:
    May 3, 2012
    Posts:
    45
    Thanks for the reply, and cant wait to see the resource bit added in. Keep up the great work.
     
  22. zionmees

    zionmees

    Joined:
    Nov 2, 2016
    Posts:
    9
    Hi,

    I was playing around with this asset but I have a question about the minimap.
    For the terrain I use Gaia and I made it larger then the original size from the "Configure New Map".
    My minimap shows the entire terrain but when I want to click on the minimap it does not go there where I click on the map except the clickable size does work that's given by the "Configure New Map".
    how can I resize the selection rectangle of the minimap?
    Sorry for my English btw.

    I hope someone can help me?

    Best Regards,
     
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Hello, are you sure that the generated Gaia terrain has the correct layer set in the Camera Controller component? You can find more information regarding that in this doc link (under the "Terrain Layer Mask" field): http://soumidelrio.com/docs/unity-rts-engine/cameras/main-camera-controller/
     
  24. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    62
    When I run the game in Unity 2019.3.0f3 there the only error on the map scene when loading from single player
    "CalculatePolygonPath" can only be called on an active agent that has been placed on a NavMesh.
    UnityEngine.AI.NavMeshAgent:CalculatePath(Vector3, NavMeshPath)
    RTSEngine.UnitMovement:CalculatePath(Vector3) (at Assets/RTS Engine/Units/Scripts/UnitMovement.cs:260)
    RTSEngine.MovementManager:OnMovementRequest(MovementTask) (at Assets/RTS Engine/Units/Scripts/MovementManager.cs:568)
    RTSEngine.MovementManager:Update() (at Assets/RTS Engine/Units/Scripts/MovementManager.cs:113)

    The big problem after I did compile the game and run the exe when I get to the map scene

    Uploading Crash Report
    NullReferenceException: Object reference not set to an instance of an object
    at RTSEngine.FactionEntityTask.Init (RTSEngine.GameManager gameMgr, RTSEngine.FactionEntity factionEntity, System.Int32 ID) [0x000c5] in D:\SAWars\SAWars\Assets\RTS Engine\Tasks\Scripts\FactionEntityTask.cs:178
    at RTSEngine.TaskLauncher.Init (RTSEngine.GameManager gameMgr, RTSEngine.FactionEntity factionEntity) [0x00015] in D:\SAWars\SAWars\Assets\RTS Engine\Tasks\Scripts\TaskLauncher.cs:101
    at RTSEngine.BuildingHealth.CompleteConstruction () [0x000ce] in D:\SAWars\SAWars\Assets\RTS Engine\Buildings\Scripts\BuildingHealth.cs:138
    at RTSEngine.BuildingHealth.OnMaxHealthReached (System.Int32 value, RTSEngine.FactionEntity source) [0x0000a] in D:\SAWars\SAWars\Assets\RTS Engine\Buildings\Scripts\BuildingHealth.cs:77
    at RTSEngine.FactionEntityHealth.AddHealthLocal (System.Int32 value, RTSEngine.FactionEntity source) [0x0003f] in D:\SAWars\SAWars\Assets\RTS Engine\Faction Entity\Scripts\FactionEntityHealth.cs:128
    at RTSEngine.Building.Init (RTSEngine.GameManager gameMgr, System.Int32 fID, System.Boolean free, RTSEngine.Border buildingCenter, System.Boolean factionCapital) [0x00209] in D:\SAWars\SAWars\Assets\RTS Engine\Buildings\Scripts\Building.cs:162
    at RTSEngine.BuildingManager.CreatePlacedInstanceLocal (RTSEngine.Building buildingPrefab, UnityEngine.Vector3 placementPosition, System.Single yEulerAngle, RTSEngine.Border buildingCenter, System.Int32 factionID, System.Boolean placedByDefault, System.Boolean factionCapital) [0x0003e] in D:\SAWars\SAWars\Assets\RTS Engine\Buildings\Scripts\BuildingManager.cs:85
    at RTSEngine.FactionSlot.SpawnFactionEntities (RTSEngine.GameManager gameMgr) [0x000a2] in D:\SAWars\SAWars\Assets\RTS Engine\Game Managers\Scripts\FactionSlot.cs:200
    at RTSEngine.GameManager.InitDefaultEntities () [0x00010] in D:\SAWars\SAWars\Assets\RTS Engine\Game Managers\Scripts\GameManager.cs:332
    at RTSEngine.GameManager.Awake () [0x00332] in D:\SAWars\SAWars\Assets\RTS Engine\Game Managers\Scripts\GameManager.cs:177

    (Filename: D:/SAWars/SAWars/Assets/RTS Engine/Tasks/Scripts/FactionEntityTask.cs Line: 178)
     
  25. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,457
    @Gatskop_Software You shouldn't be be developering a game in 2019.3. It's still in beta.
    Should use 2018.4.15. Unless there is some feature you need in 2019.
     
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Apparently you have a pre-placed unit in the map scene that has its NavMeshAgent component deactivated, although the UnitMovement script should enable that before attempting to move the unit. Can you check if having the NavMeshAgent component enabled before starting the game would erase the error or not? Seems like something has changed regarding navmesh in 2019.3.

    According to the error line here, it seems like you have a unit creation type of task that doesn't have a unit prefab assigned to it.
    In each future update, new assertions and initial checks will be added to alert you if your inspector fields are properly assigned whenever a component is initialized.
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Just to keep everyone following this thread updated.

    I am currently working on the next update (v1.5.3). This update will bring some much needed features regarding audio management in the game since that part hasn't been changed basically since the release of the assets.

    In addition, more work will be put towards simplifying the unit movement configurations as it has been brought to my attention that some parts of managing the unit movement are not very user-friendly (such as handling the unit target position collider). This will be changed to allow the asset to do most of the work for you so you do not have to worry about breaking anything when configuring the unit movement.
     
    digiross likes this.
  28. Bonzotaz1

    Bonzotaz1

    Joined:
    Apr 12, 2014
    Posts:
    83
    would i be able to make something like Banished with this engine? @OussamaB
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Well it seems like Banished is heavily based on resource micro-management. So I would assume that the RTS Engine can handle the basics and the cores of the game but you might wanna extend the resource micro-management to make it more like this game. Please note that I haven't played this game, this is just my impression from the steam page.
     
  30. kottabos

    kottabos

    Joined:
    May 3, 2012
    Posts:
    45
    Cool can't wait to play with the next update. ̶A̶n̶d̶ ̶g̶o̶t̶ ̶a̶n̶o̶t̶h̶e̶r̶ ̶h̶o̶p̶e̶f̶u̶l̶l̶y̶ ̶q̶u̶i̶c̶k̶ ̶q̶u̶e̶s̶t̶i̶o̶n̶ ̶f̶o̶r̶ ̶y̶o̶u̶.̶ ̶ ̶I̶'̶m̶ ̶c̶u̶r̶r̶e̶n̶t̶l̶y̶ ̶p̶l̶a̶y̶i̶n̶g̶ ̶a̶r̶o̶u̶n̶d̶ ̶w̶i̶t̶h̶ ̶t̶h̶e̶ ̶u̶p̶g̶r̶a̶d̶e̶ ̶s̶y̶s̶t̶e̶m̶ ̶a̶n̶d̶ ̶a̶m̶ ̶r̶u̶n̶n̶i̶n̶g̶ ̶i̶n̶t̶o̶ ̶a̶ ̶w̶a̶l̶l̶.̶ ̶ ̶B̶a̶s̶i̶c̶a̶l̶l̶y̶ ̶w̶h̶a̶t̶ ̶I̶'̶m̶ ̶w̶a̶n̶t̶i̶n̶g̶ ̶t̶o̶ ̶d̶o̶ ̶i̶s̶ ̶c̶r̶e̶a̶t̶e̶ ̶a̶ ̶u̶n̶i̶t̶ ̶u̶p̶g̶r̶a̶d̶e̶ ̶t̶r̶e̶e̶,̶ ̶s̶o̶ ̶o̶n̶e̶ ̶b̶a̶s̶i̶c̶ ̶u̶n̶i̶t̶ ̶c̶a̶n̶ ̶u̶p̶g̶r̶a̶d̶e̶ ̶i̶t̶s̶e̶l̶f̶ ̶i̶n̶t̶o̶ ̶o̶n̶e̶ ̶o̶f̶ ̶s̶e̶v̶e̶r̶a̶l̶ ̶o̶t̶h̶e̶r̶ ̶k̶i̶n̶d̶s̶.̶ ̶ ̶A̶n̶d̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶ ̶I̶'̶m̶ ̶h̶a̶v̶i̶n̶g̶ ̶i̶s̶ ̶t̶h̶a̶t̶ ̶I̶ ̶c̶a̶n̶ ̶o̶n̶l̶y̶ ̶s̶e̶e̶m̶ ̶t̶o̶ ̶h̶a̶v̶e̶ ̶o̶n̶e̶ ̶k̶i̶n̶d̶ ̶o̶f̶ ̶u̶p̶g̶r̶a̶d̶e̶ ̶p̶e̶r̶ ̶u̶n̶i̶t̶,̶ ̶a̶m̶ ̶I̶ ̶m̶i̶s̶s̶i̶n̶g̶ ̶s̶o̶m̶e̶t̶h̶i̶n̶g̶ ̶o̶b̶v̶i̶o̶u̶s̶ ̶o̶r̶ ̶i̶s̶ ̶t̶h̶i̶s̶ ̶a̶ ̶l̶i̶m̶i̶t̶a̶t̶i̶o̶n̶ ̶o̶f̶ ̶t̶h̶e̶ ̶e̶n̶g̶i̶n̶e̶?̶

    Edit: okay so I figured out the upgrade tree thing I was trying to figure out. Missed the update target ID somehow, but found it eventually.
     
    Last edited: Feb 3, 2020
    OussamaB likes this.
  31. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    171
    I have edited this post many times to try to convey the meaning. Because I know my English is terrible and I'm sorry.

    Hello, again sir.

    1. I notice that units in the game can walk through each other like nothing there. It kind of weird you know... lol. This caught my eye since a group of enemies rush into my base and ran through my units (who actually block the gate) like no one there... it like... wait what!? No !!!, that illegal. lol.



    As you can see in the video, many games like Starcraft 2, Warcraft III, Halo War 2 all have a unit that can block each other to make it more realistic or solid. Do we have any option to make this kind of thing happen sir?

    2. "Unit Select" by clicking sometimes not working in an expected way.



    Sometimes we got to change a camera angle in order to make it work, sometimes we got to zoom in to create the same result. I wonder is the floating UI over their head cause this problem to happen?

    ps. "SelectionObj" of these units is the same size. (mean it should have the same results)


    3. Free unit problem.



    At first in this video, I try to prove that every unit works just fine. Anyways when I try to make them as a free unit looks like some of them do not work properly (even their copy works). so maybe I just missed something that I don't know. I notice that this problem happens since unit number 8 in the "free unit script" list.



    but before list number 8 all of it works just fine.

    ps. Sorry for the audio, I forgot to turn it off while recording.

    4. Rang unit set up.

    Here is what happens after I try to mimic your "little archer" in the demo folder.



    I'm not sure this is a bug, glitch or something but clearly this is weird. lol.

    Anyways, I try to create this "Archer Unit" with my understanding but still, it didn't work as I expected.



    As you can see look like the animation clip and the attacking process doesn't sync as it should be. But I blame myself for this because as I recall this is the best template on the store so... I'm here looking for help.

    This clip long 2.1 seconds and the archer suppose to release the arrow at 0.9 sec how can I set up this setting properly sir?


    Lastly,

    Do you have any plane to create some kind of "Random Attack Animation" for a unit sir? Because character performs a single animation is not fun to watch really. The death animation is also the same, I think it should be more variety. I don't know... lol. but you get the point right?

    So please consider this request sir, it could be awesome!

    Thank you.
     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    The RTS Engine currently uses Unity's built-in navmesh which doesn't have the best obstacle avoidance out there. I chose to have the obstacle avoidance's quality set to none because other than that, the obstacle avoidance would simply impact the movement of the units very negatively, especially in multiplayer. This is the reason why units move through each other sometimes.

    Please note that I am always looking into improving the unit movement and this will eventually include an integration package for the popular A* Pathfinding Project asset.

    My first instinct here would be to ask you to check the selection object's collider but you have already mentioned it is adequate. In this case, there might be some other collider that might be blocking the raycast. Maybe the actual unit's model might include a collider that is blocking the selection?

    If units are displayed like that when the game starts, it generally means that they haven't been initialized correctly. You show a screenshot of all of the free units in added to the list in the Unit Manager. If all units before the one in the 8th element are initialized correctly and all of the ones after that are not then there should be a problem within the initialization of the unit in the 8th element. Are you getting any errors coming from there? I couldn't see the console in the video you posted.

    In the video you posted, I see you have the attack's delay time set to 0.9 and then the attack object release/delay time is set to 0.9 which means that the arrow will be only launched after 1.8 seconds. So make sure to change that.

    Seems like a very reasonable request. I added this to my todo list and will hopefully add it ASAP. Unit movement is getting an update soon and it will be a suitable time to work on more options regarding animations for that update.
     
  33. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    171
    Happy to know that!

    Done!

    Yes, scale up the "SelectionObj" confirmed help sir. But the floating UI over their head is also blocking too, but it okay now I know why.

    Done!

    As you wish sir.



    As you can see here I record everything for you. Please note, even the unit who got an error at the first time will work just fine after we put him/her below the list number 8.

    I understand sir I try to adjust it in many ways. The point is if we let the archer shoot (loop) she will do just fine, but if we control her to change a target or kype (shoot and run) you will see something up with her. I mean the animation started to de-synced, sometimes she continue to perform attack animation while running, sometimes the animation doesn't even perform at all and the arrow comes out of nowhere.



    Another thing is she doesn't perform the full length of the animation clip. I mean my attack clip is long 72 frame but she performs just 50-60 frames and then replete. I already try to edit the animation transition to 0 points but the results still the same.

    That is awesome! Thank you.
     
    Last edited: Feb 12, 2020
  34. Mgb789

    Mgb789

    Joined:
    Feb 12, 2020
    Posts:
    1
    Hello Oussama, I was thinking in buying your product, but first i would like to clarify a doubt I have. I've already read in some comment section that youre planning on making a wall building system, but are you planning on making a road building system? I would like my Rts to have roads and dirt roads.

    Since English is not my first language, I upload an image so you can see what I mean. Rads.jpg

    Thanks for your patience!
     
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    You can always set the height of that health bar on the UnitHealth component by the way.

    It seems like one of the units there is missing their "Target Position Collider" in the Unit Movement component. Please fix that and the other errors should be gone. For more information about that field, check this doc page: http://soumidelrio.com/docs/unity-rts-engine/units/unit-movement/

    Thanks a lot for the detailed information and the video. The problem is apparently with a custom component I created to handle the animator states, I fixed it now. Please e-mail me or message me via Discord with your invoice number so I can send you the fix for this before the update hits the store.
     
    Pollawat likes this.
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    A wall and road system is indeed planned but it unfortunately ranks pretty low in terms of priority at the moment. Both will be added eventually but I can not really provide a specific timeline for that at the moment.
     
  37. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    171
    Right! I will be more careful about this in the future.


    Actually, I can wait for the patch to come. Knowing that this problem has been solved just makes me feel much more comfortable now.

    Thank you! for all of your support.
     
    Last edited: Feb 17, 2020
    OussamaB likes this.
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Just submitted v1.5.3 to the asset store. It should be available anytime this week!

    This update tackles the new audio system in the RTS Engine and introduces a new Resource Generator component with a bunch of new features allowing it to work with both units and buildings. Most importantly, a lot of work has been put into laying the base of handling unit, resource and building components in the future so it will be easier to convert the current components we have to work with different entities (for example, making the healer component work for both units and buildings). As always, a lot of features that you've requested over the past couple of weeks have been added and a lot of issues have been fixed.

    Here's the update list:
    • Fixed detecting whether the player’s mouse is over the minimap or not while handling the minimap camera controller.
    • Fixed an issue in the Attack Entitiy component which allows attackers to target inactive units or buildings.
    • Fixed a selection bug triggered when the player is selecting a resource object that gets destroyed.
    • Fixed a bug triggered when the hover health bar is active on a unit or a building instance that gets upgraded.
    • Fixed adding the initial resources of a building when the building is constructed completely for the first time instead of adding them when the building is first placed.
    • Fixed a bug where resource collectors would continue collecting a resource for a brief time after it is destroyed.
    • Fixed a bug in the unit animator that keeps units in their movement state even if they leave it.
    • Fixed a bug where upgrading an instance of a unit takes an extra population slot from the faction.
    • Fixed a bug that allows a NPC faction to trigger an attack with no active attack unit.
    • Added the option to enable/disable displaying resources’ count in the UI depending on the player’s faction type.
    • Added the “Height Sample Range Multiplier” field to the Terrain Manager component which allows to define a multiplier value for the TerrainManager’s “SampleHeight()” method.
    • Added an option to the NPC Building Regulator Data scriptable object to enable/disable the building’s auto creation by the NPC Building Creator component.
    • Added the option to define an alternative task icon or a color to draw over the original task launcher tasks or building placement tasks icon when the task is displayed in the task panel while requirements to launch it (resources or faction limits) are not met.
    • Added a new static event “BuildingPlacement.PlacementDenied” that gets called each time a building placement request is denied (due to insufficient resources for example).
    • Added the AudioClipFetcher component which allows to define a list of AudioClip elements and fetch one of them to play depending on a fetch type which can be: random, random with no repetition or in order. All of the audio clip related fields in all RTS Engine components now use this component.
    • Rewrote the AudioManager component:
      • Added the option to play a list of music loops during the game.
      • Separated between local and global sound effects.
      • Added the option to set the volume of music and sound effects separately through UI sliders.
      • Updated all the audio clip related fields in the RTS Engine components to use a unified property type that allows to define a set of AudioClip instances and retrieve one of them each time depending on a type that can be chosen from the inspector as well (random, random no repetition or in order fetching).
    • Added the “CustomEvents.UnitStartMoving” and “CustomEvents.UnitStopMoving” custom events triggered when a unit starts moving and stops moving respectively.
    • Updated the faction slots in the Game Manager to include lists for pre-spawned default entities instead of having to assign them individually.
    • Rewrote the Resource Generator component:
      • Extended it to work with both units and buildings.
      • Added the ability to generate multiple resources at once instead of just one.
      • Added the option to take resources from the generator’s faction every resource production cycle.
      • Added the option to customize the resource collection task of the generator through the inspector (including selection conditions to show it, icon, description, how it behaves with the tooltip, etc…).
      • Added two Unity Events in addition to the custom events: “On Threshold Met” and “On Collected”. These two are triggered when the resource collection threshold is met and when the generated resources are collected respectively.
    • Updated the TaskPanelUI component to avoid updating the task panel when it is locked (due to the player placing a building for example).
    • Updated the Mirror-multiplayer integration package to work with the new version of Mirror:
      • Refactored some parts of the NetworkLobbyManager_Mirror component.
      • Added the option to assign a minimum amount of factions for each available multiplayer map.
      • Updated the GameManager component to delay initializing resources after factions in the multiplayer game are initialized so that resources can be tracked by the Border components.
    • Updated the RTS Engine menu items regarding starting a new single player or multiplayer menu scene.
    • Updated the NPCUpgradeManager component to go through the already spawned task launcher instances when it is initialized and inspect them for upgrade tasks.
    • Make sure to go through the update helper before updating to 1.5.3: http://soumidelrio.com/docs/unity-rts-engine/update-helper/v1-5-3/
    As always, here's the full changelog: http://soumidelrio.com/assets/rts-engine/changelog/
     
    digiross likes this.
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Just to let you guys know that the Asset Store team is on vacation until the 23rd so the update is expected to go live by early next week.
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    So 1.5.3 is still awaiting to be accepted by the asset store team and since their vacation ended yesterday, they have a lot to process so it might take a few days.

    However, I have already started working on 1.5.4 and this is going to be all about unit movement, unit attack and search optimizations. I have started with optimizing how entities in the RTS Engine search for a target to attack, collect resource from, construct or do anything that their component require them to do. Each map can now be divided into cells of the same size (that you pick from the inspector) and this grid of search cells allows searching for any target to be done progressively starting from the cell the search source is and then incrementally going through the neighboring cells until a target is found.

    The effect of this new search method will not be visible if you have only a few units, buildings and resources in the game but as soon as the number of entities is in the hundreds (or thousands), this gives a performance boost.

    I will be keeping you updated regarding the optimization changes that are going to occur for the next update.
    Also please let me know if you notice any performance hiccup of any kind as my main goal right now is to have an optimized set of core components so adding more features in the future will be easier.
     
  41. MegaCo

    MegaCo

    Joined:
    Jan 24, 2018
    Posts:
    81
    I'm having trouble with the building model it keeps moving it to 0.85 on the Y when I hit play even though iv specified a different height on the prefab. And when I try to place it well running it decides 0.35 Y.
     
    Last edited: Feb 27, 2020
  42. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Just to be clear, you referring to the actual building model that is a child object of the main building object, right?
    If yes, the RTS Engine does not really change the model's object, it only either hides or shows it. Are you using other scripts that reference the model field of the building?
     
  43. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    124
    I'd love to use this asset as a base for a city building game (simcity style), not sure how viable that is. Maybe it can be combined with other assets, like Easy Build System to create that possibility ? Would it be a viable option for such a game ?

    Thanks !
     
  44. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,457
    What version you planning to start doing a saving system?
    Just curious
     
  45. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    The RTS Engine could definitely be a good starting point for a city building game. Although I think not all the features required for that specific type of game are available as plug and play features, you could still build them on top of the asset.

    Can you probably provide a list of the most important features your city building game will require? I can let you know if the RTS Engine can already handle it or provide insights on how that can be added.
     
  46. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    Original plan is to implement the saving and loading system by 1.6.0. The asset is currently on 1.5.3.
    However, this can still change as sometimes I have to squeeze in an urgent update (like the one I am currently working on where I am improving search, unit movement and unit attack so that the asset can scale, mainly in terms of the numbers of units, without hurting the performance).
     
    Shadowing likes this.
  47. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    The 1.5.3 update has been submitted on the 19th and on the 25th I noticed I haven't received a confirmation e-mail from Unity so I re-submitted it. There's still no answer from the asset store yet, I wrote an e-mail to the support team and I am waiting for their response. It seems like the asset is stuck in the pending review state.

    Really sorry if you've been waiting for the update, it is just out of my hands. The asset store team announced a delay in asset review before two weeks but I think their review queue is now broken as well.

    But while waiting, I've been already working on the next update: 1.5.4 which will be all about entity search, unit movement and unit/building attack. Here are some of the things that you can expect with 1.5.4:

    - No need for the unit target position collider anymore which means less colliders in the scene which means less physics interaction and better performance overall.
    - Attack units now respect their maximum attacking range parameters and will not engage with targets that are outside the range that was defined for them. They also now specifically pick a target that they can actually reach and attack within their attacking range. This means that units will no longer surround just one target and keep trying to find a suitable position to attack it, they now possess a more realistic behavior where they will look for farther units that they can reach within the attack range.
    - MovementManager and AttackManager components are receiving some heavy refactoring so that they are more modular and handling movement and attack requests is faster. I've also discovered an issue that might cause a desync in multiplayer when these components attempt to generate a movement/attack position.

    This all aims to allow the asset to scale with more units in the game without drastically affecting the performance.
     
    Shadowing likes this.
  48. Soasy57

    Soasy57

    Joined:
    Jan 30, 2020
    Posts:
    3
    Hello! Sorry i'm bad in english

    I have this error when i select my new building (but when i select my new unit, it's work)

    NullReferenceException: Object reference not set to an instance of an object
    RTSEngine.SingleSelectionPanelUI.UpdateBuildingUI (RTSEngine.Building building) (at Assets/RTS Engine/UI/Scripts/SingleSelectionPanelUI.cs:149)
    RTSEngine.UIManager.OnEntitySelected (RTSEngine.Entity entity) (at Assets/RTS Engine/UI/Scripts/UIManager.cs:246)
    RTSEngine.CustomEvents.OnEntitySelected (RTSEngine.Entity entity) (at Assets/RTS Engine/Scripting/Scripts/CustomEvents.cs:160)
    RTSEngine.SelectionEntity.OnSelected () (at Assets/RTS Engine/Selection/Scripts/SelectionEntity.cs:96)
    RTSEngine.BuildingSelection.OnSelected () (at Assets/RTS Engine/Selection/Scripts/BuildingSelection.cs:22)
    RTSEngine.SelectedEntities.Add (RTSEngine.Entity newEntity, RTSEngine.SelectionTypes type) (at Assets/RTS Engine/Selection/Scripts/SelectedEntities.cs:201)
    RTSEngine.SelectionManager.Update () (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:194)

    upload_2020-3-10_16-50-39.png

    as you can see, the selection panel doesn't work only for the building, but it work for the unit

    any idea ? Thank you and sorry for my bad english ^^'
     
  49. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,423
    According to the line where the error is coming from. It seems like either the WorkerManager component is not attached to the building object, can you please confirm whether this is the case or not?
     
  50. Soasy57

    Soasy57

    Joined:
    Jan 30, 2020
    Posts:
    3

    upload_2020-3-12_0-21-35.png

    upload_2020-3-12_0-22-29.png

    As you can see, WorkderManager is present, pictures are better than bad sentences ^^'
     
unityunity