Announcement

Collapse
No announcement yet.

Advanced Turn Based Tile Toolkit [SUPPORT]

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

  • The things I was thinking for the black board and maybe I have it wrong. I was thinking if you stored all the stats around a character. So for you D&D example you could store STR, CON, etc... As well as hp and things like that. This way I could make a black board for each actor in the game and call the value from there. When you update the version I don't have to worry about losing custom stats I just have to relink the black board. Though I could be wrong I thought that was one way you could use a black board.

    Comment


    • Originally posted by Anzak View Post
      The things I was thinking for the black board and maybe I have it wrong. I was thinking if you stored all the stats around a character. So for you D&D example you could store STR, CON, etc... As well as hp and things like that. This way I could make a black board for each actor in the game and call the value from there. When you update the version I don't have to worry about losing custom stats I just have to relink the black board. Though I could be wrong I thought that was one way you could use a black board.
      I don't really see the benefit in storing stats in a blackboard instead of in the individual units. When you add new units you have to add them again when you update the toolkit. If you migrate them to a new project they will keep their stats if these are variables stored in the pawns. If you are making large, complex rpgs ore something like that, with tons of different units I think it would be better to store their stats in Excel or something similar, as discussed in this thread: https://forums.unrealengine.com/show...ata-from-Excel
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


      • Hi Monokkel, I'm sure there will be a lot of work involved on my part in this request but I was wondering what would need modified to add extra factions. I am looking to add 2 more factions to create a 4-player game.

        Comment


        • Originally posted by TrueSkittles View Post
          Hi Monokkel, I'm sure there will be a lot of work involved on my part in this request but I was wondering what would need modified to add extra factions. I am looking to add 2 more factions to create a 4-player game.
          This is something that I'm also interested in having. I'm planning on making a 5-player game where each side is it's own faction (So-to-speak)

          Comment


          • I just did some tinkering on this front myself by extending off a similar faction-based feature that I had already added (KOed Player, so that player pawns can be revived if desired).

            After a bit of work I got it sorta working, I'm just fighting with the tiles and how they're displayed (The attack range tiles are now visible on the start of a unit's turn for some reason...), and the AI now sometimes attacks a tile where a pawn was just destroyed and thus never ending its turn because it's calling Attack but nothing ever calls Receive Damage, which in turn means Choose Next Pawn doesn't get called either...(my guess is it's an issue with timing somewhere, and the array is not being cleared before the new pawn starts his turn...)... But yes, multiple factions are possible.

            To get it working, you basically need to tell the appropriate places to add new Factions to the Pawn Array, and Initiative Order Array, and if they are not the Current Pawn's faction or an Empty Faction to add them to the Pawns in Sight Array, and Reachable Pawns Array.

            Took me about 3 hours to figure out, so it's not hard to do, just a little tricky to make sure all the nodes are hooked up correctly so the game doesn't stall. I can try and take some screenshots of my somewhat spaghetti-fied nodes if you guys want, but there was a lot of little things that needed to be changed, and like I said, it's only sorta working...
            Last edited by Shenku; 07-06-2015, 04:34 PM. Reason: Typos

            Comment


            • Thanks for the input, Shenku. So to TrueSkittles and AxelRantila, as you can see games with more factions is certainly possible, but it requires some tweaking. The main things that have to be changed are any functions or blueprint graphs that use the faction variable from units. This includes functions like Pathfinding and Find Tiles In Range, where units that are within ranged are marked and stored. It's also important for input. When the player clicks a tile the following actions is determined by checking what faction is stored in the Pawn Array index corresponding to the clicked tile. There might also have to be adjustments to the AI. If an AI pawn finds pawns from multiple factions within range, how does it decide which one to attack? None of the changes that have to be made are particularly large, but there are quite a lot of them. I'll happily provide support to anyone attempting to add more factions, but I recommend that they are comfortable with the basic functionality of the toolkit first.

              To your specific problems, Shenku. For the attack tiles being visible at the start of the turn, that's probably because Find Tiles In Range is called at the start of unit turn (like it usually is), but that you have not set it to "find only pawns" (possibly because you have changed it to find all possible pawns since you're not looking for a single faction). I would probably keep it at "find only pawns", but change the function to find all indexes with pawns except the ones that contain the faction of the current pawn or are empty. Your second problem with the AI attacking empty tiles tells me that you probably aren't removing the pawn from both the Pawn Array and the Pawn Actor Array at the appropriate index where it is killed. If these suggestions don't help you in fixing the problems I can take a look at your project for you, if you're interested.

              In other news, I've changed the units to use the new 4.8 mannequin. While doing this I have been made aware that there is a bug with 4.8 that I was unaware of. It seems like 4.8 has a problem with child components of the animation blueprint. If you have units with child components of the unit animation blueprint in your maps and modify Unit_Parent by adding a variable it causes a crash every time. I'm looking into this and trying to fix this, but I think I might need Epic's help on this one. I'll upload a new version when everything is working as it should again.

              Here are the new shiny pawns that will be included when I do:

              Click image for larger version

