Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    #31
    Hiya Monokkel! Found another weird lil bug for ya. If I have a scenario where a melee unit has a target that is right at the edge of his movement range, like this:

    Click image for larger version

Name:	Screen Shot 2015-03-01 at 6.32.38 PM.png
Views:	1
Size:	301.3 KB
ID:	1067449

    If I click the enemy unit with the intent of move then attack, instead of clicking to move first then attacking, not only does nothing happen, but I am no longer able to do anything. He can't move anywhere else, gameplay just gets stuck. Looks like it might be another "edge clipping" example. If you get a chance, could you test this scenario with your updated code? I'm curious to see if it is related. Also, right now if I do the same thing with a ranged character, click an enemy to move into range then attack, it moves in to point blank range then attacks, rather then just moving in to attacking range before attacking. In fact, even if the unit was already in range before moving, he will move into point blank range before attacking. Weird no?

    Cheers,

    J^2

    Comment


      #32
      In fact, if I try to attack an enemy unit with a ranged unit, where the ranged unit is in firing range but not able to close to point blank range, then the same "gameplay lockup" occurs where I can't move or do anything else. Just another heads up. Cheers,

      J^2

      Comment


        #33
        Hi Monokkel,

        I have bought your package to help me learn Blueprints, and I want to toy around with a game I have in mind. I basically have a picture that I want to set your grids on top of, with the picture fully visible & the grids hidden. Is this possible? I've watched your video's but couldn't see what I'm after.

        I can't import a single mesh per square, I need the entire picture displayed & the characters will traverse the picture.

        Also, is it possible to resize the grid individual squares? I need a rectangular grid 100x50 and my picture to be placed on it with perfect fit.

        Sorry these are newb questions, even if you have pointers of what i should be researching to figure these things out for myself, very much appreciated.

        Many thanks,

        Richard.

        Comment


          #34
          Thanks for letting me know of any bugs you find, J.J. This problem is not related to the previous one, but is the result of some late changes I did to the blueprint that I obviously didn't playtest well enough. The game stopping when you click outside your movement range is very easy to fix. I've fixed it in the update I've sent Epic, but until they get it uploaded you can fix it by inserting the two nodes I've pictured below. The first one is in the "Attack Target" section in the bottom right part of the main blueprint. The second is in "Select action depending on tile clicked" in the top, green part.

          Click image for larger version

Name:	attack target.png
Views:	1
Size:	110.4 KB
ID:	1067471

          Click image for larger version

