Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    hi

    i think there is a bug (or maybe i am doing something wrong), but whenever i make a grid bigger then x=70,y=70 then Problems begin (its happened only when enabled multilevel or trace for walls):

    1. character snap to diamond shape visibility and its not in standard movement anymore (snap out diagonal movement)

    2. if you place mesh above ground it will not detect as a tile (high map) as it intended in multilevel.

    3. if you dont check PregenerateGameplayGrids then it will crash when play - (something with the revers loop). if you check bPregenerateGameplayGrids then its ok.

    and there are other staff but the main thing is that i dont know if something is wrong or am i not doing something right? if anyone knows about it and can help that will be great.

    thanks in advance

    leo
    Last edited by leo bar; 04-21-2018, 11:37 PM.

    Comment


      Originally posted by GuyGtmn View Post

      Hey Knut,

      Yes. Your example of the floating islands is more or less what I am trying to achieve.

      For my prototype, the player can spend some resources , once per turn, that will allow him to have control on some of the grids. The player can then choose a ui button for this “special power” and There should be some previsualization of the platform he chose and how it can move. Then, if and when he confirms, the platform moves with all the elements on it.

      I hope this makes sense.

      Thank you very much for your support.

      Guy
      Ok, I see. That is pretty tricky to do, but not impossible. Essentially you would want the grid manager to cover the entire area that the smaller grids would inhabit. These smaller grids would not be actual grid managers, but just groups of static meshes. When moving these "islands" what you would have to do is remove the tile indexes it previously occupied from the GridLocations map and add the new locations instead. You would then have to update the GridEdges array appropriately as well. You could run the entire CreateGridLocations and GenerateGameplayGrids again (after clearing the appropriate arrays) whenever you move an island and that would do the trick, but that is highly likely to cause frame drops. Instead you would have to do something similar but for limited areas. Take a look at those functions and try to understand how they work. After that try to implement something similar on a smaller scale. null If you run into difficulties come ask me. Note that this is a pretty advanced modification of the toolkit and will be challenging.
      Originally posted by GamingByNumbers View Post
      Is there an explicit list somewhere of what the steps are to migrate this plug-in to an existing project? I see these steps:

      ! ) Migrate the AdvancedTurnBasedTileToolkit folder to the content folder of the other project
      2) Copy over the .ini files.

      Is there anything else? What part of the .ini files are important? Looking at them it's not intuitively obvious to me what I may need. I can't just copy them directly over and wipe out my changes to the files.
      Yep, you have the right idea. The important stuff to copy is all the AxisConfigs and ActionMappings from DefaultInput (or you will need to add new input events yourself) and the collision profiles from DefaultEngine.

      Originally posted by leo bar View Post
      hi

      i think there is a bug (or maybe i am doing something wrong), but whenever i make a grid bigger then x=70,y=70 then Problems begin (its happened only when enabled multilevel or trace for walls):

      1. character snap to diamond shape visibility and its not in standard movement anymore (snap out diagonal movement)

      2. if you place mesh above ground it will not detect as a tile (high map) as it intended in multilevel.

      3. if you dont check PregenerateGameplayGrids then it will crash when play - (something with the revers loop). if you check bPregenerateGameplayGrids then its ok.

      and there are other staff but the main thing is that i dont know if something is wrong or am i not doing something right? if anyone knows about it and can help that will be great.

      thanks in advance

      leo
      If you have a very large map and use the procedural options the toolkit will do a ton of calculations at startup, which can potentially hit the built-in loop iteration limit. If you get infinite loops at the first tick of gameplay go to project settings -> Engine -> General Settings and increase Maximum Loop Iteration Count until you no longer experience the issue. Try this and see if you still have any problems.
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        hi knut

        the increase maximum iteration count is maybe good for what i wrote in no-3, but its has no affect on the first two Paragraphs i wrote- when you go above 70(x,y) the system start to do some wired staff- check it

        Comment


          I got the following question in the comments on the asset page. I'm answering it here as it will not be possible to explain within an asset page comment and because I believe it might be of general interest. The question asked was this:

          Does the Grid Manager need to already be existing in the level? I want to spawn them at difference sizes based off menu settings when generating new instances.
          The toolkit is not setup to allow for this by default (I'm working on this, though), but it can be modified to allow for this with a quite few steps. First replace the BeginPlay event in BP_ATBTT with a custom event so that everything is activated when this event is called instead of the start of the game:



          Next, in the player controller make sure a reference to the grid manager is setup in the ClientSetup event instead of BeginPlay, since the grid manager will not exist at BeginPlay:



          That is basically all you need to do. Now, after spawning the grid manager call ActivateATBTT at any time to start the blueprint setup cascade. After this is done you will probably want to spawn units which you can do using the built-in UE4 SpawnActor node. After you have spawned at least one unit you can call the StartMatch event in BP_TurnManager to commence turn based combat.

          Note that while this seems to work fine it has not been fully tested yet so it might potentially cause issues I'm not aware of. If you run into any, let me know.
          Last edited by Monokkel; 04-22-2018, 12:52 AM.
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            Originally posted by leo bar View Post
            hi knut

            the increase maximum iteration count is maybe good for what i wrote in no-3, but its has no affect on the first two Paragraphs i wrote- when you go above 70(x,y) the system start to do some wired staff- check it
            Sorry, I don't think I completely understand your first two points. Can you give me the exact steps I need to do to reproduce the issues? I won't be able to look at this until tomorrow night, since it is really late now, but tell me exactly what I need to do to check this and I will try to find a way to solve whatever the problem is.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Originally posted by Monokkel View Post

              I have not really made a flowchart for this, but the general setup order is the following: Game mode starts up. Signals game state to setup reference to core blueprints (turn manager, action manager and grid manager) and initializes each of these in that order. Meanwhile the the game mode delays for two ticks while all of this is setting up. When that time has passet it sets the TurnState in the game state to TurnBasedCombat, signaling that the game is ready to start.

              Whenever a new player logs in it first checks to see if the grid manager is done initalizing (last step of the above setup process). If it is it initializes the player controller for that player. If it isn't it delays until it is. The HUD is initialized as part of initializing the player controller as well as the grid camera.

              This means that the grid camera's setup will be the last thing to run for any player logging in, so at the end of the grid camera's setup it signals to the turn manager that a new player has joined and is possessing a grid camera. The turn manager keeps track of such signals from players joining to know if enough players have joined to begin the game and activate the first unit in initiative.

              If you want to see more specifically what happens, add a break point right after event begin play for the game mode and step through the nodes one after one in the blueprint debugger.
              Ok, I think I have found the problem, but still no solution. Everything fires off in the order that you have described, except Initialize on BP_TurnManager. I have also tested using BeginPlay from TurnManager and it never fires either (Note: Everything works fine if I used OpenLevel and override the GameMode in the world settings of my new map). I now also tested with a new dummyactor spawned directly before TurnManager and that actors BeginPlay fires as expected.
              Do you have any idea on what's keeping the TurnManager from being callable? Is there any settings I may have overlooked? I can use the Camera fine, HUD gets initialized fine.... the camera hangs in the middle of the GridManager but I found out why in the Camera BP.
              Anyways, very close to getting it working now I think, if I can understand whats keeping the Turn Manager from "talking" with the other BPs.
              Again, thanks for all your help! Will be so worth it in the end

              Comment


                Originally posted by Mivke1 View Post

                Ok, I think I have found the problem, but still no solution. Everything fires off in the order that you have described, except Initialize on BP_TurnManager. I have also tested using BeginPlay from TurnManager and it never fires either (Note: Everything works fine if I used OpenLevel and override the GameMode in the world settings of my new map). I now also tested with a new dummyactor spawned directly before TurnManager and that actors BeginPlay fires as expected.
                Do you have any idea on what's keeping the TurnManager from being callable? Is there any settings I may have overlooked? I can use the Camera fine, HUD gets initialized fine.... the camera hangs in the middle of the GridManager but I found out why in the Camera BP.
                Anyways, very close to getting it working now I think, if I can understand whats keeping the Turn Manager from "talking" with the other BPs.
                Again, thanks for all your help! Will be so worth it in the end
                Hapy you've managed to narrow it down so much. It is kind of a bizzarre issue, and I'm not sure what could be causing it. The Turn Manager is just a blueprint actor like any other, so it should in principle work just like that. Maybe you can try disabling spawning the turn manager and instead placing it manually in the map beforehand? Then in the SetupCoreBlueprints function in BP_ATBTT_State you can replace the spawn node with a GetAllActorsOfClass node and get index 0? Not a permanent solution I would like to have in the toolkit, but if it works or not we have narrowed down what might be causing it a bit further.
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Originally posted by Monokkel View Post
                  Hapy you've managed to narrow it down so much. It is kind of a bizzarre issue, and I'm not sure what could be causing it. The Turn Manager is just a blueprint actor like any other, so it should in principle work just like that. Maybe you can try disabling spawning the turn manager and instead placing it manually in the map beforehand? Then in the SetupCoreBlueprints function in BP_ATBTT_State you can replace the spawn node with a GetAllActorsOfClass node and get index 0? Not a permanent solution I would like to have in the toolkit, but if it works or not we have narrowed down what might be causing it a bit further.
                  I actually tried excactly that but to no avail. I'm starting to think it might actually be some kind of bug (probably on my end as I've migrated my previous project into your toolkit) because recreating the BP_TurnManager as a new actor seems to work as expected. Anyways, if I get it working like this at least I can post here how I fixed the other stuff (ServerTravel with switching GameModes and calling HandleStartingNewPlayer instead of OnPostLogin (since that does not get called during ServerTravel)) so someone else in my shoes can get it working aswell (or if you find it interesting for the future multiplayer features of the toolkit).

                  Thanks again for all the feedback and help, really really appreciate it

                  Comment


                    Originally posted by Mivke1 View Post

                    I actually tried excactly that but to no avail. I'm starting to think it might actually be some kind of bug (probably on my end as I've migrated my previous project into your toolkit) because recreating the BP_TurnManager as a new actor seems to work as expected. Anyways, if I get it working like this at least I can post here how I fixed the other stuff (ServerTravel with switching GameModes and calling HandleStartingNewPlayer instead of OnPostLogin (since that does not get called during ServerTravel)) so someone else in my shoes can get it working aswell (or if you find it interesting for the future multiplayer features of the toolkit).

                    Thanks again for all the feedback and help, really really appreciate it
                    It seems like this issue goes beyond just your issues. In my current internal build the same issue is appearing when playing the game as a standalone. It is thankfully not an issue in the version currently on the marketplace, but the issue I am seeing seems like the same you are having. Test this to see if you have the same problem:

                    Add a mesh or any visual component to the turn manager so that it is visible. Place a turn manager actor in the game so you can see it. Use regular play in editor and confirm that it is there. Then play as standalone. If we are having the same issue the turn manager should not appear. It seems like it is deleted before the game even starts and is not allowed to be spawned. It is a very strange issue and I'm working hard on finding a cause.
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by Monokkel View Post

                      It seems like this issue goes beyond just your issues. In my current internal build the same issue is appearing when playing the game as a standalone. It is thankfully not an issue in the version currently on the marketplace, but the issue I am seeing seems like the same you are having. Test this to see if you have the same problem:

                      Add a mesh or any visual component to the turn manager so that it is visible. Place a turn manager actor in the game so you can see it. Use regular play in editor and confirm that it is there. Then play as standalone. If we are having the same issue the turn manager should not appear. It seems like it is deleted before the game even starts and is not allowed to be spawned. It is a very strange issue and I'm working hard on finding a cause.
                      Ok, I did as you asked. When using a static mesh on the BP_TurnManager and playing using PIE I can see both the manually added TurnManager aswell as the spawned one (I moved the manually played one and the spawned one spawns at 0,0,0) and everything fires as it should. When using Standalone neither of the TurnManagers are visible and the initialize is never fired (nor is any other event on the TurnManager obviously). So it seems like it's the same issue.
                      HOWEVER, what I found out now when I tried this is that Server Travel now seems to work in PIE mode! This was not the case just some time ago, I'm wondering if it's due to a new update or if my knowledge simply was lacking the last time I tried this. So at least it seems like I might be able to continue work on my project in parallell to you finding the source of the Standalone bug (if it's your bug or Epics that is).
                      If you want any more input from me or want me to try something else, please let me know. We can continue discussing here or on mail as to not spam too niche a solution for the whole thread.

                      Cheers man!

                      Edit: The result for launching the game by right clicking the uproject is the same as the standalone result fyi.
                      Last edited by Mivke1; 04-24-2018, 04:04 PM.

                      Comment


                        Originally posted by Mivke1 View Post

                        Ok, I did as you asked. When using a static mesh on the BP_TurnManager and playing using PIE I can see both the manually added TurnManager aswell as the spawned one (I moved the manually played one and the spawned one spawns at 0,0,0) and everything fires as it should. When using Standalone neither of the TurnManagers are visible and the initialize is never fired (nor is any other event on the TurnManager obviously). So it seems like it's the same issue.
                        HOWEVER, what I found out now when I tried this is that Server Travel now seems to work in PIE mode! This was not the case just some time ago, I'm wondering if it's due to a new update or if my knowledge simply was lacking the last time I tried this. So at least it seems like I might be able to continue work on my project in parallell to you finding the source of the Standalone bug (if it's your bug or Epics that is).
                        If you want any more input from me or want me to try something else, please let me know. We can continue discussing here or on mail as to not spam too niche a solution for the whole thread.

                        Cheers man!

                        Edit: The result for launching the game by right clicking the uproject is the same as the standalone result fyi.
                        I've looked into this some more and it seems to be an issue with the engine and not the toolkit specifically. That means that identifying the issue is more difficult and I will have to find a workaround. Good thing it does not affect the version on the marketplace, but I will try to address it as soon as I'm able. After some testing it seems the FAction struct is somehow to blame. Adding this struct as a variable to a new blueprint actor and setting this struct to anything at begin play (or connected to any other event) causes the actor not to load when playing in standalone. However, creating a new, identical struct and doing the same thing with another actor causes no issue. It seems the action struct has become corrupted in my internal build (and probably in yours as well).

                        Can you test the same thing and see if it happens on your end? Making a new actor with a FAction struct variable and setting that variable at begin play (using "make array" to make empty input arrays). That will help me pin down if we're seeing the same issue.

                        Edit: Changing all references to FAction to a new identical struct fixed the problem. Extremely tedious work, but it got the job done. Confirms that this was caused by something specific to the FACtion struct, but not due to any properties of the struct itself. Some weird engine bug it seems.
                        Last edited by Monokkel; 04-24-2018, 08:55 PM.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Originally posted by Monokkel View Post
                          I've looked into this some more and it seems to be an issue with the engine and not the toolkit specifically. That means that identifying the issue is more difficult and I will have to find a workaround. Good thing it does not affect the version on the marketplace, but I will try to address it as soon as I'm able. After some testing it seems the FAction struct is somehow to blame. Adding this struct as a variable to a new blueprint actor and setting this struct to anything at begin play (or connected to any other event) causes the actor not to load when playing in standalone. However, creating a new, identical struct and doing the same thing with another actor causes no issue. It seems the action struct has become corrupted in my internal build (and probably in yours as well).

                          Can you test the same thing and see if it happens on your end? Making a new actor with a FAction struct variable and setting that variable at begin play (using "make array" to make empty input arrays). That will help me pin down if we're seeing the same issue.

                          Edit: Changing all references to FAction to a new identical struct fixed the problem. Extremely tedious work, but it got the job done. Confirms that this was caused by something specific to the FACtion struct, but not due to any properties of the struct itself. Some weird engine bug it seems.
                          I did as you said and I got it working! Thank god it was an engine bug, I thought I was going mad

                          Ok, so now on to MUCH more fun questions :P I'm looking to make a kind of "deployment phase" before the first turn starts. In this "Deployment Phase" I would like to have a few predetermined tiles that are ok to deploy on, where your chosen character from the lobby (this I think I know how to do already) will show on the OnHovered-tile and be placed upon a click. When all connected players have done this the first turn will begin (or maybe I will add a button saying ready to begin but that is a minor fix).

                          Do you have any ideas on where to start digging to get this going? I'm thinking some things must be added in the TurnManager of course, but also making some tiles deployable and most not is a big thing. Also, the hover and click actions.
                          Anyways, very tired so sorry if my explanation is scattered. I will clarify if you need it.

                          Cheers man!
                          Mivke

                          Comment


                            Hello, I am new to UE4 (I have looked at most of the needed tutorials and all of yours). I really like this toolkit and I plan on using it for Fire Emblem fangames, but when the time comes for me to make an original license I want to try a different gameplay style. Now that there is an action queue, how flexible would it be to develop a we-go game with simultaneous turns? What I mean by this is that you have a command phase where you plan your actions with no limitations other than that they would take longer to execute, and when you decide your plan you go onto the execution phase and can execute all actions in the order you put them in alongside the AI and other players executing their actions. The reason why I want to do something like this is because I want to make a strategy/fighting game hybrid, where time and execution time is very important as the game is balanced around frame data (Startup, active, recovery, and the move's hit/blockstun) but played like a strategy game so that you can carefully plan every encounter and can have more interesting map design for interactions rather than a 2d plane. I know things like these are possible seeing as there are many simultaneous turn games already, but how feasible would it be to use the toolkit's system for the command phase and then use a modified action queue that makes everything run at the same time in the execution phase?

                            Comment


                              Originally posted by Mivke1 View Post

                              I did as you said and I got it working! Thank god it was an engine bug, I thought I was going mad

                              Ok, so now on to MUCH more fun questions :P I'm looking to make a kind of "deployment phase" before the first turn starts. In this "Deployment Phase" I would like to have a few predetermined tiles that are ok to deploy on, where your chosen character from the lobby (this I think I know how to do already) will show on the OnHovered-tile and be placed upon a click. When all connected players have done this the first turn will begin (or maybe I will add a button saying ready to begin but that is a minor fix).

                              Do you have any ideas on where to start digging to get this going? I'm thinking some things must be added in the TurnManager of course, but also making some tiles deployable and most not is a big thing. Also, the hover and click actions.
                              Anyways, very tired so sorry if my explanation is scattered. I will clarify if you need it.

                              Cheers man!
                              Mivke
                              Great to hear that it works! This was a very tricky bug to fix and I might not have discovered it at all if not for your help, so thanks to you as well!

                              As for your deployment phase, the first thing you would want to do is stopping the start game event in the turn manager from automatically running at startup. It can be called manually whenever you want it to, through a UI button or when a certain number of units have been spawned or whatever.

                              For spawning units during the deployment phase I've made it so that units are automatically centered on the closest tile and assigned a GridIndex value when you use the regular SpawnActor node, so that is the only node you need for that. The easiest place to add this is probably within the click and hover nodes in the player controller. I'm thinking of in the future to add a new ability blueprint that is used by default when there are no active units, which would might an even better place for this sort of functionality, but as long as you make sure the spawn nodes are run server side you should be good.

                              As for only allowing certain tiles to be selectable for deployment I would add a new Set to BP_GridManager containing the allowed grid indexes. When you attempt to spawn a new unit you would use the "contains" node on this set to see if it is allowed.

                              Those are the first steps I would do to add the features you are talking about. Let me know if you have any difficulties implementing them.


                              Originally posted by HaxorViper View Post
                              Hello, I am new to UE4 (I have looked at most of the needed tutorials and all of yours). I really like this toolkit and I plan on using it for Fire Emblem fangames, but when the time comes for me to make an original license I want to try a different gameplay style. Now that there is an action queue, how flexible would it be to develop a we-go game with simultaneous turns? What I mean by this is that you have a command phase where you plan your actions with no limitations other than that they would take longer to execute, and when you decide your plan you go onto the execution phase and can execute all actions in the order you put them in alongside the AI and other players executing their actions. The reason why I want to do something like this is because I want to make a strategy/fighting game hybrid, where time and execution time is very important as the game is balanced around frame data (Startup, active, recovery, and the move's hit/blockstun) but played like a strategy game so that you can carefully plan every encounter and can have more interesting map design for interactions rather than a 2d plane. I know things like these are possible seeing as there are many simultaneous turn games already, but how feasible would it be to use the toolkit's system for the command phase and then use a modified action queue that makes everything run at the same time in the execution phase?
                              Hi HaxorViper. You are correct in assuming that the new update makes making simultaneous turns a lot simpler to implement. The devil is in the details, though, and certain forms of simultaneous turns are a lot simpler to add than others. If the "simulated" server-side actions are still run in sequence and they are just animated in parallel this is quite easy to do. You would just need to make sure that the actions are added to the action queue in the order they should be happening and set any actions that should happen alongside other actions to "withPrevious" in the QueueAction macro.

                              However, if things are happening simultaneously also when it is simulated you run into many of the same difficulties as in previous versions of the toolkit. For instance if you want a unit to move to an index and that unit can potentially be killed by another unit which inputs its action "after" this unit. but kills it midway though the movement you will need to make a lot of modifications to how actions are simulated. You would probably want to have a second step of simulation after the initial simulations where you look at everything that will happen one turn and modify what is happening based on how the simulated actions interact. This is quite tricky, but depending on just how interdependent everything is it should still be possible without completely altering the core of the toolkit.

                              In any case this is a pretty advanced modification, though, and one that I have not attempted yet, which means there might be other issues I am not seeing a priori. Since you are new to UE4 I would recommend you not to tackle this as your first task. Which is why it is great to hear that you want to make Fire Emblem style fan games first. If you complete and release a Fire Emblem style fan game you should have acquired a lot of knowledge both about the toolkit and UE4 more generally, and you should be well equipped to tackle challenging modifications like this.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Originally posted by Monokkel View Post

                                [LEFT][COLOR=#252C2F][FONT=Helvetica][SIZE=13px]
                                Hi HaxorViper. You are correct in assuming that the new update makes making simultaneous turns a lot simpler to implement. The devil is in the details, though, and certain forms of simultaneous turns are a lot simpler to add than others. If the "simulated" server-side actions are still run in sequence and they are just animated in parallel this is quite easy to do. You would just need to make sure that the actions are added to the action queue in the order they should be happening and set any actions that should happen alongside other actions to "withPrevious" in the QueueAction macro.

                                However, if things are happening simultaneously also when it is simulated you run into many of the same difficulties as in previous versions of the toolkit. For instance if you want a unit to move to an index and that unit can potentially be killed by another unit which inputs its action "after" this unit. but kills it midway though the movement you will need to make a lot of modifications to how actions are simulated. You would probably want to have a second step of simulation after the initial simulations where you look at everything that will happen one turn and modify what is happening based on how the simulated actions interact. This is quite tricky, but depending on just how interdependent everything is it should still be possible without completely altering the core of the toolkit.

                                In any case this is a pretty advanced modification, though, and one that I have not attempted yet, which means there might be other issues I am not seeing a priori. Since you are new to UE4 I would recommend you not to tackle this as your first task. Which is why it is great to hear that you want to make Fire Emblem style fan games first. If you complete and release a Fire Emblem style fan game you should have acquired a lot of knowledge both about the toolkit and UE4 more generally, and you should be well equipped to tackle challenging modifications like this.
                                Thanks man, you are right, I am not ready to tackle something that big, I just wanted to make sure that it would be possible to do in the future. I am relieved to hear that it is and I just need to learn how to heavily modify the system. Thanks for the information and I will let you know when I am ready to tackle onto something like this. Cheers!

                                Comment

                                Working...
                                X