Name:	Shiny_pawns.PNG
Views:	1
Size:	883.3 KB
ID:	1081271
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


              • Well I didn't change anything with the way Pawns are handled when dying outside of simply adding a switch on faction node so that the player doesn't get destroyed, but everything else still uses the same nodes past that. And everything is already set to find only pawns, so I'm not sure what's going on there unless I accidentally connected/disconnected something without realizing it....

                Here's some screenshots of some of the blueprint changes I made (not all of them, though, since I can't recall half the changes I did while troubleshooting to get it working...).


                (Appologies for the hacked-up nature of this one, was hard to fit it all on my screen for one shot so I edited it together in Photoshop...)





                Regardless, I fixed the problem for the most part I think by adding in an "escape" bool of sorts to make sure that when Receive damage is called that it actually fires on a pawn, and if it doesn't for some reason it just ends the pawn's turn anyways... Partly had to add this because I was experiencing an issue with my AoE/Cone attacks not actually hitting the target because of height differences (I get all the targets based off a static mesh volume to get all its overlapping actors and apply damage to them if their faction doesn't match the current pawn), but it helped with the AI hanging a bit too for those "attacking air" situations...


                The top one resets the bool when the Attack Victim function is executed, and then in the second portion at the end of the attack it'll wait 2 seconds before checking to make sure that the damage was actually received by something, and if not it ends the unit's turn. The bottom portion is simply switching the bool after Receiving damage so that it registers as the victim having actually been hit so when the delay finishes it'll see if it changed or not.



                I do however get an intermittent issue (unrelated to this I think) that only comes up once in a while where a Player unit will begin its turn and automatically try to attack the nearest Player unit then switch back to letting the Player Controller having control of it for the second half of its turn. It's really random though... Probably something I broke myself, possibly when I was extending the Player turn order to include "action points" for moving and attacking(I'm leaning towards that because I never noticed it before that), but I'm just not sure because of how random it is...

                Comment


                • Hi Monokkel,
                  I just purchased and downloaded your release a few days ago, it's great and thanks for that

                  After having fun and learning for some days, I made a little mods. It seems having not considered the Z-extent of the default tile's StaticMesh, that means pawns always stand on the GridManager's height. So I added **TileBoundsHalfZ**, and use it before **AddInstance**'s transform.

                  It's a tiny but also annoying when I update a new version, I have to remember this and do it again
                  I appologize if I missed sth.

                  Anyway, t's a great job saving me months to do the same thing, thanks!

                  Comment


                  • @Skenku: Ok, trying to keep all your modifications in my head to figure out what might have gone wrong is quite tricky, but I'll try. I don't see any reason why your top code should allow for displaying all tiles in range instead of just pawns that can be targeted. In the base toolkit, the Find Tiles In Range function for the player is set up so that "find only pawns" is set to false if current move is 0. Have you modified that stuff in the Activate Unit part of ATBTT_PlayerController?

                    I can't see a reason why Recieve Damage should not be called from the screenshots you've posted. I guess the attacker might be attacking an array index that does not hold a pawn? You could try to print the index of the tile the attacker is attacking and the index of the tile the target is standing on and see if they always match up. I usually fill my blueprint graphs with Print Strings when I run into these sorts of problems.

                    @xiuxiu: Thanks, glad you like it I assume you're using your own custom static meshes for tiles? The easiest way to fix your problem is to make sure the pivot point of your static mesh (set up in whatever modeling sotware you are using) is at the top and center of your mesh. I did this with my own meshes as I thought it made sense that the "floor" of the grid was at the same Z location as the Z location of the grid, and so I would not have to correct for the height of the meshes in blueprint. I assume the pivot points of your meshes are in the center of your tiles, since you have to add half their tile bounds.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                    • Errors/warnings reported while playing in editor

                      Dear Knut,

                      First of all I HAVE to say that I think you have been working on an amazing and awesome Toolkit!!! It's really a privilege, in the first place to be able to buy it, and secondly to be able to work with it, let me tell you that!!! I can't wait to further develop what all I have in mind, with all your fantastic Blueprint work under the hood of my game project!!!

                      Today, for the first time, I ran into an issue actually; after playing Map_Height_Example through PIE and closing it, the editor immidiately reported some errors. I found a post, earlier in this thread, which kind of describes simmilar kind of errors, under kind of the same circumstances.

                      The errors reported at my end:

                      Click image for larger version

