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,470
    1) Not sure I understand this suggestion. Do you mean using the same concept for a healer component to create a shield, mana and other systems? I see how you want to do that with the Shield as it would work like the unit's health but I'm not completely sure how you want mana and other systems to work the same way?

    2) I'm currently working on improving the NPC system and part of that is definitely the NPC Attack Manager component. I'll be updating how faction power is determined and I really like your suggestions about making it a built-in resource type. I'll be also adding the option to target a random faction or the strongest faction.
    Regarding making the NPC faction to see other factions. I'm thinking about adding a Scout type of component that allows the NPC to send units towards a potential target faction and then collect information about the faction's power. Thanks a lot for these ideas.

    3) What in-game effects do you think the asset should have at least?
     
  2. CPTANT

    CPTANT

    Joined:
    Mar 31, 2016
    Posts:
    80
    I am running into a problem trying to prototype multiplayer functionality. I am unable to set the player joining the lobby to ready and get an lacking authority error.

    Using unity 2019.2.0f1
    using mirror 5.0.2
    using RTS engine 1.5.0

    Code (CSharp):
    1. Trying to send command for object without authority.
    2. UnityEngine.Debug:LogWarning(Object)
    3. Mirror.NetworkBehaviour:SendCommandInternal(Type, String, NetworkWriter, Int32) (at Assets/Mirror/Runtime/NetworkBehaviour.cs:196)
    4. Mirror.NetworkRoomPlayer:CmdChangeReadyState(Boolean) (at Assets/Mirror/Components/NetworkRoomPlayer.cs:67)
    5. RTSEngine.NetworkLobbyFaction_Mirror:CallCmdUpdateFactionInfo(String, Int32, Int32, Boolean)
    6. RTSEngine.NetworkLobbyFaction_Mirror:InvokeCmdCmdUpdateFactionInfo(NetworkBehaviour, NetworkReader)
    7. Mirror.NetworkBehaviour:InvokeHandlerDelegate(Int32, MirrorInvokeType, NetworkReader) (at Assets/Mirror/Runtime/NetworkBehaviour.cs:432)
    8. Mirror.NetworkIdentity:HandleRemoteCall(Int32, Int32, MirrorInvokeType, NetworkReader) (at Assets/Mirror/Runtime/NetworkIdentity.cs:859)
    9. Mirror.NetworkIdentity:HandleCommand(Int32, Int32, NetworkReader) (at Assets/Mirror/Runtime/NetworkIdentity.cs:879)
    10. Mirror.NetworkServer:OnCommandMessage(NetworkConnection, CommandMessage) (at Assets/Mirror/Runtime/NetworkServer.cs:1029)
    11. Mirror.<>c__DisplayClass7_0`1:<MessageHandler>b__0(NetworkMessage) (at Assets/Mirror/Runtime/MessagePacker.cs:163)
    12. Mirror.NetworkConnection:InvokeHandler(Int32, NetworkReader, Int32) (at Assets/Mirror/Runtime/NetworkConnection.cs:272)
    13. Mirror.NetworkConnection:TransportReceive(ArraySegment`1, Int32) (at Assets/Mirror/Runtime/NetworkConnection.cs:326)
    14. Mirror.NetworkServer:OnDataReceived(Int32, ArraySegment`1, Int32) (at Assets/Mirror/Runtime/NetworkServer.cs:545)
    15. UnityEngine.Events.UnityEvent`3:Invoke(Int32, ArraySegment`1, Int32)
    16. Mirror.TelepathyTransport:ProcessServerMessage() (at Assets/Mirror/Runtime/Transport/TelepathyTransport.cs:136)
    17. Mirror.TelepathyTransport:LateUpdate() (at Assets/Mirror/Runtime/Transport/TelepathyTransport.cs:107)
     
  3. islesofurth

    islesofurth

    Joined:
    Oct 10, 2018
    Posts:
    6
    Thanks for the reply :)

    1) with the healing thing, i'm not sure how it is programmed in the system but i would consider "healing" as adding something when below optimal.
    So theoretically you should be able to "heal" anything that can store data of a number 1 or greater.
    What it actually adds is just flavor text.

    3) It would be very nice to have something like the war3 editor but i know that would never happen.

    I think the main things needed would be.

    Movement:
    movement speed % up & down
    knock back effect + range of effect
    move to location - instant yes/no - travel time xxx

    Enhancements:
    Damage % up & down - aura yes/no - aura range xxx - duration xxx
    Defence, attack speed, movement speed, Regeneration, You get the idea.

    Custom Enhancement % yes/no - Base amount yes/no - aura yes/no - aura range xxx - duration xxx

    Also any area that can include a custom addition to it would also create a huge amount of usability
     
  4. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Got it, I'll be adding this to my todo list however I can not promise it anytime soon as more urgent updates need to be submitted before.

    There are plans to add a dynamic attributes systems for units, buildings and resources which will allow you to work with either native properties of entities (such movement and health properties) or define your own attributes and work with them. I'll be sharing more information about this soon. Just need to focus and focus on pushing the next two updates first.
     
  5. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for reporting this. I've updated the integration package and added the fix for this. You can get the integration package from the same page as always: http://soumidelrio.com/docs/unity-rts-engine/multiplayer-mirror/
     
  6. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Good job on the updates @OussamaB
    Probably wont get the time to work on my rts game till January sadly.
     
  7. DevelopGamer

    DevelopGamer

    Joined:
    Nov 22, 2014
    Posts:
    24
    This really is impressive! I'm having too much fun with the demo to start modifying it yet.

    I've noticed a few issues such as ai projectiles not being cleaned up, ai knight bobbing up and down, and errors relating to accessing both the health canvas after being destroyed and the same error with capsule colliders.

    The first two (projectiles and knight bobbing) occurred after the red faction attacked yellow in the demo (both ai). It seems the health canvas issue was actually relating to clicking my own building after it had finished being built (perhaps the health canvas is used for progress, just a hunch). I don't know which of those errors happened first but from experience I'm aware one of them may cause the others. I'm on unity 2019.2 in case that helps, will try it in 2018 tonight to see if I can replicate the issues.

    Is this the preferred channel for bug reports or discord? I'd like to contribute in a small way towards making this the best asset possible, in part to help me complete my own projects so not purely selfless!

    Thanks again for an amazing feat of work so far. This is literally allowing me to pursue one of my longest running ambitions, to make my own traditional rts strategy games. Documentation is excellent both code comments and manual.
     
    Last edited: Nov 21, 2019
    Shadowing likes this.
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You mean that the projectiles remained visible for the whole game and did not get hidden/pooled after a certain time?

    I can't reproduce this one by clicking on a building once it has been built. Any more information will be much appreciated.

    Does this happen when the knight unit is moving on even surface, uneven surface or both?

    You have the freedom to choose whatever is comfortable for you: E-mail, this forum post or discord.
    Although I would recommend Discord just in case you might be missing some configuration that is causing the issue you're reporting and another RTS Engine user might be faster than me to let you know about it. There are a lot of active users on Discord so I recommend checking it out.

    Thanks a lot for your kind words. Let me know if you have any suggestions.
     
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hey there, just wanted to let you guys informed regarding the status of the upcoming AI update. It's basically done now, there's still some testing that needs to be done to make sure everything works as expected and I still need to add some smaller features that has been recently requested. Unit movement and animation now also works as expected whether you choose to use the NavAgent component or the UnitMovement component as a controller for the movement. I'll be spending the next two days testing and updating the documentation so this should be submitted pretty soon.
     
    Last edited: Nov 24, 2019
  10. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The RTS Engine is now 50% OFF until Friday!
     
    zeon_06 likes this.
  11. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Hello, OussamaB!
    Bought RTS Engine at sale several days ago.
    Could check only documentation yet.
    Your asset looks very great and capital, especially if multiplayer really works.


    And I have questions:
    1) I didn`t catch the feature with converting enemy unit, what is it? Is it meant capturing or what?
    2) many assets have code field. Does code mean C#script or what?
    3) What is the safest way to change original features and add new one. F.e. if I want to add accuracy for firing weapon. At first look I should attach new script to unit with accuracy amount, then catch the firing event and spawn projectile with accordance with accuracy. Am I right or not. I suppose i shouldn't change any RTS_engine scripts or scriptable objects to avoid erasing during RTS engine updating.
     
    Last edited: Nov 29, 2019
  12. NamelessGames_

    NamelessGames_

    Joined:
    Jun 4, 2019
    Posts:
    43
    Hello!
    I've bought your RTS Engine on this Monday.
    I've really difficult to understand the terrain:
    - How you say to Navmesh that it has to look only to the WalkableTiles for the "Bake"?
    - Where I can find or create the "WalkableTiles" prefab?
    - Why can't I expland the "WalkableTiles" prefab in Hierarchy?
    Thank you very much and compliments for your work!! (I hope that the sense of the sentence is the same as italian XD)
     
  13. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Can someone explain me what a construction like this in C# is:

    #if RTSENGINE_FOW
    using FoW;
    #endif

    I see many of that either in classes or outside classes.
    If-else construction I know, but here is #if
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    It allows a unit to convert a unit from an enemy faction into a friendly unit that can be used.

    Not entirely sure what you're referring to here. But the source C# code is available in the RTS Engine.

    Safest way right now is to use the custom events that you can subscribe to from your own components. They are triggered for every action that happens in the game and it provides you with references to the entities that participated in each action so you can rely on them for the most part. If you're looking to add custom behavior but triggers for the events that you need are not available, please do let me know and they will be added.
    In addition, you can also the Unity Event fields provided in some of the components to instantly invoke a method in your custom component directly from the inspector.
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You usually just select the objects you want to bake the navigation mesh on and then you can assign the layer of the navmesh on those objects to whatever you want. For example, in the demo, the WalkableTiles objects have the layer: "Walkable". But it seems like you might as well go through how the navigation mesh in Unity works because the RTS Engine doesn't really change much regarding that, it just uses it. Here's a good starting point: https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html

    These are used in the demo game, you can definitely clone them and use them in your game since these are open source models made by Kenney.nl.

    Not really sure about this, works fine on my end. What version of Unity are you using?
     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    When you have something like this:

    #if SCRIPTING_DEFINE_SYMBOL
    ...
    code block
    ...
    #endif

    This means that the code block between the #if and #endif statements will be only compiled if the scripting define symbol is present in the player's settings. Here's more information about scripting define symbols: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

    This is usually used to execute different code blocks depending on the platform running the build but it can also be used (like in this case) to compile code only if a certain integration package (which is the FoW integration package in this case) is present.
     
  17. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Thanks a lot for your answers! I am a newcomer and I think your asset is a good start point for me.
    As I understand from your code converter unit can capture only buildings now. And in case of #if now I can guess for what purpose I added rts_mirror (or something like that) to player's settings.
    And I have another question. Assume that I added new variable, f. e. accuracy which depends on unit's pose (stand, crouch, prone) I suppose in that case i need to inform server about changing pose. Let's say I will make new event but how I push this information to server? Where I can find code how you inform server about event's invoking and and how clients receive that?
     
    Last edited: Nov 30, 2019
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    It can only convert enemy units now but support for targeting buildings will be coming very soon for converters and healers.

    Not entirely sure what you're referring to here by "server". But assuming that you're talking about a multiplayer game (with Mirror integration, you really don't need an actual server, it can be as simple as peer to peer), you want to check the InputManager component and specifically its static "SendInput()" method which allows you to send a custom input command to be synced with all players in a multiplayer game.
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    So the new NPC faction system update is finally submitted to the asset store. While the focus of this update was for NPC factions, the unit movement and animation systems also received some important changes. Here's the main changelog for the 1.5.1 update:
    • Fixed an issue that blocks leaving a multiplayer game to the main menu.
    • Fixed a UI and selection bug that occurs when the APC is selected among other units and all the units but the APC enter the APC.
    • Fixed syncing whether a movement command has been produced directly by the player or not in the InputManager component.
    • Fixed transparency issue of UI task images.
    • Fixed updating colors for unit creation and building placement tasks that reached their faction limits.
    • Fixed the unit death animation triggering issue when unit is using the NavMeshAgent component for movement and dies while moving.
    • Fixed toggling the ready status for a faction slot in the multiplayer lobby menu (Mirror multiplayer integration).
    • Replaced animator state machine components by one component that can perform the same task.
    • Updated "offlineScene" property for the NetworkLobbyManager in the multiplayer lobby menu (Multiplayer with Mirror).
    • Updated the UnitMovement component to disable setting the NavMeshAgent obstacle avoidance type when the movement is handled by the NavMeshAgent component.
    • Updated configuring a new map by destroying present objects in scene before the "NewMapConfiguration" prefab is cloned into the scene and added basic unit and building structures so a newly configured map is instantly playable.
    • Updated the FoW and Mirror assets integration packages.
    • Added the option to force unit rotation towards its steering target before actual movement is allowed even if the NavMeshAgent is used to control the unit's movement.
    • Added a custom event and a Unity event trigger that are invoked when a task in a task launcher starts processing a task in the queue.
    • Added option to allow attack units/buildings to be able to target flying units or not.
    • Added the option to add/remove resources from a faction whenever a unit or building instance that belongs to it is created or destroyed.
    • Added faction type, NPC type and resource type caching so they can be easily assigned in the inspector using a popup menu so you don't have to manually drag and drop these asset files from the project tab to the inspector fields.
    • Scan resource, npc and faction types and cache them to easily assign them from a popup in the inspector.
    • Refactored the NPC faction system to make it more scalable, modular and to improve performance by re-writing huge parts of the code and using better suited structures that suit the needs of each NPC component. Here are the main changes for the NPC components:
      • Added NPCTypeInfo scriptable objects which can be created from the project tab. Each NPCTypeInfo asset file allows to define a NPC type (or simply difficulty level) which can be directly used to assign a faction slot to a NPC type either in the Game Manager in a map scene or in the lobby menus.
      • The NPCManager component now acts simply as the main NPC component that is responsible for initializing, connecting and providing the required references for NPC components in a game.
      • A NPC type (defined by a NPCTypeInfo asset file) can be used for multiple faction types. You have the option to either define one NPC Manager prefab for all faction types or define one NPC Manager prefab for each group of faction types or individually for each faction type.
      • Added NPCUnitRegulatorData and NPCBuildingRegulatorData scriptable objects which can be created from the project tab and then assigned to units and buildings in the inspector allow for regulating the creation of unit and building types for one or multiple NPC types, one or multiple of faction types or a combination of those two. The regulator data asset files can be reused for different unit/building types as well.
      • Added the option to regulate buildings per building center or for the whole NPC faction overall.
      • Deprecated the built-in "Faction Power" counter that used to be assigned from the UnitAttack or BuildingAttack component and which was used by NPC factions ot measure how powerful a faction is.
      • The NPCAttackManager component now allows to input resource types in the inspector to be used to decide which faction to target. There are currently three options: Pick a target faction randomly, pick the faction with the most assigned resource types or pick the one with the least assigned resource types.
      • The NPCAttackManager component now allows to input resource types and specify an amount range for each one which determine both the minimum required resources to launch an attack or the resources that trigger the NPC faction to cancel an attack.
      • Updated the NPCPopulationManager is now capable of actively monitoring the NPC faction's population.
      • When no NPC type is assigned for a NPC faction in its faction slot, the NPC faction will simply act as a dummy faction and won't have any effect on the game.
      • Added tooltips for each exposed field of the NPC related components in the inspector.
      • Added assertions that print comprehensible errors in the console in case something is missing regarding the NPC configurations.
    • Please make sure to go through the update guide to walk you through what needs to be changed in your RTS Engine project after the update: http://soumidelrio.com/docs/unity-rts-engine/update-helper/v1-5-1/
    As always, full changelog can be found at: http://soumidelrio.com/assets/rts-engine/changelog/
     
    Last edited: Dec 1, 2019
  20. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Hi!
    I started to make new map and faced with several difficulties.
    As I understand we can't use unity terrain and should use meshes instead of it, becouse main camera is set to see special coordinates in world and they are not 0,0,0 as terrain appears.
    So I had to convert my terrain to mesh.
    And I have question what is the position for terrain is supposed, what are the limits for height, width and depth of terrain? Can my map be bigger then demo map?
    Documentation doesn't cover these moments
     
    Last edited: Dec 2, 2019
  21. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You can definitely use Unity terrain or use one mesh for your terrain or use a series of meshes/tiles, it's all up to you. Did you read this information somewhere in the documentation? If yes, then it needs to be rectified now.

    You can define the coordinates that the camera is allowed to "see" easily through the inspector by modifying the "Pan Limit" field of the Main Camera Controller component. Here's the doc page: http://soumidelrio.com/docs/unity-rts-engine/cameras/main-camera-controller/

    There's no limitations regarding this, you decide.

    Yes definitely, the demo map is just an example.

    It doesn't really say that there are limitations regarding the terrain but I'll add comments that there aren't any.
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
  23. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Than
    Thank you very much for answers and your support! No, that is not said in documentation that we couldn't use terrain, I suggested it after demoscene analisys. Thank you again, it is a little bit clearer for me.
     
  24. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Its been a while since i came back to messing around with unity and this asset , im wondering how Multiplayer is working now? Since you changed it to Mirror. Is it basically the same where a player hosts a game/lobby then players are able to see it from the multiplayer menu list? or do players have to manually type in the IP and Port of the client hosting?
     
  25. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Just curious if you have been kinda working on game saving.
    Maybe you could add a alpha version of game saving. Just tell everyone it's in alpha.
    Just to kinda get the ball rolling.
     
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Mirror offers an add-on so you can use the list servers feature. By default that feature is not available in Mirror.
    I'm planning to offer my own solution for listing servers but it might take some time since my focus right now is directed towards AI, unit movement and generally offering more customization solutions through coding.
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    There are some features I'd like to add first before implementing a save and load system although the structure of the save and load system is already planned so I'd like to ask for your patience on this one.
    Also, would you prefer to have an integrated save and load system into the RTS Engine or be able to use a third party asset to do so (Easy Save for example)?
     
  28. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    doesn't matter lol. What ever is easiest for you.
    if Easy Save is a well managed asset then go for it.
    I went ahead and bought Easy Save just now since its half off. Just in case you decide to use it.
    Plus I may use it for future games.
     
    OussamaB likes this.
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    V1.5.1.1 has been submitted. This patch includes some small bug fixes plus additional improvements regarding using the NavMeshAgent component for movement. Here's the update list:
    • Fix bug where units stored in a APC unit can be targeted in an attack.
    • Fix initial building rotation when spawned by a NPC faction.
    • Add updating the NavMeshAgent “Speed” property when it’s enabled and the unit’s speed is updated.
    • Add ability to unlock scenarios in the campaign menu.
    • Separated idle rotation angular speed and movement angular speed values by having a field for each in the Unit Movement inspector.
     
  30. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Hi, OussamaB!
    After last update I have problems with other tools integration.
    F.e I can`t use any external terrain tool now:

    upload_2019-12-8_14-40-35.png


    Looks like FoW is activated in this case, and the problem is I dont have it:
    upload_2019-12-8_14-42-58.png

    Sorry, if my question is stupid, I am a newcomer.
     
  31. WoogyIM

    WoogyIM

    Joined:
    Oct 2, 2015
    Posts:
    16
    Remove everything related to Fog or buy a fog asset
     
  32. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    @WoogyIM
    Thanks for your reply!
    But before update everything worked without FoW.
    Besides the same error appered about NetworkManager_Mirror.
    You can see at first my screenshot.
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I have uploaded 1.5.1 and forgot to delete the scripting define symbols from my project before the upload because they get uploaded as well. Therefore please go to Project Settings -> Player Settings and remove the RTSENGINE_FOW and RTSENGINE_MIRROR scripting define symbols and that shall fix your problem.

    I've uploaded patch 1.5.1.1 without the scripting define symbols but it's still pending review since 3 days now but it should be accepted and live on the asset store by tomorrow.
     
  34. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Than
    Thanks a lot!
     
  35. jijithnr

    jijithnr

    Joined:
    Jul 6, 2018
    Posts:
    5
    I want to buy this asset today but want to know, if I can replace all of the prefabs with my own. For example, I want to create my own characters, buildings etc and want to use the code as is. I am basically an artist and can easily create all the 3D models, animations and characters in low poly but better than the square like extreme low poly 3D assets seen in the demo. The idea is to create a version of the same game with my own 3D content but with little more higher resolution and polygon count and to have a different look and feel.

    Is it possible?
     
  36. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    Hello sir. I think I found something weird here.



    As you can see the building will complete itself just after the upgrade is done. I think this is not right, is this a bug or something?


    Another question is this:



    As you can see here, I know you already fixed some of it, but some issue going on here. I mean the "stuck" animation. (or if I just missed something please tell me)

    Lastly the pre-places system:



    When it comes to the unit this thing works just fine, but for the building, it is not (Sometimes even cause the problem) Maybe it is my fault and that is the reason why I'm here. lol.
     
    Last edited: Dec 11, 2019
  37. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Hi,OussamaB!
    Today I could check if my error gone with 1.5.1.1.
    But I could say that only error concerning FoW is solved and mirror error is still here:
    upload_2019-12-10_20-31-11.png
    And where is interesting think that if I remove ";MIRROR;MIRROR_1726_OR_NEWER;RTSENGINE_MIRROR;MIRROR_3_0_OR_NEWER" from player setting it will be automatically recovered.

    Update:
    Of couse after Mirror integration everything is ok, but nether the less.
     
    Last edited: Dec 10, 2019
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The point of the RTS Engine is to allow you to import your own models and art and just slap the RTS Engine components to them and customize everything from the inspector to have a fully functional RTS game. So yeah, what you're describing is definitely possible.
     
    jijithnr likes this.
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks a lot for the bug report and the video displaying how to reproduce the issue. I've fixe it and it will be available part of the next patch.

    Are you referring to the moment where the animation is kind of stuck between the transitions from walking to collecting? I think this is due to the fact that the animation goes through the idle animation first and then to the resource collection one. Can you confirm that the "stuck" animation there is the actual idle animation of that unit?

    Again, thanks a lot for reporting this. I've identified where the problem is coming from and will fix it.
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Just made a fresh import of 1.5.1.1 and not getting these errors nor do my scripting define symbols change. Did you have these symbols already in your player settings before importing?
     
  41. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    Appreciated your attention here.

    I can fix it for myself but it is not the right solution. (It has to mess with your script and animation method)

    Now, for the greater good, I will share the experimental with you for... maybe you can make it better in the future.



    As you can see in the video "in the default mode" we have to put three animations inside the "Override controller" included with "CollectAnim", "Idle Anim", "MvtAnim" just simply put some of them will not result in make this thing works.



    Anyways, the second video show if we started to use an override animation for a different type of resources they will cause the same problem. We can fix it in the same way but keep this in mind it is not perfect. (smooth transition still noticeable) . And lastly, it pretty hard to combine another "animation override" in one unit, I mean to make it more dynamics. (or I might be wrong)

    I solved this by recreated a hold animation parameter with combined "Resources Collector" and "Unit" scripts together.

    Anyways, I'm happy for what I got here so far... yeah. Maybe we can forget about this for now.

    Thank you.

    ------------------------------------------------------ Qusetion 1 ------------------------------------------------------



    I really mess some of your code here, can you confirm if it safe to proceed? (For Multiplayer Reason)

    Just a simple

    Code (CSharp):
    1. using UnityEngine.AI;
    to slow the unit down or increase their momentum when engaging the enemy.

    ------------------------------------------------------ Qusetion 2 ------------------------------------------------------

    As you can see, I don't remember this problem before the animation overhaul. They keep sending new parameter command to the idle state and send it back again, and again, and again. Result in the weird animation output as you can see here.



    Imagine when you play Starcraft 2 and the marine shout out "Moving out" every single time you right-clicking.lol. what a weird thing to see.

    Please advise.
     
    Last edited: Dec 15, 2019
  42. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    I deleted my project, then created new one and imported rts engine 1.5.1.1. After that I imported World creator and had these errors due project compilation. I didn't even open player's prefs before that.
     
  43. Eleutherios

    Eleutherios

    Joined:
    Mar 17, 2013
    Posts:
    4
    Hello i have a problem.
    Code (CSharp):
    1. The type or namespace name 'FoW' could not be found (are you missing a using directive or an assembly reference?)
     
  44. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    Read this:
    I have uploaded 1.5.1 and forgot to delete the scripting define symbols from my project before the upload because they get uploaded as well. Therefore please go to Project Settings -> Player Settings and remove the RTSENGINE_FOW and RTSENGINE_MIRROR scripting define symbols and that shall fix your problem.

    But you need to delete only rtsengine_fow.
     
    OussamaB likes this.
  45. PinkPanteRus

    PinkPanteRus

    Joined:
    Mar 2, 2019
    Posts:
    19
    @OussamaB
    I wonder what can you recommend me to do.
    So my problem is: I made a test terrain in 0,0,0 coordinates and moved main camera to right place. But main camera spawn at height set in CameraController script defined by private variables initialHeight, maxHeight and minHeight, so it spawn beneath my terrain.

    My Idea was to make my script that will change these variables at start function, but they are private and where are no get and set methods for them. So I can`t access them by scripts.

    Of couse I can change them in inspector or make them public, but these are bad decisions.
    If I change your code my changes will be erased while updating rtsengine and manual setting in inspector is not good for multiplayer I guess. f.e I want to lock these variables in regarding to capital building coords and for different players they will be different.

    Maybe you can advise me something or change code for providing access to these variables?


    upload_2019-12-12_20-15-57.png

    upload_2019-12-12_20-29-9.png
     
    Last edited: Dec 12, 2019
  46. jijithnr

    jijithnr

    Joined:
    Jul 6, 2018
    Posts:
    5
    If you can create a youtube video or write up on how you can change characters, buildings, vegetation and terrain in this RTS engine to quickly customize it to their own liking and look and feel, it will be great, and there will be more buyers for this asset.
     
    cidiego likes this.
  47. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Since you're updating the speed within the Resource Collector component then this should be replicated for all clients in a multiplayer game. You should also be using the method "SetMaxSpeed()" from the UnitMovement component instead of updating the speed directly. This method will override the AI's speed if the unit uses NavMeshAgent component to handle movement.

    Apart from that, I'd really recommend to use the custom events related to collecting and dropping off resources to update the speed of the collector unit instead of directly modifying the ResourceCollector.cs script. This allows you to have your modifications intact while updating to a new version.
     
  48. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This issue is caused because the movement is stopped, then recalculated and started again everytime you click, which is not ideal. This will be fixed in the next update.
     
    Pollawat likes this.
  49. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    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?
     
  50. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    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.