Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Ok, I've taken a closer look. Seems there is a good reason why I was confused as to where in the Grid Manager there are references to ATBTT_GameMode. I have already removed all such references in the update I am working on, so this should no longer be a problem come next update. In the version currently on the marketplace ATBTT_GameMode is only referenced twice in BP_GridManager. The first is in the Reachable Index Closest to Target function and the other is in the beginning of the construction script to simply set up a reference to the game mode.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      @Monokkel - I think I found the problem I was having since you already have a Ref to certain things in the parent the child can not make a ref to the same object. However now I am having an issue with creating walls. I have an area tile that is 4x4 This is my standard tile that will become visible (D&D Board Game Style) Because of the limitations of the how the Grid Manager Calculates the walkable area I build a preset of basic tiles that I put down over the entire grid. So I have a simple activation call on my tile that makes it visible or not. I also put a large Block over the tile to block movement into hidden tiles. I destroy the block when I make a tile visible. However even with the Height Impassible cut off set to 10 and the block being 100 units tall I still get an effect where while the decals do not show up the Pawn will run up on top of the blocks outside the area and if I click the bottom row I moved one row past the bottom. I am guessing this is because the camera angle make the click happen on the higher invisible surface. Any thoughts on How I can limit the walk able area to only the tiles I have made visible?

      Comment


        Nevermind I got it working I had AutoHeight turned off. Which is odd because I was sure I had it turned on. However I did notice that the attack area can go off the area that is walkable. Not a huge deal since that will not be visible to the player but if they click just off the edge it will register as an attack. That will be something I can work on when I get to building the attack system.

        Comment


          @Monokkel - I know I had an issue with this before but I thought it was pretty simple to fix. However in the current version I can not get the player to do overlaps with a trigger box. This is a pretty basic feature and a nice event to be able to tell when a character is at a certain location quickly. I just want to generate an on overlap event so I can call some functions. However when ever I enable any type of overlap on the pawn it stops working. I want it to be treated as a pawn and overlap world static and world Dynamic.

          Comment


            Does anyone have any idea which blueprint to cast to when trying to display information on the HUD in the toolkit? I see two different locations that appear to hold HUD information, the HUD_Faction_Turn and the ATBTT_GameMode in the Toolkit. I'm looking to send information to the HUD to relay how much experience a character has gained in battle to the player, and how much is yet left until the next level.

            A second, and not entirely unrelated question is when implementing my RPG-like level up system, is the best way to accomplish this through messing around with the pawn blueprints, I.E. the Player Unit Ranged and Melee classes, or is there another method recommended? Basically, I don't want the XP of one unit of that class affecting the xp of another unit in that class and I would like to ensure that fiddling with those two blueprints doesn't screw that up. Thanks!

            Comment


              OK found it after playing with the collision settings for far too long. I had to set Collision Enabled to Physics Only. It seems Query Collision break the movement.

              Comment


                @Anzak: Hi, sorry for taking so long to respond. I’m taking a course in Boston and so I’ve been pretty busy. It seems like you have solved a lot of your problems yourself, though I apologize for not being here to make the process less frustrating.

                I’m a little confused on your method for revealing tiles, though. The way the toolkit works is that it generates walkability and heightmaps at startup, and after that it can only be modified directly through the edge array. If an area of the map is not walkable at the beginning of the game because you have added a tall collision volume blocking PathTrace at this location it should not become walkable later if you remove this collision volume, as the edge array is still the same.

                I’m not sure I understand how your solution is currently working. I would recommend printing values from the edge array at various indexes you know to have tiles that are revealed, tiles that are not yet revealed and indexes of walls to see what is going on under the hood. As for tiles in range showing up in unwalkable areas of the map I would look at my solution in the 25th post of the 13th page of this thread.

                There will be a new function in the next update called Spawn Tile, which will allow you to easily spawn tiles and add their edge costs to the edge array appropriately at runtime. This is another method you might consider for adding dungeon rooms at runtime.

                @MicahM: All information about the HUD is stored in HUD_Faction_Turn. Look at the event graph here to see how it works. ATBTT_GameMode simply calls a custom event in this event graph to modify the current displayed text. You could certainly do something similar with XP, adding inputs to a new custom events for XP-gained and XP to next level (which you would probably want to get from your current unit) and changing the value of a displayed string to these values.

                You should be able to store XP in the unit blueprints just like I currently store health. Health is modified at runtime in the individual unit without affecting other units of the same class, and XP would be much the same. If XP is something you want all units to have you can add it to Unit_Parent. If it is not then it’s better to modify one of the other unit blueprints and either duplicate this unit to make others or having this be the parent blueprint for any further units with XP you add.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  @Monokkel: Hopefully your course is going well. Yes I have been fumbling through things slowly. It is very much a learning process. The whole edge array thing seems odd to me. However I am running into exactly what you are saying. I can spawn the tiles correctly now however they are not walkable when they are spawned. Does this work in the reverse direction? If trigger a wall to spawn do I have to redo the edge array as well?

                  Comment


                    @Anzak: Even though the default for an empty tiles edge cost is set to 1 in all directions, it is not automatically included in the EdgeArray when added to the grid during runtime. You will more than likely need to add the new 'spawned' tile index and it's edge costs to the EdgeArray. Anytime you make an update to a tile (add or remove a wall, etc) you will have to update the EdgeArray as it directly effects the Grid Managers 'Can Move to Array', which is created with the Pathfinding function.

                    Edit: As a quick pass for creating a little function that did it for you, it could look something like this;
                    Click image for larger version