Name:	01_Errors_reported_while_playing_in_editor.jpg
Views:	1
Size:	484.3 KB
ID:	1081293

                      The earlier post I mentioned:

                      Originally posted by Maeglin17 View Post
                      Whenever I close PIE, it get this error message (attachment). The floor is a BSP. Any idea what this means/how to fix it? Thanks all.
                      Originally posted by Monokkel View Post
                      Ah, I had forgot about that error message. That's something that happens if you use automatic heightmap generation from tracing. Traces hit the center of all tile locations across the entire grid and add their heights to the Vector Field Array. At the same time, rotations of any actors that are hit are added to the Rotation Array. If the traces hit something other than an actor (such as terrain), Hit Actor will return false and this error message will appear. You can safely ignore the error as it does not affect the game, but I will change the toolkit so that the error no longer appears in the future. If you want to remove the error yourself, here is what to add to the Add Viewport Terrain to Arrays function in BP_GridManager (it's in the top left part of the function's event graph):

                      [ATTACH=CONFIG]43779[/ATTACH]
                      Your solution to the issue described in that earlier post turned out to be the solution to my issue as well; I assume this fix is not yet implemented in the latest 1.41 Toolkit version? I've downloaded 1.41 for Unreal Engine 4.8 last saturday only; in 1.41 the untouched 'Add Viewport Terrain To Arrays' (still) looks like this:

                      Click image for larger version

Name:	02_Add_Viewport_Terrain_To_Arrays.jpg
Views:	1
Size:	411.3 KB
ID:	1081294
                      Last edited by RAKSHASRAJA; 07-07-2015, 11:02 AM.

                      Comment


                      • Hi RAKSHASRAJA. First of all, thanks for the glowing review I hope the toolkit will live up to your expectations.

                        You are indeed right in that I forgot to correct that error in the latest update, but I'm sending a new update to Epic this night or tomorrow that will fix this error among other things. The error isn't actually doing any harm, and keeping it in is actually slightly more efficient than correcting for it, but I'll fix it in any case, lest it confuses even more users.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                        • Originally posted by Monokkel View Post
                          Thanks for the input, Shenku. So to TrueSkittles and AxelRantila, as you can see games with more factions is certainly possible, but it requires some tweaking. The main things that have to be changed are any functions or blueprint graphs that use the faction variable from units. This includes functions like Pathfinding and Find Tiles In Range, where units that are within ranged are marked and stored. It's also important for input. When the player clicks a tile the following actions is determined by checking what faction is stored in the Pawn Array index corresponding to the clicked tile. There might also have to be adjustments to the AI. If an AI pawn finds pawns from multiple factions within range, how does it decide which one to attack? None of the changes that have to be made are particularly large, but there are quite a lot of them. I'll happily provide support to anyone attempting to add more factions, but I recommend that they are comfortable with the basic functionality of the toolkit first.
                          Ok, I was just wondering. I bought it anyway and will use it in my projects.

                          Comment


                          • I'm not even sure what happened, but now it's not displaying the tiles incorrectly at the start of a unit's turn anymore... Must have been some kind of odd compiling error or something, because I didn't really change anything and it's fine now... I'll try adding in some print strings as you suggested to see if I can figure out what was going on with the attacking air and random attack issues, but I think I can probably figure it out from here.

                            Thanks again for the assistance, I'll let you know if I have any other issues that I can't figure out.

                            Comment


                            • Originally posted by AxelRantila View Post
                              Ok, I was just wondering. I bought it anyway and will use it in my projects.
                              Ok, great I hope you'll find it useful. Make sure to check out the tutorials linked to in the first post of this thread, and let me know if you have any questions.

                              Originally posted by Shenku View Post
                              I'm not even sure what happened, but now it's not displaying the tiles incorrectly at the start of a unit's turn anymore... Must have been some kind of odd compiling error or something, because I didn't really change anything and it's fine now... I'll try adding in some print strings as you suggested to see if I can figure out what was going on with the attacking air and random attack issues, but I think I can probably figure it out from here.

                              Thanks again for the assistance, I'll let you know if I have any other issues that I can't figure out.
                              Good that the problem disappeared. Hope it doesn't show up again, though it's often unnerving to have a bug disappear for no reason. Like I said, I see no reason why it should happen from the code you posted. I hope print strings and adding breaks to the blueprint graphs/checking variable values at various points will help you zero down on what's causing the problem.

                              And don't mention it! Feel free to ask again if something isn't working as it should.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                              • Originally posted by Monokkel View Post

                                @xiuxiu: Thanks, glad you like it I assume you're using your own custom static meshes for tiles? The easiest way to fix your problem is to make sure the pivot point of your static mesh (set up in whatever modeling sotware you are using) is at the top and center of your mesh. I did this with my own meshes as I thought it made sense that the "floor" of the grid was at the same Z location as the Z location of the grid, and so I would not have to correct for the height of the meshes in blueprint. I assume the pivot points of your meshes are in the center of your tiles, since you have to add half their tile bounds.
                                Thanks for reply so fast.
                                I agree that the pivot should be at top as floor. Please ignore my request, I've just found it's hard to use it in my own project without any modification.

                                Any idea about fog of war? I can only show/hide them, it's sad. Ok, it's a little far from this post, don't mind.
                                I am strongly looking forward to this toolkit's new version.

                                Good job!

                                Comment

                                Working...
                                X