Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Thanks also after I've used these abilities for some reason they don't take any damage, I looked at BP_Unit's Take Damage function and it should work as the Damage Variable is at 35. The logic should work as they are doing the animations for taking damage then it should give the damage as it should through the toolkit's base code/blueprints but it just doesn't. Any idea of why this could be happening and a solution?

    Thanks again, EagleEyeGamma.

    Comment


      Originally posted by EagleEyeGamma View Post
      Thanks also after I've used these abilities for some reason they don't take any damage, I looked at BP_Unit's Take Damage function and it should work as the Damage Variable is at 35. The logic should work as they are doing the animations for taking damage then it should give the damage as it should through the toolkit's base code/blueprints but it just doesn't. Any idea of why this could be happening and a solution?

      Thanks again, EagleEyeGamma.
      Could be a few different things based on what you're saying. Have you seen my tutorials videos on the action system? Might you be only changing CurrentHealth without changing the health bar through an Action? Have you tried printing the value of CurrentHealth and seen if it is changed?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        I looked at the default toolkit with no modifications to figure out the problem however, my next question is that example of the elemental weakness how can i find the attacker unit's type and apply that into the damage?

        Thanks, EagleEyeGamma.

        Comment


          Originally posted by Monokkel View Post

          Hmm, it should spawn normally as the assigned default pawn class. You're using BP_ATBTT as the game mode? How does the game look when you start? What camera seems to be possessed?

          As for the mobile stuff I found out why I'm not able to run it properly on my phone, and that is because the USB port on my phone is slightly wonky, causing it to disconnect and reconnect sporadically... This cancels my attempts to test on mobile. A silly reason, I know, but it is holding me up currently. I'll see if I can borrow someones phone to test it out.
          I got the camera issue figured out

          Another question for you!

          If I had a PlayerTurnArray of BP_PlayerControllers passed into the BP_TurnManager Initialize function to declare the player turn order, how can I make it so that the units belonging to the player at the beginning of the PlayerTurnArray go first? The card system I have declares a random player to go first, so I want to make sure the 2 turn managers are in sync as far as who is going first and who is going second.

          Thanks!

          Comment


            Originally posted by EagleEyeGamma View Post
            I looked at the default toolkit with no modifications to figure out the problem however, my next question is that example of the elemental weakness how can i find the attacker unit's type and apply that into the damage?

            Thanks, EagleEyeGamma.
            There are no unit types by default in the toolkit, but if you implement it like my recent suggestion you can access it through any reference to the unit. In an ability what often makes sense is to either access the OwningUnit of the ability or the target unit by finding the reference in GridUnits using the TargetIndex variable.

            Originally posted by Zennisin View Post

            I got the camera issue figured out

            Another question for you!

            If I had a PlayerTurnArray of BP_PlayerControllers passed into the BP_TurnManager Initialize function to declare the player turn order, how can I make it so that the units belonging to the player at the beginning of the PlayerTurnArray go first? The card system I have declares a random player to go first, so I want to make sure the 2 turn managers are in sync as far as who is going first and who is going second.

            Thanks!
            Good to hear you fixed your camera issues

            For sorting what players go first you can get the player controller order list from the card game template (which it seems like it has) you could loop through these and have a nested loop where you loop through the units in initiative. Within this nested loop you would check if the units are owned by the player controller in the outer loop, and if so add the faction of that unit to the FactionOrder array (breaking off after finding one valid unit). I think that should do the trick. Be sure to do this after the AssignUnitsToPlayers function, but before StartMatch.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Hi, hope all is well.

              Currently, I'm using the toolkit to have units prespawned for each team, i've dragged them onto the grid onto the appropriate starting tile, and depending on which Unit Type a player chooses from a WBP menu before the game starts, it is changing the attributes of the prespawned unit (defense, attack, Unit Name, etc) to reflect the player's choice.

              I'm looking to be extend this functionality to Unit's abilitiies. Currently, I can change the unit's abilities from the details panel in the ability system in the world outliner, but this would be static and would be the same no matter what the player chooses for the Unit Type.

              I'd like to be able to have a unique ability to be added depending on what Unit was chosen at the beginning of the game (similarly to how unique stats and names are being set currently). I'm having trouble getting this to work, I've been trying to watch the first ability system video and using nodes like Add Ability, Set Array Element, Update Ability Box etc, but can't get it to work.

              Thanks!

              Comment


                Originally posted by behappyandsm1le View Post
                Hi, hope all is well.

                Currently, I'm using the toolkit to have units prespawned for each team, i've dragged them onto the grid onto the appropriate starting tile, and depending on which Unit Type a player chooses from a WBP menu before the game starts, it is changing the attributes of the prespawned unit (defense, attack, Unit Name, etc) to reflect the player's choice.

                I'm looking to be extend this functionality to Unit's abilitiies. Currently, I can change the unit's abilities from the details panel in the ability system in the world outliner, but this would be static and would be the same no matter what the player chooses for the Unit Type.

                I'd like to be able to have a unique ability to be added depending on what Unit was chosen at the beginning of the game (similarly to how unique stats and names are being set currently). I'm having trouble getting this to work, I've been trying to watch the first ability system video and using nodes like Add Ability, Set Array Element, Update Ability Box etc, but can't get it to work.

                Thanks!
                Hey, I can see why this is a bit tricky. This functionality should probably exist as a function in the base toolkit. I have made such a function now that does what you want:



                This will not show up in the ability bar until the next time UpdateInitiativeBar is called in the TurnManager, so if you run the above function on the active unit and want it to show up immediately, make sure to call that function straight after.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Awesome, thanks!

                  Comment


                    Originally posted by Monokkel View Post

                    Hi there! I'm a DM myself, so I wish you luck on your game By your request I've made a setup for assigning specific units to cameras of clients. It is a bit more hacky than I would like, but it should work. I've added a new function to BP_TurnManager which loops through all grid cameras, finds the ones not controller by the server and assign a unit controller by that player to each one:




                    .
                    Ok that gave me the desired result with the camera, but now on pawn initiative, the camera changes the focus to the "pawn with the initiative" and won't change back to the "Hero Pawn"
                    *edit* it also takes control away from the player in the process.

                    Comment


                      Hey, would love to get your input on a question I had with regards to the corner objects you helped me make. I'm looking to have them block pathfinding across the diagonal that they rest on, both for movement and for the finding tiles in range for some abilities. Do you think this would be doable? Thx
                      Last edited by behappyandsm1le; 11-04-2019, 03:36 AM.

                      Comment


                        hey, so i dont know if someone already ask but, how we can spawn more "minions" during the game ? i want to start a basic game like risk

                        Comment


                          Sorry about the very late reply, people. Was busy all weekend.

                          Originally posted by consummate707 View Post

                          Ok that gave me the desired result with the camera, but now on pawn initiative, the camera changes the focus to the "pawn with the initiative" and won't change back to the "Hero Pawn"
                          *edit* it also takes control away from the player in the process.
                          Hmm, not entirely sure if I know what you're saying here. What do you mean with "on pawn initiative" and "pawn with the initiative"? Do you mean that when a new unit is selected that is not controlled by the client, the camera focuses on this unit instead of staying focused on the unit specified as that client's hero unit? How precisely do you want the end result to behave?

                          Originally posted by behappyandsm1le View Post
                          Hey, would love to get your input on a question I had with regards to the corner objects you helped me make. I'm looking to have them block pathfinding across the diagonal that they rest on, both for movement and for the finding tiles in range for some abilities. Do you think this would be doable? Thx
                          Sure, that is possible. Having it block visibility for finding tiles in range is easy. Just add collision to the corner thingy and have it block the RangeTrace trace channel.

                          Pathfinding is a bit more difficult. You essentially need to remove the edges from each of the surrounding tiles that pass through the corner where your actor is placed, and then re-add them when the actor is moved.

                          Since your corner actors always have a straightforward relationship with the surrounding tiles you can make this simpler by hardcoding it. The grid indexes of the surrounding tiles relative to the corner actor will depend on how you chose to offset the actor, but if it is offset to the south-east (positively on the X and Y axes) the surrounding tiles will have relative grid indexes 0, 1, 1000 and 1001. You could go through these tiles in the GridEdges TMap and use RemoveEdgeBothWays on two of the tiles to remove the diagonal crossing through your corner actor. If you have offset the actor as described above you will run RemoveEdge with the following parameters:

                          RemoveEdgeBothWays(GridIndex,GridIndex+1001) & RemoveEdgeBothWays(GridIndex+1000,GridIndex+1).

                          When your corner actor is moved or destroyed you would run AddEdgeBothWays with the same inputs.

                          Note that this will only affect RunPathfinding and FindTilesInRange the next time these are called. If you have a currently active unit displaying move or sight range when you make these changes, you need to re-run pathfinding/visibility for it to take effect.

                          Originally posted by M4RKSK1 View Post
                          hey, so i dont know if someone already ask but, how we can spawn more "minions" during the game ? i want to start a basic game like risk
                          Should be as simple as using SpawnActor. The construction script of BP_Unit has exposed variables where you can decide if the unit is to be automatically added to the grid and/or initiative order.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            Thanks for your reply. I'm still having trouble getting it to stop finding tiles in range past this corner object. My Find Tiles in Range function works in straight lines (including diagonals) similar to the example you used in the Finding Tiles video. Could this be because my corner objects are not being stored in the Grid Index? Here are my collision settings and a screenshot of it successfully finding a tile through the corner object.

                            Additionally, do you think it's easy to add in functionality so that one faction can pathfind/find tiles through certain objects and one faction can't. Appreciate it!

                            Click image for larger version

