Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Phoidy View Post

    Hey OperatorCrux, I had the exact same problem.
    I did however manage to get passed those error messages, but I'm stuck somewhere else now.
    Maybe I can help you with this specific problem, since I struggled with exactly that for a day.
    I will try lend you some visual aid maybe that will help. Basicly it's the same advice Monokkel already gave.
    Thanks for posting what you did, Crux. That is basically what I tried to explain in my post. Only difference is that I changed the class of the reference instead of creating a new one, but the results are of course the same. What are you stuck on now?

    Originally posted by OperatorCrux View Post

    Thank you so much. What i was messing up was the way that I was declaring and setting the variable. I wasn't specifying that it was a reference to the Object Type so it was just routing back to having no reference at all. I was completely overlooking the details panel when trying to change everything around to reference the new stuff. Here's a screenshot of what I did for anyone else who might be searching this thread in the future looking for a fix for the same issue.

    Thanks again Monokkel and Phoidy
    Glad that solved it for you. Is everything working as expected now?

    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Hi,

      I figured a lot of things out since my post from saturday. I think I understand the toolkit much better and already began trying to build my ideas into it. As said I want to do a board game. Different tiles will be assigned different states in the course of a game (for example controlled by player 1 or 2 and so on..). For that I initialize a map with grid indeces as keys and integer values corresponding to the state. From a custom ability I call a function in the grid manager that updates this map - when a state changes. In the Ability-BP where possible targets are determined I changed it to output a set of indeces according to my needs. And in the animate actions part of the Ability-BP I changed the meshes which are supposed to be shown at the possible target indeces. Just to give you a short overview of what I changed. But I don't know what could be responsible for my problem: I tried to print something out after the branch which checks whether the unit is ai controlled and that one gets printed. After that the event Player Activate should be called but the string which is supposed to be printed directly after the Player Activate event doesn't show up. What could be the reason the event doesn't start? There is nothing between the two Print to Stings other than the event call and the event.

      I tried connecting the execution path (if that's what you call it) coming from the ai check branch to the first node in the Player Activate part and then the meshes are shown on the correct tiles. But I guess there is a reason this is not directly connected that I'm just not seeing?

      Edit: I made my additions in the same project in which I started fiddling around with it. Maybe I changed something without knowing it. Is there any easy way I could export my own functions and everything I changed without building up everything part by part again?

      --------------------

      I was able to go on while connecting the the Activate and PlayerActivate parts directly in the Ability Blueprint. I made a new event which fires simultaneously and goes to the specific abilities (I guess that is the reason there is no direct connection in the ability bp?).
      But while I am now able to spawn my markers by clicking the rules I tried to implement to check which tiles should get a marker when clicked and which shouldn't
      don't seem to work. I think it is because my array/map located in the grid manager doesn't get updated properly. I am making changes to the map on every turn (I want to be able to click several tiles in one turn later - depending on AP) in the ability blueprints and I want to access the changed map in later turns. Is there a principal problem with that or would that be possible if I do in the right way?

      Thanks for helping!!
      Last edited by izckl; 06-22-2018, 12:52 PM.

      Comment


        Originally posted by Monokkel View Post

        Thanks for posting what you did, Crux. That is basically what I tried to explain in my post. Only difference is that I changed the class of the reference instead of creating a new one, but the results are of course the same. What are you stuck on now?
        I guess with Crux you mean me

        I'm happy to hear it was helpful for OperatorCrux.

        I'm still stuck with getting my custom characters to move:
        I made a blendspace (1D) with the same specs as the ones you use (speed 0-600, idle, walk and run at the same position, preview works fine).
        What i see now when I move a character is they are in idle animation (so the first part of the blendspace works), but they slide to another location instead of walking.
        Somehow the walking part of the blendspace isn't triggered or there is a problem in my ABP somewhere.
        I haven't worked on it for a few days, but I will dive into it again tomorrow.
        If you have any suggestions I'd love to hear them
        Last edited by Phoidy; 06-21-2018, 09:42 AM.

        Comment


          Originally posted by izckl View Post
          Hi,

          I figured a lot of things out since my post from saturday. I think I understand the toolkit much better and already began trying to build my ideas into it. As said I want to do a board game. Different tiles will be assigned different states in the course of a game (for example controlled by player 1 or 2 and so on..). For that I initialize a map with grid indeces as keys and integer values corresponding to the state. From a custom ability I call a function in the grid manager that updates this map - when a state changes. In the Ability-BP where possible targets are determined I changed it to output a set of indeces according to my needs. And in the animate actions part of the Ability-BP I changed the meshes which are supposed to be shown at the possible target indeces. Just to give you a short overview of what I changed. But I don't know what could be responsible for my problem: I tried to print something out after the branch which checks whether the unit is ai controlled and that one gets printed. After that the event Player Activate should be called but the string which is supposed to be printed directly after the Player Activate event doesn't show up. What could be the reason the event doesn't start? There is nothing between the two Print to Stings other than the event call and the event.

          I tried connecting the execution path (if that's what you call it) coming from the ai check branch to the first node in the Player Activate part and then the meshes are shown on the correct tiles. But I guess there is a reason this is not directly connected that I'm just not seeing?

          Edit: I made my additions in the same project in which I started fiddling around with it. Maybe I changed something without knowing it. Is there any easy way I could export my own functions and everything I changed without building up everything part by part again?

          I have the same problem now between the event ActivateUnitAbility in the Unit and Ability System Blueprint. I guess I broke something somewhere?

          Thanks for helping!!
          Hey, sorry for the late reply. Adding a print string should not break any execution chains, so I don't really know what is happening here. Are you modifying BP_Ability directly? If you are using a child blueprint of BP_Ability which overrides PlayerActivate then the PlayerActivate nodes in BP_Ability will not trigger. Where exactly are these print string nodes placed?

          Originally posted by Phoidy View Post

          I guess with Crux you mean me

          I'm happy to hear it was helpful for OperatorCrux.

          I'm still stuck with getting my custom characters to move:
          I made a blendspace (1D) with the same specs as the ones you use (speed 0-600, idle, walk and run at the same position, preview works fine).
          What i see now when I move a character is they are in idle animation (so the first part of the blendspace works), but they slide to another location instead of walking.
          Somehow the walking part of the blendspace isn't triggered or there is a problem in my ABP somewhere.
          I haven't worked on it for a few days, but I will dive into it again tomorrow.
          If you have any suggestions I'd love to hear them
          Oops, sorry. Swapped the names out while typing. Hard to know what part you might be missing as you seem to be doing all the steps that I did and which work on my end. Perhaps try deleting and re-adding a couple of things so that you know that the correct references are being used? In your custom unit blueprint make sure the MulticastMoveAnimation calls the Animate movement interface function from the correct reference. Make sure it is the interface event that is called and not something else. Ensure that the abp was compiled with the interface added before adding the call to this event. Try printing the input and output of the speed variable and see if it has the correct value. In your animation blueprint, check your blend space and make sure that the animation changes appropriately when you alter the balue within the timeline. Check that you are using the correct blendspace within the state machine and try deleting and re-adding the reference to the speed variable in the blendspace. That is all I can think of now as, like I said, you seem to have done all the right stuff, and it works for me.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Originally posted by Monokkel View Post
            Oops, sorry. Swapped the names out while typing. Hard to know what part you might be missing as you seem to be doing all the steps that I did and which work on my end. Perhaps try deleting and re-adding a couple of things so that you know that the correct references are being used? In your custom unit blueprint make sure the MulticastMoveAnimation calls the Animate movement interface function from the correct reference. Make sure it is the interface event that is called and not something else. Ensure that the abp was compiled with the interface added before adding the call to this event. Try printing the input and output of the speed variable and see if it has the correct value. In your animation blueprint, check your blend space and make sure that the animation changes appropriately when you alter the balue within the timeline. Check that you are using the correct blendspace within the state machine and try deleting and re-adding the reference to the speed variable in the blendspace. That is all I can think of now as, like I said, you seem to have done all the right stuff, and it works for me.
            I'm happy to report I was finally able to fix this problem.
            Ofcourse now that I found it I feel like such a noob, but I will report it anyway in case someone is wondering:
            In the event graph of my custom ABP I had a wrong event casting to the speed variable.
            I changed the custom_event_1 to the Event Animate Movement and it worked right away.
            Some screenshots to clarify included

            Thanks again for your help Monokkel! your suggestions were pointing me in the right direction.
            Attached Files
            Last edited by Phoidy; 06-23-2018, 10:03 AM.

            Comment


              Originally posted by Phoidy View Post

              I'm happy to report I was finally able to fix this problem.
              Ofcourse now that I found it I feel like such a noob, but I will report it anyway in case someone is wondering:
              In the event graph of my custom ABP I had a wrong event casting to the speed variable.
              I changed the custom_event_1 to the Event Animate Movement and it worked right away.
              Some screenshots to clarify included

              Thanks again for your help Monokkel! your suggestions were pointing me in the right direction.
              Glad to hear you fixed it. Whenever I spend hours trying to fix some bug it is usually always some small thing like that. That is why I asked you to check if it was the interface event that was called and not something else. I'm guessing what happened is that you copied all nodes, including interface events, from an actor that implemented the interface to one that did not do so yet. Since UE4 could not find the interface it created new event nodes instead, which will of course not be called by other actors attempting to call the interface.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Originally posted by Monokkel View Post

                I tried replicating your blueprints and it is working on my end. Made a separate level for the menu, added a widget with a start game button to the viewport from the level blueprint and run OpenLevel(Example) on click. Might it be something in how you set up your level? What happens if you load my example level instead? Are you playing in standalone?
                I made a new project with an empty level of the toolkit and a menu that you could look at.

                This is google drive folder with that project so you could check
                https://drive.google.com/drive/folde...GU?usp=sharing

                I also made a video capture of me doing that

                https://youtu.be/qH_l7912Nck

                Comment


                  Originally posted by Seruvv View Post

                  I made a new project with an empty level of the toolkit and a menu that you could look at.

                  This is google drive folder with that project so you could check
                  https://drive.google.com/drive/folde...GU?usp=sharing

                  I also made a video capture of me doing that

                  https://youtu.be/qH_l7912Nck
                  Ah, I see. I misunderstood the trouble you were having. The reason you are seeing this error is because the default game mode in the config files of a fresh ATBTT project is BP_ATBTT. BP_ATBTT has an event begin play event that looks for the grid manager. To stop this error message from occuring modify BP_ATBTT so it does not run all its EventBeginPlay nodes when it spawns, but rather from a custom event you can trigger when you want.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Hi Monokkel,there is a issue i found in "Find Overlapping Tile Locations"function. "start location" is a world location, and you forgot to turn it to relative location. may be we can use the third picture.By the way , This toolkit is so cool, i love it very much, thank you for your hard work and tutorial. last , please forgive me ,my English is not well.

                    Comment


                      Hi Monokkel, I've finally saw your splendid work on advanced AI, congrats for that.
                      In our game, the main character, AI or human, starts alone and then he has to spawn servants to gain mana and tactical advance.

                      Should I considerely disrupt your AI system to achieve that? Or simply put an additional "is main character alone" in the head of BP_Ability Ability Assesment flow should work for that?
                      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


                        Hi Monokkel,

                        Firstly, thank you for taking the time to create this toolkit and for also creating some very informative videos! For a novice with UE4 such as myself, it has actually been an invaluable teaching resource for my working on RTS and Simulation-type games.

                        I just have a question, though, and it is regards the 2D dungeon crawler project. How have you managed to distinguish walls and other obstacles from the rest of the tilemap? My understanding of Paper2D is that you can't query individual tiles in such a way to do this neatly.

                        Cheers,
                        Kieran

                        Comment


                          Originally posted by Wisdom-HELLy View Post
                          Hi Monokkel, I've finally saw your splendid work on advanced AI, congrats for that.
                          In our game, the main character, AI or human, starts alone and then he has to spawn servants to gain mana and tactical advance.

                          Should I considerely disrupt your AI system to achieve that? Or simply put an additional "is main character alone" in the head of BP_Ability Ability Assesment flow should work for that?
                          Thanks for the kind words. The AI system is one of the things I have spent the most time on and it is somewhat hidden since I have not had the time to make a video delving into it yet.

                          You could achieve the effect you want in the way you describe it. If you are not using the advanced ability component used in the JungleRaid map this is the way to do it. However, if you want to do it closer to how I intended it I would use the ability system component and create the spawn servant ability as a separate ability. In the evaluate ability event for this ability you can calculate whatever conditions would make the AI consider spawning a servant to be more or less valuable. Then you would return a value between 0 and 1 based on these factors (maybe look at the heal ability for the simplest example). If the spawn servant ability is in the ability array of an AI unit's ability system component it will consider this value against the values of its other ability and select the best one dependent on the situation it is in.

                          Originally posted by Kasa27 View Post
                          Hi Monokkel,

                          Firstly, thank you for taking the time to create this toolkit and for also creating some very informative videos! For a novice with UE4 such as myself, it has actually been an invaluable teaching resource for my working on RTS and Simulation-type games.

                          I just have a question, though, and it is regards the 2D dungeon crawler project. How have you managed to distinguish walls and other obstacles from the rest of the tilemap? My understanding of Paper2D is that you can't query individual tiles in such a way to do this neatly.

                          Cheers,
                          Kieran
                          Happy to hear that my toolkit can also be useful to people making different genres of games

                          For the 2D collision thing you should take a look at the tilemaps. Tilemaps can have multiple layers and it is possible to define a collision thickness for each layer and to specify which tiles should have collision. For the 2D example I have made it so ground tiles block pathTrace to indicate that they are walkable, while wall tiles block wallTrace. When using my procedural system for generating a walkability map (by setting heightmap and bTraceForWalls to true in the public variables of BP_GridManager) this gives the result you see in the 2D example map.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            Originally posted by JinPengfei View Post
                            Hi Monokkel,there is a issue i found in "Find Overlapping Tile Locations"function. "start location" is a world location, and you forgot to turn it to relative location. may be we can use the third picture.By the way , This toolkit is so cool, i love it very much, thank you for your hard work and tutorial. last , please forgive me ,my English is not well.
                            Whoops, I did not see your comment until now for whatever reason. Sorry. Thanks a lot for reporting this! I will look into it and fix it.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post

                              Whoops, I did not see your comment until now for whatever reason. Sorry. Thanks a lot for reporting this! I will look into it and fix it.
                              I forgot to say ,i used 4.19.2 version,and it seems like some more bugs exist in this version,such like move between three tiles,like the picture i uploaded.The indexes of tiles are 12、13、27,and height impassable cut off is 300, the height between 27 and 12 is more than Height between levels, but the character can not move to 27, he can only move to 12 from 13.
                              Now i change the version 4.18.1, everything is fine.

                              Comment


                                Originally posted by JinPengfei View Post

                                I forgot to say ,i used 4.19.2 version,and it seems like some more bugs exist in this version,such like move between three tiles,like the picture i uploaded.The indexes of tiles are 12、13、27,and height impassable cut off is 300, the height between 27 and 12 is more than Height between levels, but the character can not move to 27, he can only move to 12 from 13.
                                Now i change the version 4.18.1, everything is fine.
                                Yeah, this seems like a bug. I am currently away from home, but I will look into this when I return this weekend. Thanks for letting me know.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X