Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hi again

    I have managed to get stuck, partly since Im trying to change your system completely, and partly because I dont even know the basics of the Unreal engine
    However, I hope this problem is simple enough that you can still help me in the right direction.
    I have removed the initiative sorted list and some other stuff that I dont think I will need.
    I start the game with no unit selected since I dont really see a need for that in the gamemode that I plan to use.

    My current problem is that Im not quite sure how or where to catch mouse clicks on a unit or the map so that I can use that to activate the unit.

    My initial thought was that this should be in the BP_GridManager since its the thing getting clicked, or some other central place where you would look for input each tick.
    But I seem to find most of the clicking stuff in BP_AbilityBase and Im not quite sure how parts of that blueprint are fired up unless a unit is already selected?

    Edit
    I think I solved the issue, found the input stuff in BP_PlayerController_ATBTT where I should have looked first tbh.
    Now I just need to figure out how to activate units from there instead. I wont focus much on the multiplayer code, but I will probably have to review how to get that part to work later.

    Is there any reason for me to state that something should be executed on owning client?
    Last edited by Doxs Roxs; 09-11-2018, 10:49 AM.

    Comment


      Originally posted by Doxs Roxs View Post
      Hi again

      I have managed to get stuck, partly since Im trying to change your system completely, and partly because I dont even know the basics of the Unreal engine
      However, I hope this problem is simple enough that you can still help me in the right direction.
      I have removed the initiative sorted list and some other stuff that I dont think I will need.
      I start the game with no unit selected since I dont really see a need for that in the gamemode that I plan to use.

      My current problem is that Im not quite sure how or where to catch mouse clicks on a unit or the map so that I can use that to activate the unit.

      My initial thought was that this should be in the BP_GridManager since its the thing getting clicked, or some other central place where you would look for input each tick.
      But I seem to find most of the clicking stuff in BP_AbilityBase and Im not quite sure how parts of that blueprint are fired up unless a unit is already selected?

      Edit
      I think I solved the issue, found the input stuff in BP_PlayerController_ATBTT where I should have looked first tbh.
      Now I just need to figure out how to activate units from there instead. I wont focus much on the multiplayer code, but I will probably have to review how to get that part to work later.

      Is there any reason for me to state that something should be executed on owning client?
      I think you might want to look at the new update that went live yesterday, where I added support for just the sort of thing you are after. I added a new ability called BP_AbilityBase_Idle which is active when no other abilities are active, including when no units are selected. By default it is set up for selecting units, which I think is what you're after. As you have found most input is handled through the player controller, which is generally best practice in UE4.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Originally posted by Monokkel View Post

        I think you might want to look at the new update that went live yesterday, where I added support for just the sort of thing you are after. I added a new ability called BP_AbilityBase_Idle which is active when no other abilities are active, including when no units are selected. By default it is set up for selecting units, which I think is what you're after. As you have found most input is handled through the player controller, which is generally best practice in UE4.
        Thanks! Ill look at that, but I think I have already made to many changes to go back to a fresh install. Or maybe I can just copy the parts I need/check how you did it.
        But to be honest its a mess at the moment, Im just hacking and slashing my way through it all
        Im learning a lot though, its great to have your framework to start with since I can copy/repurpose stuff that is already there.

        Comment


          Hi again, is there any way for me to see what has been updated or do you have a change log somewhere?
          I can see a lot of changes in for example BP_AbilityBase but Im worried I might miss stuff if I just start copying over things at random.
          Last edited by Doxs Roxs; 09-11-2018, 05:52 PM.

          Comment


            Originally posted by Doxs Roxs View Post

            Thanks! Ill look at that, but I think I have already made to many changes to go back to a fresh install. Or maybe I can just copy the parts I need/check how you did it.
            But to be honest its a mess at the moment, Im just hacking and slashing my way through it all
            Im learning a lot though, its great to have your framework to start with since I can copy/repurpose stuff that is already there.
            Originally posted by Doxs Roxs View Post
            Hi again, is there any way for me to see what has been updated or do you have a change log somewhere?
            I can see a lot of changes in for example BP_AbilityBase but Im worried I might miss stuff if I just start copying over things at random.
            On new updates I try to add a boolean marker designating when something was changed for all major changes. Use the "Find in Blueprints" window and search for "version191" and you should find all of this. Version info is also described on the second post of this thread and on my Trello. Not that not every little change is marked this way, but the biggest changes should be noted. If you are using version control you can see what blueprints were modified and can merge over changes that has been made in one version to another, but if you have made changes to the same blueprint that has been changed in the update you would still need to copy this manually.
            Last edited by Monokkel; 09-11-2018, 06:59 PM.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Hey!

              Two questions:

              1. When creating a new project with the newest version, then adding a new C++ class to the project, I get an error. Does this happen to anyone else or is it on my end?

              2. I'm about to start implementing the UI of a card system for the abilities, where is most of the logic placed for how the current abilities are shown and made clickable etc?

              Thanks in advance!

              Cheers,
              Mivke

              Comment


                Originally posted by Monokkel View Post



                On new updates I try to add a boolean marker designating when something was changed for all major changes. Use the "Find in Blueprints" window and search for "version191" and you should find all of this. Version info is also described on the second post of this thread and on my Trello. Not that not every little change is marked this way, but the biggest changes should be noted. If you are using version control you can see what blueprints were modified and can merge over changes that has been made in one version to another, but if you have made changes to the same blueprint that has been changed in the update you would still need to copy this manually.
                Great stuff, that should be no problem, Ill just search for the boolean marker then. Thanks!

                Comment


                  Originally posted by Mivke1 View Post
                  Hey!

                  Two questions:

                  1. When creating a new project with the newest version, then adding a new C++ class to the project, I get an error. Does this happen to anyone else or is it on my end?

                  2. I'm about to start implementing the UI of a card system for the abilities, where is most of the logic placed for how the current abilities are shown and made clickable etc?

                  Thanks in advance!

                  Cheers,
                  Mivke
                  1. Not seeing anything like that. Does this happen only for the new version? What error are you getting?
                  2. The ability icon display and clicking can be found in WBP_AbilityBox and WBP_Ability.

                  Originally posted by Doxs Roxs View Post

                  Great stuff, that should be no problem, Ill just search for the boolean marker then. Thanks!
                  No worries. As mentioned, though, not every little change is marked, but hopefully all of the most important stuff.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Prepurchase question here.. It looks like you've written this all, or mostly in blueprint. Is this available at all in only c++ or is the performance totally fine for this to be running entirely in blueprint? How well will your system plugin with someone who may plan to do most of extra work in c++ and not blueprint?

                    Comment


                      hi monokkel

                      I am getting this warning in the output log whenever I start to modify the toolkit :

                      LogScript: Warning: Script Msg: Attempted to access index 0 from array 'CallFunc_GetAllActorsOfClass_OutActors' of length 0 in '/Game/AdvancedTurnBasedTileToolkit/Core/Grid/BP_GridActor.BP_GridActor_C:UserConstructionScript'!
                      LogScript: Warning: Accessed None trying to read property GridManagerRef

                      Do you understand why this is happening ?

                      thanks in advance
                      leo

                      Comment


                        Originally posted by crossmr View Post
                        Prepurchase question here.. It looks like you've written this all, or mostly in blueprint. Is this available at all in only c++ or is the performance totally fine for this to be running entirely in blueprint? How well will your system plugin with someone who may plan to do most of extra work in c++ and not blueprint?
                        Yes, this indeed made entirely in blueprints. You need not worry about performance, as this is something I've prioritized heavily. For real time games with a lot of stuff going on using C++ will certainly give you a nice performance boost. However, turn-based games have the benefit of limiting the amount of stuff you need to calculate simultaneously, which makes it a great fit for blueprints.

                        If you want to work in the way Epic recommends, with a combination of C++ and blueprints, then this toolkit should be a good fit. However, if you want to work purely in C++ and don't plan to touch blueprints at all, I think it could be annoying to work with. It is possible to call blueprint functions in C++, but I know that some other things are more difficult. Accessing blueprint created structs in C++, for instance, is quite awkward.

                        I cannot be certain, since I personally use a combination of both C++ and blueprints in my own projects, and there might be other difficulties I would have ran into if I used C++ which I'm not aware of. There might also be easy workarounds for some of the perceived difficulties, but I cannot give you a definitive answer.

                        Originally posted by leo bar View Post
                        hi monokkel

                        I am getting this warning in the output log whenever I start to modify the toolkit :

                        LogScript: Warning: Script Msg: Attempted to access index 0 from array 'CallFunc_GetAllActorsOfClass_OutActors' of length 0 in '/Game/AdvancedTurnBasedTileToolkit/Core/Grid/BP_GridActor.BP_GridActor_C:UserConstructionScript'!
                        LogScript: Warning: Accessed None trying to read property GridManagerRef

                        Do you understand why this is happening ?

                        thanks in advance
                        leo
                        Hmm, I'm guessing one of the grid actors is trying to access the grid manager, game state or another singleton blueprint and failing. It is very likely a warning that does not have any consequence, as I've built the blueprints to keep searching before proceeding if they do not find an essential blueprint. The warning should still not be there, of course. I have not been able to reproduce the warning, so are you able to give me the repro steps? The warning says that the GetAllActorsOfClass node in the construction script of BP_GridActor returns null, and the only such node in BP_GridActor is the one that tries to find the grid manager. Have you placed a blueprint of type BP_GridActor (this includes units and tiles) before placing the grid manager? This would have given a warning.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Thanks, one more quick question:

                          >Levels can be built directly in the UE4 viewport, either through drag and drop or by having the toolkit automatically generate a walkability grid on top of any terrain

                          Does this include landscape, as well as imported terrain from say blender or something like that?

                          Comment


                            hi monokkel

                            I didn't place bp_gridactor before placing the grid manager. I modify the stealth componenet and then its begin to show the warning. when I save the project, exit unreal and then fire the project again its all good - no warning. puzzle me why its doing this, like after the modify the grid actor in the
                            ConstructionScrip no doing the ref to the gridmanager.

                            If you can understand why this happens, I would be happy to know, anyway, thanks for the quick assistance as usual.

                            cheers
                            leo

                            Comment


                              Originally posted by crossmr View Post
                              Thanks, one more quick question:

                              >Levels can be built directly in the UE4 viewport, either through drag and drop or by having the toolkit automatically generate a walkability grid on top of any terrain

                              Does this include landscape, as well as imported terrain from say blender or something like that?
                              Yep, works with basically anything. I've made it so that line traces are traced from the sky down to the ground in the center of every grid tile. Whatever is hit that blocks the custom PathTrace collision channel is added as a potential walkable tile. After that height differences between these trace hits are compared to calculate walkability, in a way that is fully customizable. As long as you set up the collision to block PathTrace you can use landscapes, meshes from blender or whatever else you want.

                              Originally posted by leo bar View Post
                              hi monokkel

                              I didn't place bp_gridactor before placing the grid manager. I modify the stealth componenet and then its begin to show the warning. when I save the project, exit unreal and then fire the project again its all good - no warning. puzzle me why its doing this, like after the modify the grid actor in the
                              ConstructionScrip no doing the ref to the gridmanager.

                              If you can understand why this happens, I would be happy to know, anyway, thanks for the quick assistance as usual.

                              cheers
                              leo
                              Hmm, seems like a bit of a corner case, but I'll look into it. Like I said, I seriously doubt this will affect the game in any way, but it is best practice to remove all warning messages. All that is likely needed is an isValid check after the GetAllActorsOfClass node.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                hi monokkel

                                The current problem continues even after I exit the editor and fire again - restarts. I tried to put "is valid" after GetAllActorsOfClassnode - didn't help.
                                I also tried with a new project I created and there (without any change of mine) log gives the same warnings

                                if you want to see it happening just create a new project and every time you compile the bp_gridactor blueprint you will get lot of warning (same as I worte before).
                                I do not know the reason for this, but it is even worse when trying to modify some blueprints.

                                Sorry for the headache

                                cheers
                                leo
                                Last edited by leo bar; 09-14-2018, 10:48 PM.

                                Comment

                                Working...
                                X