Name:	Screen-Shot-20191105-at-11.26.20-AM.png
Views:	76
Size:	64.6 KB
ID:	1682926
                            Click image for larger version

Name:	Screen-Shot-20191105-at-11.26.49-AM.png
Views:	75
Size:	21.6 KB
ID:	1682925
                            Attached Files

                            Comment


                              Originally posted by behappyandsm1le View Post
                              Thanks for your reply. I'm still having trouble getting it to stop finding tiles in range past this corner object. My Find Tiles in Range function works in straight lines (including diagonals) similar to the example you used in the Finding Tiles video. Could this be because my corner objects are not being stored in the Grid Index? Here are my collision settings and a screenshot of it successfully finding a tile through the corner object.
                              Hmm, it should work. I'm guessing your mesh might not be set up properly for collision? To test this, try adding a collision box component to your actor that blocks RangeTrace.

                              Originally posted by behappyandsm1le View Post
                              Additionally, do you think it's easy to add in functionality so that one faction can pathfind/find tiles through certain objects and one faction can't. Appreciate it!
                              This is certainly possible. The simplest way is to add a new custom pathfinding type. You can start by modifying SearchAndAddTileCustom1 and add more as needed. If you look in this function you'll see how tiles are evaluated through several branches before they are added as tiles in move range. You can add more branches here that test against custom conditions. Beware that this is the most performance sensitive area of the entire toolkit, so make sure to keep the checks to a minimum and avoid expensive operations like casting.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                Hello. Monokkel

                                I have multiple questions.First, I'm not sure how this occurred in my project but if the AI doesn't reach its intended target to attack for some reason it won't end its turn when it should.
                                Second, how do you make it so that you can make certain animation that aren't part of the toolkit trigger the same mechanics such as damaging other units, death and movement. Lastly, from those last two examples Ability Elemental Attack and the Ability Attack Repeat I combined them together and now I was wonder where can change it so you can move again after you attack.

                                Many thanks, EagleEyeGamma.

                                Comment

                                Working...
                                X