Search Unity

  1. Unity 2019.1 beta is now available.
    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. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity RTS Engine

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

  1. HanAusBerlin

    HanAusBerlin

    Joined:
    Sep 13, 2017
    Posts:
    49
    Oh, one more question: I'd like to substract the count from the population when a unit object becomes destroyed (need that because I combine your asset with a FPS system). How can I do that?
     
  2. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Yes, with RTS_HideInFog script : Lign 65 :
    Visible = !RTS_FoWManager.FoWMgr.IsInFog(new Vector3(transform.position.x, 0.0f, transform.position.z), MinFogStrength);
    IsInFog is not found :)
     
  3. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Thanks a lot for reporting this. Will update the integration pack ASAP!
     
  4. September9

    September9

    Joined:
    Jan 20, 2016
    Posts:
    16
    It's really good RTS starter Kit!
    Do you have a plan to add sky units?
     
  5. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Read the documentation you can make fly unit ;)
     
  6. September9

    September9

    Joined:
    Jan 20, 2016
    Posts:
    16
    Thanks. You are right.
     
    meTonne likes this.
  7. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Hi !

    I've a list of questions : ^^

    - I use the Fog of War asset and the LoS (Line of Sight) with a angle of vision for my infantry.
    What script I need to modify to have ennemi detection with Line of Sight ?

    -I work on a modern warfare RTS. I use bullet projectile and I want to have dispersion.
    What script I need to modify to add dispertion of bullet ?

    -Last question, I use modern vehicule like cars, jeep, tanks etc ...
    What script I need to modify to make real vehicle movment (don't turn in fixe position but turn wheels and have "real" mouvment) ?

    Thank for your answers
     
  8. Phesant33

    Phesant33

    Joined:
    Nov 13, 2015
    Posts:
    34
    Hi, I tried this, and now it has just changed the green placement layer to red, won't let me place the building anywhere.

    - I should add that the only way I could even get my new building to appear in the list of build options when selecting the worker, was to replace the normal house object with my own.
    - When using the "new building" button in the RPG Engine editor I filled in all the relevant inputs but the building icon would never appear in the "worker" buildings menu, until I replaced the default house with my own building.
    - I added the building placement component and added my new building to the list but it still didn't happen.

    Are there any video tutorials on creating new buildings with custom mesh/models?

    Thanks for your help. Would love to be able to just place custom buildings
     
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    The Attack component that allows units/buildings to attack enemy units/buildings is responsible for LoS settings. You can modify the LoS settings easily from its inspector.

    The Attack component is the one responsible for spawning an attack object (bullet, in your case for example) and initializing its settings including its movement direction, so I'd say have a look at that part. However, I really advise against implementing imprecision yourself right now if you are using multiplayer. If not, go ahead.

    This is unfortunately not supported. All units have the same type of movement, you can play with the rotation and movement speeds in order to achieve a better and smoother movement for the vehicles but for now, a special movement component for vehicles is unfortunately not supported.
     
  10. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    This part in the documentation (http://soumidelrio.com/docs/unity-rts-engine/buildings/) walks you through creating your building step by step. Video tutorials will be available after some essential updates are submitted.

    When adding it to the "All Buildings" list of the Building Placement component, does that not work?

    This is because the default house building is already in the "All Buildings" list that I've mentioned above.

    Aha, so now I assume you have two Building Placement components and the second one is discarded as soon as the game starts since you're not allowed to have two. Can you add your buildings to the one that's already available as a component of the "BuildingsManager" game object?
     
  11. lpye

    lpye

    Joined:
    Aug 2, 2012
    Posts:
    23
    I am using Unity version 2018.3.1f1 Personal. I created a new project and imported RTSEngine. I received a number of errors in the console.

    Is this asset fully supported up through the latest version? If not, what version is it supported for?

    upload_2019-1-14_4-42-29.png

    upload_2019-1-14_4-42-37.png
     
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    2018.3.1 is supported. You'll get some errors regarding lightning and animations when you import the package though and these are simply related to some Unity components that have been changed/deprecated. Clear the errors and you'll be good to go.
     
  13. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Hello !

    I've a little problem, when I tested my map with AI player, AI collect resources but when I launch map by the SinglePlayerMenu AI didn't collect resources... An idea ?
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Are you talking about the AI managers that came with the demo? Or is this an AI manager that you created? If it's the latter, check that you have correctly assigned the NPC Manager component in the single player menu.

    ---

    P.S: The 1.3.6 update will be submitted to the store by tomorrow. More information about the update list will be shared as soon as it's available on the store!
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    So the 1.3.6 update has been submitted, here's the main update changes:
    • Added the feature to detect idle units/workers using which can be triggered using a UI button.
    • Added population slots for units so that units can occupy more than 1 population slots.
    • Added the option to pick a faction defeat condition: either by destroying the faction’s capital or by eliminating all units and buildings of that faction.
    • Added the option to have multiple upgrade targets for units and buildings.
    • Deprecated the unit, building and resource related components and replaced them with new more modular components with better performance.
    As soon as the update is released and to guarantee a smooth transition, check out this guide before updating: http://soumidelrio.com/docs/unity-rts-engine/update-helper/v1-3-6/
     
  16. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    207
    Very nice! This seems like it might be the perfect time for me to restart my project!
    You clearly put some care into that upgrade page so it gives me confidence that it'll work great. You've made a number of improvements to this asset that make me really look forward to working with it again. Note the only reason I stopped working with it before was my lack of knowledge on how to code. I've taken a number of courses since then so I'm excited to see the changes you've made. Thx and great job
     
  17. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    78
    Glad the next version is being released soon! I have some input on what I would like to see in the next update. Obviously this is specific to my project, and it's order in importance is influenced by what you and others would like to have going forward.

    1. Ability to build squads, so that when you build a unit, it actually builds more than one from a preset list. (Like an array of units that we can make).
    2. Be able to set layers to block LOS so units don't shoot through them if they have a collider.
    3. Be able to assign a hotkey to a task.
    4. When moving a unit, being able to hold down the RMB and choose a facing direction for the unit.
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    The latest update has been already approved by the Asset Store team and is now live on the store.

    Glad to have you back here! Thanks a lot for the kind words.

    Thanks a lot for the great suggestions. I've added all of them to my to-do list. I can not promise them anytime soon but I'll try to my best to add them ASAP (especially the first point as it has been suggested by other users already).
     
    Paul-Swanson and jobo22 like this.
  19. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
  20. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    meTonne likes this.
  21. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Thanks, all work for RTS Engine prefab but for my prefab it didn't work. :/
    I haven't many prefab so I do it again.
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Are you sure that your prefabs are in a path that ends with "Resources/Prefabs"?
     
  23. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Yes in the same folder that RTS Engine prefab. But I rework all of them.
    I found that villager didn't return to drop off when they were max amount resource.
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Really sorry you had to do this but I just tested the attributes collector/converter packages with a new building and a new unit prefab and it worked.
    When you import the new version, the old unit and building prefabs must be there (you do not import the new version into a new project but into the same project and then follow the steps specified in the guide to clean it up and convert the prefabs into the new system).

    Thanks a lot for reporting this bug, it has been fixed and a patch will be submitted later today (along with other fixes).
     
    meTonne likes this.
  25. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Patch v1.3.6.1 has been submitted to address issues that have risen in the last update:
    • Fixed updating the population UI for the local player’s faction.
    • Fixed a bug that prevented units from dropping off the collected resources.
    • The Resource Manager now initializes the map’s resources at the beginning of the game, there’s no need to set them manually from the inspector anymore.
    • Fixed a bug in the Update Helper’s Attributes Converter package that prevented updating the unit and building prefabs description fields properly.
     
  26. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Hello !

    I've a problem with the Fog of War, I reimport :
    Integration pack and Asset Fog of war
    Mistake :
    Assets/Integration Packs/Fog Of War/Scripts/RTS_HideInFog.cs(58,48): error CS1061: Type `FoW.FogOfWar' does not contain a definition for `IsInFog' and no extension method `IsInFog' of type `FoW.FogOfWar' could be found. Are you missing an assembly reference?
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    With the latest update, the FoW integration pack has been also updated.
    Get the updated pack from this page: http://soumidelrio.com/docs/unity-rts-engine/third-party-support/fog-of-war/ and let me know how it works out.
     
  28. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    I deleted the integration pack of my project, download the new on you page but I've the save mistake... I need to delete it on prefab before import the new ?
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    You don't really need to either delete the old package before importing the new one as it will be overwritten and you don't need to remove that component from the prefabs either.

    From the error that you posted, it seems like you don't have the new integration package imported since that line has been changed (I just downloaded the integration package to double check if it's the most recent one into my project and it worked error-free).

    Can you please double check?
     
  30. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Yes it's like old error. I redownload it and reimport it and same problem ... I don't understand why it doesn't work :/
    The package that I download : https://mega.nz/#!8d12XCyS!00hC051EulPXzw1xAeo3Uh8gJS0iwCi4VBGVpG0Vg1s

    I found that when you attack a unit, if unit detect another unit in range he didn"t move. I move when all unit will be killed.
     
  31. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    Hi !
    Report : When you build a building, the object "underconstruction" didn't hid when building built.
    I test with lower life : 199 for 200 life point and same issue.

    meTonne
    :)
     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Hey, really sorry but apparently I uploaded the updated package into a different path. It's now in the correct path:
    http://soumidelrio.com/asset/rts-engine/thirdparty/fogofwar/FogOfWar_RTSEngine.unitypackage
    Sorry for all the confusion this might have caused.

    Yes the unit is not supposed to stop its current attack to attack another unit unless it's manually assigned by the player to do so? Or didn't I misunderstood what you said?
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Thanks a lot for reporting this bug, I've just looked into it and fixed it. The fix will be available in the upcoming patch.

    This patch still hasn't been accepted by the asset store team. The fix for the above problem will be added to it and the patch will be re-submitted.

    I've originally submitted the patch on the February 6th and apparently the asset store are having issues processing pending updates as fellow asset store publishers have reported having the same problem. I've already sent an e-mail to the asset store team to ask for clarification and hopefully fix this issue ASAP. I will keep you updated.
     
  34. meTonne

    meTonne

    Joined:
    Apr 30, 2016
    Posts:
    42
    No problem, it's correct now ! :D

    I think I wrong explain.
    You select a soldier, go in ennemi base. Soldier attack ennemi villager, but if you give a movement order, he didn't move, he rest on is attack condition. He move when all ennemi will be killed (in his range detection).
     
  35. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    78
    I have this problem too, once a unit has a target, they will not obey movement orders.
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Thanks a lot for reporting this bug, it has been fixed and the fix will be added to the next patch.
     
    jobo22 likes this.
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Just letting you know that the Asset Store staff still haven't processed the patch and still haven't responded to my messages yet (as it's the case for other publishers). Therefore I re-submitted the patch to include the new bug fixes so here's the patch update list:
    • Fixed updating the population UI for the local player’s faction.
    • Fixed a bug that prevented units from dropping off the collected resources.
    • The Resource Manager now initializes the map’s resources at the beginning of the game, there’s no need to set them manually from the inspector anymore.
    • Fixed a bug in the Update Helper’s Attributes Converter package that prevented updating the unit and building prefabs description fields properly.
    • Fixed a bug that prevented units from responding to movement orders when they are engaging enemy units.
    • Updated the Fog Of War asset integration package to support the newest versions of both the RTS Engine and the Fog Of War assets.
    • Fixed a bug that prevented the last under construction state objects be hidden after construction is complete.
    • The RTS Engine now supports only Unity 2018.2.3 and newer versions.
    As always, you can find the full changelog on this page: http://soumidelrio.com/assets/rts-engine/changelog/
     
    meTonne and jobo22 like this.
  38. shawnevony

    shawnevony

    Joined:
    Aug 23, 2018
    Posts:
    5
    Hey there, just a quick question,

    Is anybody able to tell me how soldiers (Players soldiers) decide who to attack first when confronted with multiple enemes.

    I have a situation where my soldiers will always attack a certain a unit and ignore the people actively attacking them (Unless I manually make them switch targets). The strangest thing about this is that the target they always want to attack has 'Take damage' set to false.

    I would like to know what determines the automatic target so I can modify my units accordingly, thanks in advance.
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,181
    Units that can attack in range will simply pick the nearest enemy unit inside the defined range. They do not switch to attack units that attack them because imagine a unit being attacked by a group of enemy where switching its attack target every time it recieves damage from one of the units in the group, it will instantly switch its attack target.
    If units are set to not take damage, they will not be excluded from getting attacks but will simply receive no damage from the attacks while all the attack method callbacks will be called allowing you to customly write the effect of the attack. If the "Can Be Attacked" field is disabled for a unit then enemy units will not be able to attack it.