Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Monokkel View Post
    Maybe you didn't add the project properly and the Config files were not included?
    Exactly that was the case. Would've probably taken forever to find this error XD

    If you don't mind I'd have another tiny question which could save me a lot of time. As I see it initiative order is created in the grid manager blueprint and values like health are defined in the pawn blueprints (with help from the unit_parent). I'm struggeling with getting access to the current pawn, the next pawn and so on (and their values like Health) from other blueprints. In the current case I want to show a health bar (on the UI) for each pawn on the map in the order of the initiative (just below each other).

    I think I need the initiative order array from the grid manager to read the pawns position on the array an with that determine screen position of the health bar. But I'm already struggeling with getting the health value of the current pawn and displaying it (via progress bar) in a corner of the screen.
    I tried casting to the grid manager and getting the initiative order array but failed to get the pawn currently at position 1 (to get its health value).

    Comment


      Good thing getting the config files imported solved it. Seemed likely to be the case.

      The initiative array is an array containing all the units on the map. It is always sorted so that the item at index 0 is the current pawn, index 1 is the next pawn and the pawn at index array.length -1 will be the previous current pawn. If you for instance want to find the health of the next pawn in initiative you would get a reference to Grid_Manager (or ATBTT_GameMode in the coming update), get the initiative array, get index 1, cast the output node from the getter to Unit_Parent and from the output of the cast get the value of Current Health.

      This should work, but if it doesn’t, could you send me a screenshot of how you do the casting?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        For some reason my problem is to get the grid_manager ref and hook it up with the initiative array.
        First of all I can create a gridmanager ref from 'Tile_parent', 'Unit_parent', 'pawn_anim_blueprint_parent' and 'default'. I think either the unit_parent one or the default one has to be the right one. The one from unit_parent needs an input and both aren't connectable with the get initiative array (which needs an input).
        Click image for larger version

Name:	getcharhealth.png
Views:	1
Size:	111.0 KB
ID:	1072438

        Edit: All of this is on an 'Add Fill Percent' function of a progression bar within a widget.
        Last edited by Hinato; 04-13-2015, 11:46 AM.

        Comment


          You're missing one piece of the puzzle it seems. From Grid Manager Ref (which should not have a blank default value) drag the node "Get all actors of class". From that node you should have an output array of actors. From that array get element 0. Cast that element to Grid_Manager and get the initiative order variable from there.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Okay I think I understand my mistake. Everything seems to be connected as you described and thus far makes sense to me.
            Unfortunately there has to be an error still. In the following image you see my current test setup where the progression bar doesn't show anything.
            When I drag a string from Cast Failed of the cast to the grid manager this string is printed. So the error should be somewhere there...
            Unfortunately right now I don't see it
            Click image for larger version

Name:	charhealthperc.png
Views:	1
Size:	145.4 KB
ID:	1072442
            Last edited by Hinato; 04-13-2015, 01:38 PM.

            Comment


              Seems one of the castings was unnecessary, but that's not it. Works fine on my computer with or without casting to BP_Grid_Manager. Not seeing anything obviously wrong with your verion either. Try relplicating what I've made and see if you can get it working (blueprintue link here). Remember to set auto recieve input to Player 0 so that input keys are registered, and again make sure Grid Manager Ref is set to BP_Grid_Manager as its default value in its variable properties.

              Click image for larger version