Name:	Disable input.png
Views:	1
Size:	78.7 KB
ID:	1067472

          As for ranged units moving to point blank to attack and not being able to attack targets outside your movement range but inside your sight range while in the movement phase, that's actually working as intended, though I am working on ways to change this still. The reason is that currently units generate either a walkability grid or a visibility grid, but not both at the same time. Therefore when a ranged unit is in movement mode it acts just like a melee unit. To attack a target within move and sight range without moving, the player can click his active pawn to change to attack mode and then attack any enemies in sight. The reason for this is that calculation visibility and movement are the most costly parts of the blueprint, and back when the system was less efficient I didn't want to generate both at the same time, especially not on the same tick. Now that I've made the system a lot more efficient it isn't as important, but generating both at the same time for units with high move and range on slow computers will probably still cause some slight lag (we're still talking a few milliseconds here, but ideally I don't want to have any percievable lag).

          The Next big update I'm working on will enable walkability and visibility to be calculated over several ticks, preventing lag, which will allow me to generate both visibility and walkability at the same time as the default option. Until then a small change you can do if you want some of the functionality right now is calling the "find tiles in range" function when a player clicks on an enemy in the movement phase. Then you check whether the enemy's index in the range array is a number different than zero (meaning it is within range). If it is, call attack target, if not proceed as usual as with the old system.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            #35
            Originally posted by Rixly239 View Post
            Hi Monokkel,

            I have bought your package to help me learn Blueprints, and I want to toy around with a game I have in mind. I basically have a picture that I want to set your grids on top of, with the picture fully visible & the grids hidden. Is this possible? I've watched your video's but couldn't see what I'm after.

            I can't import a single mesh per square, I need the entire picture displayed & the characters will traverse the picture.

            Also, is it possible to resize the grid individual squares? I need a rectangular grid 100x50 and my picture to be placed on it with perfect fit.

            Sorry these are newb questions, even if you have pointers of what i should be researching to figure these things out for myself, very much appreciated.

            Many thanks,

            Richard.
            Hi Richard, thanks for checking out the Toolkit

            I'm not sure there really are any noob questions when it comes to my toolkit. After all I'm the only one who has any experience with it, so that would make anyone else a noob at the moment :P What you're describing is certainly possible, and actually really easy. What you need to do is set up the blueprint just like I show in the first video. Then click on the Grid Manager blueprint and set Grid size X to 100 and Grid size Y to 50.

            If you need the grid cells to be a different size (and you can't for some reason resize the picture to fit) you'll need to resize the meshes you use for the grid. Edit the SM_Default_grid_mesh (or something similar. I'm at work and can't check. The mesh in "meshes" that looks like the default mesh in any case) and set its build scale to whatever size you need. Its default size is 200*200*37. Now place the picture on top of the grid so that it covers it perfectly and is at the exact same height as the Grid Manager. Then click on the grid manager and set the public variable "default tile visible" to false.

            That should do the trick Just ask me again if you have any other questions.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              #36
              Hey Monokkel,

              Still loving your plugin! Its awesome!

              But i found a small bug.
              when you click on an enemy which is outside of your movement and attack range, something breaks.
              After that you can't move or do anything at all.

              Comment


                #37
                Originally posted by Gaara View Post
                Hey Monokkel,

                Still loving your plugin! Its awesome!

                But i found a small bug.
                when you click on an enemy which is outside of your movement and attack range, something breaks.
                After that you can't move or do anything at all.
                Hi Gaara, I'm glad to hear that you're enjoying the toolkit

                What you are describing is a known bug. I've sent new files correcting this problem to Epic a few days ago, but updates usually take some time. In the meantime take a look at my comment three comments up for how to fix this problem yourself. You only need to add two New blueprint nodes.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  #38
                  sry, my bad
                  thanks for the quick response thought!

                  Comment


                    #39
                    Originally posted by Gaara View Post
                    sry, my bad
                    thanks for the quick response thought!
                    Hey, no need to apologize That bug is a pretty serious oversight on my part which appeared due to some last minute changes I apparently didn't playtest enough. Hopefully Epic will get the new update uploaded soon.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      #40
                      Is it possible to not be in combat mode all the time. Like fallout 2. Enemy sees you, then the combat mode starts?
                      Just bought it. Tried it a little, I managed to produce a bug where the player pawn can enter a tile that is occupied by an enemy pawn.

                      Comment


                        #41
                        Originally posted by Athidi View Post
                        Is it possible to not be in combat mode all the time. Like fallout 2. Enemy sees you, then the combat mode starts?
                        Just bought it. Tried it a little, I managed to produce a bug where the player pawn can enter a tile that is occupied by an enemy pawn.
                        That's certainly possible, though the amount of work it will require will differ depending on how you'd want to implement it. The simplest way would be to just modify the initiative order array so that the player character is always on top of initiative when he's not in combat, meaning he's the only one moving. While not in combat also make the tiles he can move to invisible and give him a move range larger than what is visible on screen so that the player can move wherever he clicks. When combat starts use initiative like normal and make the blue can-move-to tiles visible again. You'd probably want to add a lot more stuff than that, but that would achieve a lot of the basics.

                        Alternately you can just use navmesh and something similar to the top down example when not in combat, and when combat starts you could place all pawns on the tiles closest to their location and start combat.

                        I haven't encountered the bug you're describing before. Are you able to replicate it? Is the enemy pawn's faction set to "Enemy" and not to "Empty"?
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          #42
                          Thanks for the quick reply, Ill try out your advice
                          I will also try to replicate the bug for you.. You will hear from me if I can replicate it :P If not It was probable me doing something stupid.

                          Comment


                            #43
                            Here's a short clip showing off a new macro I've made for splitting up forLoops and forEachLoops over multiple ticks. The slow version showed in the video is way slower than what you would ever need (this is adjustable), for demonstration purposes.

                            The video shows the regular (instant) and loops per tick based vesions of creating a visibility grid. Visibility is efficient enough that the instant versions should work well for most games, but I've created this method for games on less beefy hardware (like mobiles) that want to use large grids and still be certain of a constant framerate.

                            This is a big step towards my next major planned feature, which is mobile and tablet support out of the box. Some users have already made the toolkit work on mobile, but I wanted to get this option done before implementing touch controls myself.

                            I enabled draw debug line per tick and it created a cool barcode-scanner effect For a real game you'd probably want to keep everything invisible until the grid was done generating.

                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              #44
                              Hello everyone,

                              First of all, again, cool toolkit.
                              I believe it has great potential.

                              Is there a way to have empty tile put over the base grid block range attacks?
                              Like lets say a building roof that you could walk on? Building itself should block vision, but still allows you to walk on the roof.
                              I've tried to put a wall and empty tile on one tile but that combination makes it not walkable.
                              Any suggestions?

                              Thanks,
                              Oskar

                              Comment


                                #45
                                @Oskarek: Vision (and thus ranged attacks) is checked by doing line traces from the attackers tile at "visibility trace height" (by default head height of the UE4 mannequin) to the same height on the target tile. This trace is done on the custom trace channel "Range trace". To block vision there must thus be something blocking "Range trace" between the start and end Points of the trace. So you can for instance set the mesh of your building to block range trace (make sure it has an appropriate collision volume and collision enabled). You can also create a copy of the invisible wall tile and set all its edge costs to 1 and Place them wherever you want to block vision. Or just drag collision volumes into the viewport wherever you need them.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X