Search Unity

Unity RTS Engine

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

  1. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    - It seems like the selection object of the unit has its position at the bottom of the unit (ground terrain level or maybe even lower?). That is the position that the attacker will aim at so if it's too close the terrain level then they might be prone to miss or hit the terrain first when the just enter their damage range, so move it up a bit to the center of the unit and your units will be able to do damage anywhere in their range.

    Also, really sorry about missing your submission in the contact formula. I usually get e-mail notifications for those.
     
    Last edited: Jul 28, 2019
  2. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    I'm really not sure why this is not working or why it should work.

    I would recommend to maybe wait a bit. I'm already working on a new camera controller which will include rotation among other new features. The next update is about finishing up some refactoring work I'm doing on some components and the one after it will be all about the camera movement. Thanks for the patience.
     
  3. ritorct

    ritorct

    Joined:
    Jul 10, 2017
    Posts:
    1
    Hi, this is greatest asset i found. but can the unit attack when moving ?
    I want to make a unit like a tank that can attack nearby enemies when moving.
     
  4. snowwolfam24

    snowwolfam24

    Joined:
    Oct 7, 2018
    Posts:
    2
    GM ERROR.PNG RTS Error Log.PNG Hello, Just updated the asset to your recent update, and im throwing errors and also the RTS Editor to create new terrain, faction type or anything is gone RTS Error Log.PNG
     
  5. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Move attack will be added in a couple of weeks, it has been already suggested by other users so it's a must-have feature now!
     
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
  7. chris21

    chris21

    Joined:
    Jan 12, 2014
    Posts:
    2
    Hi! Not sure if i get something wrong, but is this asset compatible with Unity 2019.1 ?
    Just purchased the asset recently, but i can't get the demo scene working.
    Currently it throws errors all over the place (see attached screenshot).
    There is also no chance to get selection working, even with a very basic setup (selection also doesn't work in the dem scene)

    I am using the DemoMap.unity Scene File.

    I just wanted to get a very basic start, but as the demo is not working, i feel a little lost ...

    Thanks for any hints on that.
     

    Attached Files:

    Last edited: Aug 2, 2019
  8. chris21

    chris21

    Joined:
    Jan 12, 2014
    Posts:
    2
    I see :) If i load the DemoMap from within the Assets in Editor View - it works -
    If you try to load the scene from the Files Menu it doesn't work - looks like some references are missing , then.
     
  9. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Hello sir, I got a question about how to delete a gap between humanoid animation.



    As you can see in the video this animation process creates a "stuck moment while change state"
    and it looks maybe not as smooth as it should.

    Thank you.
     
  10. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Sorry for this, it will be fixed in the next update which will be submitted later today.
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    I've updated the way animator states are changed for units, can you please wait for the next update and let me know if the issue still exists?
     
    Pollawat likes this.
  12. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Sure sir. I'm happy to wait for the next update to come.
     
    Last edited: Aug 11, 2019
  13. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    304
    In fact, I once asked a similar question. But now it's been a while. Are character system and building system independent of each other? I want to be able to use building systems separately.
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Not really, buildings and units share most of the components and other components rely on differentiating between both. It's definitely possible to separate them and use them independently but that'll require you to modify the code yourself.
     
  15. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    17
    Any way I'd be able to make the FactionID a texture instead of a color?
     
  16. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    276
    If your going to texture it make the primary color as white as possible. That way it'll just get to tinted.
    Otherwise it will just tint the color over top and have unpredictable results
     
  17. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    17
    I found a workaround, do you know how to access nested classes from a different script?
     
  18. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    17
    Never mind, got it
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    More information about the next update: Most manager components (except the Camera related components and the single player menu related components, have been refactored (and some even re-written completely from scratch) to improve performance, I would really like to complete refactoring the single player menu components and leave the camera related ones for the next update so this is going to take a couple more days. Re-writing stuff can lead to unexpected erroneous behavior and I'd like to avoid these issues when I release the update. So I thank you for patience again!
     
  20. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,289
    I bought this asset like 2 years ago when it first came out. Just want to say thanks for keep doing updates on this. I haven't tried the asset out yet. But when the day comes that I make a rts. I'm hoping this will be polished good. Probably will next year.
     
  21. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Hello sir. I'm creating a prototype through the Unity terrain system and one of the problems I found is "unit" cannot move in different height of the terrain sir. How can solve this sir?

     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Hey, thanks a lot for the nice words. I appreciate the fact that you bough the asset 2 years ago when it wasn't as good as it is now (still can get a lot better of course and hopefully it will).

    The update I'm working on right now aims to solidify the code base and the available features and that has been a goal this year (have a performant asset, avoid adding too much new features before solidifying the foundation).
     
    Shadowing likes this.
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Do you get any navmesh related errors when attempting to move the unit from the hill? I see there are some errors on the console but they have appeared before the actual issue happened and I can't really read them clearly.
     
  24. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    No sir. I try to bake a Navmesh again with a different setting but the problem still happens.
     
  25. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Another question about how to tell the additional building that comes with the map to let it know that they belong to what faction, in the case to set up an additional building before game start.



    For example, I need to tell this farm that they belong to this capital. I already have done this with the unit but just sign a Faction ID seem not to work with a building (Or I missed something).


    Last question. I try to replace a resources icon (sprite) and look like every time I re-open Unity those icons will turn back into a default picture (RTS Engine) again. So how do I solve this sir?


    Thank you, sir.
     
    Last edited: Aug 29, 2019
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Units and buildings that are pre-placed in the map is going to be part of the next update.

    There's a problem with the custom editor built for the Resource Type Info scriptable object assets which is going to be fixed in the next update.

    I'm currently submitting that update by the way, will be posting the full changelog list soon.
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    If no error is being shown in the console then it seems like the navmesh can not find a suitable path down from that hill which is very odd. Can you open the navmesh tab and take a look at the hill and see how the navmesh is baked over that area?
     
  28. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    A new updated has been submitted, v1.4.7 is a major update that brings a lot of new features and most importantly extensive refactoring which should improve performance a lot. Here are the main update changes:
    • Fixed an issue that made the unit move to its creator building goto position after it is upgraded.
    • Fixed refreshing the spawnable prefabs in the Mirror multiplayer menu.
    • Fixed an issue where wandering units start wandering while in battle.
    • Fixed an issue that prevented faction entities from attacking friendly entities when it’s enabled.
    • Fixed refreshing the APC’s capacity UI indicator when the APC capacity is updated while it is selected.
    • Fixed registering buildings placement instances in a multiplayer game.
    • Fixed assigning the Game Mmanager component to the Network Lobby Manager (Mirror) when the multiplayer game starts.
    • Fixed updating the free units list when free units are created/removed/converted.
    • Fixed unit animation change when “takeDamage” state is enabled.
    • Fixed updating the attack power attribute for factions when units/buildings with an Attack component are created/destroyed.
    • Fixed stopping collectors when their target resource is empty/destroyed.
    • Fixed getting the correct healing order audio clip when a healer clicks on a friendly unit.
    • Fixed AoE attack getting the right damage amount depending on the target type.
    • Fixed triggering the destruction effect when faction entities are destroyed.
    • Updated the faction limits to use either unit/building codes, categories or a combination of both to define limtations on creating types of units/buildings for a faction type during a game.
    • Updated the InputManager component to assign unique integer keys to units, buildings and resources to identify them in a multiplayer game (identifying them can now faster than it used to be).
    • Added an option to choose whether faction limits and faction population slots get updated when a unit/building is created directly using the creation method from the Unit Manager/Building Manager.
    • Added Unit Spawner component which allows to spawn units in game in the form of waves.
    • Deprecated the SinglePlayerManager component, previously responsible for handling the single player menu and replaced it with the LobbyManager and LobbyManagerUI components which now handle adding/removing faction slots, picking a target map, picking the defeat condition and speed modifier among other things in a single player menu.
    • Refactored the Game Manager component making the game initialization process smoother and faster.
    • Refactored both the Building Manager and Building Placement component to improve performance regarding the building related tasks that they perform.
    • Added the option to have units and buildings pre-placed for each faction slot in the map scene in addition to filtering those entities when the game starts depending on the faction type assigned to the faction slot (keep them or destroy them).
    • Rewrote all of the custom editor components that had issues with keeping the applied changes when the project is re-opened.
    • Refactored most of the components to improve performance, make things more modular and keep the same convetions among all scripts in the asset.
    • Added multiple new custom events.
    • Make sure to go through the update helper before updating to 1.4.7: http://soumidelrio.com/docs/unity-rts-engine/update-helper/v1-4-7/
    As always, full changelog can be found at: http://soumidelrio.com/assets/rts-engine/changelog/
     
    Pollawat likes this.
  29. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    [FIXED]

    Hello again sir. This time I got this up after I try to recreate the same working environment.



    As you can see it is just a Unity and your asset. I cannot tread it back anymore because of this.

    - This thing pops up after I try to re-import my asset in, and even I delete it all look like the error still there.
    - I already did a thing such as create a new project and reimported all of the clean library files, reimported the RTS engine from another project (that didn't have error), re-created all project data from nothing and imported it into the error one... all of this does not work.

    And here I am again... lol

    Thank you.

    ps. I fixed the error somehow but I just don't know how (I clean even the AppData in my computer). Anyway, I'm not going to delete this post to provide an additional log in case of this thing happens in the future.
    pps. Your pre-placed building (updated) is just awesome by the way. lol
     
    Last edited: Aug 31, 2019
  30. Huntah666

    Huntah666

    Joined:
    Aug 23, 2018
    Posts:
    11
    Hey OussamaB, and anyone else interested.

    I just wanted to show a finished product using this awesome engine.

    I started using this engine about a year ago, was a complete newbie to Unity but gave it a shot, just under a year later I have a released game on steam. I'm still using an old version of the engine as well, there has been many great improvements since then.

    Anyway here it is, thanks OussamaB for your continued support for your product, you're really helping people to do what they love.

    https://store.steampowered.com/app/1057740/World_Of_Conquerors/
     
    Paul-Swanson likes this.
  31. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Glad it has been fixed!

    Thanks a lot, let me know if you have any further suggestions.
     
  32. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    871
    @OussamaB I already own your asset but never got a chance to use it
    However i noticed many popular asset devs rewriting "next/pro" version of their assets using Job System and charge seperate money for that (upgrade cost for existing customers)

    I'd be willing to pay for such Pro version which makes your asset let us use 1000 of units on mobile . Please do consider it. Thanks
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    This looks so cool! I'm really happy that you've reached this stage with your project. You also already have some nice reviews on the steam page, congratulations for that!

    I will be trying the game and will let you know regarding any feedback but I recommend getting to the latest RTS Engine version, a lot of improvements can help you do more with your game.

    You can also promote your game on the discord server, we have a showcase channel with active users who will be able to provide even more feedback, here's the invite link: https://discord.gg/BsdQNKY
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    I'm considering moving most of the units and NPC behavior logic into the Job System to improve performance, this will definitely take some time but it is definitely coming!
     
    jGate99 likes this.
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    I've started working on the next update which will be mainly about a new camera controller. If you have any suggestions regarding the main or minimap camera movement or anything related to the RTS camera in general, let me know!

    Also please consider rating and reviewing the asset on the store, it helps a lot!
     
  36. mcchief

    mcchief

    Joined:
    Feb 10, 2013
    Posts:
    8
    Hi OussamaB,

    I'm very excited that you're revisiting the camera. Here's a quick vid from a game called Warrior Kings Battles, showing the camera mechanics I'd like to see in the RTS Engine. It's choppy, but you'll get the idea I think...



    Some nice features to have: Terrain collision, so the camera doesn't clip through the terrain. This would be especially helpful for hilly/mountainous terrain, where the zoom level is based on the terrain height. So if zoom is '50' as an example, you'd be 50 units above a low point (plane or valley) and 50 units above the highest peak.

    "Freelook" similar functionality to this asset: https://assetstore.unity.com/packages/tools/camera/rtscamera-103490 I think having the ability to tilt the camera straight down to the ground and straight up at the sky would be cool too. This would allow for some cool camera angles as a player is playing.

    While it is traditional for an RTS to have a fixed isometric view, I think adding the flexibility of full freelook to the camera would add more options for various gaming types people want to build with the RTS Engine.

    Regarding the Minimap. I think it'd be handy to have it show which direction your camera is pointing.

    Looking forward to the update. Keep up the great work!
     
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    Already thinking about adding those two, thanks a lot for explaining each suggestion in details.

    Yeah, the camera system hasn't been updated since a long time, it is time to improve it.
     
  38. Polite_Orc

    Polite_Orc

    Joined:
    May 3, 2018
    Posts:
    4
    Hello! I want to ask - is this asset suitable for creation of the indirect control RTS? Like Majesty or Settlers - is it possible to make AI fully controlling the player's units (units going for upgrades, looking for enemies, collecting resources, fleeing when seriously hurt)? Can I add some custom characteristics for units like experience and levels?
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    The RTS Engine units can construct buildings, collect resources, attack other units, wander (patrol), escape when attacked automatically without the player's intervention (each of one of this automatic behaviors can either be enabled or disabled per unit type). Going for upgrades and launching tasks is however handled by the player for player factions and everything is handled by the AI for NPC factions.

    You can definitely add custom components, there are a lot of custom events that you can subscribe to from your own components and they're triggered, you can update the level and experience system you set up for units. For more information about custom events, check this page: http://soumidelrio.com/docs/unity-rts-engine/scripting/custom-events/
     
    Polite_Orc likes this.
  40. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Sir, look like there is some problem here after a character received damage. (Or just miss setting)



    As you can see in the video, normally I set a character HP below bullet damage to hide this "Stuck animation" because they are one-hit kill (So people won't see what happens if they don't die). But if I set these character health to receive more than one bullet they will stuck after playing "Hit animation".

    Important question:

    - Is this a bug or just I missed something because I read you "Update Log" and it says already fix this.

    Secondary question: Can we set input action keys like other RTS game on the market such as.

    - Double hit "1, 2, 3..." (Command Group) to immediately switch the main camera to those characters that already set command group? (Right now I have to hit 1, 2, 3... +Space)
    - Can we pre-set command group to a unit before the game starts?
    - Can we set the main camera and minimap rotation outside the script? because I don't need it to be the "Diamonds" shape, I mean I can fix it buy set both of them to 0 Y degree rotation and in order to make it work I have to change your code:
    Code (CSharp):
    1. MainCamera.transform.eulerAngles = new Vector3(45.0f,45,0.0f);
    to (45.0f,0,0.0f) that fine, but to be honest I have no desire to mess with your code directly because it will earn me trouble when the next update comes so... "you get the point" lol.

    Thank you Sir.
     
    Last edited: Sep 7, 2019
  41. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    This issue was supposed to be fixed in the previous after further invesitgation, it turned out that there was still a minor issue with the "take damage" animation. This has been resolved and is part of the patch that has been submitted this morning (more information about the changes in this patch will be posted later today).

    Love this suggestion, will try to squeeze it in this patch since it hasn't been accepted yet. If not, next update. Thanks!

    Are those units pre-spawned in the map scene?

    I'm also working on a whole new camera controller which should allow you to pick the rotation you want from the inspector. I've taken a break from working on the camera update to submit to include important bug fixes but will be resuming working on it later today/tomorrow.
     
  42. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    So v1.4.8 has been submitted. It mainly includes some important bug fixes and performance improvements mainly when a large number of entities are selected / deselected. Next one will be about the camera controller, here's the changes list:
    • Fixed Building Drop Off component’s custom editor.
    • Fixed an issue where the target position collider of a unit is destroyed when the unit is converted.
    • Fixed an issue that allowed a building to pick itself as the rally point destination.
    • Fixed an issue that resulted in hiding the selection plane of a selected entity when an empty action is requested on the selected entity.
    • Fixed the “Take Damage” animation clip trigger.
    • Fixed displaying the list of buildings that a builder can place in the task panel when a builder that has certain restrictions is selected.
    • Refactored some of the selection related components in order to improve performance especially when a large amount of entities:
      • When the selected entities amount reaches a certain number that can be chosen from the UI Manager inspector (selection panel section), selection tasks will not be displayed for each individual entity but rather for each entity type + a text label will show the amount of the selected entities of that type.
    • Updated Game Manager to reset the time scale when the game is paused in a single player game.
    • Updated Resource Generator component to only add resources to the building’s faction when the maximum amount is reached even if auto collect is enabled.
    As always, full Changelog can be found at: http://soumidelrio.com/assets/rts-engine/changelog/
     
  43. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    v1.4.8 is now available on the asset store!
     
  44. hazuhiro

    hazuhiro

    Joined:
    Feb 14, 2019
    Posts:
    10
    after i generate new map using rts engine menu
    and then i play it, it show error

    NullReferenceException: Object reference not set to an instance of an object
    RTSEngine.FactionSlot.Init (System.Int32 factionID, RTSEngine.FactionManager factionMgr, RTSEngine.GameManager gameMgr) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:192)
    RTSEngine.GameManager.InitFactions () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:309)
    RTSEngine.GameManager.Awake () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:162)
    any idea? what am i missing?
    im using unity 2019
     

    Attached Files:

    Candac59 likes this.
  45. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106

    Hi,

    I have the same problem, i use unity 2018
     
  46. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    It seems like you guys haven't set up the faction slots and capital buildings for the factions.
    Have a look here: http://soumidelrio.com/docs/unity-rts-engine/game-manager/
     
  47. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,289
    Hey I was wondering are there any mobile input controls for RTS Engine?
    If not are you planning to add it in the future?

    Is this working good with 2019.1 or should i use 2018 LTS?
     
    Last edited: Sep 20, 2019
  48. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    It is planned. There are other things I need to work on first but I'll get to it.

    Should be working fine with both. 2018 LTS is definitely more stable than 2019.1 as a whole Unity editor though.
     
  49. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,330
    I've just submitted v1.4.8.1 as a follow-up patch to the last updates with more bug fixes and some necessary additions here and there. Here's the update list:
    • Fixed updating faction unit/building limits.
    • Fixed an issue where default units didn’t properly get initialized and recognized by all factions when the game starts.
    • Fixed a bug where the single selected entities info remain on the selection panel when it’s deselected.
    • Fixed property naming issue in the Mirror’s integration package.
    • Fix resetting animation when a unit instance is upgraded.
    • Fixed missing “Events” tab on the Building Attack component’s editor.
    • Updated the entity selection clip from one single field to an array of audio clips where each time the entity is selected, a random clip is chosen and played.
    • Added a “Destination” fields to the Unit Spawner component which will be the goto position of the units that spawn using that component.
    • Updated initiating a faction by:
      • Making a capital building not required to initialize a faction if the defeat condition is set different than “Destroy Capital” and if there a transform assigned in the new “Camera Look At Position” field that represents the initial camera position when the game starts.
      • Whenever the “Camera Look At Position” field is assigned, it will always override the capital building’s position as the initial camera position.

    As always, full Changelog can be found at: http://soumidelrio.com/assets/rts-engine/changelog/
     
  50. Scott90

    Scott90

    Joined:
    Jan 23, 2013
    Posts:
    3
    Hi Dussama,

    I keep getting these issues while trying to import the RTS Engine. I've tried importing with 2018.4.9f1, 2019.6f1, 2020.1.0a3 all with the same issue.

    The multiplayer component of your package is missing or failing to import. Is there something I'm missing or is this a bug?

    x.PNG