Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity RTS Engine

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

  1. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    277
    This is a simple curiosity. Do you plan to create a mobile city building game template like Class of Clan?
     
  2. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    Are you attempting to the rotate the unit when it is in idle or not? If not then this may be due to the fact that the Navigation Mesh Agent component is modifying the rotation on movement. Have a look at that component and try decreasing the value of the "Angular Speed" field and let me know if it works.
     
  3. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    This has been requested and will be implemented as soon as possible.
    But you can already implement it using the delegate event OnAttackPerformed which is called whenever an attack is performed.
     
  4. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    Not really, the asset can be a great starter pack for something like Clash of Clans but it wasn't the inspiration for it. This asset is suited for the creation of a classic RTS (age of empires, warcraft, rise of nations, etc..).
     
  5. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    72
    I found the problem was with the NavMeshAgent, I had to set NavMeshAgent.updateUpAxis to false. Thanks for pointing me in the right direction!
     
    OussamaB likes this.
  6. Ajukili

    Ajukili

    Joined:
    Oct 12, 2018
    Posts:
    1
    Hello,

    Bought this a few days ago, great work! However I can't run a new map.

    So the demo scene works well, but after I create a new map, set up the managers and capitals, I can't get the game to start. Tried both building it and running it from the editor. Essentially the game is frozen. An HP bar appears for a millisecond over the capital and then disappears. I can't click anything, not even the UI. I tried importing managers, castles and functions from the demomap but still nothing. No script changes. Any ideas?
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    Are you getting any errors/warnings?
     
  8. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    72
    Something I noticed is that my units will select a different target even when I right click on an enemy. So instead of attacking the unit I want it to, it will switch to another target that it wants to attack.
     
  9. shawnevony

    shawnevony

    Joined:
    Aug 23, 2018
    Posts:
    4
    Does anybody here know how to stop task from re-ordering themselves mid-game.

    For example lets say category 0 of a capital makes a worker, a healer and a converter. One time I open it the worker is on the far left, next time someone else is there.

    The same thing happens with building task in a villagers task menu, the building change order as well which can become quite confusing, any help is greatly appreciated.
     
  10. Seling

    Seling

    Joined:
    Apr 26, 2018
    Posts:
    87
    Same behavior here, I have seen this since a long time (not linked to last updates) I have a panel which contain more than three tasks.
    The first line of button is shuffled after the first use of an action.
    Sometime the turret move to the last position when se was the first.

    It seems that there is a reorder of the task list which define buttons in some cases.

    Also the action buttons and the tasks buttons share the same first line.
    Maybe there is a conflict of’placement ?
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    These are known issues, I will try to fix them for the next update but I really want to finish the NPC faction update first which will be submitted this week (as I need to update the docs first).

    I'll be sharing some info about the new NPC system later today so stay tuned!
     
    jobo22 likes this.
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    As promised, here's some information about the new NPC system:

    - The NPC Army, NPC Building Placment, NPC Resource & NPC Unit Spawner components have been all deprecated.

    - NPC Regulators: a NPC Regulator is responsible for regulating the creation and maintenance of a certain unit/building type. You'll be able to set the ratio of that unit/building type in relation to the max population slots, minimum/maximum allowed amounts, placement options (for buildings only) and a couple more settings using the NPC Building Regulator & NPC Unit Regulator. This component is a scriptable object which can be created from the project tab. I've also added the feature to automatically generate NPC regulators from the available building/unit prefabs in the resource folders so it's faster & easier to create them.

    - A couple of new components will be also introduced to control the behavior of the NPC faction, including:
    * NPC Unit Creator: responsible for the creation of units.
    * NPC Building Creator: responsible for the creation of buildings.
    * NPC Building Placer: responsible fort the placement of buildings.
    * NPC Building Constructor: responsible for the construction of buildings.
    * NPC Resource Manager: manages resources inside the territory of the NPC faction.
    * NPC Resource Collector: responsible for the collection of resources.
    * NPC Territory Manager: responsible for expanding the NPC faction's territory.
    * NPC Attack Manager: targets another faction & decides when to attack it.
    * NPC Army Creator: responsible for the creation of army units.
    * NPC Defense Manager: activated when the faction is attacked, responsible to defend the NPC faction's territory.
    * NPC Population Manager: manages the NPC faction's population.
    * NPC Task Manager: manages urgent tasks that need to be executed by the NPC faction (only a lite version of this component will be submitted in the next update but it will extended in the upcoming updates).

    - The new NPC components aren't referenced in other components as I wanted to separate both logics so that it becomes easier to add NPC factions in the future. NPC components use Custom Events in order to track the progress of the NPC faction. With that being said, a couple of new custom events will be also introduced in the next update.

    - More NPC components are planned for future updates, including a component that manages upgrades which is planned for v1.3.5 where the focus will be to create a new unit/building upgrade system.
     
  13. shawnevony

    shawnevony

    Joined:
    Aug 23, 2018
    Posts:
    4
    Looks like some good updates coming :)

    I have a question about units not properly facing their targets, this goes for villagers facing buildings they are building, resources they are collecting and military units attacking others.

    I have the units in question set to rotate when idle, is there a certain setting I need to play around with to make my units correctly face their targets?

    Oh one more question while I'm here, how can I set the range of a ranged troop? Lets say I want an archer to be able to shoot up to 100 meters, but I only want a crossbowman to shoot 50, I mucked around with the LOS stuff but didn't really understand the results.

    Thanks for any answers :)
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    This is a weird one, does this happen with the demo units as well? And what version are you using?

    You would simply define different range type on the Attack Manager component.
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,117
    So I'm done adding new documentation for the new NPC components. I also had a look at the other documentation and updated what needed to be updated.

    The update will be submitted to the Asset Store tomorrow and will be mostly available by next Monday.

    The next update (v1.3.5) will tackle the issue of unit/building upgrades: the goal is to simplify upgrading units/buildings and allow NPC factions to handle the upgrading process better. In addition, Unit and Building related components will be refactored in order to provide better overall performance and have better architecture that will you allow you to modify the code easily.
     
    jobo22 likes this.
  16. shawnevony

    shawnevony

    Joined:
    Aug 23, 2018
    Posts:
    4
    I'm using different assets, your assets are facing the targets. There must be some option I'm missing somewhere or a setting your units have that mine don't, ill figure it out.

    Thanks, didn't see that option there lol

    Looking forward to the update!