Name:	set_edge_costs_for_new_tile.JPG
Views:	1
Size:	126.3 KB
ID:	1088368

                    This will accept your new or current tile that you are attempting to add to the EdgeArray and then include it's Edge Cost and Index of that tile if it is a valid Tile_Parent (or child).
                    Last edited by EricCorso; 09-29-2015, 01:29 AM. Reason: Added example function image

                    Comment


                      @isthisbad: I am not sure this will solve my problem. I am not using child tiles. My "Tiles" are 4x4 squares that when I generate I place a blank tile down with a block to stop movement. I then remove the block and make the center one visible. This gives me a 4x4 area that is usable. I have a trigger box on each edge that removes the block box and makes the "tile" on that edge visible. So my "tiles" do not have an edge area because I was using the ray trace to figure out what is walkable or not. I guess I was expecting the grid to be dynamic as things change in the game.

                      Comment


                        @isthisbad: Ok follow up question since I am still waking up my brain is not fully in gear yet. What you are saying is my 4x4 let's call it a platform needs to be a child of the tile. So the question is if I keep my platform 4x4 will it still count it as 4x4 or will it just be a large tile?

                        Comment


                          @Anzak: I thought you where creating and removing tiles during run time for the grid as the player moves through it. Guess I am a bit confused now as well lol. When you say you are making a 4x4 'Platform' is it placed in game as an addition to the current grid and have 4 tiles in a block, or are you attempting to make a 'fog of war' type of thing that has a collision box so that the tiles are invisible (and unwalkable) until the unit crosses a certain point? Kind of hard to figure out what you are doing without an example at this point

                          In either case, you will need to update the EdgeArray so that when you Activate movement on the Unit/Pawn it can know which Tile Index's are available to walk on. But some screenies or a quick drawing of what you intention is would help a lot

                          Comment


                            Ok, I think I'm a bit clearer on what you are trying to do now. In your case I think I would actually refrain from running the Add Viewport Terrain to Arrays function at startup (which is normally run on event begin play in BP_Grid_Manager). This function adds tile edges to the edge array and uses traces to automatically generate edge costs if this is checked. Instead I would run the part of this function that generates edge costs using traces whenever you spawnnew rooms, making sure to only check tthe relevant indexes where you spawn terrain. I'd send you blueprint examples, but I don't have my computer until I'm back from Harvard next week. I'll assist from here whenever I find the time if you're having problems with implementation. I would recommend you watch my fifth tutorial video if you have not done so already. Especially thepart where I go through the Add View Terrain to Arrays function.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Thank you guys. When I get out of meetings I will fully process what is said here and see if I can apply it. I will keep you posted.

                              @isthisbad: I am working on building something like the D&D Board Game sets where you have a 4x4 area and as you explore an open edge it opens the next 4x4 area. So yes fog of war. I started with a simple function that would have a single area and them spawn them when you hit a trigger box. This did not work because of the walk plane not being generated. So I created all the areas and then block off all of them other than the center so the walk plane is generated and you see the results.

                              Comment


                                @Monokkel: One more thing for you. I was having some issues around the lack of a 2D array. What I did is I created a Macro that lets me use a 1D array as a 2D array. The Blueprint is a bit messy but I am more than happy to share what I did if it is something you are interested in.

                                Comment

                                Working...
                                X