Name:	r9pWcGg.png
Views:	1
Size:	127.9 KB
ID:	1072456
              Last edited by Monokkel; 04-13-2015, 05:51 PM.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Hi Monokkel,

                Thank you so much for sharing the new feature list.
                It was critical for me and my team to know to know in advance what will be changed in order to bring our modifications to the new version.
                Fantasy Turn-Based Tactical Game
                STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                IG: https://www.instagram.com/arcanelegacyofficial/
                FB: https://www.facebook.com/ArcaneLegacy/
                WEB: http://www.arcanelegacy.com

                Comment


                  Originally posted by Wisdom-HELLy View Post
                  Hi Monokkel,

                  Thank you so much for sharing the new feature list.
                  It was critical for me and my team to know to know in advance what will be changed in order to bring our modifications to the new version.
                  Happy to be of service. I was going to make a list anyway, so this you just got me to make it a bit earlier. I sent the update to Epic yesterday along with e-mails to multiple different support e-mails. They haven't answered me yet, but I'm hoping the update will be up soon. I will try to make new tutorial video this week on how to use the new features.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Hi Monokkel, I have one suggestion that might help make the transition to new updates easier from the viewpoint of customers. For people like myself who have already started using the toolkit in it's original form, it's not viable to move all the changed code to the new version after an update. And going through the code and comparing them to find the changes is a hectic task as well. So if you could provide some screenshots or additional info as part of the next update regarding the changes that you have made, it would be really useful. Since you're planning to add more functionalities in the future, that would make a lot of sense until there is a system implemented to handle the update seamlessly. You could add it in a separate folder as part of the project with the version number of the update. I understand that this is difficult for some of the changes, but for small things like the one where you fixed the grid size (-1) bug, it would really help as it's hard to notice.
                    Last edited by Stormrage256; 04-16-2015, 04:45 AM.
                    Wave Spawning System | Tower Defense Starter Kit | Line of Sight Visualization

                    Comment


                      Originally posted by Stormrage256 View Post
                      Hi Monokkel, I have one suggestion that might help make the transition to new updates easier from the viewpoint of customers. For people like myself who have already started using the toolkit in it's original form, it's not viable to move all the changed code to the new version after an update. And going through the code and comparing them to find the changes is a hectic task as well. So if you could provide some screenshots or additional info as part of the next update regarding the changes that you have made, it would be really useful. Since you're planning to add more functionalities in the future, that would make a lot of sense until there is a system implemented to handle the update seamlessly. You could add it in a separate folder as part of the project with the version number of the update. I understand that this is difficult for some of the changes, but for small things like the one where you fixed the grid size (-1) bug, it would really help as it's hard to notice.
                      Thanks for the suggestion. I am planning to make a new video showcasing the new features as well as a video describing how the blueprints are organized. I’ve been wanting to make a video about the blueprints’ organization for a while, but I’ve delayed it because of all the changes I knew I was going to make.

                      Now that I’ve landed on how I’m going to organize the blueprint, most future updates can be additive instead of transformative, which means I can easily mark the new additions clearly with comment frames in the blueprints. Since the funtionality is spread across multiple blueprints I am unlikely to change all separate blueprints when I make an update, and users can safely keep their old, modified blueprints that have not been changed in the update.

                      The list of features I consider to be general enough that I want to include them in the default blueprints is also growing quite thin. When I have added touch controls, slow loops, multilevel grids and large unit support I am less likely to make large changes to the basic system.

                      Instead I will be creating example levels with special rules, like cover systems, fog of war, flanking, leveling up etc. These will be entirely separate from the default blueprints and use their own versions of the blueprints, with the modifications clearly marked and commented. Then users can easily copy whatever specific functionality they need into their own blueprints.
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Ok, so the new big update is finally up! Epic seems to be having some trouble uploading it correctly, however, so the project and config files are missing. Not to worry, I have contacted Epic and they are working on it, but in the meantime you can get them here. Here's how to create a new project:

                        - Download the toolkit and click Add to Project
                        - Do not add it to a project. Instead create a brand new project. It will not show up in your library, but will appear in Documents/Unreal Projects/[project name]
                        - Download the config and project files and drop these in the new project folder.
                        - You're good to go!
                        - If you want to add the files to a previous project, just copy all the content and config files from the new project to that project.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Love the update, imho this makes it much much easier to extend and customize with a much lower learning curve. Great work!

                          Comment


                            For the new update, I said I was going to do a new video that shows how to use the new features as well as how the blueprint is now organized. However, I have a pretty bad cold at the moment, and I don’t think all of you will want to listen to a snotty, coughing explanation, so I will wait until I’m better until making a video. Instead I will give a quick overview of the new organization and how to access the new stuff below:

                            Most of the important stuff can be found in Blueprints -> Gameplay, except for Unit_Parent and Tile_Parent which can be found in Blueprints -> Pawns and Blueprints -> Tiles respectively, like before. I’ll describe them in the order I think it makes the most sense to view them.

                            ATBTT_GameMode: Sets up the game at the beginning through its event graph. Spawns the Grid Camera (no longer has to be dragged into the viewport) and the AI controller and sorts pawns in initiative order (a new function for sorting using initiative attributes can be accessed in ATBTT_GameMode, though it requires some setup). It then chooses the first “current pawn” and activates either ATBTT_PlayerController or ATBTT_AIController depending on the faction of the pawn. ATBTT_GameMode also communicates with the HUD and changes the displayed “Player Turn” text. On subsequent turns ATBTT_GameMode is called to find the next pawn in initiative and shuffle the initiative order. It holds the CurrentPawn, which is accessed from many of the other blueprints, as well as the counter for keeping track of the current turn (a feature which has no out of the box uses so far).

                            BP_Grid_Manager: Has gotten a lot slimmer. No longer calls anything by itself, except at the very start of the game when it creates all the grid arrays and stores tiles and pawns in the appropriate ones. Now includes options for automatically generating a grid and walkability on any meshes placed in the level, without having to place a single tile actor. Do do this, first drag the Grid_Manager into the viewport, change GridSizeX and the size of the default tile so that it covers the terrain/meshes you want to generate a grid on. Then change Max Grid Height and Min Grid Height to the maximum and minimum heights in unreal units relative to the location of the grid manager you want to generate a grid on. Then check auto height, and when you click play all meshes and terrain that does not have its collision set to ignore PathTrace should have a grid generated on top. If you also check Auto Height Based Edge Costs there will be generated automatic walkability depending on the height differences between the centers of adjacent tiles. You can adjust Height Impassable Cutoff and Height Slow increment to decide at what height difference movement cost should be increased or walkability be turned off between tiles. If you use terrain that is not flat I recommend setting the public boolean “Use Decals” to true, which will use decals instead of meshes for displaying tiles in range and markers. These conform to any underlying terrain. Note that decals do not work on mobile.

                            BP_Grid_Manager_Child_Hex: Is just a child actor of BP_Grid_Manager with default meshes and decals set to their hex versions to make setting up hex maps quicker.

                            ATBTT_Player_Controller: Controls all mouse input by the player. This includes deciding what happens when the player clicks or hovers the mouse over a tile. Interacts heavily with Grid_Manager in deciding what happens, as Grid_Manager holds all information of what is stored in any clicked tile. ATBTT_Player_Controller messeges Unit_Parent if it decides the input warrants that a unit should move and attack, from which Unit_Parent takes over. ATBTT_Player_Controller also initiates a player unit has been selected in ATBTT_GameMode by finding tiles in move and sight range. These have now been changed slightly so that both are generated simultaneously in most cases.

                            ATBTT_AI_Controller: Is activated by the GameMode as soon as an AI pawn has been selected as the current unit. The AI controller is not created one for each unit, but is a single blueprint that decides the bahaviour of only the current pawn. Holds the AI decision tree which determines what the AI does any given round. Tells Unit_Parent to go through with the chosen actions once they have been decided.

                            Unit_Parent: Receives commands from either ATBTT_PlayerController or ATBTT_AIController. These have already decided what path the unit shall move and whether or not it shall attack at the end of movement, and Unit_Parent simply executes this, moving the pawn physically along the movement spline and firing the Receive Damage event in the target pawn. The Receive Damage event changes the displayed health of the health bar and decides whether or not the pawn should be destroyed. Unit_Parent does not have a skeletal mesh and does not handle animation. This is handled in the event graphs of the individual units (Unit_player_melee etc.) in conjunction with the Animation Blueprints. This way it should be much easier to use custom skeletons. Unit_Parents has a few more public variables than before, and diagonal movement, crossing corners and the speed the pawn moves along the spline can be set individually for each pawn. A new option called Can Split Up Move lets the pawn move again if it didn’t use up all its movement in the first move. This can be modified quite easily to a Fallout-style action point system.

                            BP_Grid_Camera, HUD_Faction_Turn and Pawn_Anim_BP_Parent: mostly function like before. BP_Grid_Camera does no longer have to be placed in the game and is now possessed by ATBTT_PlayerController. Pawn_Anim_BP_Parent has had some minor changes because of the changes made to Unit_Parent.

                            Ok, that’s the basic overview. As I said, I will make a video in a few days. In the meantime, like always, feel free to ask my any and all questions about the toolkit and I’ll usually respond the same day.

                            Edit:
                            Originally posted by VFe View Post
                            Love the update, imho this makes it much much easier to extend and customize with a much lower learning curve. Great work!
                            Thanks! That's a relief to hear after working on the changes for so long. I'm certain there are still a few more changes I can do. For instance BP_Grid_Camera is possessed, but input is still handled through the camera itself. There are probably a lot of stuff I've overlooked or haven't thought of, so I ask anyone reading this to tell me if they've got any thoughts for further improvements.
                            Last edited by Monokkel; 04-19-2015, 09:01 AM.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Haven't explored what's causing this yet, but there's a bug causing my pawn to revert to the 0 index after attacks(haven't modified anything out of the box yet).

                              Comment


                                Originally posted by VFe View Post
                                Haven't explored what's causing this yet, but there's a bug causing my pawn to revert to the 0 index after attacks(haven't modified anything out of the box yet).
                                And here come the bugs :P With such a big update I was of course exprecting bugs, but I was hoping they were more subtle. I'll look into it right away. Could you send me just the map file by e-mail (knuteiliv@gmail.com)? That would make troubleshooting quicker.
                                Last edited by Monokkel; 04-16-2015, 03:58 PM.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X