Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Awesome toolkit! I have a question: I'm developing a mulitplayer game I'd like to be across a public server. The game has a home screen (set up as a separate level) that players are to join the server first. It then take them to a central "in game" area that they choose various levels from. The central area doesn't really use the grid manager/controller but obviously all the other levels would.

    The Toolkit seems to set up the server and connect players within itself, which in my case would be within the levels, not the "central area". If I'm wanting to connect players earlier at the home screen of the game, do I need to remove that server set up from the levels themselves and do this in the separate home screen levels? What is the most effective way to do this?

    Comment


      Originally posted by Monokkel View Post

      Hmm, it should be possible by default, but I have not tested it in a while. I will not have the time to test it for a few days either, but here is how I would check it: Add a break point to the server click event of the heal ability, click the unit that possesses it and follow the execution chain to see what happens. If it does not fire. examine the steps of the player activate part of BP_Ability and see how it sorts through unit indexes. I will take a closer look when I have the time, but I'm afraid I cannot make any promises for the immediate future, as the next few weeks are promising to be the most exhausting in my life so far, as I'm rushing to finish my thesis. After it is done I should have more time than I've had for almost a year, though.
      Best of luck with that!

      Just as an update I added a branch in Grid Manage > Keep Indexes with Relevant Units Set - which i believe is called right before it checks all indexes in the array for targets.
      Essentially just using the Exclude Specific Unit bool, if yes continue as normal, if no then add the owning actors index to the array before going to the Return Node.

      Comment


        Hey, sorry for the late answers. My responses are going to be extra sporadic the next couple of weeks, but then things should get better.

        Originally posted by Autowaaagh View Post
        Hey guys, I've run into an issue that I can't seem to find an answer for, so maybe someone here can help. I've got the toolkit running with a random dungeon generator I made. I have predefined rooms (as Blueprint Actors), and each contains a BP_Subgrid with the exception of my Entry room, which hold the BP_Grid_Manager. When I run the game, I'm able to cross over rooms (and thus into the subgrids) just fine, up to a point. It seems that 30 tiles away from the start point, I can not move further, usually stopping me halfway thru a subgrid. In my testing its always 30 tiles end-end (or roughly 6000 units). Any thoughts?
        I'm not able to replicate this on my end. Are you able to reproduce the issue without your dungeon generator (just using subgrids)? If so can you give me the precise reproduction steps so I can test it out?

        Originally posted by Illusive_S View Post
        Love the toolkit, but i have a problem with spawning units at runtime. They get created and everything, even have the right grid index and they are represented on the initiative bar, but nothing is happening during their turn. They do not move.
        Is it enough to spawn actor on the tile or is there some additional configuration that is required to make this work?

        EDIT:
        after some digging
        it sseems that the problem is with the ability system's begin play, in second pin of sequence there is some wierd loop after that, why is this whole setup neccesary? You create just one instance of each ability in the character controller instead of having every instance of ability actor per component?
        Seems like you've found a bug. Seems I did not properly test unit spawning after I made changes to network ownership, which is what is causing this. The problem is not the begin play of the ability system, though it is partially ability related.

        For the first issue of the unit never being selected, this is because the unit does not get assigned an owner automatically. If there is no player controller that owns the unit it will not be activated. Thus when spawning the unit set its owner to the appropriate player controller (for single player games just use GetPlayerController). I will change this in a future update so that the player controller of the server is automatically assigned if no other owner is chosen.

        This will get you most of the way there, but there is another issue relating to ownership. You need to set the OwnerId variable of the spawned unit to the ID of the controlling player's game state, or player-specific markers will not show up for that player (such as tiles in move range etc.). Before any such ability-specific markers are spawned abilities check that the unit owning the ability is being controller by this particular player. OwnerID is also something I should set to the id of the server if nothing is specified. For now you'll need to do this manually, but it is pretty simple. Here is a basic setup for spawning units owner by the server:


        As for why abilities are spawned the way they are, that is for a couple of reasons. First, for turn based games having multiple abilities of the same type spawned are not really needed as only one of them would be active at the same time anyway. The way I've designed the abilities having a lot of them spawned at the same time should not really have any impact on performance, but it is a bit of a safeguard. Another more important reason is that it often takes a while in Unreal Engine from you spawn an actor until you are able to access it (a tick, usually). This is doubly true for clients accessing actors spawned on the server, which might take multiple ticks.

        If we keep spawning in and deleting abilities every time a unit is created we would have to add several checks to make sure the ability actors can be accessed before they are, for instance, passed to the action system to be stored for later animation, to avoid issues. By keeping the amount of times abilities are spawned minimal and keeping these checks in a central location (the GetAbilityOrAddIfMissing function in BP_PlayerController_ATBTT) we can minimize the problems caused by this spawn lag.

        Originally posted by JPhilmore View Post
        Awesome toolkit! I have a question: I'm developing a mulitplayer game I'd like to be across a public server. The game has a home screen (set up as a separate level) that players are to join the server first. It then take them to a central "in game" area that they choose various levels from. The central area doesn't really use the grid manager/controller but obviously all the other levels would.

        The Toolkit seems to set up the server and connect players within itself, which in my case would be within the levels, not the "central area". If I'm wanting to connect players earlier at the home screen of the game, do I need to remove that server set up from the levels themselves and do this in the separate home screen levels? What is the most effective way to do this?
        Hey JPhilmore, glad you like the toolkit. I do not think the setup I have within the levels would need to be removed. You could always create a central area where the players meet (which is not turn based) and then have them join new levels. All the checks I've added do is to make sure turn based combat does not start until all players that should join have joined the level. Even though you have players connect up in a central HUB I assume you still want to wait with turn based combat beginning until all relevant players have joined that particular level? If so I think you should be able to keep things the way they are. Let me know if you run into any issues, though.

        Originally posted by LDodds View Post

        Best of luck with that!

        Just as an update I added a branch in Grid Manage > Keep Indexes with Relevant Units Set - which i believe is called right before it checks all indexes in the array for targets.
        Essentially just using the Exclude Specific Unit bool, if yes continue as normal, if no then add the owning actors index to the array before going to the Return Node.
        Thanks LDodds Yes, that seems like the right place to look. Did this solve your problem?
        Advanced Turn Based Tile Toolkit (Marketplace - Support)

        Dungeon Crawler Toolkit (Marketplace - Support)

        Discord

        Comment


          Originally posted by Monokkel View Post
          I'm not able to replicate this on my end. Are you able to reproduce the issue without your dungeon generator (just using subgrids)? If so can you give me the precise reproduction steps so I can test it out?
          Thanks for the response man. I removed my generator like you asked and it does seem like that is the cause to part of the issue as I too was unable to replicate it by just placing my room BPs or using a (much simplified) version of my generator to mimic the adding of the rooms at runtime. However, part of the issue I was able to replicate, but I'm not sure if there's really anything that can be done as I believe its just part of the way the toolkit is engineered because of the tile indexing. If a BP is placed so part/all of the child subgrid goes beyond the 0xy of the main grid, it ceases to become functional. I noticed that if you place a subgrid in the scene, it wont even let you move the thing beyond these limits due to the aforementioned theoretical limitations.

          I honestly believe I just need to reimplement the toolkit and my dungeon generator a bit differently, as the current way the indexing works for the grid/subgrid is going to make using the subgrids within a BP placed at random locations this way impossible. No worries though, I've already got a more semi-random placement method in my head, just need to map it out (no pun intended).



          Comment


            Hello. I am fairly new using your blueprint. I am having an issue Adding characters without the UE4 skeleton. I seem to be real close, most everything is working except exiting from the TakeDamage and Attack states in the UnitStateMachine. The animations begin and loop over and over, never having the bTakeDamage and bAttack being reset to false to exit from the state so the game freezes in the animation loop.

            I checked in in the Anim Preview Editor. If I click true/false there for bTakeDamage and bAttack it works as expected, but not at run time.

            My Parent Class for my Animation Blueprint is BP Unit, and copied blueprint code from BP_Anim_Unit with Advance blueprints for Abilties, Attributes, and Stealth added.

            Any ideas why the bAttack and bTakeDamage would not being set to false when the animation should end.

            EDIT: Figured out the problem. I had to add Notifies into the animation frames of the model I was using. Like notify HitEnd, ActionHit, ActionEnd, DeathEnd, etc.

            Thanks, Loco
            Last edited by Locoweed; 01-04-2019, 01:27 PM.

            Comment


              Another quick question, how would you gather neighbours of a tile? GA_Tile seems to have an array of edges, but grid manager is having all the connections held in a map?

              EDIT: Problem solved, i thought for some reason that costs are keys to the map, while its the target tile, hurr
              Last edited by Illusive_S; 01-04-2019, 02:23 AM.

              Comment


                Originally posted by Illusive_S View Post
                Another quick question, how would you gather neighbours of a tile? GA_Tile seems to have an array of edges, but grid manager is having all the connections held in a map?

                EDIT: Problem solved, i thought for some reason that costs are keys to the map, while its the target tile, hurr
                Glad you figured it out Edges for a tile is indeed represented by the nested GridEdges map. This will only give you connected neighbors, though. If you want to get all surrounding tiles, including the ones that are not connected by an edge you can use GetIndexesInRange with a range of 1 or, if performance is extremely important, use GetBaseEdges (adding the index of the center tile to the output array).
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Originally posted by Autowaaagh View Post

                  Thanks for the response man. I removed my generator like you asked and it does seem like that is the cause to part of the issue as I too was unable to replicate it by just placing my room BPs or using a (much simplified) version of my generator to mimic the adding of the rooms at runtime. However, part of the issue I was able to replicate, but I'm not sure if there's really anything that can be done as I believe its just part of the way the toolkit is engineered because of the tile indexing. If a BP is placed so part/all of the child subgrid goes beyond the 0xy of the main grid, it ceases to become functional. I noticed that if you place a subgrid in the scene, it wont even let you move the thing beyond these limits due to the aforementioned theoretical limitations.

                  I honestly believe I just need to reimplement the toolkit and my dungeon generator a bit differently, as the current way the indexing works for the grid/subgrid is going to make using the subgrids within a BP placed at random locations this way impossible. No worries though, I've already got a more semi-random placement method in my head, just need to map it out (no pun intended).


                  Yeah, it does indeed not work if you go beyond index 0,0. I thought long and hard on how I wanted to do the indexing, but ended up doing it this way as it made the indexing more intuitive. If you want to be able to place the rooms anywhere just place the grid manager so that the center of your dungeon is at index 50000 and you should have plenty of space to either side. No need to change how the indexing works.

                  Originally posted by Locoweed View Post
                  Hello. I am fairly new using your blueprint. I am having an issue Adding characters without the UE4 skeleton. I seem to be real close, most everything is working except exiting from the TakeDamage and Attack states in the UnitStateMachine. The animations begin and loop over and over, never having the bTakeDamage and bAttack being reset to false to exit from the state so the game freezes in the animation loop.

                  I checked in in the Anim Preview Editor. If I click true/false there for bTakeDamage and bAttack it works as expected, but not at run time.

                  My Parent Class for my Animation Blueprint is BP Unit, and copied blueprint code from BP_Anim_Unit with Advance blueprints for Abilties, Attributes, and Stealth added.

                  Any ideas why the bAttack and bTakeDamage would not being set to false when the animation should end.

                  EDIT: Figured out the problem. I had to add Notifies into the animation frames of the model I was using. Like notify HitEnd, ActionHit, ActionEnd, DeathEnd, etc.

                  Thanks, Loco
                  Hey, glad you figured it out. Sorry for the late answer.
                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    Yea, thats what I figured. Thanks man, what I've done is move to a more semi-random dungeon builder, similar to the way Dungeon of the Endless builds its dungeons, and am planning on then adding the GridManager afterward so it can then scan for walls/etc. Love it so far, keep up the great work!

                    Comment


                      I have been working with both Unreal 4 and your Blueprints for about a month now. I am finally understanding how everything works, Thank you for a great system. One thing that caused me much grief though was the SM_AR being inherited so earlier. Made it hard as newbie to replace the SM_AR with another weapon. Having the weapon in BP_Unit_Anim instead of like BP_Unit_Anim_Adv makes it much harder for newbies like me to add a different weapon, especially when the AddHealth ability is casting to BP_Unit_Anim. But also was good lesson I guess.
                      Last edited by Locoweed; 01-05-2019, 09:31 PM.

                      Comment


                        Originally posted by Autowaaagh View Post
                        Yea, thats what I figured. Thanks man, what I've done is move to a more semi-random dungeon builder, similar to the way Dungeon of the Endless builds its dungeons, and am planning on then adding the GridManager afterward so it can then scan for walls/etc. Love it so far, keep up the great work!
                        Great, best of luck!

                        Originally posted by Locoweed View Post
                        I have been working with both Unreal 4 and your Blueprints for about a month now. I am finally understanding how everything works, Thank you for a great system. One thing that caused me much grief though was the SM_AR being inherited so earlier. Made it hard as newbie to replace the SM_AR with another weapon. Having the weapon in BP_Unit_Anim instead of like BP_Unit_Anim_Adv makes it much harder for newbies like me to add a different weapon, especially when the AddHealth ability is casting to BP_Unit_Anim. But also was good lesson I guess.
                        Happy to hear things are beginning to click. I think the placement of SM_AR in the hierarchy is okay, though I understand your objection. The idea is that a duplicate of BP_Unit_Anim (not a child blueprint) should be made for whatever base unit you want in your game. That way you have full authority to change anything you want animation wise while keeping the essential functionality of BP_Unit. Nothing in BP_Unit_Anim or its child blueprints are needed for the game to function and are just for animation. BP_Unit_Anim_Adv is just BP_Unit_Anim with the stealth and ability system components added. You can just add these directly to your fresh duplicate and achieve the same result.

                        I understand that it is easy to fall into the trap of basing your own unit on one of the child blueprints further down into the hierarchy if you use the JungleRaid map as a guide. I intend to explain what I consider the best method (described above) when I make an updated video on how to create new custom units (on my to-do list, I swear)
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          This is a pretty big WTF here for me. I've got some characters that I'm using from a set. Their heads/hat/masks are additional meshes. If I add 1 static mesh and attach it to the head, it's fine. The unit still works fine. (e.g. the hair) but if I add a second static mesh to the head socket, it stops functioning. When I start the game the unit will not shoot or move with a second static mesh there. Now for the panda head it's fine because it covers the whole head, but other masks also require a hair mesh be attached.

                          Edit: Already solved this. Apparently you can't have something cover their face with collisions. Is there a line trace or something being done for movement/shooting? I set the masks no collisions and then it was fine.
                          Last edited by crossmr; 01-06-2019, 10:06 PM.

                          Comment


                            I've actually got a functioning cut-away system in place for my camera. If a character is in a building or behind things it'll hide it for me so that I can see. The problem I'm having now is that despite the building being cut away the grid has already laid itself out, so you end up with a bit of an odd situation, where you can see into the building and where the character is, but your camera is a bit higher up. This means your mouse tries to interact with the spots that might be on the roof rather than the floor you can see. Is there anyway to have the grid go transparent with the underlying meshes?

                            Also, why is the game always starting on Turn 2?

                            Comment


                              This is probably another newbie issue I think, but I thought I heard you say you could delete any sub folder like Maps 2d, but when I deleted caused other things to get broken. I think it is when deleting the BP_Grid_Manager_2d is breaking BP_Grid_Manager, unless I am not clicking the right warnings when I am deleting the Maps 2d. After I deleted everything in Maps 2d, but left Maps 2d Core folder in everything still works.

                              Thanks, Loco

                              Comment


                                Originally posted by crossmr View Post
                                This is a pretty big WTF here for me. I've got some characters that I'm using from a set. Their heads/hat/masks are additional meshes. If I add 1 static mesh and attach it to the head, it's fine. The unit still works fine. (e.g. the hair) but if I add a second static mesh to the head socket, it stops functioning. When I start the game the unit will not shoot or move with a second static mesh there. Now for the panda head it's fine because it covers the whole head, but other masks also require a hair mesh be attached.

                                Edit: Already solved this. Apparently you can't have something cover their face with collisions. Is there a line trace or something being done for movement/shooting? I set the masks no collisions and then it was fine.
                                Yeah, you need to be careful what meshes are blocking RangeTrace and PathTrace when using the toolkit. Only things blocking line of sight should block RangeTrace and only things that can be walked on should block PathTrace. If not you'll get weird results like a unit's head blocking its own line of sight or the GridManager treating the tops of heads of units as ground when calculating walkability.

                                Originally posted by crossmr View Post
                                I've actually got a functioning cut-away system in place for my camera. If a character is in a building or behind things it'll hide it for me so that I can see. The problem I'm having now is that despite the building being cut away the grid has already laid itself out, so you end up with a bit of an odd situation, where you can see into the building and where the character is, but your camera is a bit higher up. This means your mouse tries to interact with the spots that might be on the roof rather than the floor you can see. Is there anyway to have the grid go transparent with the underlying meshes?

                                Also, why is the game always starting on Turn 2?
                                For your first question again the answer is the trace channels. When you hide the top floor you also need to stop these meshes from blocking PathTrace or you will not be able to select tiles through them. Check out the platforms in the JungleRaid map that I have set up to become semi-transparent and click through when you zoom close.

                                As for the game starting on Turn 2 I'm not seeing that. Can you give me the steps to reproduce this?

                                Originally posted by Locoweed View Post
                                This is probably another newbie issue I think, but I thought I heard you say you could delete any sub folder like Maps 2d, but when I deleted caused other things to get broken. I think it is when deleting the BP_Grid_Manager_2d is breaking BP_Grid_Manager, unless I am not clicking the right warnings when I am deleting the Maps 2d. After I deleted everything in Maps 2d, but left Maps 2d Core folder in everything still works.

                                Thanks, Loco

                                Hmm, yeah seems like UE4 is detecting some dependencies. Not sure if it is a false positive, though, as I've now tested deleting the folder with no apparent issues. What issues are you seeing on your end?
                                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                                Dungeon Crawler Toolkit (Marketplace - Support)

                                Discord

                                Comment

                                Working...
                                X