Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Monokkel,

    No matter what I do, I keep getting this result from the progress bar HUD:
    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	85.1 KB
ID:	1119495

    Any Idea why the values stay at 0? They are referenced to the correct values in ATBTT_GameMode, Current Pawn. I'm spawning the HUD from the ATBTT_GameMode Event Begin Play script. For some reason I can't get the correct values/colors to show up on the HUD. (No errors showed from running the game either).

    Comment


      Worked fine when I tried it. Here are the blueprints I use for the progress bar binding in HUD_Faction_Turn:

      Click image for larger version

Name:	Uene8oJ.png
Views:	1
Size:	92.2 KB
ID:	1119521
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Thank You for the example Monokkel,

        I realized something got messed up, and just recreated the project and remade the HUD. Then it worked. Your example also helped me do it a better way too (since I'm still a bit new to blueprint scripting). Thanks for all the help! Let me know if there's anything I can do in return.

        Best Regards,
        Seader

        Comment


          No worries! You bought the toolkit already, so don't feel like you owe me any favors
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Haha,

            Tuche good sir, and thank you!

            Comment


              Hey. I found an issue that appears to be a bug.



              Empty project, took the standard ranged pawn, and gave it a range of 2, and then just added a command to dump the range array to the player controller.

              For some reason the range array for the first pawn is giving the index with the enemy pawn, which is 1 range away, a value of 2, however, the second pawn returns the correct value of 1.
              Last edited by Envieous; 12-17-2016, 01:23 AM.

              Comment


                I think you're just counting from the wrong direction here, Selentic. When you dump the values of an array to the log using a forloop the values for the last indexes of the array will be displayed on top of the screen (since they are the last ones to be printed). This means that the bottom number displayed is the value of index 0, the second to lowest is the value of index 1 etc.

                The enemy unit in your images is standing on index 2 if I understand correctly, which is the one two from the bottom when looking at the log (third one to be printed). Its value is 1 in both images, as is expected.

                If you want to find the value of the index of an array corresponding to a tile index in the future I recommend using the Get Hit Tile Location and Index function in BP_GridManager. This will get the index and location of whatever tile you are hovering over with your mouse. Use the outputted index to get a value from any of the grid sized arrays (such as Range Array)

                Click image for larger version

Name:	5QsCVBn.png
Views:	1
Size:	69.9 KB
ID:	1120240
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Oh you're right, WHOOPS.

                  Comment


                    No worries! I've done the same mistake a couple of times. It is a bit counter-intuitive.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      Would it be possible to use the tile feature of this on its own? I am trying to create a game similar to animal crossing where the world uses a grid for placement and pathfinding.
                      I have custom gravity where the playable area is a mini planet that can be walked across entirely, so I need hex cells. Is there a way to project this grid onto a large sphere?
                      Sorry if you've already covered this in previous posts, I'm a little frantic with research.

                      Comment


                        There is nothing in the toolkit that forces you to use all the features, so you are welcome to use it just for displaying the grid. That is if I understand you correctly, though. You are also implying that you might want to use the pathfinding, which is not recommended if you want a real time game like Animal Crossing. If you just want the toolkit to make a hexagonal grid, buying the toolkit is probably a bit overkill, though. I would just look at my tutorial where I explain the construction script of BP_GridManger. Here is the relevant bit: https://www.youtube.com/watch?v=cK1EFnmSyE4&t=636s

                        If you want to project the grid to a large sphere there are a couple of ways you should go. You should first know that making a sphere out of hexagons is physically impossible, though you can use a few tricks to make something close enough. You would either do something like a truncated icosahedron (a sphere made of mostly hexagons and some pentagons), or you could fake it in some way, possibly by using a material (u/zeustiak did this with a material a while back. See his thread here).

                        Hope that helps you get on the right path!
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Hey Monokkel. Was this by chance something you fixed recently? I've run into this issue where the red visible tiles do not spawn in their correct locations when the grid size has been changed (in this case 1000, from 200). I'm unable to reproduce it in a fresh project, but I'm also pretty sure this functionality isn't something I've touched.



                          If it's something you fixed, could you tell me what you changed, if not can you tell me where this is handled so I can fix it?


                          I also stumbled upon this by accident, but you might want to look into this.



                          If you uncheck this, presumably because you want solid walls to function like invisible ones as far as allowing attacks through is concerned...



                          ...and then do this, it will break the ai's pathfinding. They'll just run to index 0 and execute their attack. Using invisible walls does not cause this.
                          Last edited by Envieous; 12-22-2016, 03:34 PM.

                          Comment


                            You're a great resource for finding bugs, Selentic Thanks for reporting the bugs you encounter. Your first issue is an issue I thought I had corrected, but it seems I only corrected it for displaying tiles for pathfinding and not for visibility. To fix this you should make the following changes to the Spawn Tiles In Range function:

                            Click image for larger version

Name:	BJCsItO.png
Views:	1
Size:	325.7 KB
ID:	1120447

                            The second thing you are pointing to (the branch that is always true) is just a temporary branch I forgot to delete after testing. The reason it does not work is that the AI uses it to determine what tiles it can move to for attacking player units. If we allow the AI to include tiles where LoS is blocked because of walls the AI may then attempt to move to these tiles when attacking. However, later down the event graph of ATBTT_AI_Controller Find Path to Tile in Range is set up to take walls blocking cover into account by default. This function will attempt to find the best tile for attacking the target, but may not find any (since all might have LoS blocked by walls), return false (0) and have the AI unit move to index 0. You could set Trace Visibility to false for the Find Path to Tile in Range in the AI controller and I think it should work as you expect it to, but I think it is better to instead set the collision of any walls you want to be able to attack through to not block RangeTrace.

                            I will put these bugs on the list of things to fix before the next update. Thanks again for letting me know.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post
                              You're a great resource for finding bugs, Selentic Thanks for reporting the bugs you encounter.
                              np dude, also your fix worked, thanks a bunch

                              Comment


                                Thanks for your quick reply Monokkel. I have decided I will need to create a geodesic sphere. With your toolkit, is it possible then to use a custom mesh (such as a geodesic polyhedra) and use that to project a grid on to?
                                I assume you could create the polyhedra mesh and use that as a base for the grid and bring in each hexagon/pentagon cell one by one and manual index them, but is there a way to generate it all in one?

                                Comment

                                Working...
                                X